161847f8eSopenharmony_ci/* 261847f8eSopenharmony_ci * Copyright (c) 2023 Huawei Device Co., Ltd. 361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 461847f8eSopenharmony_ci * you may not use this file except in compliance with the License. 561847f8eSopenharmony_ci * You may obtain a copy of the License at 661847f8eSopenharmony_ci * 761847f8eSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 861847f8eSopenharmony_ci * 961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and 1361847f8eSopenharmony_ci * limitations under the License. 1461847f8eSopenharmony_ci */ 1561847f8eSopenharmony_ci 1661847f8eSopenharmony_ci/** 1761847f8eSopenharmony_ci * @file 1861847f8eSopenharmony_ci * @kit ArkUI 1961847f8eSopenharmony_ci */ 2061847f8eSopenharmony_ci 2161847f8eSopenharmony_ci/** 2261847f8eSopenharmony_ci * Enum for the counter type. 2361847f8eSopenharmony_ci * 2461847f8eSopenharmony_ci * @enum { number } 2561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 2661847f8eSopenharmony_ci * @crossplatform 2761847f8eSopenharmony_ci * @since 11 2861847f8eSopenharmony_ci */ 2961847f8eSopenharmony_ci /** 3061847f8eSopenharmony_ci * Enum for the counter type. 3161847f8eSopenharmony_ci * 3261847f8eSopenharmony_ci * @enum { number } 3361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 3461847f8eSopenharmony_ci * @crossplatform 3561847f8eSopenharmony_ci * @atomicservice 3661847f8eSopenharmony_ci * @since 12 3761847f8eSopenharmony_ci */ 3861847f8eSopenharmony_cideclare enum CounterType { 3961847f8eSopenharmony_ci /** 4061847f8eSopenharmony_ci * List counter. 4161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 4261847f8eSopenharmony_ci * @crossplatform 4361847f8eSopenharmony_ci * @since 11 4461847f8eSopenharmony_ci */ 4561847f8eSopenharmony_ci /** 4661847f8eSopenharmony_ci * List counter. 4761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 4861847f8eSopenharmony_ci * @crossplatform 4961847f8eSopenharmony_ci * @atomicservice 5061847f8eSopenharmony_ci * @since 12 5161847f8eSopenharmony_ci */ 5261847f8eSopenharmony_ci LIST = 0, 5361847f8eSopenharmony_ci 5461847f8eSopenharmony_ci /** 5561847f8eSopenharmony_ci * Compact counter. 5661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 5761847f8eSopenharmony_ci * @crossplatform 5861847f8eSopenharmony_ci * @since 11 5961847f8eSopenharmony_ci */ 6061847f8eSopenharmony_ci /** 6161847f8eSopenharmony_ci * Compact counter. 6261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 6361847f8eSopenharmony_ci * @crossplatform 6461847f8eSopenharmony_ci * @atomicservice 6561847f8eSopenharmony_ci * @since 12 6661847f8eSopenharmony_ci */ 6761847f8eSopenharmony_ci COMPACT = 1, 6861847f8eSopenharmony_ci 6961847f8eSopenharmony_ci /** 7061847f8eSopenharmony_ci * Inline counter. 7161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 7261847f8eSopenharmony_ci * @crossplatform 7361847f8eSopenharmony_ci * @since 11 7461847f8eSopenharmony_ci */ 7561847f8eSopenharmony_ci /** 7661847f8eSopenharmony_ci * Inline counter. 7761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 7861847f8eSopenharmony_ci * @crossplatform 7961847f8eSopenharmony_ci * @atomicservice 8061847f8eSopenharmony_ci * @since 12 8161847f8eSopenharmony_ci */ 8261847f8eSopenharmony_ci INLINE = 2, 8361847f8eSopenharmony_ci 8461847f8eSopenharmony_ci /** 8561847f8eSopenharmony_ci * Date inline counter. 8661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 8761847f8eSopenharmony_ci * @crossplatform 8861847f8eSopenharmony_ci * @since 11 8961847f8eSopenharmony_ci */ 9061847f8eSopenharmony_ci /** 9161847f8eSopenharmony_ci * Date inline counter. 9261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 9361847f8eSopenharmony_ci * @crossplatform 9461847f8eSopenharmony_ci * @atomicservice 9561847f8eSopenharmony_ci * @since 12 9661847f8eSopenharmony_ci */ 9761847f8eSopenharmony_ci INLINE_DATE = 3 9861847f8eSopenharmony_ci} 9961847f8eSopenharmony_ci 10061847f8eSopenharmony_ci/** 10161847f8eSopenharmony_ci * Defines the common options. 10261847f8eSopenharmony_ci * 10361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 10461847f8eSopenharmony_ci * @crossplatform 10561847f8eSopenharmony_ci * @since 11 10661847f8eSopenharmony_ci */ 10761847f8eSopenharmony_ci /** 10861847f8eSopenharmony_ci * Defines the common options. 10961847f8eSopenharmony_ci * 11061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 11161847f8eSopenharmony_ci * @crossplatform 11261847f8eSopenharmony_ci * @atomicservice 11361847f8eSopenharmony_ci * @since 12 11461847f8eSopenharmony_ci */ 11561847f8eSopenharmony_cideclare class CommonOptions { 11661847f8eSopenharmony_ci /** 11761847f8eSopenharmony_ci * Set the focusable of the counter component. 11861847f8eSopenharmony_ci * @type { ?boolean } 11961847f8eSopenharmony_ci * @default true 12061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 12161847f8eSopenharmony_ci * @crossplatform 12261847f8eSopenharmony_ci * @since 11 12361847f8eSopenharmony_ci */ 12461847f8eSopenharmony_ci /** 12561847f8eSopenharmony_ci * Set the focusable of the counter component. 12661847f8eSopenharmony_ci * @type { ?boolean } 12761847f8eSopenharmony_ci * @default true 12861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 12961847f8eSopenharmony_ci * @crossplatform 13061847f8eSopenharmony_ci * @atomicservice 13161847f8eSopenharmony_ci * @since 12 13261847f8eSopenharmony_ci */ 13361847f8eSopenharmony_ci focusable?: boolean; 13461847f8eSopenharmony_ci 13561847f8eSopenharmony_ci /** 13661847f8eSopenharmony_ci * Set the step of the couter component, ranges greater than or equal to 1 13761847f8eSopenharmony_ci * 13861847f8eSopenharmony_ci * @type { ?number } 13961847f8eSopenharmony_ci * @default 1 14061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 14161847f8eSopenharmony_ci * @crossplatform 14261847f8eSopenharmony_ci * @since 11 14361847f8eSopenharmony_ci */ 14461847f8eSopenharmony_ci /** 14561847f8eSopenharmony_ci * Set the step of the couter component, ranges greater than or equal to 1 14661847f8eSopenharmony_ci * 14761847f8eSopenharmony_ci * @type { ?number } 14861847f8eSopenharmony_ci * @default 1 14961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 15061847f8eSopenharmony_ci * @crossplatform 15161847f8eSopenharmony_ci * @atomicservice 15261847f8eSopenharmony_ci * @since 12 15361847f8eSopenharmony_ci */ 15461847f8eSopenharmony_ci step?: number; 15561847f8eSopenharmony_ci 15661847f8eSopenharmony_ci /** 15761847f8eSopenharmony_ci * Trigger a mouse hover event at the increased button. 15861847f8eSopenharmony_ci * 15961847f8eSopenharmony_ci * @type { ?function } 16061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 16161847f8eSopenharmony_ci * @crossplatform 16261847f8eSopenharmony_ci * @since 11 16361847f8eSopenharmony_ci */ 16461847f8eSopenharmony_ci /** 16561847f8eSopenharmony_ci * Trigger a mouse hover event at the increased button. 16661847f8eSopenharmony_ci * 16761847f8eSopenharmony_ci * @type { ?function } 16861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 16961847f8eSopenharmony_ci * @crossplatform 17061847f8eSopenharmony_ci * @atomicservice 17161847f8eSopenharmony_ci * @since 12 17261847f8eSopenharmony_ci */ 17361847f8eSopenharmony_ci onHoverIncrease?: (isHover: boolean) => void; 17461847f8eSopenharmony_ci 17561847f8eSopenharmony_ci /** 17661847f8eSopenharmony_ci * Trigger a mouse hover event at the decreased button. 17761847f8eSopenharmony_ci * 17861847f8eSopenharmony_ci * @type { ?function } 17961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 18061847f8eSopenharmony_ci * @crossplatform 18161847f8eSopenharmony_ci * @since 11 18261847f8eSopenharmony_ci */ 18361847f8eSopenharmony_ci /** 18461847f8eSopenharmony_ci * Trigger a mouse hover event at the decreased button. 18561847f8eSopenharmony_ci * 18661847f8eSopenharmony_ci * @type { ?function } 18761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 18861847f8eSopenharmony_ci * @crossplatform 18961847f8eSopenharmony_ci * @atomicservice 19061847f8eSopenharmony_ci * @since 12 19161847f8eSopenharmony_ci */ 19261847f8eSopenharmony_ci onHoverDecrease?: (isHover: boolean) => void; 19361847f8eSopenharmony_ci} 19461847f8eSopenharmony_ci 19561847f8eSopenharmony_ci/** 19661847f8eSopenharmony_ci * Defines the inline style options. 19761847f8eSopenharmony_ci * 19861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 19961847f8eSopenharmony_ci * @crossplatform 20061847f8eSopenharmony_ci * @since 11 20161847f8eSopenharmony_ci */ 20261847f8eSopenharmony_ci /** 20361847f8eSopenharmony_ci * Defines the inline style options. 20461847f8eSopenharmony_ci * 20561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 20661847f8eSopenharmony_ci * @crossplatform 20761847f8eSopenharmony_ci * @atomicservice 20861847f8eSopenharmony_ci * @since 12 20961847f8eSopenharmony_ci */ 21061847f8eSopenharmony_cideclare class InlineStyleOptions extends CommonOptions { 21161847f8eSopenharmony_ci /** 21261847f8eSopenharmony_ci * Set initial value of the counter component, ranges from min to max. 21361847f8eSopenharmony_ci * 21461847f8eSopenharmony_ci * @type { ?number } 21561847f8eSopenharmony_ci * @default 0 21661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 21761847f8eSopenharmony_ci * @crossplatform 21861847f8eSopenharmony_ci * @since 11 21961847f8eSopenharmony_ci */ 22061847f8eSopenharmony_ci /** 22161847f8eSopenharmony_ci * Set initial value of the counter component, ranges from min to max. 22261847f8eSopenharmony_ci * 22361847f8eSopenharmony_ci * @type { ?number } 22461847f8eSopenharmony_ci * @default 0 22561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 22661847f8eSopenharmony_ci * @crossplatform 22761847f8eSopenharmony_ci * @atomicservice 22861847f8eSopenharmony_ci * @since 12 22961847f8eSopenharmony_ci */ 23061847f8eSopenharmony_ci value?: number; 23161847f8eSopenharmony_ci 23261847f8eSopenharmony_ci /** 23361847f8eSopenharmony_ci * Set minimum value of the counter component 23461847f8eSopenharmony_ci * 23561847f8eSopenharmony_ci * @type { ?number } 23661847f8eSopenharmony_ci * @default 0 23761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 23861847f8eSopenharmony_ci * @crossplatform 23961847f8eSopenharmony_ci * @since 11 24061847f8eSopenharmony_ci */ 24161847f8eSopenharmony_ci /** 24261847f8eSopenharmony_ci * Set minimum value of the counter component 24361847f8eSopenharmony_ci * 24461847f8eSopenharmony_ci * @type { ?number } 24561847f8eSopenharmony_ci * @default 0 24661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 24761847f8eSopenharmony_ci * @crossplatform 24861847f8eSopenharmony_ci * @atomicservice 24961847f8eSopenharmony_ci * @since 12 25061847f8eSopenharmony_ci */ 25161847f8eSopenharmony_ci min?: number; 25261847f8eSopenharmony_ci 25361847f8eSopenharmony_ci /** 25461847f8eSopenharmony_ci * Set maximum value of the counter component 25561847f8eSopenharmony_ci * 25661847f8eSopenharmony_ci * @type { ?number } 25761847f8eSopenharmony_ci * @default 999 25861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 25961847f8eSopenharmony_ci * @crossplatform 26061847f8eSopenharmony_ci * @since 11 26161847f8eSopenharmony_ci */ 26261847f8eSopenharmony_ci /** 26361847f8eSopenharmony_ci * Set maximum value of the counter component 26461847f8eSopenharmony_ci * 26561847f8eSopenharmony_ci * @type { ?number } 26661847f8eSopenharmony_ci * @default 999 26761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 26861847f8eSopenharmony_ci * @crossplatform 26961847f8eSopenharmony_ci * @atomicservice 27061847f8eSopenharmony_ci * @since 12 27161847f8eSopenharmony_ci */ 27261847f8eSopenharmony_ci max?: number; 27361847f8eSopenharmony_ci 27461847f8eSopenharmony_ci /** 27561847f8eSopenharmony_ci * Set text width of the counter component, ranges greater than or equal to 0 27661847f8eSopenharmony_ci * 27761847f8eSopenharmony_ci * @type { ?number } 27861847f8eSopenharmony_ci * @default 0 27961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 28061847f8eSopenharmony_ci * @crossplatform 28161847f8eSopenharmony_ci * @since 11 28261847f8eSopenharmony_ci */ 28361847f8eSopenharmony_ci /** 28461847f8eSopenharmony_ci * Set text width of the counter component, ranges greater than or equal to 0 28561847f8eSopenharmony_ci * 28661847f8eSopenharmony_ci * @type { ?number } 28761847f8eSopenharmony_ci * @default 0 28861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 28961847f8eSopenharmony_ci * @crossplatform 29061847f8eSopenharmony_ci * @atomicservice 29161847f8eSopenharmony_ci * @since 12 29261847f8eSopenharmony_ci */ 29361847f8eSopenharmony_ci textWidth?: number; 29461847f8eSopenharmony_ci 29561847f8eSopenharmony_ci /** 29661847f8eSopenharmony_ci * Trigger a event when the value of the counter has been changed. 29761847f8eSopenharmony_ci * 29861847f8eSopenharmony_ci * @type { ?function } 29961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 30061847f8eSopenharmony_ci * @crossplatform 30161847f8eSopenharmony_ci * @since 11 30261847f8eSopenharmony_ci */ 30361847f8eSopenharmony_ci /** 30461847f8eSopenharmony_ci * Trigger a event when the value of the counter has been changed. 30561847f8eSopenharmony_ci * 30661847f8eSopenharmony_ci * @type { ?function } 30761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 30861847f8eSopenharmony_ci * @crossplatform 30961847f8eSopenharmony_ci * @atomicservice 31061847f8eSopenharmony_ci * @since 12 31161847f8eSopenharmony_ci */ 31261847f8eSopenharmony_ci onChange?: (value: number) => void; 31361847f8eSopenharmony_ci} 31461847f8eSopenharmony_ci 31561847f8eSopenharmony_ci/** 31661847f8eSopenharmony_ci * Defines the number style options. 31761847f8eSopenharmony_ci * 31861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 31961847f8eSopenharmony_ci * @crossplatform 32061847f8eSopenharmony_ci * @since 11 32161847f8eSopenharmony_ci */ 32261847f8eSopenharmony_ci /** 32361847f8eSopenharmony_ci * Defines the number style options. 32461847f8eSopenharmony_ci * 32561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 32661847f8eSopenharmony_ci * @crossplatform 32761847f8eSopenharmony_ci * @atomicservice 32861847f8eSopenharmony_ci * @since 12 32961847f8eSopenharmony_ci */ 33061847f8eSopenharmony_cideclare class NumberStyleOptions extends InlineStyleOptions { 33161847f8eSopenharmony_ci /** 33261847f8eSopenharmony_ci * Set the label of the counter component. 33361847f8eSopenharmony_ci * 33461847f8eSopenharmony_ci * @type { ?ResourceStr } 33561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 33661847f8eSopenharmony_ci * @crossplatform 33761847f8eSopenharmony_ci * @since 11 33861847f8eSopenharmony_ci */ 33961847f8eSopenharmony_ci /** 34061847f8eSopenharmony_ci * Set the label of the counter component. 34161847f8eSopenharmony_ci * 34261847f8eSopenharmony_ci * @type { ?ResourceStr } 34361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 34461847f8eSopenharmony_ci * @crossplatform 34561847f8eSopenharmony_ci * @atomicservice 34661847f8eSopenharmony_ci * @since 12 34761847f8eSopenharmony_ci */ 34861847f8eSopenharmony_ci label?: ResourceStr; 34961847f8eSopenharmony_ci 35061847f8eSopenharmony_ci /** 35161847f8eSopenharmony_ci * Trigger a event when the increased button got focus. 35261847f8eSopenharmony_ci * 35361847f8eSopenharmony_ci * @type { ?function } 35461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 35561847f8eSopenharmony_ci * @crossplatform 35661847f8eSopenharmony_ci * @since 11 35761847f8eSopenharmony_ci */ 35861847f8eSopenharmony_ci /** 35961847f8eSopenharmony_ci * Trigger a event when the increased button got focus. 36061847f8eSopenharmony_ci * 36161847f8eSopenharmony_ci * @type { ?function } 36261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 36361847f8eSopenharmony_ci * @crossplatform 36461847f8eSopenharmony_ci * @atomicservice 36561847f8eSopenharmony_ci * @since 12 36661847f8eSopenharmony_ci */ 36761847f8eSopenharmony_ci onFocusIncrease?: () => void; 36861847f8eSopenharmony_ci 36961847f8eSopenharmony_ci /** 37061847f8eSopenharmony_ci * Trigger a event when the decreased button got focus. 37161847f8eSopenharmony_ci * 37261847f8eSopenharmony_ci * @type { ?function } 37361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 37461847f8eSopenharmony_ci * @crossplatform 37561847f8eSopenharmony_ci * @since 11 37661847f8eSopenharmony_ci */ 37761847f8eSopenharmony_ci /** 37861847f8eSopenharmony_ci * Trigger a event when the decreased button got focus. 37961847f8eSopenharmony_ci * 38061847f8eSopenharmony_ci * @type { ?function } 38161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 38261847f8eSopenharmony_ci * @crossplatform 38361847f8eSopenharmony_ci * @atomicservice 38461847f8eSopenharmony_ci * @since 12 38561847f8eSopenharmony_ci */ 38661847f8eSopenharmony_ci onFocusDecrease?: () => void; 38761847f8eSopenharmony_ci 38861847f8eSopenharmony_ci /** 38961847f8eSopenharmony_ci * Trigger a event when the increased button lose focus. 39061847f8eSopenharmony_ci * 39161847f8eSopenharmony_ci * @type { ?function } 39261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 39361847f8eSopenharmony_ci * @crossplatform 39461847f8eSopenharmony_ci * @since 11 39561847f8eSopenharmony_ci */ 39661847f8eSopenharmony_ci /** 39761847f8eSopenharmony_ci * Trigger a event when the increased button lose focus. 39861847f8eSopenharmony_ci * 39961847f8eSopenharmony_ci * @type { ?function } 40061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 40161847f8eSopenharmony_ci * @crossplatform 40261847f8eSopenharmony_ci * @atomicservice 40361847f8eSopenharmony_ci * @since 12 40461847f8eSopenharmony_ci */ 40561847f8eSopenharmony_ci onBlurIncrease?: () => void; 40661847f8eSopenharmony_ci 40761847f8eSopenharmony_ci /** 40861847f8eSopenharmony_ci * Trigger a event when the decreased button lose focus. 40961847f8eSopenharmony_ci * 41061847f8eSopenharmony_ci * @type { ?function } 41161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 41261847f8eSopenharmony_ci * @crossplatform 41361847f8eSopenharmony_ci * @since 11 41461847f8eSopenharmony_ci */ 41561847f8eSopenharmony_ci /** 41661847f8eSopenharmony_ci * Trigger a event when the decreased button lose focus. 41761847f8eSopenharmony_ci * 41861847f8eSopenharmony_ci * @type { ?function } 41961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 42061847f8eSopenharmony_ci * @crossplatform 42161847f8eSopenharmony_ci * @atomicservice 42261847f8eSopenharmony_ci * @since 12 42361847f8eSopenharmony_ci */ 42461847f8eSopenharmony_ci onBlurDecrease?: () => void; 42561847f8eSopenharmony_ci} 42661847f8eSopenharmony_ci 42761847f8eSopenharmony_ci/** 42861847f8eSopenharmony_ci * Defines the date data. 42961847f8eSopenharmony_ci * 43061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 43161847f8eSopenharmony_ci * @crossplatform 43261847f8eSopenharmony_ci * @since 11 43361847f8eSopenharmony_ci */ 43461847f8eSopenharmony_ci /** 43561847f8eSopenharmony_ci * Defines the date data. 43661847f8eSopenharmony_ci * 43761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 43861847f8eSopenharmony_ci * @crossplatform 43961847f8eSopenharmony_ci * @atomicservice 44061847f8eSopenharmony_ci * @since 12 44161847f8eSopenharmony_ci */ 44261847f8eSopenharmony_cideclare class DateData { 44361847f8eSopenharmony_ci /** 44461847f8eSopenharmony_ci * The year of the DateData, ranges from 1 to 5000. 44561847f8eSopenharmony_ci * 44661847f8eSopenharmony_ci * @type { number } 44761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 44861847f8eSopenharmony_ci * @crossplatform 44961847f8eSopenharmony_ci * @since 11 45061847f8eSopenharmony_ci */ 45161847f8eSopenharmony_ci /** 45261847f8eSopenharmony_ci * The year of the DateData, ranges from 1 to 5000. 45361847f8eSopenharmony_ci * 45461847f8eSopenharmony_ci * @type { number } 45561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 45661847f8eSopenharmony_ci * @crossplatform 45761847f8eSopenharmony_ci * @atomicservice 45861847f8eSopenharmony_ci * @since 12 45961847f8eSopenharmony_ci */ 46061847f8eSopenharmony_ci year: number; 46161847f8eSopenharmony_ci 46261847f8eSopenharmony_ci /** 46361847f8eSopenharmony_ci * The month of the DateData. 46461847f8eSopenharmony_ci * 46561847f8eSopenharmony_ci * @type { number } 46661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 46761847f8eSopenharmony_ci * @crossplatform 46861847f8eSopenharmony_ci * @since 11 46961847f8eSopenharmony_ci */ 47061847f8eSopenharmony_ci /** 47161847f8eSopenharmony_ci * The month of the DateData. 47261847f8eSopenharmony_ci * 47361847f8eSopenharmony_ci * @type { number } 47461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 47561847f8eSopenharmony_ci * @crossplatform 47661847f8eSopenharmony_ci * @atomicservice 47761847f8eSopenharmony_ci * @since 12 47861847f8eSopenharmony_ci */ 47961847f8eSopenharmony_ci month: number; 48061847f8eSopenharmony_ci 48161847f8eSopenharmony_ci /** 48261847f8eSopenharmony_ci * The day of the DateData. 48361847f8eSopenharmony_ci * 48461847f8eSopenharmony_ci * @type { number } 48561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 48661847f8eSopenharmony_ci * @crossplatform 48761847f8eSopenharmony_ci * @since 11 48861847f8eSopenharmony_ci */ 48961847f8eSopenharmony_ci /** 49061847f8eSopenharmony_ci * The day of the DateData. 49161847f8eSopenharmony_ci * 49261847f8eSopenharmony_ci * @type { number } 49361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 49461847f8eSopenharmony_ci * @crossplatform 49561847f8eSopenharmony_ci * @atomicservice 49661847f8eSopenharmony_ci * @since 12 49761847f8eSopenharmony_ci */ 49861847f8eSopenharmony_ci day: number; 49961847f8eSopenharmony_ci 50061847f8eSopenharmony_ci /** 50161847f8eSopenharmony_ci * Constructor of the DateData. 50261847f8eSopenharmony_ci * 50361847f8eSopenharmony_ci * @param { number } year - set the year of the DateData. 50461847f8eSopenharmony_ci * @param { number } month - set the month of the DateData. 50561847f8eSopenharmony_ci * @param { number } day - set the day of the DateData. 50661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 50761847f8eSopenharmony_ci * @crossplatform 50861847f8eSopenharmony_ci * @since 11 50961847f8eSopenharmony_ci */ 51061847f8eSopenharmony_ci /** 51161847f8eSopenharmony_ci * Constructor of the DateData. 51261847f8eSopenharmony_ci * 51361847f8eSopenharmony_ci * @param { number } year - set the year of the DateData. 51461847f8eSopenharmony_ci * @param { number } month - set the month of the DateData. 51561847f8eSopenharmony_ci * @param { number } day - set the day of the DateData. 51661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 51761847f8eSopenharmony_ci * @crossplatform 51861847f8eSopenharmony_ci * @atomicservice 51961847f8eSopenharmony_ci * @since 12 52061847f8eSopenharmony_ci */ 52161847f8eSopenharmony_ci constructor(year: number, month: number, day: number); 52261847f8eSopenharmony_ci 52361847f8eSopenharmony_ci /** 52461847f8eSopenharmony_ci * Convert the date data to string. 52561847f8eSopenharmony_ci * 52661847f8eSopenharmony_ci * @returns { string } date data in string form. 52761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 52861847f8eSopenharmony_ci * @crossplatform 52961847f8eSopenharmony_ci * @since 11 53061847f8eSopenharmony_ci */ 53161847f8eSopenharmony_ci /** 53261847f8eSopenharmony_ci * Convert the date data to string. 53361847f8eSopenharmony_ci * 53461847f8eSopenharmony_ci * @returns { string } date data in string form. 53561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 53661847f8eSopenharmony_ci * @crossplatform 53761847f8eSopenharmony_ci * @atomicservice 53861847f8eSopenharmony_ci * @since 12 53961847f8eSopenharmony_ci */ 54061847f8eSopenharmony_ci toString(): string; 54161847f8eSopenharmony_ci} 54261847f8eSopenharmony_ci 54361847f8eSopenharmony_ci/** 54461847f8eSopenharmony_ci * Defines the date style options. 54561847f8eSopenharmony_ci * 54661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 54761847f8eSopenharmony_ci * @crossplatform 54861847f8eSopenharmony_ci * @since 11 54961847f8eSopenharmony_ci */ 55061847f8eSopenharmony_ci /** 55161847f8eSopenharmony_ci * Defines the date style options. 55261847f8eSopenharmony_ci * 55361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 55461847f8eSopenharmony_ci * @crossplatform 55561847f8eSopenharmony_ci * @atomicservice 55661847f8eSopenharmony_ci * @since 12 55761847f8eSopenharmony_ci */ 55861847f8eSopenharmony_cideclare class DateStyleOptions extends CommonOptions { 55961847f8eSopenharmony_ci /** 56061847f8eSopenharmony_ci * Set the year of the counter component, ranges from 1 to 5000. 56161847f8eSopenharmony_ci * 56261847f8eSopenharmony_ci * @type { ?number } 56361847f8eSopenharmony_ci * @default 1 56461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 56561847f8eSopenharmony_ci * @crossplatform 56661847f8eSopenharmony_ci * @since 11 56761847f8eSopenharmony_ci */ 56861847f8eSopenharmony_ci /** 56961847f8eSopenharmony_ci * Set the year of the counter component, ranges from 1 to 5000. 57061847f8eSopenharmony_ci * 57161847f8eSopenharmony_ci * @type { ?number } 57261847f8eSopenharmony_ci * @default 1 57361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 57461847f8eSopenharmony_ci * @crossplatform 57561847f8eSopenharmony_ci * @atomicservice 57661847f8eSopenharmony_ci * @since 12 57761847f8eSopenharmony_ci */ 57861847f8eSopenharmony_ci year?: number; 57961847f8eSopenharmony_ci 58061847f8eSopenharmony_ci /** 58161847f8eSopenharmony_ci * Set the month of the counter component. 58261847f8eSopenharmony_ci * 58361847f8eSopenharmony_ci * @type { ?number } 58461847f8eSopenharmony_ci * @default 1 58561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 58661847f8eSopenharmony_ci * @crossplatform 58761847f8eSopenharmony_ci * @since 11 58861847f8eSopenharmony_ci */ 58961847f8eSopenharmony_ci /** 59061847f8eSopenharmony_ci * Set the month of the counter component. 59161847f8eSopenharmony_ci * 59261847f8eSopenharmony_ci * @type { ?number } 59361847f8eSopenharmony_ci * @default 1 59461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 59561847f8eSopenharmony_ci * @crossplatform 59661847f8eSopenharmony_ci * @atomicservice 59761847f8eSopenharmony_ci * @since 12 59861847f8eSopenharmony_ci */ 59961847f8eSopenharmony_ci month?: number; 60061847f8eSopenharmony_ci 60161847f8eSopenharmony_ci /** 60261847f8eSopenharmony_ci * Set the day of the counter component. 60361847f8eSopenharmony_ci * 60461847f8eSopenharmony_ci * @type { ?number } 60561847f8eSopenharmony_ci * @default 1 60661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 60761847f8eSopenharmony_ci * @crossplatform 60861847f8eSopenharmony_ci * @since 11 60961847f8eSopenharmony_ci */ 61061847f8eSopenharmony_ci /** 61161847f8eSopenharmony_ci * Set the day of the counter component. 61261847f8eSopenharmony_ci * 61361847f8eSopenharmony_ci * @type { ?number } 61461847f8eSopenharmony_ci * @default 1 61561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 61661847f8eSopenharmony_ci * @crossplatform 61761847f8eSopenharmony_ci * @atomicservice 61861847f8eSopenharmony_ci * @since 12 61961847f8eSopenharmony_ci */ 62061847f8eSopenharmony_ci day?: number; 62161847f8eSopenharmony_ci 62261847f8eSopenharmony_ci /** 62361847f8eSopenharmony_ci * Trigger a event when the date of the counter has been changed. 62461847f8eSopenharmony_ci * 62561847f8eSopenharmony_ci * @type { ?function } 62661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 62761847f8eSopenharmony_ci * @crossplatform 62861847f8eSopenharmony_ci * @since 11 62961847f8eSopenharmony_ci */ 63061847f8eSopenharmony_ci /** 63161847f8eSopenharmony_ci * Trigger a event when the date of the counter has been changed. 63261847f8eSopenharmony_ci * 63361847f8eSopenharmony_ci * @type { ?function } 63461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 63561847f8eSopenharmony_ci * @crossplatform 63661847f8eSopenharmony_ci * @atomicservice 63761847f8eSopenharmony_ci * @since 12 63861847f8eSopenharmony_ci */ 63961847f8eSopenharmony_ci onDateChange?: (date: DateData) => void; 64061847f8eSopenharmony_ci} 64161847f8eSopenharmony_ci 64261847f8eSopenharmony_ci 64361847f8eSopenharmony_ci/** 64461847f8eSopenharmony_ci * Defines the counter options. 64561847f8eSopenharmony_ci * 64661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 64761847f8eSopenharmony_ci * @crossplatform 64861847f8eSopenharmony_ci * @since 11 64961847f8eSopenharmony_ci */ 65061847f8eSopenharmony_ci /** 65161847f8eSopenharmony_ci * Defines the counter options. 65261847f8eSopenharmony_ci * 65361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 65461847f8eSopenharmony_ci * @crossplatform 65561847f8eSopenharmony_ci * @atomicservice 65661847f8eSopenharmony_ci * @since 12 65761847f8eSopenharmony_ci */ 65861847f8eSopenharmony_cideclare class CounterOptions { 65961847f8eSopenharmony_ci /** 66061847f8eSopenharmony_ci * Set the type of the counter component. 66161847f8eSopenharmony_ci * 66261847f8eSopenharmony_ci * @type { CounterType } 66361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 66461847f8eSopenharmony_ci * @crossplatform 66561847f8eSopenharmony_ci * @since 11 66661847f8eSopenharmony_ci */ 66761847f8eSopenharmony_ci /** 66861847f8eSopenharmony_ci * Set the type of the counter component. 66961847f8eSopenharmony_ci * 67061847f8eSopenharmony_ci * @type { CounterType } 67161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 67261847f8eSopenharmony_ci * @crossplatform 67361847f8eSopenharmony_ci * @atomicservice 67461847f8eSopenharmony_ci * @since 12 67561847f8eSopenharmony_ci */ 67661847f8eSopenharmony_ci type: CounterType; 67761847f8eSopenharmony_ci 67861847f8eSopenharmony_ci /** 67961847f8eSopenharmony_ci * Set the counter attribute of the LIST or COMPACT counter component. 68061847f8eSopenharmony_ci * 68161847f8eSopenharmony_ci * @type { ?NumberStyleOptions } 68261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 68361847f8eSopenharmony_ci * @crossplatform 68461847f8eSopenharmony_ci * @since 11 68561847f8eSopenharmony_ci */ 68661847f8eSopenharmony_ci /** 68761847f8eSopenharmony_ci * Set the counter attribute of the LIST or COMPACT counter component. 68861847f8eSopenharmony_ci * 68961847f8eSopenharmony_ci * @type { ?NumberStyleOptions } 69061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 69161847f8eSopenharmony_ci * @crossplatform 69261847f8eSopenharmony_ci * @atomicservice 69361847f8eSopenharmony_ci * @since 12 69461847f8eSopenharmony_ci */ 69561847f8eSopenharmony_ci numberOptions?: NumberStyleOptions; 69661847f8eSopenharmony_ci 69761847f8eSopenharmony_ci /** 69861847f8eSopenharmony_ci * Set the counter attribute of the INLINE counter component. 69961847f8eSopenharmony_ci * 70061847f8eSopenharmony_ci * @type { ?InlineStyleOptions } 70161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 70261847f8eSopenharmony_ci * @crossplatform 70361847f8eSopenharmony_ci * @since 11 70461847f8eSopenharmony_ci */ 70561847f8eSopenharmony_ci /** 70661847f8eSopenharmony_ci * Set the counter attribute of the INLINE counter component. 70761847f8eSopenharmony_ci * 70861847f8eSopenharmony_ci * @type { ?InlineStyleOptions } 70961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 71061847f8eSopenharmony_ci * @crossplatform 71161847f8eSopenharmony_ci * @atomicservice 71261847f8eSopenharmony_ci * @since 12 71361847f8eSopenharmony_ci */ 71461847f8eSopenharmony_ci inlineOptions?: InlineStyleOptions; 71561847f8eSopenharmony_ci 71661847f8eSopenharmony_ci /** 71761847f8eSopenharmony_ci * Set the counter attribute of the INLINE_DATE counter component. 71861847f8eSopenharmony_ci * 71961847f8eSopenharmony_ci * @type { ?DateStyleOptions } 72061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 72161847f8eSopenharmony_ci * @crossplatform 72261847f8eSopenharmony_ci * @since 11 72361847f8eSopenharmony_ci */ 72461847f8eSopenharmony_ci /** 72561847f8eSopenharmony_ci * Set the counter attribute of the INLINE_DATE counter component. 72661847f8eSopenharmony_ci * 72761847f8eSopenharmony_ci * @type { ?DateStyleOptions } 72861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 72961847f8eSopenharmony_ci * @crossplatform 73061847f8eSopenharmony_ci * @atomicservice 73161847f8eSopenharmony_ci * @since 12 73261847f8eSopenharmony_ci */ 73361847f8eSopenharmony_ci dateOptions?: DateStyleOptions; 73461847f8eSopenharmony_ci 73561847f8eSopenharmony_ci /** 73661847f8eSopenharmony_ci * Indicates the attribute of the current counter direction. 73761847f8eSopenharmony_ci * 73861847f8eSopenharmony_ci * @type { ?Direction } 73961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 74061847f8eSopenharmony_ci * @crossplatform 74161847f8eSopenharmony_ci * @atomicservice 74261847f8eSopenharmony_ci * @since 12 74361847f8eSopenharmony_ci */ 74461847f8eSopenharmony_ci direction?: Direction; 74561847f8eSopenharmony_ci} 74661847f8eSopenharmony_ci 74761847f8eSopenharmony_ci/** 74861847f8eSopenharmony_ci * Defines Counter Component. 74961847f8eSopenharmony_ci * 75061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 75161847f8eSopenharmony_ci * @crossplatform 75261847f8eSopenharmony_ci * @since 11 75361847f8eSopenharmony_ci */ 75461847f8eSopenharmony_ci /** 75561847f8eSopenharmony_ci * Defines Counter Component. 75661847f8eSopenharmony_ci * 75761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 75861847f8eSopenharmony_ci * @crossplatform 75961847f8eSopenharmony_ci * @atomicservice 76061847f8eSopenharmony_ci * @since 12 76161847f8eSopenharmony_ci */ 76261847f8eSopenharmony_ci@Component 76361847f8eSopenharmony_cideclare struct CounterComponent { 76461847f8eSopenharmony_ci /** 76561847f8eSopenharmony_ci * The options of a counter component. 76661847f8eSopenharmony_ci * 76761847f8eSopenharmony_ci * @type { CounterOptions } 76861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 76961847f8eSopenharmony_ci * @crossplatform 77061847f8eSopenharmony_ci * @since 11 77161847f8eSopenharmony_ci */ 77261847f8eSopenharmony_ci /** 77361847f8eSopenharmony_ci * The options of a counter component. 77461847f8eSopenharmony_ci * 77561847f8eSopenharmony_ci * @type { CounterOptions } 77661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 77761847f8eSopenharmony_ci * @crossplatform 77861847f8eSopenharmony_ci * @atomicservice 77961847f8eSopenharmony_ci * @since 12 78061847f8eSopenharmony_ci */ 78161847f8eSopenharmony_ci @Prop 78261847f8eSopenharmony_ci options: CounterOptions; 78361847f8eSopenharmony_ci} 78461847f8eSopenharmony_ci 78561847f8eSopenharmony_ciexport {CounterComponent, CounterOptions, DateData, CounterType} 786