diff --git a/api/@internal/component/ets/badge.d.ts b/api/@internal/component/ets/badge.d.ts index 729160f93e50905c48746a2c5c2b3e889b77b258..b70912408a191f5f36b97c2243f551004a670079 100644 --- a/api/@internal/component/ets/badge.d.ts +++ b/api/@internal/component/ets/badge.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ResourceColor, Length, Position, Resource, ResourceStr } from './units'; +import { FontWeight } from './enums'; +import { CommonMethod } from './common'; +/*** endif */ + /** * Defines the badge position property. * @@ -50,969 +56,996 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare enum BadgePosition { - /** - * The dot is displayed vertically centered on the right. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * The dot is displayed vertically centered on the right. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * The dot is displayed vertically centered on the right. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * The badge is displayed in the upper right corner of the parent component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - RightTop, - - /** - * Dots are displayed in the upper right corner. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Dots are displayed in the upper right corner. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Dots are displayed in the upper right corner. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * The badge is vertically centered on the right of the parent component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - Right, - - /** - * The dot is displayed in the left vertical center. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * The dot is displayed in the left vertical center. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * The dot is displayed in the left vertical center. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * The badge is vertically centered on the left of the parent component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - Left, - } - - /** - * BadgeStyle object - * - * @interface BadgeStyle +declare enum BadgePosition { + /** + * The dot is displayed vertically centered on the right. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * BadgeStyle object + * The dot is displayed vertically centered on the right. * - * @interface BadgeStyle * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * BadgeStyle object + * The dot is displayed vertically centered on the right. * - * @interface BadgeStyle * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * BadgeStyle object + * The badge is displayed in the upper right corner of the parent component. * - * @interface BadgeStyle * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare interface BadgeStyle { - /** - * Text Color - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Text Color - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Text Color - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Font color. - * - * @type { ?ResourceColor } - * @default Color.White - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - color?: ResourceColor; - - /** - * Text size. - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Text size. - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Text size. - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Text size. - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - /** - * Font size. - * For the string type, only numeric string values with optional units. - * The value must be greater than or equal to 0. If the value is less than 0, the default value is used. - * Unit: fp - * - *

NOTE: - *
This parameter cannot be set in percentage. - *

- * - * @type { ?(number | ResourceStr) } - * @default 10 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - fontSize?: number | ResourceStr; - - /** - * Size of a badge. - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Size of a badge. - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Size of a badge. - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Size of a badge. - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - /** - * Badge size. - * For the string type, numeric string values with optional units. - * The value must be greater than or equal to 0. If the value is less than 0, the default value is used. - * Unit: vp - * - *

NOTE: - *
This parameter cannot be set in percentage. - *
If it is set to an invalid value, the default value is used. - *

- * - * @type { ?(number | ResourceStr) } - * @default 16 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - badgeSize?: number | ResourceStr; - - /** - * Color of the badge. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Color of the badge. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Color of the badge. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Badge color. - * - * @type { ?ResourceColor } - * @default Color.Red - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - badgeColor?: ResourceColor; - - /** - * Define the border color of the badge. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Border color of the background. - * - * @type { ?ResourceColor } - * @default Color.Red - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - borderColor?: ResourceColor; - - /** - * Define the border width of the badge. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Border width of the background. - * This parameter cannot be set in percentage. - * Unit: vp - * - * @type { ?Length } - * @default 1 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - borderWidth?: Length; - - /** - * Define the font weight of the badge. - * - * @type { ?(number | FontWeight | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Define the font weight of the badge. - * - * @type { ?(number | FontWeight | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Font weight of the text. - * For the number type, the value ranges from 100 to 900, at an interval of 100. Default value: 400 - * A larger value indicates a heavier font weight. - * For the string type, only strings that represent a number. Default value: FontWeight.Normal - * - *

NOTE: - *
This parameter cannot be set in percentage. - *

- * - * @type { ?(number | FontWeight | ResourceStr) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - fontWeight?: number | FontWeight | ResourceStr; - } - - /** - * Defines the base param of badge. - * - * @interface BadgeParam + RightTop, + + /** + * Dots are displayed in the upper right corner. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Defines the base param of badge. + * Dots are displayed in the upper right corner. * - * @interface BadgeParam * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Defines the base param of badge. + * Dots are displayed in the upper right corner. * - * @interface BadgeParam * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Provides basic parameters for creating a badge. + * The badge is vertically centered on the right of the parent component. * - * @interface BadgeParam * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare interface BadgeParam { - /** - * Set the display position of the prompt point. - * - * @type { ?(BadgePosition) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Set the display position of the prompt point. - * - * @type { ?(BadgePosition) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Set the display position of the prompt point. - * - * @type { ?(BadgePosition | Position) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Position to display the badge relative to the parent component. - * - *

NOTE: - *
With the Position type, percentage values are not supported. - *
If an invalid value is set, the default value (0,0), - * which indicates the upper left corner of the component, will be used. - *
With the BadgePosition type, the position is mirrored based on the Direction property. - *

- * - * @type { ?(BadgePosition | Position) } - * @default BadgePosition.RightTop - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - position?: BadgePosition | Position; - - /** - * Defines the style of the Badge component, including the text color, size, dot color, and size. - * - * @type { BadgeStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Defines the style of the Badge component, including the text color, size, dot color, and size. - * - * @type { BadgeStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Defines the style of the Badge component, including the text color, size, dot color, and size. - * - * @type { BadgeStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Style of the badge, including the font color, font size, badge color, and badge size. - * - * @type { BadgeStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - style: BadgeStyle; - } - - /** - * Defines the badge param with count and maxCount. - * - * @extends BadgeParam - * @interface BadgeParamWithNumber + Right, + + /** + * The dot is displayed in the left vertical center. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Defines the badge param with count and maxCount. + * The dot is displayed in the left vertical center. * - * @extends BadgeParam - * @interface BadgeParamWithNumber * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Defines the badge param with count and maxCount. + * The dot is displayed in the left vertical center. * - * @extends BadgeParam - * @interface BadgeParamWithNumber * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Inherits from BadgeParam and has all attributes of BadgeParam. + * The badge is vertically centered on the left of the parent component. * - * @extends BadgeParam - * @interface BadgeParamWithNumber * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare interface BadgeParamWithNumber extends BadgeParam { - /** - * Set the number of reminder messages. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Set the number of reminder messages. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Set the number of reminder messages. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Number of notifications. - * - *

NOTE: - *
If the value is less than or equal to 0 and less than the value of maxCount, no badge is displayed. - *
Value range: [-2147483648, 2147483647] - *
If the value is out of the range, - * it will be adjusted by adding or subtracting 4294967296 to bring it back within the range. - *
If the value is not an integer, it is rounded off to the nearest integer. - *

- * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - count: number; - - /** - * Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Maximum number of notifications. When the maximum number is reached, only maxCount+ is displayed. - * - *

NOTE: - *
Value range: [-2147483648, 2147483647] - *
If the value is out of the range, - * it will be adjusted by adding or subtracting 4294967296 to bring it back within the range. - *
If the value is not an integer, it is rounded off to the nearest integer. - *

- * - * @type { ?number } - * @default 99 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - maxCount?: number; - } - - /** - * Defines the badge param with string value. - * - * @extends BadgeParam - * @interface BadgeParamWithString + Left, +} + +/** + * BadgeStyle object + * + * @interface BadgeStyle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ +/** + * BadgeStyle object + * + * @interface BadgeStyle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ +/** + * BadgeStyle object + * + * @interface BadgeStyle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * BadgeStyle object + * + * @interface BadgeStyle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare interface BadgeStyle { + /** + * Text Color + * + * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Defines the badge param with string value. + * Text Color * - * @extends BadgeParam - * @interface BadgeParamWithString + * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Defines the badge param with string value. + * Text Color * - * @extends BadgeParam - * @interface BadgeParamWithString + * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Inherits from BadgeParam and has all attributes of BadgeParam. + * Font color. * - * @extends BadgeParam - * @interface BadgeParamWithString + * @type { ?ResourceColor } + * @default Color.White * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare interface BadgeParamWithString extends BadgeParam { - /** - * Text string of the prompt content. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Text string of the prompt content. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Text string of the prompt content. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Text string of the prompt content. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - /** - * Prompt content. - * - * @type { ResourceStr } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - value: ResourceStr; - } - - /** - * Defines Badge Component. - * - * @interface BadgeInterface + color?: ResourceColor; + + /** + * Text size. + * + * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Defines Badge Component. + * Text size. * - * @interface BadgeInterface + * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Defines Badge Component. + * Text size. * - * @interface BadgeInterface + * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Defines Badge Component. + * Text size. * - * @interface BadgeInterface + * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - interface BadgeInterface { - /** - * position: Set the display position of the prompt point. - * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. - * count: Set the number of reminder messages. - * style: You can set the style of the Badge component, including the text color, size, dot color, and size. - * - * @param { BadgeParamWithNumber } value - * @returns { BadgeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * position: Set the display position of the prompt point. - * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. - * count: Set the number of reminder messages. - * style: You can set the style of the Badge component, including the text color, size, dot color, and size. - * - * @param { BadgeParamWithNumber } value - * @returns { BadgeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * position: Set the display position of the prompt point. - * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. - * count: Set the number of reminder messages. - * style: You can set the style of the Badge component, including the text color, size, dot color, and size. - * - * @param { BadgeParamWithNumber } value - * @returns { BadgeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * position: Set the display position of the prompt point. - * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. - * count: Set the number of reminder messages. - * style: You can set the style of the Badge component, including the text color, size, dot color, and size. - * - * @param { BadgeParamWithNumber } value - * @returns { BadgeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - (value: BadgeParamWithNumber): BadgeAttribute; - - /** - * value: Text string of the prompt content. - * position: Set the display position of the prompt point. - * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. - * style: You can set the style of the Badge component, including the text color, size, dot color, and size. - * - * @param { BadgeParamWithString } value - * @returns { BadgeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * value: Text string of the prompt content. - * position: Set the display position of the prompt point. - * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. - * style: You can set the style of the Badge component, including the text color, size, dot color, and size. - * - * @param { BadgeParamWithString } value - * @returns { BadgeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * value: Text string of the prompt content. - * position: Set the display position of the prompt point. - * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. - * style: You can set the style of the Badge component, including the text color, size, dot color, and size. - * - * @param { BadgeParamWithString } value - * @returns { BadgeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * value: Text string of the prompt content. - * position: Set the display position of the prompt point. - * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. - * style: You can set the style of the Badge component, including the text color, size, dot color, and size. - * - * @param { BadgeParamWithString } value - * @returns { BadgeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - (value: BadgeParamWithString): BadgeAttribute; - } - - /** - * Defines Badge Component attribute. - * - * @extends CommonMethod + /** + * Font size. + * For the string type, only numeric string values with optional units. + * The value must be greater than or equal to 0. If the value is less than 0, the default value is used. + * Unit: fp + * + *

NOTE: + *
This parameter cannot be set in percentage. + *

+ * + * @type { ?(number | ResourceStr) } + * @default 10 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + fontSize?: number | ResourceStr; + + /** + * Size of a badge. + * + * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Defines Badge Component attribute. + * Size of a badge. * - * @extends CommonMethod + * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Defines Badge Component attribute. + * Size of a badge. * - * @extends CommonMethod + * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Defines Badge Component attribute. + * Size of a badge. * - * @extends CommonMethod + * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - declare class BadgeAttribute extends CommonMethod {} - /** - * Defines Badge Component. + * Badge size. + * For the string type, numeric string values with optional units. + * The value must be greater than or equal to 0. If the value is less than 0, the default value is used. + * Unit: vp + * + *

NOTE: + *
This parameter cannot be set in percentage. + *
If it is set to an invalid value, the default value is used. + *

* + * @type { ?(number | ResourceStr) } + * @default 16 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + badgeSize?: number | ResourceStr; + + /** + * Color of the badge. + * + * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Defines Badge Component. + * Color of the badge. * + * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Defines Badge Component. + * Color of the badge. * + * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Defines Badge Component. + * Badge color. * + * @type { ?ResourceColor } + * @default Color.Red * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + badgeColor?: ResourceColor; + + /** + * Define the border color of the badge. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Border color of the background. + * + * @type { ?ResourceColor } + * @default Color.Red + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + borderColor?: ResourceColor; + + /** + * Define the border width of the badge. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Border width of the background. + * This parameter cannot be set in percentage. + * Unit: vp + * + * @type { ?Length } + * @default 1 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + borderWidth?: Length; + + /** + * Define the font weight of the badge. + * + * @type { ?(number | FontWeight | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Define the font weight of the badge. + * + * @type { ?(number | FontWeight | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice * @since 11 */ - declare const Badge: BadgeInterface; - /** - * Defines Badge Component instance. + * Font weight of the text. + * For the number type, the value ranges from 100 to 900, at an interval of 100. Default value: 400 + * A larger value indicates a heavier font weight. + * For the string type, only strings that represent a number. Default value: FontWeight.Normal + * + *

NOTE: + *
This parameter cannot be set in percentage. + *

* + * @type { ?(number | FontWeight | ResourceStr) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + fontWeight?: number | FontWeight | ResourceStr; +} + +/** + * Defines the base param of badge. + * + * @interface BadgeParam + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ +/** + * Defines the base param of badge. + * + * @interface BadgeParam + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ +/** + * Defines the base param of badge. + * + * @interface BadgeParam + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Provides basic parameters for creating a badge. + * + * @interface BadgeParam + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare interface BadgeParam { + /** + * Set the display position of the prompt point. + * + * @type { ?(BadgePosition) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Set the display position of the prompt point. + * + * @type { ?(BadgePosition) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Set the display position of the prompt point. + * + * @type { ?(BadgePosition | Position) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Position to display the badge relative to the parent component. + * + *

NOTE: + *
With the Position type, percentage values are not supported. + *
If an invalid value is set, the default value (0,0), + * which indicates the upper left corner of the component, will be used. + *
With the BadgePosition type, the position is mirrored based on the Direction property. + *

+ * + * @type { ?(BadgePosition | Position) } + * @default BadgePosition.RightTop + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + position?: BadgePosition | Position; + + /** + * Defines the style of the Badge component, including the text color, size, dot color, and size. + * + * @type { BadgeStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Defines the style of the Badge component, including the text color, size, dot color, and size. + * + * @type { BadgeStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Defines the style of the Badge component, including the text color, size, dot color, and size. + * + * @type { BadgeStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Style of the badge, including the font color, font size, badge color, and badge size. + * + * @type { BadgeStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + style: BadgeStyle; +} + +/** + * Defines the badge param with count and maxCount. + * + * @extends BadgeParam + * @interface BadgeParamWithNumber + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ +/** + * Defines the badge param with count and maxCount. + * + * @extends BadgeParam + * @interface BadgeParamWithNumber + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ +/** + * Defines the badge param with count and maxCount. + * + * @extends BadgeParam + * @interface BadgeParamWithNumber + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Inherits from BadgeParam and has all attributes of BadgeParam. + * + * @extends BadgeParam + * @interface BadgeParamWithNumber + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare interface BadgeParamWithNumber extends BadgeParam { + /** + * Set the number of reminder messages. + * + * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Defines Badge Component instance. + * Set the number of reminder messages. * + * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Defines Badge Component instance. + * Set the number of reminder messages. * + * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Defines Badge Component instance. + * Number of notifications. + * + *

NOTE: + *
If the value is less than or equal to 0 and less than the value of maxCount, no badge is displayed. + *
Value range: [-2147483648, 2147483647] + *
If the value is out of the range, + * it will be adjusted by adding or subtracting 4294967296 to bring it back within the range. + *
If the value is not an integer, it is rounded off to the nearest integer. + *

* + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + count: number; + + /** + * Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Maximum number of notifications. When the maximum number is reached, only maxCount+ is displayed. + * + *

NOTE: + *
Value range: [-2147483648, 2147483647] + *
If the value is out of the range, + * it will be adjusted by adding or subtracting 4294967296 to bring it back within the range. + *
If the value is not an integer, it is rounded off to the nearest integer. + *

+ * + * @type { ?number } + * @default 99 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + maxCount?: number; +} + +/** + * Defines the badge param with string value. + * + * @extends BadgeParam + * @interface BadgeParamWithString + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ +/** + * Defines the badge param with string value. + * + * @extends BadgeParam + * @interface BadgeParamWithString + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ +/** + * Defines the badge param with string value. + * + * @extends BadgeParam + * @interface BadgeParamWithString + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Inherits from BadgeParam and has all attributes of BadgeParam. + * + * @extends BadgeParam + * @interface BadgeParamWithString + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare interface BadgeParamWithString extends BadgeParam { + /** + * Text string of the prompt content. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Text string of the prompt content. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Text string of the prompt content. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Text string of the prompt content. + * + * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - declare const BadgeInstance: BadgeAttribute; - \ No newline at end of file + /** + * Prompt content. + * + * @type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + value: ResourceStr; +} + +/** + * Defines Badge Component. + * + * @interface BadgeInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ +/** + * Defines Badge Component. + * + * @interface BadgeInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ +/** + * Defines Badge Component. + * + * @interface BadgeInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Defines Badge Component. + * + * @interface BadgeInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + * @noninterop + */ +interface BadgeInterface { + /** + * position: Set the display position of the prompt point. + * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * count: Set the number of reminder messages. + * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * + * @param { BadgeParamWithNumber } value + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * position: Set the display position of the prompt point. + * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * count: Set the number of reminder messages. + * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * + * @param { BadgeParamWithNumber } value + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * position: Set the display position of the prompt point. + * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * count: Set the number of reminder messages. + * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * + * @param { BadgeParamWithNumber } value + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * position: Set the display position of the prompt point. + * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * count: Set the number of reminder messages. + * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * + * @param { BadgeParamWithNumber } value + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + (value: BadgeParamWithNumber): BadgeAttribute; + + /** + * value: Text string of the prompt content. + * position: Set the display position of the prompt point. + * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * + * @param { BadgeParamWithString } value + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * value: Text string of the prompt content. + * position: Set the display position of the prompt point. + * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * + * @param { BadgeParamWithString } value + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * value: Text string of the prompt content. + * position: Set the display position of the prompt point. + * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * + * @param { BadgeParamWithString } value + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * value: Text string of the prompt content. + * position: Set the display position of the prompt point. + * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * + * @param { BadgeParamWithString } value + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + (value: BadgeParamWithString): BadgeAttribute; +} + +/** + * Defines Badge Component attribute. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ +/** + * Defines Badge Component attribute. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ +/** + * Defines Badge Component attribute. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Defines Badge Component attribute. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + * @noninterop + */ +declare class BadgeAttribute extends CommonMethod {} + +/** + * Defines Badge Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ +/** + * Defines Badge Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ +/** + * Defines Badge Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Defines Badge Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + * @noninterop + */ +declare const Badge: BadgeInterface; + +/** + * Defines Badge Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ +/** + * Defines Badge Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ +/** + * Defines Badge Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Defines Badge Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + * @noninterop + */ +declare const BadgeInstance: BadgeAttribute; diff --git a/api/@internal/component/ets/calendar_picker.d.ts b/api/@internal/component/ets/calendar_picker.d.ts index 2ae7c8c787cde6ac58eb41bc6fa7850ffb1c0d2e..87198423ba6a04a464ae483e940c583ee83bcff2 100644 --- a/api/@internal/component/ets/calendar_picker.d.ts +++ b/api/@internal/component/ets/calendar_picker.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource } from '../../global/resource' +import { CommonMethod, PickerTextStyle, Callback, BlurStyle, PickerDialogButtonStyle, ShadowOptions, ShadowStyle, HoverModeAreaType, DateRange, + BackgroundBlurStyleOptions, BackgroundEffectOptions, Optional } from './common' +import { Offset, VoidCallback, ResourceColor } from './units' +/*** endif */ + /** * The type of alignment between entry and calendar. * @enum {number} @@ -31,7 +38,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum CalendarAlign { /** @@ -45,7 +53,8 @@ declare enum CalendarAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ START = 0, /** @@ -59,7 +68,8 @@ declare enum CalendarAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CENTER = 1, /** @@ -73,7 +83,8 @@ declare enum CalendarAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ END = 2 } @@ -91,7 +102,8 @@ declare enum CalendarAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CalendarOptions { /** @@ -107,7 +119,8 @@ declare interface CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ hintRadius?: number | Resource; @@ -124,7 +137,8 @@ declare interface CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selected?: Date; @@ -135,7 +149,8 @@ declare interface CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ start?: Date; @@ -146,7 +161,8 @@ declare interface CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ end?: Date; @@ -157,7 +173,8 @@ declare interface CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ disabledDateRange?: DateRange[]; } @@ -175,7 +192,9 @@ declare interface CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + * @noninterop */ interface CalendarPickerInterface { /** @@ -193,7 +212,8 @@ interface CalendarPickerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (options?: CalendarOptions): CalendarPickerAttribute; } @@ -211,7 +231,9 @@ interface CalendarPickerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + * @noninterop */ declare class CalendarPickerAttribute extends CommonMethod { /** @@ -231,7 +253,8 @@ declare class CalendarPickerAttribute extends CommonMethod, offset?: Offset): CalendarPickerAttribute; @@ -262,7 +286,8 @@ declare class CalendarPickerAttribute extends CommonMethod): CalendarPickerAttribute; @@ -302,7 +328,8 @@ declare class CalendarPickerAttribute extends CommonMethod): CalendarPickerAttribute; @@ -313,7 +340,8 @@ declare class CalendarPickerAttribute extends CommonMethod>): CalendarPickerAttribute; @@ -325,7 +353,8 @@ declare class CalendarPickerAttribute extends CommonMethod; @@ -396,7 +427,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onCancel?: VoidCallback; @@ -422,7 +454,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onChange?: Callback; @@ -443,7 +476,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor?: ResourceColor; @@ -464,7 +498,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyle?: BlurStyle; @@ -475,7 +510,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; @@ -486,7 +522,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundEffect?: BackgroundEffectOptions; @@ -497,7 +534,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ acceptButtonStyle?: PickerDialogButtonStyle; @@ -508,7 +546,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ cancelButtonStyle?: PickerDialogButtonStyle; @@ -529,7 +568,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onDidAppear?: VoidCallback; @@ -550,7 +590,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onDidDisappear?: VoidCallback; @@ -571,7 +612,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onWillAppear?: VoidCallback; @@ -592,7 +634,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDisappear?: VoidCallback; @@ -603,7 +646,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shadow?: ShadowOptions | ShadowStyle; @@ -615,7 +659,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enableHoverMode?: boolean; @@ -627,7 +672,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ hoverModeArea?: HoverModeAreaType; @@ -639,7 +685,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ markToday?: boolean; } @@ -655,7 +702,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CalendarPickerDialog { /** @@ -671,7 +719,8 @@ declare class CalendarPickerDialog { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ static show(options?: CalendarDialogOptions): void; } @@ -688,6 +737,7 @@ declare class CalendarPickerDialog { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const CalendarPicker: CalendarPickerInterface; @@ -703,5 +753,6 @@ declare const CalendarPicker: CalendarPickerInterface; * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const CalendarPickerInstance: CalendarPickerAttribute; diff --git a/api/@internal/component/ets/counter.d.ts b/api/@internal/component/ets/counter.d.ts index 9fb6cf9cc9fa2759b59f405ff41a7123d2f7594c..29b552d0b90b0be3b7d76b29fbb7dd8c6b71c5bc 100644 --- a/api/@internal/component/ets/counter.d.ts +++ b/api/@internal/component/ets/counter.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod } from './common' +import { VoidCallback } from './units' +/*** endif */ + /** * Counter component, which provides corresponding increment or decrement counting operations. * @@ -50,7 +55,9 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + * @noninterop */ interface CounterInterface { /** @@ -85,7 +92,8 @@ interface CounterInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (): CounterAttribute; } @@ -122,7 +130,9 @@ interface CounterInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + * @noninterop */ declare class CounterAttribute extends CommonMethod { /** @@ -173,7 +183,8 @@ declare class CounterAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onInc(event: VoidCallback): CounterAttribute; @@ -225,7 +236,8 @@ declare class CounterAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onDec(event: VoidCallback): CounterAttribute; @@ -246,7 +258,8 @@ declare class CounterAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enableDec(value: boolean): CounterAttribute; @@ -267,7 +280,8 @@ declare class CounterAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enableInc(value: boolean): CounterAttribute; } @@ -301,6 +315,7 @@ declare class CounterAttribute extends CommonMethod { * @form * @atomicservice * @since 11 + * @noninterop */ declare const CounterInstance: CounterAttribute; @@ -333,5 +348,6 @@ declare const CounterInstance: CounterAttribute; * @form * @atomicservice * @since 11 + * @noninterop */ declare const Counter: CounterInterface; diff --git a/api/@internal/component/ets/data_panel.d.ts b/api/@internal/component/ets/data_panel.d.ts index 02fa057c4e305c64e3a0987eadca2622188b0030..9783b377adad218a12904408df738e36651b8d31 100644 --- a/api/@internal/component/ets/data_panel.d.ts +++ b/api/@internal/component/ets/data_panel.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ResourceColor, Length } from './units' +import { CommonMethod, ContentModifier, CommonConfiguration, MultiShadowOptions } from './common' +/*** endif */ + /** * DataPanelType enum * @@ -50,7 +55,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum DataPanelType { /** @@ -81,7 +87,8 @@ declare enum DataPanelType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Line, @@ -113,7 +120,8 @@ declare enum DataPanelType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Circle, } @@ -130,7 +138,8 @@ declare enum DataPanelType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ColorStop { /** @@ -146,7 +155,8 @@ declare interface ColorStop { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ color: ResourceColor; @@ -163,7 +173,8 @@ declare interface ColorStop { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offset: Length; } @@ -181,7 +192,8 @@ declare interface ColorStop { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class LinearGradient { /** @@ -199,7 +211,8 @@ declare class LinearGradient { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(colorStops: ColorStop[]); } @@ -221,7 +234,8 @@ declare class LinearGradient { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DataPanelShadowOptions extends MultiShadowOptions { /** @@ -241,7 +255,8 @@ declare interface DataPanelShadowOptions extends MultiShadowOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ colors?: Array; } @@ -278,7 +293,8 @@ declare interface DataPanelShadowOptions extends MultiShadowOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DataPanelOptions { /** @@ -313,7 +329,8 @@ declare interface DataPanelOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ values: number[]; @@ -349,7 +366,8 @@ declare interface DataPanelOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ max?: number; @@ -385,7 +403,8 @@ declare interface DataPanelOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ type?: DataPanelType; } @@ -422,7 +441,9 @@ declare interface DataPanelOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + * @noninterop */ interface DataPanelInterface { /** @@ -461,7 +482,8 @@ interface DataPanelInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (options: DataPanelOptions): DataPanelAttribute; } @@ -474,7 +496,8 @@ interface DataPanelInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DataPanelConfiguration extends CommonConfiguration { /** @@ -484,7 +507,8 @@ declare interface DataPanelConfiguration extends CommonConfiguration { /** @@ -571,7 +598,8 @@ declare class DataPanelAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ closeEffect(value: boolean): DataPanelAttribute; @@ -592,7 +620,8 @@ declare class DataPanelAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ valueColors(value: Array): DataPanelAttribute; @@ -613,7 +642,8 @@ declare class DataPanelAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ trackBackgroundColor(value: ResourceColor): DataPanelAttribute; @@ -634,7 +664,8 @@ declare class DataPanelAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeWidth(value: Length): DataPanelAttribute; @@ -655,7 +686,8 @@ declare class DataPanelAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ trackShadow(value: DataPanelShadowOptions): DataPanelAttribute; @@ -667,7 +699,8 @@ declare class DataPanelAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentModifier(modifier: ContentModifier): DataPanelAttribute; } @@ -701,6 +734,7 @@ declare class DataPanelAttribute extends CommonMethod { * @form * @atomicservice * @since 11 + * @noninterop */ declare const DataPanel: DataPanelInterface @@ -733,5 +767,6 @@ declare const DataPanel: DataPanelInterface * @form * @atomicservice * @since 11 + * @noninterop */ declare const DataPanelInstance: DataPanelAttribute; diff --git a/api/@internal/component/ets/date_picker.d.ts b/api/@internal/component/ets/date_picker.d.ts index 73f6661439639451f4f065091b67f445458155f2..373be6f74f989ffe9ccfe387a867b2547f3c21e8 100644 --- a/api/@internal/component/ets/date_picker.d.ts +++ b/api/@internal/component/ets/date_picker.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod, PickerTextStyle, PickerDialogButtonStyle, Rectangle, Callback, BlurStyle, ShadowOptions, ShadowStyle, HoverModeAreaType, BackgroundBlurStyleOptions, BackgroundEffectOptions, Optional, DateTimeOptions, Bindable } from './common' +import { ResourceColor, Offset, VoidCallback } from './units' +import { DialogAlignment } from './alertDialog' +import { CrownSensitivity } from './enums' +/*** endif */ + /** * Defines the struct of DatePickerResult. * @@ -40,1415 +47,1502 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare interface DatePickerResult { - /** - * Application year - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Application year - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Year of the selected date. - * - *

NOTE: - *
Value range: depends on start and end. - * If start and end are not set, the default range is [1970, 2100]. - *

- * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - year?: number; - - /** - * Application month - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Application month - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Month index of the selected date. - * The index is zero-based. 0 indicates January, and 11 indicates December. - * - *

NOTE: - *
Value range: depends on start and end. If start and end are not set, the default range is [0, 11]. - *

- * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - month?: number; - - /** - * Application day - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Application day - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Day of the selected date. - * - *

NOTE: - *
Value range: depends on start and end. If start and end are not set, the default range is [1, 31]. - *

- * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - day?: number; - } - +declare interface DatePickerResult { + /** + * Application year + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Application year + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ /** - * Defines the mode of the date picker. + * Year of the selected date. * - * @enum { number } + *

NOTE: + *
Value range: depends on start and end. + * If start and end are not set, the default range is [1970, 2100]. + *

+ * + * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare enum DatePickerMode { - /** - * The date displays three columns: year, month, and day. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - DATE = 0, - - /** - * The date displays two columns: year and month. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - YEAR_AND_MONTH = 1, - - /** - * Defines a mode that displays the date in months and days of the month. - * In this mode, if the month changes from December to January, - * the year does not increment by one; if the month changes from January to December, - * the year does not decrement by one. The year remains fixed at the currently set value. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - MONTH_AND_DAY = 2, - } - + year?: number; + /** - * Defines the options of DatePicker. + * Application month * - * @interface DatePickerOptions + * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Defines the options of DatePicker. + * Application month * - * @interface DatePickerOptions + * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Parameters of the date picker. + * Month index of the selected date. + * The index is zero-based. 0 indicates January, and 11 indicates December. * - * @interface DatePickerOptions + *

NOTE: + *
Value range: depends on start and end. If start and end are not set, the default range is [0, 11]. + *

+ * + * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare interface DatePickerOptions { - /** - * Specifies the start date of the date selector. - * - * @type { ?Date } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Specifies the start date of the date selector. - * - * @type { ?Date } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Start date of the picker. - * - * @type { ?Date } - * @default Date('1970-1-1') - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - start?: Date; - - /** - * Specifies the end date for the date selector. - * - * @type { ?Date } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Specifies the end date for the date selector. - * - * @type { ?Date } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * End date of the picker. - * - * @type { ?Date } - * @default Date('2100-12-31') - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - end?: Date; - - /** - * Specifies the date selector check date or time selector check time. - * - * @type { ?Date } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Specifies the date selector check date or time selector check time. - * - * @type { ?Date } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Date of the selected item. - * - * @type { ?Date } - * @default current system date - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - selected?: Date; - - /** - * Date columns to be displayed. - * - *

NOTE: - *
In DatePickerDialog, with showTime=true, this parameter has no effect and the default three columns for year, - *
month, and day are displayed. - *

- * - * @type { ?DatePickerMode } - * @default DatePickerMode.DATE - which means to display three columns: year, month, and day. - *
Decimal values are rounded off. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - mode?: DatePickerMode; - } - + month?: number; + /** - * Defines the DatePicker Component. + * Application day * - * @interface DatePickerInterface + * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Defines the DatePicker Component. + * Application day * - * @interface DatePickerInterface + * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Creates a date picker in the given date range. + * Day of the selected date. + * + *

NOTE: + *
Value range: depends on start and end. If start and end are not set, the default range is [1, 31]. + *

* - * @interface DatePickerInterface + * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - interface DatePickerInterface { - /** - * Defines the DatePicker constructor. - * - * @param { DatePickerOptions } options - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines the DatePicker constructor. - * - * @param { DatePickerOptions } options - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Parameters of the date picker. - * - * @param { DatePickerOptions } options - Parameters of the date picker. - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - (options?: DatePickerOptions): DatePickerAttribute; - } - + day?: number; +} + +/** + * Defines the mode of the date picker. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare enum DatePickerMode { + /** + * The date displays three columns: year, month, and day. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + DATE = 0, + + /** + * The date displays two columns: year and month. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + YEAR_AND_MONTH = 1, + + /** + * Defines a mode that displays the date in months and days of the month. + * In this mode, if the month changes from December to January, + * the year does not increment by one; if the month changes from January to December, + * the year does not decrement by one. The year remains fixed at the currently set value. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + MONTH_AND_DAY = 2, +} + +/** + * Defines the options of DatePicker. + * + * @interface DatePickerOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines the options of DatePicker. + * + * @interface DatePickerOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * Parameters of the date picker. + * + * @interface DatePickerOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare interface DatePickerOptions { /** - * Defines the DatePicker attribute functions. + * Specifies the start date of the date selector. * - * @extends CommonMethod + * @type { ?Date } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Defines the DatePicker attribute functions. + * Specifies the start date of the date selector. * - * @extends CommonMethod + * @type { ?Date } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Defines the DatePicker attribute functions. + * Start date of the picker. * - * @extends CommonMethod + * @type { ?Date } + * @default Date('1970-1-1') * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare class DatePickerAttribute extends CommonMethod { - /** - * Date selector: true: displays the lunar calendar. false: The lunar calendar is not displayed. - * - * @param { boolean } value - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Date selector: true: displays the lunar calendar. false: The lunar calendar is not displayed. - * - * @param { boolean } value - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Specifies whether to display the lunar calendar. - * - * @param { boolean } value - Whether to display the lunar calendar. - *
- true: Display the lunar calendar. - *
- false: Do not display the lunar. - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - lunar(value: boolean): DatePickerAttribute; - - /** - * Specifies whether to display the lunar calendar. - * This API supports the undefined type for the isLunar parameter. - * - * @param { Optional } isLunar - Whether to display the lunar calendar. - *
- true: Display the lunar calendar. - *
- false: Do not display the lunar. - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - lunar(isLunar: Optional): DatePickerAttribute; - - /** - * Sets the text style of disappearing items - * - * @param { PickerTextStyle } value - indicates the text style of disappearing items. - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the text style for the top and bottom items. - * - * @param { PickerTextStyle } value - Font color, font size, and font weight of the top and bottom items. - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - disappearTextStyle(value: PickerTextStyle): DatePickerAttribute; - - /** - * Sets the text style for the top and bottom items. - * This API supports the undefined type for the style parameter. - * - * @param { Optional } style - Font color, font size, and font weight of the top and bottom items. - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - disappearTextStyle(style: Optional): DatePickerAttribute; - - /** - * Sets the text style of normal items - * - * @param { PickerTextStyle } value - indicates the text style of normal items. - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the text style for all items except the top, bottom, and selected items. - * - * @param { PickerTextStyle } value - Font color, font size, and font weight of all items except the top, - *
bottom, and selected items. - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - textStyle(value: PickerTextStyle): DatePickerAttribute; - - /** - * Sets the text style for all items except the top, bottom, and selected items. - * This API supports the undefined type for the style parameter. - * - * @param { Optional } style - Font color, font size, and font weight of all items except the top, - *
bottom, and selected items. - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - textStyle(style: Optional): DatePickerAttribute; - - /** - * Sets the text style of selected items - * - * @param { PickerTextStyle } value - indicates the text style of selected items. - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the text style for the selected item. - * - * @param { PickerTextStyle } value - Font color, font size, and font weight of the selected item. - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - selectedTextStyle(value: PickerTextStyle): DatePickerAttribute; - - /** - * Sets the text style for the selected item. - * this API supports the undefined type for the style parameter. - * - * @param { Optional } style - Font color, font size, and font weight of the selected item. - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - selectedTextStyle(style: Optional): DatePickerAttribute; - - /** - * Triggered when a date is selected. - * - * @param { function } callback - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - * @deprecated since 10 - * @useinstead datePicker/DatePickerAttribute#onDateChange - */ - onChange(callback: (value: DatePickerResult) => void): DatePickerAttribute; - - /** - * This event is triggered when a DatePicker date or time is selected. - * - * @param { function } callback - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * This event is triggered when a DatePicker date or time is selected. - * - * @param { function } callback - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Triggered when a date is selected. - * Anonymous Object Rectification. - * - * @param { Callback } callback - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - onDateChange(callback: Callback): DatePickerAttribute; - - /** - * Triggered when a date is selected. - * - * @param { Optional> } callback - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - onDateChange(callback: Optional>): DatePickerAttribute; - - /** - * Sets the sensitivity to the digital crown rotation. - * - * @param { Optional } sensitivity - Sensitivity to the digital crown rotation. - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - digitalCrownSensitivity(sensitivity: Optional): DatePickerAttribute; - - /** - * Sets whether to enable haptic feedback. - * - * @param { Optional } enable - Whether to enable haptic feedback. - *
true (default): Haptic feedback is enabled. - *
false: Haptic feedback is disabled. - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 18 - */ - enableHapticFeedback(enable: Optional): DatePickerAttribute; - - /** - * Can scroll loop if true is set, on the contrary it can not. - * - * @param { Optional } isLoop - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - canLoop(isLoop: Optional): DatePickerAttribute; - } - + start?: Date; + /** - * Defines the style of the lunar calendar switch in the DatePickerDialog component. - * - * @interface LunarSwitchStyle + * Specifies the end date for the date selector. + * + * @type { ?Date } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Specifies the end date for the date selector. + * + * @type { ?Date } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * End date of the picker. + * + * @type { ?Date } + * @default Date('2100-12-31') * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare interface LunarSwitchStyle { - /** - * Background color of the switch when it is on. - * - * @type { ?ResourceColor } - * @default $r('sys.color.ohos_id_color_text_primary_actived') - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - selectedColor?: ResourceColor; - - /** - * Border color of the switch when it is off. - * - * @type { ?ResourceColor } - * @default $r('sys.color.ohos_id_color_switch_outline_off') - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - unselectedColor?: ResourceColor; - - /** - * Color of the icon inside the switch. - * - * @type { ?ResourceColor } - * @default Color.White - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - strokeColor?: ResourceColor; - } - + end?: Date; + /** - * Defines the DatePickerDialogOptions for Data Picker Dialog. + * Specifies the date selector check date or time selector check time. * - * @extends DatePickerOptions - * @interface DatePickerDialogOptions + * @type { ?Date } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Defines the DatePickerDialogOptions for Data Picker Dialog. + * Specifies the date selector check date or time selector check time. * - * @extends DatePickerOptions - * @interface DatePickerDialogOptions + * @type { ?Date } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Parameters of the date picker dialog box. + * Date of the selected item. * - * @extends DatePickerOptions - * @interface DatePickerDialogOptions + * @type { ?Date } + * @default current system date * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ - declare interface DatePickerDialogOptions extends DatePickerOptions { - /** - * Date selector: true: displays the lunar calendar. false: The lunar calendar is not displayed. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Date selector: true: displays the lunar calendar. false: The lunar calendar is not displayed. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Whether to display the lunar calendar. - * The value true means to display the lunar calendar, and false means the opposite. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - lunar?: boolean; - - /** - * Whether to show the switch to display the lunar. - * - * @type { ?boolean } value - indicates whether to show the switch to display the lunar. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Whether to display the lunar calendar switch. - * The value true means to display the lunar calendar switch, and false means the opposite. - * - * @type { ?boolean } value - indicates whether to show the switch to display the lunar. - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - lunarSwitch?: boolean; - - /** - * Style of the lunar calendar switch. - * - * @type { ?LunarSwitchStyle } - * @default { selectedColor: $r('sys.color.ohos_id_color_text_primary_actived'), - *
unselectedColor: $r('sys.color.ohos_id_color_switch_outline_off'), strokeColor: Color.White }. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - lunarSwitchStyle?: LunarSwitchStyle; - - /** - * Indicates whether to show the time selector. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Whether to display the time item. - * The value true means to display the time item, and false means the opposite. - * - *

NOTE: - *
With showTime=true, the mode parameter has no effect and the default three columns for year, - *
month, and day are displayed. - *

- * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - showTime?: boolean; - - /** - * Indicates whether to display the 24-hour clock. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Whether to display time in 24-hour format. - * The value true means to display time in 24-hour format, and false means the opposite. - * - *

NOTE: - *
When the display time is in 12-hour format, the AM/PM zone does not change depending on the hour portion. - *

- * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - useMilitaryTime?: boolean; - - /** - * Text style of disappearing items - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Font color, font size, and font width for the top and bottom items. - * - * @type { ?PickerTextStyle } - * @default {
color: '#ff182431',
font: {
size: '14fp',
weight: FontWeight.Regular
}
} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - disappearTextStyle?: PickerTextStyle; - - /** - * Text style of normal items - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Font color, font size, and font width of all items except the top, bottom, and selected items. - * - * @type { ?PickerTextStyle } - * @default {
color: '#ff182431',
font: {
size: '16fp',
weight: FontWeight.Regular
}
} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - textStyle?: PickerTextStyle; - - /** - * Style of accept button. - * - *

NOTE: - *
In the acceptButtonStyle and cancelButtonStyle configurations, - *
only one primary field can be set to true at most. - *
If both the primary fields are set to true, neither will take effect. - *

- * - * @type { ?PickerDialogButtonStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - acceptButtonStyle?: PickerDialogButtonStyle; - - /** - * Style of cancel button. - * - *

NOTE: - *
In the acceptButtonStyle and cancelButtonStyle configurations, - *
only one primary field can be set to true at most. - *
If both the primary fields are set to true, neither will take effect. - *

- * - * @type { ?PickerDialogButtonStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - cancelButtonStyle?: PickerDialogButtonStyle; - - /** - * Font color, font size, and font width of the selected item. - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Font color, font size, and font width of the selected item. - * - * @type { ?PickerTextStyle } - * @default {
color: '#ff007dff',
font: {
size: '20vp',
weight: FontWeight.Medium
} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - selectedTextStyle?: PickerTextStyle; - - /** - * Mask Region of dialog. The size cannot exceed the main window. - * - * @type { ?Rectangle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Mask area of the dialog box. - * Events outside the mask area are transparently transmitted, and events within the mask area are not. - * - * @type { ?Rectangle } - * @default { x: 0, y: 0, width: '100%', height: '100%' } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - maskRect?: Rectangle; - - /** - * Defines the dialog alignment of the screen. - * - * @type { ?DialogAlignment } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Alignment mode of the dialog box in the vertical direction. - * - * @type { ?DialogAlignment } - * @default DialogAlignment.Default - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - alignment?: DialogAlignment; - - /** - * Defines the dialog offset. - * - * @type { ?Offset } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Offset of the dialog box based on the alignment settings. - * - * @type { ?Offset } - * @default { dx: 0 , dy: 0 } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - offset?: Offset; - - /** - * Callback invoked when the OK button in the dialog box is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - * @deprecated since 10 - * @useinstead datePicker/DatePickerDialogOptions#onDateAccept - */ - onAccept?: (value: DatePickerResult) => void; - - /** - * Called when the Cancel button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the Cancel button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the Cancel button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Callback invoked when the Cancel button in the dialog box is clicked. - * Anonymous Object Rectification. - * - * @type { ?VoidCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - onCancel?: VoidCallback; - - /** - * Callback invoked when the selected item in the picker changes. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - * @deprecated since 10 - * @useinstead datePicker/DatePickerDialogOptions#onDateChange - */ - onChange?: (value: DatePickerResult) => void; - - /** - * Called when the OK button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the OK button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Callback invoked when the OK button in the dialog box is clicked. - * - *

NOTE: - *
When showTime is set to true, the hour and minute in the value returned by - *
the callback are the hour and minute selected in the picker. Otherwise, - *
the hour and minute are the hour and minute of the system time. - *

- * - * @type { ?Callback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - onDateAccept?: Callback; - - /** - * This event is triggered when a DatePicker date or time is selected in dialog. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Callback invoked when the selected item in the picker changes. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Callback invoked when the selected item in the picker changes. - * Anonymous Object Rectification. - * - *

NOTE: - *
When showTime is set to true, the hour and minute in the value returned by - *
the callback are the hour and minute selected in the picker. Otherwise, - *
the hour and minute are the hour and minute of the system time. - *

- * - * @type { ?Callback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - onDateChange?: Callback; - - /** - * Defines the datePickerDialog's background color - * - * @type { ?ResourceColor } - * @default Color.Transparent - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Backplane color of the dialog box. - * - * @type { ?ResourceColor } - * @default Color.Transparent - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - backgroundColor?: ResourceColor; - - /** - * Defines the datePickerDialog's background blur Style - * - * @type { ?BlurStyle } - * @default BlurStyle.COMPONENT_ULTRA_THICK - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Background blur style of the dialog box. - * - * @type { ?BlurStyle } - * @default BlurStyle.COMPONENT_ULTRA_THICK - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - backgroundBlurStyle?: BlurStyle; - - /** - * Options for customizing the background blur style. - * - * @type { ?BackgroundBlurStyleOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 19 - */ - backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; - - /** - * Options for customizing the background effect. - * - * @type { ?BackgroundEffectOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 19 - */ - backgroundEffect?: BackgroundEffectOptions; - - /** - * Event callback when the dialog box appears. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - /** - * Event callback when the dialog box appears. - * - *

NOTE: - *
1. The normal timing sequence is as follows: onWillAppear > onDidAppear > - * (onDateAccept/onCancel/onDateChange) > onWillDisappear > onDidDisappear. - *
2. You can set the callback event for changing the dialog box display effect in onDidAppear. - * The settings take effect next time the dialog box appears. - *
3. If the user closes the dialog box immediately after it appears, - * onWillDisappear is invoked before onDidAppear. - *
4. If the dialog box is closed before its entrance animation is finished, - * this callback is not invoked. - *

- * - * @type { ?VoidCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - onDidAppear?: VoidCallback; - - /** - * Callback function when the dialog disappears. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - /** - * Event callback when the dialog box disappears. - * - *

NOTE: - *
1. The normal timing sequence is as follows: onWillAppear > onDidAppear > - *
(onDateAccept/onCancel/onDateChange) > onWillDisappear > onDidDisappear. - *

- * - * @type { ?VoidCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - onDidDisappear?: VoidCallback; - - /** - * Callback function before the dialog openAnimation starts. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - /** - * Event callback when the dialog box is about to appear. - * - *

NOTE: - *
1. The normal timing sequence is as follows: onWillAppear > onDidAppear > - * (onDateAccept/onCancel/onDateChange) > onWillDisappear > onDidDisappear. - *
2. You can set the callback event for changing the dialog box display effect in onWillAppear. - * The settings take effect next time the dialog box appears. - *

- * - * @type { ?VoidCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - onWillAppear?: VoidCallback; - - /** - * Callback function before the dialog closeAnimation starts. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - /** - * Event callback when the dialog box is about to disappear. - * - *

NOTE: - *
1. The normal timing sequence is as follows: onWillAppear > onDidAppear > - * (onDateAccept/onCancel/onDateChange) > onWillDisappear > onDidDisappear. - *
2. If the user closes the dialog box immediately after it appears, - * onWillDisappear is invoked before onDidAppear. - *

- * - * @type { ?VoidCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - onWillDisappear?: VoidCallback; - - /** - * Shadow of the dialog box. - * Default value on 2-in-1 devices: ShadowStyle.OUTER_FLOATING_MD - * when the dialog box is focused and ShadowStyle.OUTER_FLOATING_SM - * - * @type { ?(ShadowOptions | ShadowStyle) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - shadow?: ShadowOptions | ShadowStyle; - - /** - * Whether to display a leading zero for the hours and minutes. - * - *

NOTE: - *
Currently only the configuration of the hour and minute parameters is supported. - *

- * - * @type { ?DateTimeOptions } - * @default hour: In the 24-hour format, it defaults to 2-digit, which means a leading zero is used; - *
In the 12-hour format, it defaults to numeric, which means no leading zero is used. - *
minute: defaults to 2-digit, which means a leading zero is used. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - dateTimeOptions?: DateTimeOptions; - - /** - * Whether to enable the hover mode. - * - * @type { ?boolean } - * @default false - meaning not to enable the hover mode. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - enableHoverMode?: boolean; - - /** - * Display area of the dialog box in hover mode. - * - * @type { ?HoverModeAreaType } - * @default HoverModeAreaType.BOTTOM_SCREEN - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - hoverModeArea?: HoverModeAreaType; - - /** - * Whether to enable haptic feedback. - * The value true means to enable haptic feedback, and false means the opposite - * - * @type { ?boolean } - * @default true - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 18 - */ - enableHapticFeedback?: boolean; - - /** - * Can scroll loop if true is set, on the contrary it can not. - * - * @type { ?boolean } - * @default true - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - canLoop?: boolean; - } + selected?: Date; /** - * Defines DatePickerDialog which uses show method to show DatePicker dialog. + * Specifies the date selector check date or time selector check time. + * + * @type { ?(Date | Bindable) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + selected?: Date | Bindable; + + /** + * Date columns to be displayed. + * + *

NOTE: + *
In DatePickerDialog, with showTime=true, this parameter has no effect and the default three columns for year, + *
month, and day are displayed. + *

+ * + * @type { ?DatePickerMode } + * @default DatePickerMode.DATE - which means to display three columns: year, month, and day. + *
Decimal values are rounded off. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + mode?: DatePickerMode; +} + +/** + * Defines the DatePicker Component. + * + * @interface DatePickerInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines the DatePicker Component. + * + * @interface DatePickerInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * Creates a date picker in the given date range. + * + * @interface DatePickerInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + * @noninterop + */ +interface DatePickerInterface { + /** + * Defines the DatePicker constructor. * + * @param { DatePickerOptions } options + * @returns { DatePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Defines DatePickerDialog which uses show method to show DatePicker dialog. + * Defines the DatePicker constructor. * + * @param { DatePickerOptions } options + * @returns { DatePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Defines DatePickerDialog which uses show method to show DatePicker dialog. + * Parameters of the date picker. * + * @param { DatePickerOptions } options - Parameters of the date picker. + * @returns { DatePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare class DatePickerDialog { - /** - * Invoking method display. - * - * @param { DatePickerDialogOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Invoking method display. - * - * @param { DatePickerDialogOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Shows a date picker dialog box. - * - * @param { DatePickerDialogOptions } options - Parameters of the date picker dialog box. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - * @deprecated since 18 - * @useinstead ohos.arkui.UIContext.UIContext#showDatePickerDialog - */ - static show(options?: DatePickerDialogOptions); - } - + (options?: DatePickerOptions): DatePickerAttribute; +} + +/** + * Defines the DatePicker attribute functions. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines the DatePicker attribute functions. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * Defines the DatePicker attribute functions. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + * @noninterop + */ +declare class DatePickerAttribute extends CommonMethod { /** - * Defines DatePicker Component. + * Date selector: true: displays the lunar calendar. false: The lunar calendar is not displayed. * + * @param { boolean } value + * @returns { DatePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Defines DatePicker Component. + * Date selector: true: displays the lunar calendar. false: The lunar calendar is not displayed. * + * @param { boolean } value + * @returns { DatePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Defines DatePicker Component. + * Specifies whether to display the lunar calendar. * + * @param { boolean } value - Whether to display the lunar calendar. + *
- true: Display the lunar calendar. + *
- false: Do not display the lunar. + * @default false + * @returns { DatePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare const DatePicker: DatePickerInterface; - + lunar(value: boolean): DatePickerAttribute; + /** - * Defines DatePicker Component instance. + * Specifies whether to display the lunar calendar. + * This API supports the undefined type for the isLunar parameter. * + * @param { Optional } isLunar - Whether to display the lunar calendar. + *
- true: Display the lunar calendar. + *
- false: Do not display the lunar. + * @default false + * @returns { DatePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ + lunar(isLunar: Optional): DatePickerAttribute; + /** - * Defines DatePicker Component instance. + * Sets the text style of disappearing items * + * @param { PickerTextStyle } value - indicates the text style of disappearing items. + * @returns { DatePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Defines DatePicker Component instance. + * Sets the text style for the top and bottom items. * + * @param { PickerTextStyle } value - Font color, font size, and font weight of the top and bottom items. + * @default {
color: '#ff182431',
font: {
size: '14fp',
weight: FontWeight.Regular
}
} + * @returns { DatePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare const DatePickerInstance: DatePickerAttribute; - + disappearTextStyle(value: PickerTextStyle): DatePickerAttribute; + + /** + * Sets the text style for the top and bottom items. + * This API supports the undefined type for the style parameter. + * + * @param { Optional } style - Font color, font size, and font weight of the top and bottom items. + * @default {
color: '#ff182431',
font: {
size: '14fp',
weight: FontWeight.Regular
}
} + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + disappearTextStyle(style: Optional): DatePickerAttribute; + + /** + * Sets the text style of normal items + * + * @param { PickerTextStyle } value - indicates the text style of normal items. + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Sets the text style for all items except the top, bottom, and selected items. + * + * @param { PickerTextStyle } value - Font color, font size, and font weight of all items except the top, + *
bottom, and selected items. + * @default {
color: '#ff182431',
font: {
size: '16fp',
weight: FontWeight.Regular
}
} + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + textStyle(value: PickerTextStyle): DatePickerAttribute; + + /** + * Sets the text style for all items except the top, bottom, and selected items. + * This API supports the undefined type for the style parameter. + * + * @param { Optional } style - Font color, font size, and font weight of all items except the top, + *
bottom, and selected items. + * @default {
color: '#ff182431',
font: {
size: '16fp',
weight: FontWeight.Regular
}
} + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + textStyle(style: Optional): DatePickerAttribute; + + /** + * Sets the text style of selected items + * + * @param { PickerTextStyle } value - indicates the text style of selected items. + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Sets the text style for the selected item. + * + * @param { PickerTextStyle } value - Font color, font size, and font weight of the selected item. + * @default {
color: '#ff007dff',
font: {
size: '20vp',
weight: FontWeight.Medium
}
} + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + selectedTextStyle(value: PickerTextStyle): DatePickerAttribute; + + /** + * Sets the text style for the selected item. + * this API supports the undefined type for the style parameter. + * + * @param { Optional } style - Font color, font size, and font weight of the selected item. + * @default {
color: '#ff007dff',
font: {
size: '20vp',
weight: FontWeight.Medium
}
} + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + selectedTextStyle(style: Optional): DatePickerAttribute; + + /** + * Triggered when a date is selected. + * + * @param { function } callback + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + * @deprecated since 10 + * @useinstead datePicker/DatePickerAttribute#onDateChange + */ + onChange(callback: (value: DatePickerResult) => void): DatePickerAttribute; - \ No newline at end of file + /** + * This event is triggered when a DatePicker date or time is selected. + * + * @param { function } callback + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * This event is triggered when a DatePicker date or time is selected. + * + * @param { function } callback + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + /** + * Triggered when a date is selected. + * Anonymous Object Rectification. + * + * @param { Callback } callback + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + onDateChange(callback: Callback): DatePickerAttribute; + + /** + * Triggered when a date is selected. + * + * @param { Optional> } callback + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + onDateChange(callback: Optional>): DatePickerAttribute; + + /** + * Sets the sensitivity to the digital crown rotation. + * + * @param { Optional } sensitivity - Sensitivity to the digital crown rotation. + * @default CrownSensitivity.MEDIUM + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + digitalCrownSensitivity(sensitivity: Optional): DatePickerAttribute; + + /** + * Sets whether to enable haptic feedback. + * + * @param { Optional } enable - Whether to enable haptic feedback. + *
true (default): Haptic feedback is enabled. + *
false: Haptic feedback is disabled. + * @default true + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + enableHapticFeedback(enable: Optional): DatePickerAttribute; + + /** + * Can scroll loop if true is set, on the contrary it can not. + * + * @param { Optional } isLoop + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + canLoop(isLoop: Optional): DatePickerAttribute; +} + +/** + * Defines the style of the lunar calendar switch in the DatePickerDialog component. + * + * @interface LunarSwitchStyle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare interface LunarSwitchStyle { + /** + * Background color of the switch when it is on. + * + * @type { ?ResourceColor } + * @default $r('sys.color.ohos_id_color_text_primary_actived') + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 + */ + selectedColor?: ResourceColor; + + /** + * Border color of the switch when it is off. + * + * @type { ?ResourceColor } + * @default $r('sys.color.ohos_id_color_switch_outline_off') + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 + */ + unselectedColor?: ResourceColor; + + /** + * Color of the icon inside the switch. + * + * @type { ?ResourceColor } + * @default Color.White + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 + */ + strokeColor?: ResourceColor; +} + +/** + * Defines the DatePickerDialogOptions for Data Picker Dialog. + * + * @extends DatePickerOptions + * @interface DatePickerDialogOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines the DatePickerDialogOptions for Data Picker Dialog. + * + * @extends DatePickerOptions + * @interface DatePickerDialogOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * Parameters of the date picker dialog box. + * + * @extends DatePickerOptions + * @interface DatePickerDialogOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare interface DatePickerDialogOptions extends DatePickerOptions { + /** + * Date selector: true: displays the lunar calendar. false: The lunar calendar is not displayed. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Date selector: true: displays the lunar calendar. false: The lunar calendar is not displayed. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Whether to display the lunar calendar. + * The value true means to display the lunar calendar, and false means the opposite. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + lunar?: boolean; + + /** + * Whether to show the switch to display the lunar. + * + * @type { ?boolean } value - indicates whether to show the switch to display the lunar. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Whether to display the lunar calendar switch. + * The value true means to display the lunar calendar switch, and false means the opposite. + * + * @type { ?boolean } value - indicates whether to show the switch to display the lunar. + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + lunarSwitch?: boolean; + + /** + * Style of the lunar calendar switch. + * + * @type { ?LunarSwitchStyle } + * @default { selectedColor: $r('sys.color.ohos_id_color_text_primary_actived'), + *
unselectedColor: $r('sys.color.ohos_id_color_switch_outline_off'), strokeColor: Color.White }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 + */ + lunarSwitchStyle?: LunarSwitchStyle; + + /** + * Indicates whether to show the time selector. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Whether to display the time item. + * The value true means to display the time item, and false means the opposite. + * + *

NOTE: + *
With showTime=true, the mode parameter has no effect and the default three columns for year, + *
month, and day are displayed. + *

+ * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + showTime?: boolean; + + /** + * Indicates whether to display the 24-hour clock. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Whether to display time in 24-hour format. + * The value true means to display time in 24-hour format, and false means the opposite. + * + *

NOTE: + *
When the display time is in 12-hour format, the AM/PM zone does not change depending on the hour portion. + *

+ * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + useMilitaryTime?: boolean; + + /** + * Text style of disappearing items + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Font color, font size, and font width for the top and bottom items. + * + * @type { ?PickerTextStyle } + * @default {
color: '#ff182431',
font: {
size: '14fp',
weight: FontWeight.Regular
}
} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + disappearTextStyle?: PickerTextStyle; + + /** + * Text style of normal items + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Font color, font size, and font width of all items except the top, bottom, and selected items. + * + * @type { ?PickerTextStyle } + * @default {
color: '#ff182431',
font: {
size: '16fp',
weight: FontWeight.Regular
}
} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + textStyle?: PickerTextStyle; + + /** + * Style of accept button. + * + *

NOTE: + *
In the acceptButtonStyle and cancelButtonStyle configurations, + *
only one primary field can be set to true at most. + *
If both the primary fields are set to true, neither will take effect. + *

+ * + * @type { ?PickerDialogButtonStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + acceptButtonStyle?: PickerDialogButtonStyle; + + /** + * Style of cancel button. + * + *

NOTE: + *
In the acceptButtonStyle and cancelButtonStyle configurations, + *
only one primary field can be set to true at most. + *
If both the primary fields are set to true, neither will take effect. + *

+ * + * @type { ?PickerDialogButtonStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + cancelButtonStyle?: PickerDialogButtonStyle; + + /** + * Font color, font size, and font width of the selected item. + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Font color, font size, and font width of the selected item. + * + * @type { ?PickerTextStyle } + * @default {
color: '#ff007dff',
font: {
size: '20vp',
weight: FontWeight.Medium
} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + selectedTextStyle?: PickerTextStyle; + + /** + * Mask Region of dialog. The size cannot exceed the main window. + * + * @type { ?Rectangle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Mask area of the dialog box. + * Events outside the mask area are transparently transmitted, and events within the mask area are not. + * + * @type { ?Rectangle } + * @default { x: 0, y: 0, width: '100%', height: '100%' } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + maskRect?: Rectangle; + + /** + * Defines the dialog alignment of the screen. + * + * @type { ?DialogAlignment } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Alignment mode of the dialog box in the vertical direction. + * + * @type { ?DialogAlignment } + * @default DialogAlignment.Default + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + alignment?: DialogAlignment; + + /** + * Defines the dialog offset. + * + * @type { ?Offset } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Offset of the dialog box based on the alignment settings. + * + * @type { ?Offset } + * @default { dx: 0 , dy: 0 } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + offset?: Offset; + + /** + * Callback invoked when the OK button in the dialog box is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + * @deprecated since 10 + * @useinstead datePicker/DatePickerDialogOptions#onDateAccept + */ + onAccept?: (value: DatePickerResult) => void; + + /** + * Called when the Cancel button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the Cancel button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Called when the Cancel button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + /** + * Callback invoked when the Cancel button in the dialog box is clicked. + * Anonymous Object Rectification. + * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + onCancel?: VoidCallback; + + /** + * Callback invoked when the selected item in the picker changes. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + * @deprecated since 10 + * @useinstead datePicker/DatePickerDialogOptions#onDateChange + */ + onChange?: (value: DatePickerResult) => void; + + /** + * Called when the OK button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Called when the OK button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + /** + * Callback invoked when the OK button in the dialog box is clicked. + * + *

NOTE: + *
When showTime is set to true, the hour and minute in the value returned by + *
the callback are the hour and minute selected in the picker. Otherwise, + *
the hour and minute are the hour and minute of the system time. + *

+ * + * @type { ?Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + onDateAccept?: Callback; + + /** + * This event is triggered when a DatePicker date or time is selected in dialog. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Callback invoked when the selected item in the picker changes. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + /** + * Callback invoked when the selected item in the picker changes. + * Anonymous Object Rectification. + * + *

NOTE: + *
When showTime is set to true, the hour and minute in the value returned by + *
the callback are the hour and minute selected in the picker. Otherwise, + *
the hour and minute are the hour and minute of the system time. + *

+ * + * @type { ?Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + onDateChange?: Callback; + + /** + * Defines the datePickerDialog's background color + * + * @type { ?ResourceColor } + * @default Color.Transparent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Backplane color of the dialog box. + * + * @type { ?ResourceColor } + * @default Color.Transparent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + backgroundColor?: ResourceColor; + + /** + * Defines the datePickerDialog's background blur Style + * + * @type { ?BlurStyle } + * @default BlurStyle.COMPONENT_ULTRA_THICK + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Background blur style of the dialog box. + * + * @type { ?BlurStyle } + * @default BlurStyle.COMPONENT_ULTRA_THICK + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + backgroundBlurStyle?: BlurStyle; + + /** + * Options for customizing the background blur style. + * + * @type { ?BackgroundBlurStyleOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; + + /** + * Options for customizing the background effect. + * + * @type { ?BackgroundEffectOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + backgroundEffect?: BackgroundEffectOptions; + + /** + * Event callback when the dialog box appears. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + /** + * Event callback when the dialog box appears. + * + *

NOTE: + *
1. The normal timing sequence is as follows: onWillAppear > onDidAppear > + * (onDateAccept/onCancel/onDateChange) > onWillDisappear > onDidDisappear. + *
2. You can set the callback event for changing the dialog box display effect in onDidAppear. + * The settings take effect next time the dialog box appears. + *
3. If the user closes the dialog box immediately after it appears, + * onWillDisappear is invoked before onDidAppear. + *
4. If the dialog box is closed before its entrance animation is finished, + * this callback is not invoked. + *

+ * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + onDidAppear?: VoidCallback; + + /** + * Callback function when the dialog disappears. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + /** + * Event callback when the dialog box disappears. + * + *

NOTE: + *
1. The normal timing sequence is as follows: onWillAppear > onDidAppear > + *
(onDateAccept/onCancel/onDateChange) > onWillDisappear > onDidDisappear. + *

+ * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + onDidDisappear?: VoidCallback; + + /** + * Callback function before the dialog openAnimation starts. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + /** + * Event callback when the dialog box is about to appear. + * + *

NOTE: + *
1. The normal timing sequence is as follows: onWillAppear > onDidAppear > + * (onDateAccept/onCancel/onDateChange) > onWillDisappear > onDidDisappear. + *
2. You can set the callback event for changing the dialog box display effect in onWillAppear. + * The settings take effect next time the dialog box appears. + *

+ * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + onWillAppear?: VoidCallback; + + /** + * Callback function before the dialog closeAnimation starts. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + /** + * Event callback when the dialog box is about to disappear. + * + *

NOTE: + *
1. The normal timing sequence is as follows: onWillAppear > onDidAppear > + * (onDateAccept/onCancel/onDateChange) > onWillDisappear > onDidDisappear. + *
2. If the user closes the dialog box immediately after it appears, + * onWillDisappear is invoked before onDidAppear. + *

+ * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + onWillDisappear?: VoidCallback; + + /** + * Shadow of the dialog box. + * Default value on 2-in-1 devices: ShadowStyle.OUTER_FLOATING_MD + * when the dialog box is focused and ShadowStyle.OUTER_FLOATING_SM + * + * @type { ?(ShadowOptions | ShadowStyle) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + shadow?: ShadowOptions | ShadowStyle; + + /** + * Whether to display a leading zero for the hours and minutes. + * + *

NOTE: + *
Currently only the configuration of the hour and minute parameters is supported. + *

+ * + * @type { ?DateTimeOptions } + * @default hour: In the 24-hour format, it defaults to 2-digit, which means a leading zero is used; + *
In the 12-hour format, it defaults to numeric, which means no leading zero is used. + *
minute: defaults to 2-digit, which means a leading zero is used. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + dateTimeOptions?: DateTimeOptions; + + /** + * Whether to enable the hover mode. + * + * @type { ?boolean } + * @default false - meaning not to enable the hover mode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 + */ + enableHoverMode?: boolean; + + /** + * Display area of the dialog box in hover mode. + * + * @type { ?HoverModeAreaType } + * @default HoverModeAreaType.BOTTOM_SCREEN + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 + */ + hoverModeArea?: HoverModeAreaType; + + /** + * Whether to enable haptic feedback. + * The value true means to enable haptic feedback, and false means the opposite + * + * @type { ?boolean } + * @default true + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + enableHapticFeedback?: boolean; + + /** + * Can scroll loop if true is set, on the contrary it can not. + * + * @type { ?boolean } + * @default true + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + canLoop?: boolean; +} + +/** + * Defines DatePickerDialog which uses show method to show DatePicker dialog. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines DatePickerDialog which uses show method to show DatePicker dialog. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * Defines DatePickerDialog which uses show method to show DatePicker dialog. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare class DatePickerDialog { + /** + * Invoking method display. + * + * @param { DatePickerDialogOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Invoking method display. + * + * @param { DatePickerDialogOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Shows a date picker dialog box. + * + * @param { DatePickerDialogOptions } options - Parameters of the date picker dialog box. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + * @deprecated since 18 + * @useinstead ohos.arkui.UIContext.UIContext#showDatePickerDialog + */ + static show(options?: DatePickerDialogOptions); +} + +/** + * Defines DatePicker Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines DatePicker Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * Defines DatePicker Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + * @noninterop + */ +declare const DatePicker: DatePickerInterface; + +/** + * Defines DatePicker Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines DatePicker Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * Defines DatePicker Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + * @noninterop + */ +declare const DatePickerInstance: DatePickerAttribute; + + diff --git a/api/@internal/component/ets/gauge.d.ts b/api/@internal/component/ets/gauge.d.ts index 9b39da9c99f24917745844fb511e953d9b0e56c7..2121c7bb5b6da8b3d22ba5c034b9092824638862 100644 --- a/api/@internal/component/ets/gauge.d.ts +++ b/api/@internal/component/ets/gauge.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod,CommonConfiguration,ContentModifier,MultiShadowOptions,Optional } from './common' +import { CustomBuilder } from './builder' +import { ResourceStr,Dimension,ResourceColor,Length } from './units' +import { LinearGradient } from './dataPanel' +/*** endif */ + /** * Defines Gauge constructor options. * @@ -26,7 +33,8 @@ * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface GaugeOptions { /** @@ -72,7 +80,8 @@ interface GaugeOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ value: number; @@ -119,7 +128,8 @@ interface GaugeOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ min?: number; @@ -166,7 +176,8 @@ interface GaugeOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ max?: number; } @@ -203,7 +214,9 @@ interface GaugeOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + * @noninterop */ interface GaugeInterface { /** @@ -262,7 +275,8 @@ interface GaugeInterface { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ (options: GaugeOptions): GaugeAttribute; } @@ -284,7 +298,8 @@ interface GaugeInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GaugeShadowOptions extends MultiShadowOptions {} @@ -303,7 +318,8 @@ declare interface GaugeShadowOptions extends MultiShadowOptions {} * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GaugeIndicatorOptions { @@ -324,7 +340,8 @@ declare interface GaugeIndicatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ icon?: ResourceStr; @@ -345,7 +362,8 @@ declare interface GaugeIndicatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ space?: Dimension; } @@ -358,7 +376,8 @@ declare interface GaugeIndicatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GaugeConfiguration extends CommonConfiguration { /** @@ -368,7 +387,8 @@ declare interface GaugeConfiguration extends CommonConfiguration { /** @@ -458,7 +482,8 @@ declare class GaugeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ value(value: number): GaugeAttribute; @@ -498,7 +523,8 @@ declare class GaugeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ startAngle(angle: number): GaugeAttribute; @@ -538,7 +564,8 @@ declare class GaugeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ endAngle(angle: number): GaugeAttribute; @@ -578,7 +605,8 @@ declare class GaugeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ colors(colors: ResourceColor | LinearGradient | Array<[ResourceColor | LinearGradient, number]>): GaugeAttribute; @@ -618,7 +646,8 @@ declare class GaugeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeWidth(length: Length): GaugeAttribute; @@ -639,7 +668,8 @@ declare class GaugeAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ description(value: CustomBuilder): GaugeAttribute; @@ -660,7 +690,8 @@ declare class GaugeAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ trackShadow(value: GaugeShadowOptions): GaugeAttribute; @@ -681,7 +712,8 @@ declare class GaugeAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ indicator(value: GaugeIndicatorOptions): GaugeAttribute; @@ -694,7 +726,8 @@ declare class GaugeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ privacySensitive(isPrivacySensitiveMode: Optional): GaugeAttribute; @@ -706,7 +739,8 @@ declare class GaugeAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentModifier(modifier: ContentModifier): GaugeAttribute; } @@ -740,6 +774,7 @@ declare class GaugeAttribute extends CommonMethod { * @form * @atomicservice * @since 11 + * @noninterop */ declare const Gauge: GaugeInterface; @@ -772,6 +807,7 @@ declare const Gauge: GaugeInterface; * @form * @atomicservice * @since 11 + * @noninterop */ declare const GaugeInstance: GaugeAttribute; diff --git a/api/@internal/component/ets/image_animator.d.ts b/api/@internal/component/ets/image_animator.d.ts index 85829650f83a8f38dd76547f563ea1c325bb5649..df829102b1c9f16e17d9387f034fa481abfd574d 100644 --- a/api/@internal/component/ets/image_animator.d.ts +++ b/api/@internal/component/ets/image_animator.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource } from "../../global/resource"; +import image from '../../@ohos.multimedia.image' +import { CommonMethod, PixelMap } from './common' +import { AnimationStatus,FillMode } from './enums' +/*** endif */ + /** * Defines the ImageAnimator Interface. * @@ -42,723 +49,750 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + * @noninterop */ - interface ImageAnimatorInterface { - /** - * ImageAnimator is returned. - * - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * ImageAnimator is returned. - * - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * ImageAnimator is returned. - * - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - (): ImageAnimatorAttribute; - } - - /** - * Defines the ImageFrameInfo Interface. - * - * @interface ImageFrameInfo +interface ImageAnimatorInterface { + /** + * ImageAnimator is returned. + * + * @returns { ImageAnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Defines the ImageFrameInfo Interface. + * ImageAnimator is returned. * - * @interface ImageFrameInfo + * @returns { ImageAnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Defines the ImageFrameInfo Interface. + * ImageAnimator is returned. * - * @interface ImageFrameInfo + * @returns { ImageAnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - interface ImageFrameInfo { - /** - * Image path - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Image path - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Image path - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Image path - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - /** - * Image path - * - * @type { string | Resource | PixelMap } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - src: string | Resource | PixelMap; - /** - * Image width - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Image width - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Image width - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - width?: number | string; - /** - * Image height - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Image height - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Image height - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - height?: number | string; - /** - * Vertical coordinate of the image relative to the upper left corner of the component - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Vertical coordinate of the image relative to the upper left corner of the component - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Vertical coordinate of the image relative to the upper left corner of the component - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - top?: number | string; - /** - * Horizontal coordinate of the image relative to the upper left corner of the component - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Horizontal coordinate of the image relative to the upper left corner of the component - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Horizontal coordinate of the image relative to the upper left corner of the component - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - left?: number | string; - /** - * Playback duration of this image frame, in milliseconds. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Playback duration of this image frame, in milliseconds. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Playback duration of this image frame, in milliseconds. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - duration?: number; - } - - /** - * inheritance CommonMethod - * - * @extends CommonMethod + (): ImageAnimatorAttribute; +} + +/** + * Defines the ImageFrameInfo Interface. + * + * @interface ImageFrameInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ +/** + * Defines the ImageFrameInfo Interface. + * + * @interface ImageFrameInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Defines the ImageFrameInfo Interface. + * + * @interface ImageFrameInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ +interface ImageFrameInfo { + /** + * Image path + * + * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * inheritance CommonMethod + * Image path * - * @extends CommonMethod + * @type { string | Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 9 + */ + /** + * Image path + * + * @type { string | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * inheritance CommonMethod + * Image path * - * @extends CommonMethod + * @type { string | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - declare class ImageAnimatorAttribute extends CommonMethod { - /** - * list images - * - * @param { Array } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * list images - * - * @param { Array } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the image frame information. - * - *

NOTE: - *
Dynamic update is not supported. - *

- * - * @param { Array } value - Image frame informatio, Default value is []. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - images(value: Array): ImageAnimatorAttribute; - - /** - * The default value is the initial state, which is used to control the playback status. - * - * @param { AnimationStatus } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * The default value is the initial state, which is used to control the playback status. - * - * @param { AnimationStatus } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the playback state of the animation. - * - * @param { AnimationStatus } value - Playback state of the animation, Default value is AnimationStatus.Initial. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - state(value: AnimationStatus): ImageAnimatorAttribute; - - /** - * The unit is millisecond. - * - * @param { number } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * The unit is millisecond. - * - * @param { number } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the playback duration. - * The unit is millisecond. - * - *

NOTE: - *
This attribute does not take effect when a separate duration is set for any of the image frames. - *

- * - * @param { number } value - Playback duration, Default value is 1000. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - duration(value: number): ImageAnimatorAttribute; - - /** - * Set the playback sequence. - * - * @param { boolean } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Set the playback sequence. - * - * @param { boolean } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the playback direction. - * - * @param { boolean } value - Playback direction, Default value is false. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - reverse(value: boolean): ImageAnimatorAttribute; - - /** - * Sets whether the image size is fixed to the component size. - * - * @param { boolean } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Sets whether the image size is fixed to the component size. - * - * @param { boolean } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets whether the image size is fixed at the component size. - * - * @param { boolean } value - Whether the image size is fixed at the component size, Default value is true. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - fixedSize(value: boolean): ImageAnimatorAttribute; - - /** - * Sets the number of images to be pre-decoded. - * - * @param { number } value - Number of images to be pre-decoded, Default value is 0. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - * @deprecated since 9 - */ - preDecode(value: number): ImageAnimatorAttribute; - - /** - * Sets the state before and after the animation starts - * - * @param { FillMode } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Sets the state before and after the animation starts - * - * @param { FillMode } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the status before and after execution of the animation in the current playback direction. - * - * @param { FillMode } value - Status before and after execution of the animation in the current playback direction, - * Default value is FillMode.Forwards. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - fillMode(value: FillMode): ImageAnimatorAttribute; - - /** - * Played once by default - * - * @param { number } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Played once by default - * - * @param { number } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the number of times that the animation is played. - * Played once by default - * - * @param { number } value - Number of times that the animation is played, Default value is 1. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - iterations(value: number): ImageAnimatorAttribute; - - /** - * Sets whether the component should automatically pause or resume based on its visibility, using the system's - * onVisibleAreaChange event. - * - * @param { boolean } monitorInvisibleArea - Whether the component should automatically pause or resume based on - * its visibility, using the system's onVisibleAreaChange event, Default value is false. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 17 - */ - monitorInvisibleArea(monitorInvisibleArea: boolean) : ImageAnimatorAttribute; - - /** - * Status callback, which is triggered when the animation starts to play. - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Status callback, which is triggered when the animation starts to play. - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Status callback, which is triggered when the animation starts to play. - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - onStart(event: () => void): ImageAnimatorAttribute; - - /** - * Status callback, which is triggered when the animation pauses. - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Status callback, which is triggered when the animation pauses. - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Status callback, which is triggered when the animation pauses. - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - onPause(event: () => void): ImageAnimatorAttribute; - - /** - * Status callback, triggered when the animation is replayed - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Status callback, triggered when the animation is replayed - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Status callback, triggered when the animation is replayed - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - onRepeat(event: () => void): ImageAnimatorAttribute; - - /** - * Status callback, which is triggered when the animation is canceled. - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Status callback, which is triggered when the animation is canceled. - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Status callback, which is triggered when the animation playback returns to the initial state. - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - onCancel(event: () => void): ImageAnimatorAttribute; - - /** - * Status callback, which is triggered when the animation playback is complete. - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Status callback, which is triggered when the animation playback is complete. - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Status callback, which is triggered when the animation playback is complete or stopped. - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - onFinish(event: () => void): ImageAnimatorAttribute; - } - - /** - * Defines ImageAnimator Component. + /** + * Image path + * + * @type { string | Resource | PixelMap } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + src: string | Resource | PixelMap; + /** + * Image width * + * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Defines ImageAnimator Component. + * Image width * + * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Defines ImageAnimator Component. + * Image width * + * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare const ImageAnimator: ImageAnimatorInterface; - + width?: number | string; /** - * Defines ImageAnimator Component instance. + * Image height * + * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Defines ImageAnimator Component instance. + * Image height * + * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Defines ImageAnimator Component instance. + * Image height * + * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + height?: number | string; + /** + * Vertical coordinate of the image relative to the upper left corner of the component + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Vertical coordinate of the image relative to the upper left corner of the component + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Vertical coordinate of the image relative to the upper left corner of the component + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + top?: number | string; + /** + * Horizontal coordinate of the image relative to the upper left corner of the component + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Horizontal coordinate of the image relative to the upper left corner of the component + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Horizontal coordinate of the image relative to the upper left corner of the component + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + left?: number | string; + /** + * Playback duration of this image frame, in milliseconds. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Playback duration of this image frame, in milliseconds. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Playback duration of this image frame, in milliseconds. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + duration?: number; +} + +/** + * inheritance CommonMethod + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ +/** + * inheritance CommonMethod + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * inheritance CommonMethod + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + * @noninterop + */ +declare class ImageAnimatorAttribute extends CommonMethod { + /** + * list images + * + * @param { Array } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * list images + * + * @param { Array } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the image frame information. + * + *

NOTE: + *
Dynamic update is not supported. + *

+ * + * @param { Array } value - Image frame informatio, Default value is []. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + images(value: Array): ImageAnimatorAttribute; + + /** + * The default value is the initial state, which is used to control the playback status. + * + * @param { AnimationStatus } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * The default value is the initial state, which is used to control the playback status. + * + * @param { AnimationStatus } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the playback state of the animation. + * + * @param { AnimationStatus } value - Playback state of the animation, Default value is AnimationStatus.Initial. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + state(value: AnimationStatus): ImageAnimatorAttribute; + + /** + * The unit is millisecond. + * + * @param { number } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * The unit is millisecond. + * + * @param { number } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the playback duration. + * The unit is millisecond. + * + *

NOTE: + *
This attribute does not take effect when a separate duration is set for any of the image frames. + *

+ * + * @param { number } value - Playback duration, Default value is 1000. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + duration(value: number): ImageAnimatorAttribute; + + /** + * Set the playback sequence. + * + * @param { boolean } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Set the playback sequence. + * + * @param { boolean } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the playback direction. + * + * @param { boolean } value - Playback direction, Default value is false. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + reverse(value: boolean): ImageAnimatorAttribute; + + /** + * Sets whether the image size is fixed to the component size. + * + * @param { boolean } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Sets whether the image size is fixed to the component size. + * + * @param { boolean } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets whether the image size is fixed at the component size. + * + * @param { boolean } value - Whether the image size is fixed at the component size, Default value is true. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + fixedSize(value: boolean): ImageAnimatorAttribute; + + /** + * Sets the number of images to be pre-decoded. + * + * @param { number } value - Number of images to be pre-decoded, Default value is 0. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + * @deprecated since 9 + */ + preDecode(value: number): ImageAnimatorAttribute; + + /** + * Sets the state before and after the animation starts + * + * @param { FillMode } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Sets the state before and after the animation starts + * + * @param { FillMode } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the status before and after execution of the animation in the current playback direction. + * + * @param { FillMode } value - Status before and after execution of the animation in the current playback direction, + * Default value is FillMode.Forwards. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + fillMode(value: FillMode): ImageAnimatorAttribute; + + /** + * Played once by default + * + * @param { number } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Played once by default + * + * @param { number } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Sets the number of times that the animation is played. + * Played once by default + * + * @param { number } value - Number of times that the animation is played, Default value is 1. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + iterations(value: number): ImageAnimatorAttribute; + + /** + * Sets whether the component should automatically pause or resume based on its visibility, using the system's + * onVisibleAreaChange event. + * + * @param { boolean } monitorInvisibleArea - Whether the component should automatically pause or resume based on + * its visibility, using the system's onVisibleAreaChange event, Default value is false. + * @returns { ImageAnimatorAttribute } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 + */ + monitorInvisibleArea(monitorInvisibleArea: boolean) : ImageAnimatorAttribute; + + /** + * Status callback, which is triggered when the animation starts to play. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Status callback, which is triggered when the animation starts to play. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Status callback, which is triggered when the animation starts to play. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + onStart(event: () => void): ImageAnimatorAttribute; + + /** + * Status callback, which is triggered when the animation pauses. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Status callback, which is triggered when the animation pauses. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Status callback, which is triggered when the animation pauses. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + onPause(event: () => void): ImageAnimatorAttribute; + + /** + * Status callback, triggered when the animation is replayed + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Status callback, triggered when the animation is replayed + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Status callback, triggered when the animation is replayed + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + onRepeat(event: () => void): ImageAnimatorAttribute; + + /** + * Status callback, which is triggered when the animation is canceled. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Status callback, which is triggered when the animation is canceled. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Status callback, which is triggered when the animation playback returns to the initial state. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + onCancel(event: () => void): ImageAnimatorAttribute; + + /** + * Status callback, which is triggered when the animation playback is complete. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Status callback, which is triggered when the animation playback is complete. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 */ - declare const ImageAnimatorInstance: ImageAnimatorAttribute; - \ No newline at end of file + /** + * Status callback, which is triggered when the animation playback is complete or stopped. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + onFinish(event: () => void): ImageAnimatorAttribute; +} + +/** + * Defines ImageAnimator Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ +/** + * Defines ImageAnimator Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Defines ImageAnimator Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + * @noninterop + */ +declare const ImageAnimator: ImageAnimatorInterface; + +/** + * Defines ImageAnimator Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ +/** + * Defines ImageAnimator Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Defines ImageAnimator Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + * @noninterop + */ +declare const ImageAnimatorInstance: ImageAnimatorAttribute; diff --git a/api/@internal/component/ets/image_common.d.ts b/api/@internal/component/ets/image_common.d.ts index 24962e1329561a009cb806c3940915d4890ad86c..7415991b1a970aabdba46f343a33f201a59f309c 100644 --- a/api/@internal/component/ets/image_common.d.ts +++ b/api/@internal/component/ets/image_common.d.ts @@ -24,7 +24,8 @@ * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ImageAnalyzerType { /** @@ -32,7 +33,8 @@ declare enum ImageAnalyzerType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SUBJECT = 0, @@ -41,7 +43,8 @@ declare enum ImageAnalyzerType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TEXT, @@ -50,7 +53,8 @@ declare enum ImageAnalyzerType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ OBJECT_LOOKUP, } @@ -60,7 +64,8 @@ declare enum ImageAnalyzerType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ImageAnalyzerController { /** @@ -68,17 +73,19 @@ declare class ImageAnalyzerController { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); - + /** * Get image analyzer support types. * * @returns { ImageAnalyzerType[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getImageAnalyzerSupportTypes(): ImageAnalyzerType[]; } @@ -89,7 +96,8 @@ declare class ImageAnalyzerController { * @interface ImageAnalyzerConfig * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ImageAnalyzerConfig { /** @@ -98,7 +106,8 @@ declare interface ImageAnalyzerConfig { * @type { ImageAnalyzerType[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ types: ImageAnalyzerType[]; } @@ -109,7 +118,8 @@ declare interface ImageAnalyzerConfig { * @interface ImageAIOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ImageAIOptions { /** @@ -118,7 +128,8 @@ declare interface ImageAIOptions { * @type { ?ImageAnalyzerType[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ types?: ImageAnalyzerType[]; @@ -128,7 +139,8 @@ declare interface ImageAIOptions { * @type { ?ImageAnalyzerController } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ aiController?: ImageAnalyzerController; -} +} \ No newline at end of file diff --git a/api/@internal/component/ets/loading_progress.d.ts b/api/@internal/component/ets/loading_progress.d.ts index c63b21e50fa6c99ddfdf5905ffdbc8fd678db064..2e7528f03e0fff48eb867751c41a1796dc4e083b 100644 --- a/api/@internal/component/ets/loading_progress.d.ts +++ b/api/@internal/component/ets/loading_progress.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod,ContentModifier,CommonConfiguration } from './common' +import { ResourceColor } from './units' +/*** endif */ + /** * Load style of progress bar. * @@ -50,371 +55,386 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare enum LoadingProgressStyle { - /** - * Default style. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Default style. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Default style. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Default style. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - Default, - - /** - * Announcement style. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Announcement style. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Announcement style. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Announcement style. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - Circular, - - /** - * The style of the track. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * The style of the track. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * The style of the track. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * The style of the track. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - Orbital, - } - +declare enum LoadingProgressStyle { /** - * Provides an interface for extending the loading progress. + * Default style. * - * @interface LoadingProgressInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Provides an interface for extending the loading progress. + * Default style. * - * @interface LoadingProgressInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Provides an interface for extending the loading progress. + * Default style. * - * @interface LoadingProgressInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Provides an interface for extending the loading progress. + * Default style. * - * @interface LoadingProgressInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - interface LoadingProgressInterface { - /** - * Called when the progress bar progress is viewed. - * - * @returns { LoadingProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the progress bar progress is viewed. - * - * @returns { LoadingProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Called when the progress bar progress is viewed. - * - * @returns { LoadingProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Called when the progress bar progress is viewed. - * - * @returns { LoadingProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - (): LoadingProgressAttribute; - } - + Default, + /** - * Declare the progress bar being loaded + * Announcement style. * - * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Declare the progress bar being loaded + * Announcement style. * - * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Declare the progress bar being loaded + * Announcement style. * - * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Declare the progress bar being loaded + * Announcement style. * - * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + Circular, + + /** + * The style of the track. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * The style of the track. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * The style of the track. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 */ - declare class LoadingProgressAttribute extends CommonMethod { - /** - * Load the color of the progress bar. - * - * @param { ResourceColor } value - * @returns { LoadingProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Load the color of the progress bar. - * - * @param { ResourceColor } value - * @returns { LoadingProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Load the color of the progress bar. - * - * @param { ResourceColor } value - * @returns { LoadingProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Load the color of the progress bar. - * - * @param { ResourceColor } value - * @returns { LoadingProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - color(value: ResourceColor): LoadingProgressAttribute; - - /** - * Whether to display the LoadingProgress content. - * - * @param { boolean } value - indicates the state of LoadingProgress content - * @returns { LoadingProgressAttribute } the attribute of the LoadingProgress. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Whether to display the LoadingProgress content. - * - * @param { boolean } value - indicates the state of LoadingProgress content - * @returns { LoadingProgressAttribute } the attribute of the LoadingProgress. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - enableLoading(value: boolean): LoadingProgressAttribute; - - /** - * Set the content modifier of loadingProgress. - * - * @param { ContentModifier } modifier - The contentModifier of LoadingProgress. - * @returns { LoadingProgressAttribute} the attribute of the loading progress - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - contentModifier(modifier: ContentModifier): LoadingProgressAttribute; - } - /** - * LoadingProgressConfiguration used by LoadingProgress contentModifier + * The style of the track. * - * @extends CommonConfiguration - * @interface LoadingProgressConfiguration * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare interface LoadingProgressConfiguration extends CommonConfiguration { - /** - * Whether to enable the LoadingProgress content. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - enableLoading: boolean; - } - + Orbital, +} + +/** + * Provides an interface for extending the loading progress. + * + * @interface LoadingProgressInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Provides an interface for extending the loading progress. + * + * @interface LoadingProgressInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ +/** + * Provides an interface for extending the loading progress. + * + * @interface LoadingProgressInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Provides an interface for extending the loading progress. + * + * @interface LoadingProgressInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + * @noninterop + */ +interface LoadingProgressInterface { /** - * Defines LoadingProgress Component. + * Called when the progress bar progress is viewed. * + * @returns { LoadingProgressAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Defines LoadingProgress Component. + * Called when the progress bar progress is viewed. * + * @returns { LoadingProgressAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Defines LoadingProgress Component. + * Called when the progress bar progress is viewed. * + * @returns { LoadingProgressAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Defines LoadingProgress Component. + * Called when the progress bar progress is viewed. * + * @returns { LoadingProgressAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare const LoadingProgress: LoadingProgressInterface; - + (): LoadingProgressAttribute; +} + +/** + * Declare the progress bar being loaded + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Declare the progress bar being loaded + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ +/** + * Declare the progress bar being loaded + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Declare the progress bar being loaded + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + * @noninterop + */ +declare class LoadingProgressAttribute extends CommonMethod { /** - * Loading Progress Extensions on Declarative Classes + * Load the color of the progress bar. * + * @param { ResourceColor } value + * @returns { LoadingProgressAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Loading Progress Extensions on Declarative Classes + * Load the color of the progress bar. * + * @param { ResourceColor } value + * @returns { LoadingProgressAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Loading Progress Extensions on Declarative Classes + * Load the color of the progress bar. * + * @param { ResourceColor } value + * @returns { LoadingProgressAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Loading Progress Extensions on Declarative Classes + * Load the color of the progress bar. * + * @param { ResourceColor } value + * @returns { LoadingProgressAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare const LoadingProgressInstance: LoadingProgressAttribute; - \ No newline at end of file + color(value: ResourceColor): LoadingProgressAttribute; + + /** + * Whether to display the LoadingProgress content. + * + * @param { boolean } value - indicates the state of LoadingProgress content + * @returns { LoadingProgressAttribute } the attribute of the LoadingProgress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Whether to display the LoadingProgress content. + * + * @param { boolean } value - indicates the state of LoadingProgress content + * @returns { LoadingProgressAttribute } the attribute of the LoadingProgress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + enableLoading(value: boolean): LoadingProgressAttribute; + + /** + * Set the content modifier of loadingProgress. + * + * @param { ContentModifier } modifier - The contentModifier of LoadingProgress. + * @returns { LoadingProgressAttribute} the attribute of the loading progress + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + contentModifier(modifier: ContentModifier): LoadingProgressAttribute; +} + +/** + * LoadingProgressConfiguration used by LoadingProgress contentModifier + * + * @extends CommonConfiguration + * @interface LoadingProgressConfiguration + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare interface LoadingProgressConfiguration extends CommonConfiguration { + /** + * Whether to enable the LoadingProgress content. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + enableLoading: boolean; +} + +/** + * Defines LoadingProgress Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines LoadingProgress Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ +/** + * Defines LoadingProgress Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Defines LoadingProgress Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + * @noninterop + */ +declare const LoadingProgress: LoadingProgressInterface; + +/** + * Loading Progress Extensions on Declarative Classes + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Loading Progress Extensions on Declarative Classes + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ +/** + * Loading Progress Extensions on Declarative Classes + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Loading Progress Extensions on Declarative Classes + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + * @noninterop + */ +declare const LoadingProgressInstance: LoadingProgressAttribute; diff --git a/api/@internal/component/ets/pattern_lock.d.ts b/api/@internal/component/ets/pattern_lock.d.ts index 9231675816a0d9ac46069d591ce107c9f458724b..30b8b6cb0acb46acce84fef75553a085708d015f 100644 --- a/api/@internal/component/ets/pattern_lock.d.ts +++ b/api/@internal/component/ets/pattern_lock.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ResourceColor, Length } from './units' +import { LengthMetrics } from '../Graphics' +import { CommonMethod, Callback, Optional } from './common' +/*** endif */ + /** * The challenge result based on input pattern for control pattern lock component. * @enum { number } @@ -31,7 +37,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum PatternLockChallengeResult { /** @@ -45,7 +52,8 @@ declare enum PatternLockChallengeResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CORRECT = 1, /** @@ -59,7 +67,8 @@ declare enum PatternLockChallengeResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ WRONG = 2 } @@ -71,7 +80,8 @@ declare enum PatternLockChallengeResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CircleStyleOptions { /** @@ -81,7 +91,8 @@ declare interface CircleStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ color?: ResourceColor; @@ -92,7 +103,8 @@ declare interface CircleStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radius?: LengthMetrics; @@ -103,7 +115,8 @@ declare interface CircleStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableWaveEffect?: boolean; @@ -114,7 +127,8 @@ declare interface CircleStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ enableForeground?: boolean; } @@ -138,7 +152,8 @@ declare interface CircleStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class PatternLockController { /** @@ -160,7 +175,8 @@ declare class PatternLockController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -186,6 +202,16 @@ declare class PatternLockController { * @since 12 */ reset(); + /** + * Reset pattern lock. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + reset(): void; /** * Set challenge result. @@ -200,7 +226,8 @@ declare class PatternLockController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setChallengeResult(result: PatternLockChallengeResult): void; } @@ -227,7 +254,9 @@ declare class PatternLockController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + * @noninterop */ interface PatternLockInterface { /** @@ -255,7 +284,8 @@ interface PatternLockInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ (controller?: PatternLockController): PatternLockAttribute; } @@ -282,7 +312,9 @@ interface PatternLockInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + * @noninterop */ declare class PatternLockAttribute extends CommonMethod { /** @@ -314,7 +346,8 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ sideLength(value: Length): PatternLockAttribute; @@ -347,7 +380,8 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ circleRadius(value: Length): PatternLockAttribute; @@ -376,7 +410,8 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor(value: ResourceColor): PatternLockAttribute; @@ -405,7 +440,8 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ regularColor(value: ResourceColor): PatternLockAttribute; @@ -434,7 +470,8 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ selectedColor(value: ResourceColor): PatternLockAttribute; @@ -463,7 +500,8 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ activeColor(value: ResourceColor): PatternLockAttribute; @@ -492,7 +530,8 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pathColor(value: ResourceColor): PatternLockAttribute; @@ -525,7 +564,8 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pathStrokeWidth(value: number | string): PatternLockAttribute; @@ -554,7 +594,8 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onPatternComplete(callback: (input: Array) => void): PatternLockAttribute; @@ -585,7 +626,8 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ autoReset(value: boolean): PatternLockAttribute; @@ -608,7 +650,19 @@ declare class PatternLockAttribute extends CommonMethod { * @since 12 */ onDotConnect(callback: import('../api/@ohos.base').Callback): PatternLockAttribute; - + + /** + * Called when connecting to a grid dot. + * @param { Callback } callback - A callback instance used when connection to a grid dot. + * @returns { PatternLockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onDotConnect(callback: Callback): PatternLockAttribute; + /** * Sets the background circle style for the dots in a grid when they are in the activated state. * @@ -617,7 +671,8 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ activateCircleStyle(options: Optional): PatternLockAttribute; @@ -630,7 +685,8 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ skipUnselectedPoint(skipped: boolean): PatternLockAttribute; } @@ -655,6 +711,7 @@ declare class PatternLockAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare const PatternLock: PatternLockInterface; @@ -678,5 +735,6 @@ declare const PatternLock: PatternLockInterface; * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare const PatternLockInstance: PatternLockAttribute; diff --git a/api/@internal/component/ets/progress.d.ts b/api/@internal/component/ets/progress.d.ts index 2413ca6a2fbcca66c710a46e740a42185ec577e7..ceada3464a3b1f8238df86e4c034feffe31567a5 100644 --- a/api/@internal/component/ets/progress.d.ts +++ b/api/@internal/component/ets/progress.d.ts @@ -18,6 +18,14 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ResourceColor,Length, PX , VP , LPX, Font, ResourceStr } from './units' +import { Resource } from '../../global/resource'; +import { CommonMethod, Optional,ContentModifier,CommonConfiguration } from './common' +import { LinearGradient } from './dataPanel' +import { LengthMetrics } from '../Graphics' +/*** endif */ + /** * Defines the option of Progress. * @@ -52,1620 +60,1818 @@ * @atomicservice * @since 11 */ - declare interface ProgressOptions { - /** - * Sets the value of Progress. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Sets the value of Progress. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Sets the value of Progress. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the value of Progress. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - value: number; - - /** - * Sets the total of Progress. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Sets the total of Progress. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Sets the total of Progress. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the total of Progress. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - total?: number; - - /** - * Sets the style of Progress. - * - * @type { ?ProgressStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - * @deprecated since 8 - * @useinstead type - */ - style?: ProgressStyle - - /** - * Sets the type of Progress. - * - * @type { ?Type } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Sets the type of Progress. - * - * @type { ?Type } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Sets the type of Progress. - * - * @type { ?Type } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the type of Progress. - * - * @type { ?Type } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - type?: Type - } - - /** - * Type of progress bar - * - * @enum { number } +declare interface ProgressOptions { + /** + * Sets the value of Progress. + * + * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 + * @since 7 */ /** - * Type of progress bar + * Sets the value of Progress. * - * @enum { number } + * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Type of progress bar + * Sets the value of Progress. * - * @enum { number } + * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Type of progress bar + * Sets the value of Progress. * - * @enum { number } + * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - declare enum ProgressType { - /** - * Linear progress bar style. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Linear progress bar style. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Linear progress bar style. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Linear progress bar style. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - Linear = 0, - - /** - * Ring progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Ring progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Ring progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Ring progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - Ring = 1, - - /** - * Eclipse progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Eclipse progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Eclipse progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Eclipse progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - Eclipse = 2, - - /** - * ScaleRing progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * ScaleRing progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * ScaleRing progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * ScaleRing progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - ScaleRing = 3, - - /** - * Capsule progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Capsule progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Capsule progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Capsule progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - Capsule = 4 - } - - /** - * Current status of progress bar. - * - * @enum { number } + value: number; + + /** + * Sets the total of Progress. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Sets the total of Progress. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Sets the total of Progress. + * + * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form * @since 10 */ /** - * Current status of progress bar. + * Sets the total of Progress. * - * @enum { number } + * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice * @since 11 */ - declare enum ProgressStatus { - /** - * Loading status. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Loading status. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - LOADING, - - /** - * Processing status. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Processing status. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - PROGRESSING - } - - /** - * Defines style options for progress component. - * - * @extends CommonProgressStyleOptions - * @interface ProgressStyleOptions + total?: number; + + /** + * Sets the style of Progress. + * + * @type { ?ProgressStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + * @deprecated since 8 + * @useinstead type + */ + style?: ProgressStyle + + /** + * Sets the type of Progress. + * + * @type { ?Type } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Defines style options for progress component. + * Sets the type of Progress. * - * @extends CommonProgressStyleOptions - * @interface ProgressStyleOptions + * @type { ?Type } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Defines style options for progress component. + * Sets the type of Progress. * - * @extends CommonProgressStyleOptions - * @interface ProgressStyleOptions + * @type { ?Type } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Defines style options for progress component. + * Sets the type of Progress. * - * @extends CommonProgressStyleOptions - * @interface ProgressStyleOptions + * @type { ?Type } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - declare interface ProgressStyleOptions extends CommonProgressStyleOptions { - /** - * Defines the strokeWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines the strokeWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Defines the strokeWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Defines the strokeWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - strokeWidth?: Length; - - /** - * Defines the scaleCount property. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines the scaleCount property. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Defines the scaleCount property. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Defines the scaleCount property. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - scaleCount?: number; - - /** - * Defines the scaleWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines the scaleWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Defines the scaleWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Defines the scaleWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - scaleWidth?: Length; - } - - /** - * Progress common style options. - * - * @interface CommonProgressStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ + type?: Type +} + +/** + * Defines the option of Progress. + * + * @interface ProgressOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare interface ProgressOptions { + /** - * Progress common style options. + * Sets the value of Progress. * - * @interface CommonProgressStyleOptions + * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice - * @since 11 + * @since 20 + * @arkts 1.2 */ - declare interface CommonProgressStyleOptions { - /** - * Enable smooth effect. - * - * @type { ?boolean } - * @default true - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Enable smooth effect. - * - * @type { ?boolean } - * @default true - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - enableSmoothEffect?: boolean; - } - - /** - * Defines the enable scan effect. - * - * @interface ScanEffectOptions + value: number; + + /** + * Sets the total of Progress. + * + * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 */ + total?: number; + /** - * Defines the enable scan effect. + * Sets the type of Progress. * - * @interface ScanEffectOptions + * @type { ?ProgressType } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice - * @since 11 + * @since 20 + * @arkts 1.2 */ - declare interface ScanEffectOptions { - /** - * Enable scan effect. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Enable scan effect. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - enableScanEffect?: boolean; - } - - /** - * Defines the Eclipse style Options. - * - * @extends CommonProgressStyleOptions - * @interface EclipseStyleOptions + type?: ProgressType +} +/** + * Type of progress bar + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Type of progress bar + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ +/** + * Type of progress bar + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Type of progress bar + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare enum ProgressType { + /** + * Linear progress bar style. + * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 + * @since 8 */ /** - * Defines the Eclipse style Options. + * Linear progress bar style. * - * @extends CommonProgressStyleOptions - * @interface EclipseStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 + * @form + * @since 9 */ - declare interface EclipseStyleOptions extends CommonProgressStyleOptions { - - } - /** - * Defines the ScaleRing style Options. + * Linear progress bar style. * - * @extends CommonProgressStyleOptions - * @interface ScaleRingStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form * @since 10 */ /** - * Defines the ScaleRing style Options. + * Linear progress bar style. * - * @extends CommonProgressStyleOptions - * @interface ScaleRingStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + Linear = 0, + + /** + * Ring progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Ring progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 */ - declare interface ScaleRingStyleOptions extends CommonProgressStyleOptions { - /** - * Defines the strokeWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the strokeWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - strokeWidth?: Length; - - /** - * Defines the scaleWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the scaleWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - scaleWidth?: Length; - - /** - * Defines the scaleCount property. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the scaleCount property. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - scaleCount?: number; - } - - /** - * Defines the ring style Options. - * - * @extends ScanEffectOptions, CommonProgressStyleOptions - * @interface RingStyleOptions + /** + * Ring progress bar. + * * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form * @since 10 */ /** - * Defines the ring style Options. + * Ring progress bar. * - * @extends ScanEffectOptions, CommonProgressStyleOptions - * @interface RingStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare interface RingStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { - /** - * Defines the strokeWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the strokeWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - strokeWidth?: Length; - - /** - * Enables progress shadow. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Enables progress shadow. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - shadow?: boolean; - - /** - * The status of progress, default is PROGRESSING. Set to LOADING status will trigger the loading animation. - * - * @type { ?ProgressStatus } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * The status of progress, default is PROGRESSING. Set to LOADING status will trigger the loading animation. - * - * @type { ?ProgressStatus } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - status?: ProgressStatus; - } - - /** - * Defines the linear style Options. - * - * @extends ScanEffectOptions, CommonProgressStyleOptions - * @interface LinearStyleOptions + Ring = 1, + + /** + * Eclipse progress bar. + * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 + * @since 8 */ /** - * Defines the linear style Options. + * Eclipse progress bar. * - * @extends ScanEffectOptions, CommonProgressStyleOptions - * @interface LinearStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 + * @form + * @since 9 */ - declare interface LinearStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { - /** - * Defines the strokeWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the strokeWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - strokeWidth?: Length; - /** - * Defines the stroke radius property. - * - * @type { ?(PX | VP | LPX | Resource) } - * @default strokeWidth / 2 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the stroke radius property. - * - * @type { ?(PX | VP | LPX | Resource) } - * @default strokeWidth / 2 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - strokeRadius?: PX | VP | LPX | Resource; - } - - /** - * Defines the capsule style Options. - * - * @extends ScanEffectOptions, CommonProgressStyleOptions - * @interface CapsuleStyleOptions + /** + * Eclipse progress bar. + * * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form * @since 10 */ /** - * Defines the capsule style Options. + * Eclipse progress bar. * - * @extends ScanEffectOptions, CommonProgressStyleOptions - * @interface CapsuleStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare interface CapsuleStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { - /** - * Set the inner border color. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Set the inner border color. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - borderColor?: ResourceColor; - - /** - * Set the border width. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Set the border width. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - borderWidth?: Length; - - /** - * Set the text content. - * - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Set the text content. - * - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Set the text content. - * - * @type { ?ResourceStr } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - content?: ResourceStr; - - /** - * Set the text style. - * - * @type { ?Font } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Set the text style. - * - * @type { ?Font } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - font?: Font; - - /** - * Set the text fontColor. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Set the text fontColor. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - fontColor?: ResourceColor; - - /** - * show default percentage. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * show default percentage. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - showDefaultPercentage?: boolean; - - /** - * Set border rounded corner radius. - * - * @type { ?LengthMetrics } - * @default height / 2 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - borderRadius?: LengthMetrics; - } - - /** - * Type of progress bar - * - * @enum { number } + Eclipse = 2, + + /** + * ScaleRing progress bar. + * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 + * @since 8 */ /** - * Type of progress bar + * ScaleRing progress bar. * - * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Type of progress bar + * ScaleRing progress bar. * - * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Type of progress bar + * ScaleRing progress bar. * - * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare enum ProgressStyle { - /** - * Linear progress bar style. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Linear progress bar style. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Linear progress bar style. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Linear progress bar style. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - Linear, - - /** - * Ring progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Ring progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Ring progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Ring progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - Ring, - - /** - * Eclipse progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Eclipse progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Eclipse progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Eclipse progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - Eclipse, - - /** - * ScaleRing progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * ScaleRing progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * ScaleRing progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * ScaleRing progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - ScaleRing, - - /** - * Capsule progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Capsule progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Capsule progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Capsule progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - Capsule, - } - - /** - * Defines the map for progress type and style. - * - * @interface ProgressStyleMap + ScaleRing = 3, + + /** + * Capsule progress bar. + * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 + * @since 8 */ /** - * Defines the map for progress type and style. + * Capsule progress bar. * - * @interface ProgressStyleMap * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 + * @form + * @since 9 */ - declare interface ProgressStyleMap { - /** - * Defines the map for Linear progress. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the map for Linear progress. - * - * @type { LinearStyleOptions | ProgressStyleOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - [ProgressType.Linear]: LinearStyleOptions | ProgressStyleOptions; - - /** - * Defines the map for Ring progress. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the map for Ring progress. - * - * @type { RingStyleOptions | ProgressStyleOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - [ProgressType.Ring]: RingStyleOptions | ProgressStyleOptions; - - /** - * Defines the map for Eclipse progress. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the map for Eclipse progress. - * - * @type { EclipseStyleOptions | ProgressStyleOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - [ProgressType.Eclipse]: EclipseStyleOptions | ProgressStyleOptions; - - /** - * Defines the map for ScaleRing progress. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the map for ScaleRing progress. - * - * @type { ScaleRingStyleOptions | ProgressStyleOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - [ProgressType.ScaleRing]: ScaleRingStyleOptions | ProgressStyleOptions; - - /** - * Defines the map for Capsule progress. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the map for Capsule progress. - * - * @type { CapsuleStyleOptions | ProgressStyleOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - [ProgressType.Capsule]: CapsuleStyleOptions | ProgressStyleOptions; - } - - /** - * Provides the progress bar interface. - * - * @interface ProgressInterface + /** + * Capsule progress bar. + * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 + * @crossplatform + * @form + * @since 10 */ /** - * Provides the progress bar interface. + * Capsule progress bar. * - * @interface ProgressInterface * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform * @form - * @since 9 + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + Capsule = 4 +} + +/** + * Current status of progress bar. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ +/** + * Current status of progress bar. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare enum ProgressStatus { + /** + * Loading status. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 */ /** - * Provides the progress bar interface. + * Loading status. * - * @interface ProgressInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + LOADING, + + /** + * Processing status. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** - * Provides the progress bar interface. + * Processing status. * - * @interface ProgressInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - interface ProgressInterface { - /** - * Called when the progress bar is set. - * - * @param { ProgressOptions } options - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when the progress bar is set. - * - * @param { ProgressOptions } options - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Called when the progress bar is set. - * - * @param { ProgressOptions } options - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Called when the progress bar is set. - * - * @param { ProgressOptions } options - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - (options: ProgressOptions): ProgressAttribute; - } - - /** - * Defines the progress attribute functions. - * - * @extends CommonMethod> + PROGRESSING +} + +/** + * Defines style options for progress component. + * + * @extends CommonProgressStyleOptions + * @interface ProgressStyleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines style options for progress component. + * + * @extends CommonProgressStyleOptions + * @interface ProgressStyleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ +/** + * Defines style options for progress component. + * + * @extends CommonProgressStyleOptions + * @interface ProgressStyleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Defines style options for progress component. + * + * @extends CommonProgressStyleOptions + * @interface ProgressStyleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare interface ProgressStyleOptions extends CommonProgressStyleOptions { + /** + * Defines the strokeWidth property. + * + * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 + * @since 8 */ /** - * Defines the progress attribute functions. + * Defines the strokeWidth property. * - * @extends CommonMethod> + * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Defines the progress attribute functions. + * Defines the strokeWidth property. * - * @extends CommonMethod> + * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Defines the progress attribute functions. + * Defines the strokeWidth property. * - * @extends CommonMethod> + * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 - */ - declare class ProgressAttribute extends CommonMethod> { - /** - * Called when the current progress value is set. - * - * @param { number } value - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when the current progress value is set. - * - * @param { number } value - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Called when the current progress value is set. - * - * @param { number } value - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Called when the current progress value is set. - * - * @param { number } value - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - value(value: number): ProgressAttribute; - - /** - * Called when the progress bar foreground is set. - * - * @param { ResourceColor | LinearGradient } value - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when the progress bar foreground is set. - * - * @param { ResourceColor | LinearGradient } value - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Called when the progress bar foreground is set. - * - * @param { ResourceColor | LinearGradient } value - indicates the color of the progress. - * @returns { ProgressAttribute } the attribute of the progress. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Called when the progress bar foreground is set. - * - * @param { ResourceColor | LinearGradient } value - indicates the color of the progress. - * @returns { ProgressAttribute } the attribute of the progress. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - color(value: ResourceColor | LinearGradient): ProgressAttribute; - - /** - * Called when the style of progress bar is set. - * - * @param { Style } value - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the style of progress bar is set. - * - * @param { Style } value - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Called when the style of progress bar is set. - * - * @param { Style } value - indicates the style of the progress. - * @returns { ProgressAttribute } the attribute of the progress. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Called when the style of progress bar is set. - * - * @param { Style } value - indicates the style of the progress. - * @returns { ProgressAttribute } the attribute of the progress. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - style(value: Style): ProgressAttribute; - - /** - * Sets if mark to privacy sensitive. - * - * @param { Optional } isPrivacySensitiveMode - indicates if mark to privacy sensitive. - * @returns { ProgressAttribute } the attribute of the progress. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - privacySensitive(isPrivacySensitiveMode: Optional): ProgressAttribute; - - /** - * Set the contentModifier of progress. - * - * @param { ContentModifier } modifier - The contentModifier of progress. - * @returns { ProgressAttribute } the attribute of the progress. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - contentModifier(modifier: ContentModifier): ProgressAttribute; - } - - /** - * ProgressConfiguration used by progress contentModifier - * - * @extends CommonConfiguration - * @interface ProgressConfiguration - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare interface ProgressConfiguration extends CommonConfiguration { - /** - * The value of Progress. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - value: number; - - /** - * The total of Progress. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - total: number; - } - - /** - * Defines Progress Component. + strokeWidth?: Length; + + /** + * Defines the scaleCount property. * + * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 + * @since 8 */ /** - * Defines Progress Component. + * Defines the scaleCount property. * + * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Defines Progress Component. + * Defines the scaleCount property. * + * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Defines Progress Component. + * Defines the scaleCount property. * + * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare const Progress: ProgressInterface; - + scaleCount?: number; + /** - * Defines Progress Component instance. + * Defines the scaleWidth property. * + * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 + * @since 8 */ /** - * Defines Progress Component instance. + * Defines the scaleWidth property. * + * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Defines Progress Component instance. + * Defines the scaleWidth property. * + * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Defines Progress Component instance. + * Defines the scaleWidth property. * + * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + scaleWidth?: Length; +} + +/** + * Progress common style options. + * + * @interface CommonProgressStyleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ +/** + * Progress common style options. + * + * @interface CommonProgressStyleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare interface CommonProgressStyleOptions { + /** + * Enable smooth effect. + * + * @type { ?boolean } + * @default true + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Enable smooth effect. + * + * @type { ?boolean } + * @default true + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare const ProgressInstance: ProgressAttribute; - \ No newline at end of file + enableSmoothEffect?: boolean; +} + +/** + * Defines the enable scan effect. + * + * @interface ScanEffectOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ +/** + * Defines the enable scan effect. + * + * @interface ScanEffectOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare interface ScanEffectOptions { + /** + * Enable scan effect. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Enable scan effect. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + enableScanEffect?: boolean; +} + +/** + * Defines the Eclipse style Options. + * + * @extends CommonProgressStyleOptions + * @interface EclipseStyleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ +/** + * Defines the Eclipse style Options. + * + * @extends CommonProgressStyleOptions + * @interface EclipseStyleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare interface EclipseStyleOptions extends CommonProgressStyleOptions { + +} + +/** + * Defines the ScaleRing style Options. + * + * @extends CommonProgressStyleOptions + * @interface ScaleRingStyleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ +/** + * Defines the ScaleRing style Options. + * + * @extends CommonProgressStyleOptions + * @interface ScaleRingStyleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare interface ScaleRingStyleOptions extends CommonProgressStyleOptions { + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + strokeWidth?: Length; + + /** + * Defines the scaleWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the scaleWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + scaleWidth?: Length; + + /** + * Defines the scaleCount property. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the scaleCount property. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + scaleCount?: number; +} + +/** + * Defines the ring style Options. + * + * @extends ScanEffectOptions, CommonProgressStyleOptions + * @interface RingStyleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ +/** + * Defines the ring style Options. + * + * @extends ScanEffectOptions, CommonProgressStyleOptions + * @interface RingStyleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare interface RingStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + strokeWidth?: Length; + + /** + * Enables progress shadow. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Enables progress shadow. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + shadow?: boolean; + + /** + * The status of progress, default is PROGRESSING. Set to LOADING status will trigger the loading animation. + * + * @type { ?ProgressStatus } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * The status of progress, default is PROGRESSING. Set to LOADING status will trigger the loading animation. + * + * @type { ?ProgressStatus } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + status?: ProgressStatus; +} + +/** + * Defines the linear style Options. + * + * @extends ScanEffectOptions, CommonProgressStyleOptions + * @interface LinearStyleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ +/** + * Defines the linear style Options. + * + * @extends ScanEffectOptions, CommonProgressStyleOptions + * @interface LinearStyleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare interface LinearStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + strokeWidth?: Length; + /** + * Defines the stroke radius property. + * + * @type { ?(PX | VP | LPX | Resource) } + * @default strokeWidth / 2 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the stroke radius property. + * + * @type { ?(PX | VP | LPX | Resource) } + * @default strokeWidth / 2 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + strokeRadius?: PX | VP | LPX | Resource; +} + +/** + * Defines the capsule style Options. + * + * @extends ScanEffectOptions, CommonProgressStyleOptions + * @interface CapsuleStyleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ +/** + * Defines the capsule style Options. + * + * @extends ScanEffectOptions, CommonProgressStyleOptions + * @interface CapsuleStyleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare interface CapsuleStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { + /** + * Set the inner border color. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Set the inner border color. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + borderColor?: ResourceColor; + + /** + * Set the border width. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Set the border width. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + borderWidth?: Length; + + /** + * Set the text content. + * + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Set the text content. + * + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + /** + * Set the text content. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + content?: ResourceStr; + + /** + * Set the text style. + * + * @type { ?Font } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Set the text style. + * + * @type { ?Font } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + font?: Font; + + /** + * Set the text fontColor. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Set the text fontColor. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + fontColor?: ResourceColor; + + /** + * show default percentage. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * show default percentage. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + showDefaultPercentage?: boolean; + + /** + * Set border rounded corner radius. + * + * @type { ?LengthMetrics } + * @default height / 2 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + borderRadius?: LengthMetrics; +} + +/** + * Type of progress bar + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ +/** + * Type of progress bar + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ +/** + * Type of progress bar + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Type of progress bar + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare enum ProgressStyle { + /** + * Linear progress bar style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Linear progress bar style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Linear progress bar style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Linear progress bar style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + Linear, + + /** + * Ring progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Ring progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Ring progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Ring progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + Ring, + + /** + * Eclipse progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Eclipse progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Eclipse progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Eclipse progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + Eclipse, + + /** + * ScaleRing progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * ScaleRing progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * ScaleRing progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * ScaleRing progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + ScaleRing, + + /** + * Capsule progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Capsule progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Capsule progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Capsule progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + Capsule, +} + +/** + * Defines the map for progress type and style. + * + * @interface ProgressStyleMap + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ +/** + * Defines the map for progress type and style. + * + * @interface ProgressStyleMap + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare interface ProgressStyleMap { + /** + * Defines the map for Linear progress. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the map for Linear progress. + * + * @type { LinearStyleOptions | ProgressStyleOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + [ProgressType.Linear]: LinearStyleOptions | ProgressStyleOptions; + + /** + * Defines the map for Ring progress. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the map for Ring progress. + * + * @type { RingStyleOptions | ProgressStyleOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + [ProgressType.Ring]: RingStyleOptions | ProgressStyleOptions; + + /** + * Defines the map for Eclipse progress. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the map for Eclipse progress. + * + * @type { EclipseStyleOptions | ProgressStyleOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + [ProgressType.Eclipse]: EclipseStyleOptions | ProgressStyleOptions; + + /** + * Defines the map for ScaleRing progress. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the map for ScaleRing progress. + * + * @type { ScaleRingStyleOptions | ProgressStyleOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + [ProgressType.ScaleRing]: ScaleRingStyleOptions | ProgressStyleOptions; + + /** + * Defines the map for Capsule progress. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the map for Capsule progress. + * + * @type { CapsuleStyleOptions | ProgressStyleOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + [ProgressType.Capsule]: CapsuleStyleOptions | ProgressStyleOptions; +} + +/** + * Provides the progress bar interface. + * + * @interface ProgressInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ +/** + * Provides the progress bar interface. + * + * @interface ProgressInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ +/** + * Provides the progress bar interface. + * + * @interface ProgressInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Provides the progress bar interface. + * + * @interface ProgressInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + * @noninterop + */ +interface ProgressInterface { + /** + * Called when the progress bar is set. + * + * @param { ProgressOptions } options + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Called when the progress bar is set. + * + * @param { ProgressOptions } options + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Called when the progress bar is set. + * + * @param { ProgressOptions } options + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Called when the progress bar is set. + * + * @param { ProgressOptions } options + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + (options: ProgressOptions): ProgressAttribute; + /** + * Called when the progress bar is set. + * + * @param { ProgressOptions } options + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + (options: ProgressOptions): ProgressAttribute; +} + +/** + * Defines the progress attribute functions. + * + * @extends CommonMethod> + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ +/** + * Defines the progress attribute functions. + * + * @extends CommonMethod> + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ +/** + * Defines the progress attribute functions. + * + * @extends CommonMethod> + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Defines the progress attribute functions. + * + * @extends CommonMethod> + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + * @noninterop + */ +declare class ProgressAttribute extends CommonMethod> { + /** + * Called when the current progress value is set. + * + * @param { number } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Called when the current progress value is set. + * + * @param { number } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Called when the current progress value is set. + * + * @param { number } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Called when the current progress value is set. + * + * @param { number } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + value(value: number): ProgressAttribute; + + /** + * Called when the progress bar foreground is set. + * + * @param { ResourceColor | LinearGradient } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Called when the progress bar foreground is set. + * + * @param { ResourceColor | LinearGradient } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Called when the progress bar foreground is set. + * + * @param { ResourceColor | LinearGradient } value - indicates the color of the progress. + * @returns { ProgressAttribute } the attribute of the progress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Called when the progress bar foreground is set. + * + * @param { ResourceColor | LinearGradient } value - indicates the color of the progress. + * @returns { ProgressAttribute } the attribute of the progress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + color(value: ResourceColor | LinearGradient): ProgressAttribute; + + /** + * Called when the style of progress bar is set. + * + * @param { Style } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the style of progress bar is set. + * + * @param { Style } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Called when the style of progress bar is set. + * + * @param { Style } value - indicates the style of the progress. + * @returns { ProgressAttribute } the attribute of the progress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Called when the style of progress bar is set. + * + * @param { Style } value - indicates the style of the progress. + * @returns { ProgressAttribute } the attribute of the progress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + style(value: Style): ProgressAttribute; + + /** + * Sets if mark to privacy sensitive. + * + * @param { Optional } isPrivacySensitiveMode - indicates if mark to privacy sensitive. + * @returns { ProgressAttribute } the attribute of the progress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 12 + */ + privacySensitive(isPrivacySensitiveMode: Optional): ProgressAttribute; + + /** + * Set the contentModifier of progress. + * + * @param { ContentModifier } modifier - The contentModifier of progress. + * @returns { ProgressAttribute } the attribute of the progress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + contentModifier(modifier: ContentModifier): ProgressAttribute; +} + +/** + * Defines the progress attribute functions. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + * @noninterop + */ +declare class ProgressAttribute extends CommonMethod { + /** + * Called when the current progress value is set. + * + * @param { number } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + value(value: number): ProgressAttribute; + + /** + * Called when the progress bar foreground is set. + * + * @param { ResourceColor | LinearGradient } value - indicates the color of the progress. + * @returns { ProgressAttribute } the attribute of the progress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + color(value: ResourceColor | LinearGradient): ProgressAttribute; + + /** + * Called when the style of progress bar is set. + * + * @param { LinearStyleOptions | RingStyleOptions | CapsuleStyleOptions | ProgressStyleOptions } value - indicates the style of the progress. + * @returns { ProgressAttribute } the attribute of the progress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + style(value: LinearStyleOptions | RingStyleOptions | CapsuleStyleOptions | ProgressStyleOptions): ProgressAttribute; + + /** + * Sets if mark to privacy sensitive. + * + * @param { Optional } isPrivacySensitiveMode - indicates if mark to privacy sensitive. + * @returns { ProgressAttribute } the attribute of the progress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + privacySensitive(isPrivacySensitiveMode: Optional): ProgressAttribute; + + /** + * Set the contentModifier of progress. + * + * @param { ContentModifier } modifier - The contentModifier of progress. + * @returns { ProgressAttribute } the attribute of the progress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + contentModifier(modifier: ContentModifier): ProgressAttribute; +} + +/** + * ProgressConfiguration used by progress contentModifier + * + * @extends CommonConfiguration + * @interface ProgressConfiguration + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare interface ProgressConfiguration extends CommonConfiguration { + /** + * The value of Progress. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + value: number; + + /** + * The total of Progress. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + total: number; +} + +/** + * Defines Progress Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ +/** + * Defines Progress Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ +/** + * Defines Progress Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Defines Progress Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + * @noninterop + */ +declare const Progress: ProgressInterface; + +/** + * Defines Progress Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ +/** + * Defines Progress Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ +/** + * Defines Progress Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Defines Progress Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + * @noninterop + */ +declare const ProgressInstance: ProgressAttribute; diff --git a/api/@internal/component/ets/qrcode.d.ts b/api/@internal/component/ets/qrcode.d.ts index ef9932eecfd28f2554c376d2c714606540a5eb51..1c06f29312ed93a98adf39fbfe58a04fb3432e63 100644 --- a/api/@internal/component/ets/qrcode.d.ts +++ b/api/@internal/component/ets/qrcode.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod } from './common' +import { ResourceColor, ResourceStr } from './units' +import { Resource } from '../../global/resource' +/*** endif */ + /** * Provides an interface for generating QR codes. * @@ -50,257 +56,266 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + * @noninterop */ - interface QRCodeInterface { - /** - * Called when a QR code is set. - * - * @param { string } value - * @returns { QRCodeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when a QR code is set. - * - * @param { string } value - * @returns { QRCodeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Called when a QR code is set. - * - * @param { string } value - * @returns { QRCodeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Called when a QR code is set. - * - * @param { string } value - * @returns { QRCodeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - /** - * Called when a QR code is set. - * - * @param { ResourceStr } value - * @returns { QRCodeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - (value: ResourceStr): QRCodeAttribute; - } - +interface QRCodeInterface { /** - * Defines the qrcode attribute functions. + * Called when a QR code is set. * - * @extends CommonMethod + * @param { string } value + * @returns { QRCodeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Defines the qrcode attribute functions. + * Called when a QR code is set. * - * @extends CommonMethod + * @param { string } value + * @returns { QRCodeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Defines the qrcode attribute functions. + * Called when a QR code is set. * - * @extends CommonMethod + * @param { string } value + * @returns { QRCodeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Defines the qrcode attribute functions. + * Called when a QR code is set. * - * @extends CommonMethod + * @param { string } value + * @returns { QRCodeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - declare class QRCodeAttribute extends CommonMethod { - /** - * Called when the QR code color is set. - * - * @param { ResourceColor } value - * @returns { QRCodeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when the QR code color is set. - * - * @param { ResourceColor } value - * @returns { QRCodeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Called when the QR code color is set. - * - * @param { ResourceColor } value - * @returns { QRCodeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Called when the QR code color is set. - * - * @param { ResourceColor } value - * @returns { QRCodeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - color(value: ResourceColor): QRCodeAttribute; - - /** - * Called when setting the QR code background color. - * - * @param { ResourceColor } value - * @returns { QRCodeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when setting the QR code background color. - * - * @param { ResourceColor } value - * @returns { QRCodeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Called when setting the QR code background color. - * - * @param { ResourceColor } value - * @returns { QRCodeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Called when setting the QR code background color. - * - * @param { ResourceColor } value - * @returns { QRCodeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - backgroundColor(value: ResourceColor): QRCodeAttribute; - - /** - * Set the opacity of the QR code content color. - * @param { number | Resource } value - indicates the opacity of the QR code content color. The value is between 0 and 1, with a default value of 1. - * @returns { QRCodeAttribute } the attribute of the QR code - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Set the opacity of the QR code content color. - * @param { number | Resource } value - indicates the opacity of the QR code content color. The value is between 0 and 1, with a default value of 1. - * @returns { QRCodeAttribute } the attribute of the QR code - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - contentOpacity(value: number | Resource): QRCodeAttribute; - } - /** - * Defines QRCode Component. + * Called when a QR code is set. * + * @param { ResourceStr } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + (value: ResourceStr): QRCodeAttribute; +} + +/** + * Defines the qrcode attribute functions. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ +/** + * Defines the qrcode attribute functions. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ +/** + * Defines the qrcode attribute functions. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Defines the qrcode attribute functions. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + * @noninterop + */ +declare class QRCodeAttribute extends CommonMethod { + /** + * Called when the QR code color is set. + * + * @param { ResourceColor } value + * @returns { QRCodeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Defines QRCode Component. + * Called when the QR code color is set. * + * @param { ResourceColor } value + * @returns { QRCodeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Defines QRCode Component. + * Called when the QR code color is set. * + * @param { ResourceColor } value + * @returns { QRCodeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Defines QRCode Component. + * Called when the QR code color is set. * + * @param { ResourceColor } value + * @returns { QRCodeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare const QRCode: QRCodeInterface; - + color(value: ResourceColor): QRCodeAttribute; + /** - * Defines QRCode Component instance. + * Called when setting the QR code background color. * + * @param { ResourceColor } value + * @returns { QRCodeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Defines QRCode Component instance. + * Called when setting the QR code background color. * + * @param { ResourceColor } value + * @returns { QRCodeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Defines QRCode Component instance. + * Called when setting the QR code background color. * + * @param { ResourceColor } value + * @returns { QRCodeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Defines QRCode Component instance. + * Called when setting the QR code background color. * + * @param { ResourceColor } value + * @returns { QRCodeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + backgroundColor(value: ResourceColor): QRCodeAttribute; + + /** + * Set the opacity of the QR code content color. + * @param { number | Resource } value - indicates the opacity of the QR code content color. The value is between 0 and 1, with a default value of 1. + * @returns { QRCodeAttribute } the attribute of the QR code + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform * @since 11 */ - declare const QRCodeInstance: QRCodeAttribute; - \ No newline at end of file + /** + * Set the opacity of the QR code content color. + * @param { number | Resource } value - indicates the opacity of the QR code content color. The value is between 0 and 1, with a default value of 1. + * @returns { QRCodeAttribute } the attribute of the QR code + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + contentOpacity(value: number | Resource): QRCodeAttribute; +} + +/** + * Defines QRCode Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ +/** + * Defines QRCode Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ +/** + * Defines QRCode Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Defines QRCode Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + * @noninterop + */ +declare const QRCode: QRCodeInterface; + +/** + * Defines QRCode Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ +/** + * Defines QRCode Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ +/** + * Defines QRCode Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Defines QRCode Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + * @noninterop + */ +declare const QRCodeInstance: QRCodeAttribute; diff --git a/api/@internal/component/ets/text_clock.d.ts b/api/@internal/component/ets/text_clock.d.ts index 616157cd1d9774e5bb96ba365b2bb62e5fdcedde..8f3a3b4d9079ea57fd3f5107a8dae0ed549b2061 100644 --- a/api/@internal/component/ets/text_clock.d.ts +++ b/api/@internal/component/ets/text_clock.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonConfiguration, CommonMethod, ShadowOptions, ContentModifier, Optional, DateTimeOptions } from './common' +import { ResourceColor, Length, ResourceStr } from './units' +import { FontStyle, FontWeight } from './enums' +/*** endif */ + /** * Provides a way to control the textclock status. * @@ -38,701 +44,749 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare class TextClockController { - /** - * constructor. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * constructor. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * constructor. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - constructor(); - /** - * Provides a start event for textclock. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Provides a start event for textclock. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Provides a start event for textclock. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - start(); - /** - * Provides a stop event for textclock. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Provides a stop event for textclock. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Provides a stop event for textclock. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - stop(); - } - - /** - * TextClockConfiguration used by text clock content modifier - * - * @extends CommonConfiguration - * @interface TextClockConfiguration +declare class TextClockController { + /** + * constructor. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * constructor. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * constructor. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice - * @since 12 - */ - declare interface TextClockConfiguration extends CommonConfiguration { - /** - * Specifies the current time zone. - * The valid value is an integer ranging from - 14 to 12, - * Where a negative value indicates the eastern time zone, for example, -8. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - timeZoneOffset: number; - - /** - * TextClock is started or not. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - started: boolean; - - /** - * The time of the TextClock. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - timeValue: number; - } - - /** - * Options to construct TextClock component. - * - * @interface TextClockOptions + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + constructor(); + /** + * Provides a start event for textclock. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Provides a start event for textclock. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Provides a start event for textclock. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 - */ - declare interface TextClockOptions { - /** - * Time zone offset. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Time zone offset. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Time zone offset. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - /** - * Time zone offset. - * Anonymous Object Rectification. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ - timeZoneOffset?: number; - - /** - * TextClock controller. - * - * @type { ?TextClockController } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * TextClock controller. - * - * @type { ?TextClockController } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * TextClock controller. - * - * @type { ?TextClockController } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - /** - * TextClock controller. - * Anonymous Object Rectification. - * - * @type { ?TextClockController } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ - controller?: TextClockController - } - - /** - * TextClock component, which provides the text clock capability. - * - * @interface TextClockInterface + * @since 11 + */ + start(); + /** + * Provides a start event for textclock. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + start(): void; + /** + * Provides a stop event for textclock. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Provides a stop event for textclock. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Provides a stop event for textclock. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + stop(); + /** + * Provides a stop event for textclock. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + stop(): void; +} + +/** + * TextClockConfiguration used by text clock content modifier + * + * @extends CommonConfiguration + * @interface TextClockConfiguration + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare interface TextClockConfiguration extends CommonConfiguration { + /** + * Specifies the current time zone. + * The valid value is an integer ranging from - 14 to 12, + * Where a negative value indicates the eastern time zone, for example, -8. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + timeZoneOffset: number; + + /** + * TextClock is started or not. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + started: boolean; + + /** + * The time of the TextClock. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + timeValue: number; +} + +/** + * Options to construct TextClock component. + * + * @interface TextClockOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare interface TextClockOptions { + /** + * Time zone offset. + * + * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * TextClock component, which provides the text clock capability. + * Time zone offset. * - * @interface TextClockInterface + * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * TextClock component, which provides the text clock capability. + * Time zone offset. * - * @interface TextClockInterface + * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - interface TextClockInterface { - /** - * Construct the text clock component. - * Specifies the current time zone. - * The valid value is an integer ranging from - 14 to 12, - * Where a negative value indicates the eastern time zone, for example, -8. - * - * @param { object } options - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Construct the text clock component. - * Specifies the current time zone. - * The valid value is an integer ranging from - 14 to 12, - * Where a negative value indicates the eastern time zone, for example, -8. - * - * @param { object } options - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Construct the text clock component. - * Specifies the current time zone. - * The valid value is an integer ranging from - 14 to 12, - * Where a negative value indicates the eastern time zone, for example, -8. - * - * @param { object } options - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - /** - * Construct the text clock component. - * Specifies the current time zone. - * The valid value is an integer ranging from - 14 to 12, - * Where a negative value indicates the eastern time zone, for example, -8. - * Anonymous Object Rectification. - * - * @param { TextClockOptions } [options] - TextClock options. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ - (options?: TextClockOptions): TextClockAttribute; - } - - /** - * Provides attribute for TextClock. - * - * @extends CommonMethod + /** + * Time zone offset. + * Anonymous Object Rectification. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + timeZoneOffset?: number; + + /** + * TextClock controller. + * + * @type { ?TextClockController } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Provides attribute for TextClock. + * TextClock controller. * - * @extends CommonMethod + * @type { ?TextClockController } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Provides attribute for TextClock. + * TextClock controller. * - * @extends CommonMethod + * @type { ?TextClockController } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - declare class TextClockAttribute extends CommonMethod { - /** - * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". - * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), - * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), - * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). - * - * @param { string } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". - * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), - * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), - * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). - * - * @param { string } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". - * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), - * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), - * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). - * The default value is "hh:mm:ss" when TextClock is not in a form. - * The default value is "hh:mm" when TextClock is in a form. - * If the value has second or millisecond, the value will be set to the default value. - * - * @param { string } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - /** - * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". - * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), - * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), - * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). - * The default value is "hh:mm:ss" when TextClock is not in a form. - * The default value is "hh:mm" when TextClock is in a form. - * If the value has second or millisecond, the value will be set to the default value. - * - * @param { ResourceStr } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - format(value: ResourceStr): TextClockAttribute; - - /** - * Provides a date change callback. - * The callback parameter is Unix Time Stamp, - * The number of milliseconds that have elapsed since January 1, 1970 (UTC). - * The minimum callback interval for this event is seconds. - * You can listen to this callback, - * Use the format attribute method to customize data display in the callback. - * - * @param { function } event - Listening date event callback. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Provides a date change callback. - * The callback parameter is Unix Time Stamp, - * The number of milliseconds that have elapsed since January 1, 1970 (UTC). - * The minimum callback interval for this event is seconds. - * You can listen to this callback, - * Use the format attribute method to customize data display in the callback. - * - * @param { function } event - Listening date event callback. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Provides a date change callback. - * The callback parameter is Unix Time Stamp, - * The number of milliseconds that have elapsed since January 1, 1970 (UTC). - * The minimum callback interval for this event default is seconds when TextClock is not in a form. - * The minimum callback interval for this event is minutes when TextClock is in a form. - * If visibility is Hidden the callback be disabled when TextClock is in a form. - * You can listen to this callback, - * Use the format attribute method to customize data display in the callback. - * - * @param { function } event - Listening date event callback. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - onDateChange(event: (value: number) => void): TextClockAttribute; - - /** - * Called when the value of TextClock fontColor is set - * - * @param { ResourceColor } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the value of TextClock fontColor is set - * - * @param { ResourceColor } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the value of TextClock fontColor is set - * - * @param { ResourceColor } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - fontColor(value: ResourceColor): TextClockAttribute; - - /** - * Called when the value of TextClock fontSize is set - * - * @param { Length } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the value of TextClock fontSize is set - * - * @param { Length } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the value of TextClock fontSize is set - * - * @param { Length } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - fontSize(value: Length): TextClockAttribute; - - /** - * Called when the value of TextClock fontStyle is set - * - * @param { FontStyle } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the value of TextClock fontStyle is set - * - * @param { FontStyle } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the value of TextClock fontStyle is set - * - * @param { FontStyle } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - fontStyle(value: FontStyle): TextClockAttribute; - - /** - * Called when the value of TextClock fontWeight is set - * - * @param { number | FontWeight | string } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the value of TextClock fontWeight is set - * - * @param { number | FontWeight | string } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the value of TextClock fontWeight is set - * - * @param { number | FontWeight | string } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - fontWeight(value: number | FontWeight | string): TextClockAttribute; - - /** - * Called when the value of TextClock fontFamily is set - * - * @param { ResourceStr } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the value of TextClock fontFamily is set - * - * @param { ResourceStr } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the value of TextClock fontFamily is set - * - * @param { ResourceStr } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - fontFamily(value: ResourceStr): TextClockAttribute; - - /** - * Called when the text shadow is set. - * - * @param { ShadowOptions | Array } value - The shadow options. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 11 - */ - /** - * Called when the text shadow is set. - * - * @param { ShadowOptions | Array } value - The shadow options. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - textShadow(value: ShadowOptions | Array): TextClockAttribute; - - /** - * Called when the text fontFeature is set. - * - * @param { string } value - The fontFeature. - * normal | , - * where = [ | on | off ], like: "ss01" 0 - * number of can be single or multiple, and separated by comma ','. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 11 - */ - /** - * Called when the text fontFeature is set. - * - * @param { string } value - The fontFeature. - * normal | , - * where = [ | on | off ], like: "ss01" 0 - * number of can be single or multiple, and separated by comma ','. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - fontFeature(value: string): TextClockAttribute; - - /** - * Set the content modifier of textclock. - * - * @param { ContentModifier } modifier - The content modifier of textclock. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - contentModifier(modifier: ContentModifier): TextClockAttribute; - - /** - * Set hour format - * - * @param { Optional } dateTimeOptions - Indicates whether a leading 0 is required for the hour. - * @returns { TextClockAttribute } the attribute of the text clock - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - dateTimeOptions(dateTimeOptions: Optional): TextClockAttribute; - } - - /** - * Defines TextClock Component. + /** + * TextClock controller. + * Anonymous Object Rectification. * + * @type { ?TextClockController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + controller?: TextClockController +} + +/** + * TextClock component, which provides the text clock capability. + * + * @interface TextClockInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * TextClock component, which provides the text clock capability. + * + * @interface TextClockInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * TextClock component, which provides the text clock capability. + * + * @interface TextClockInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + * @noninterop + */ +interface TextClockInterface { + /** + * Construct the text clock component. + * Specifies the current time zone. + * The valid value is an integer ranging from - 14 to 12, + * Where a negative value indicates the eastern time zone, for example, -8. + * + * @param { object } options + * @returns { TextClockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Defines TextClock Component. + * Construct the text clock component. + * Specifies the current time zone. + * The valid value is an integer ranging from - 14 to 12, + * Where a negative value indicates the eastern time zone, for example, -8. * + * @param { object } options + * @returns { TextClockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Defines TextClock Component. + * Construct the text clock component. + * Specifies the current time zone. + * The valid value is an integer ranging from - 14 to 12, + * Where a negative value indicates the eastern time zone, for example, -8. * + * @param { object } options + * @returns { TextClockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - declare const TextClock: TextClockInterface; - /** - * Defines TextClock Component instance. + * Construct the text clock component. + * Specifies the current time zone. + * The valid value is an integer ranging from - 14 to 12, + * Where a negative value indicates the eastern time zone, for example, -8. + * Anonymous Object Rectification. * + * @param { TextClockOptions } [options] - TextClock options. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + (options?: TextClockOptions): TextClockAttribute; +} + +/** + * Provides attribute for TextClock. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Provides attribute for TextClock. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * Provides attribute for TextClock. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + * @noninterop + */ +declare class TextClockAttribute extends CommonMethod { + /** + * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". + * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), + * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), + * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). + * + * @param { string } value + * @returns { TextClockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Defines TextClock Component instance. + * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". + * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), + * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), + * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). * + * @param { string } value + * @returns { TextClockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Defines TextClock Component instance. + * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". + * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), + * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), + * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). + * The default value is "hh:mm:ss" when TextClock is not in a form. + * The default value is "hh:mm" when TextClock is in a form. + * If the value has second or millisecond, the value will be set to the default value. * + * @param { string } value + * @returns { TextClockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - declare const TextClockInstance: TextClockAttribute; - \ No newline at end of file + /** + * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". + * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), + * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), + * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). + * The default value is "hh:mm:ss" when TextClock is not in a form. + * The default value is "hh:mm" when TextClock is in a form. + * If the value has second or millisecond, the value will be set to the default value. + * + * @param { ResourceStr } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + format(value: ResourceStr): TextClockAttribute; + + /** + * Provides a date change callback. + * The callback parameter is Unix Time Stamp, + * The number of milliseconds that have elapsed since January 1, 1970 (UTC). + * The minimum callback interval for this event is seconds. + * You can listen to this callback, + * Use the format attribute method to customize data display in the callback. + * + * @param { function } event - Listening date event callback. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Provides a date change callback. + * The callback parameter is Unix Time Stamp, + * The number of milliseconds that have elapsed since January 1, 1970 (UTC). + * The minimum callback interval for this event is seconds. + * You can listen to this callback, + * Use the format attribute method to customize data display in the callback. + * + * @param { function } event - Listening date event callback. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Provides a date change callback. + * The callback parameter is Unix Time Stamp, + * The number of milliseconds that have elapsed since January 1, 1970 (UTC). + * The minimum callback interval for this event default is seconds when TextClock is not in a form. + * The minimum callback interval for this event is minutes when TextClock is in a form. + * If visibility is Hidden the callback be disabled when TextClock is in a form. + * You can listen to this callback, + * Use the format attribute method to customize data display in the callback. + * + * @param { function } event - Listening date event callback. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + onDateChange(event: (value: number) => void): TextClockAttribute; + + /** + * Called when the value of TextClock fontColor is set + * + * @param { ResourceColor } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the value of TextClock fontColor is set + * + * @param { ResourceColor } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Called when the value of TextClock fontColor is set + * + * @param { ResourceColor } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + fontColor(value: ResourceColor): TextClockAttribute; + + /** + * Called when the value of TextClock fontSize is set + * + * @param { Length } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the value of TextClock fontSize is set + * + * @param { Length } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Called when the value of TextClock fontSize is set + * + * @param { Length } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + fontSize(value: Length): TextClockAttribute; + + /** + * Called when the value of TextClock fontStyle is set + * + * @param { FontStyle } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the value of TextClock fontStyle is set + * + * @param { FontStyle } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Called when the value of TextClock fontStyle is set + * + * @param { FontStyle } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + fontStyle(value: FontStyle): TextClockAttribute; + + /** + * Called when the value of TextClock fontWeight is set + * + * @param { number | FontWeight | string } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the value of TextClock fontWeight is set + * + * @param { number | FontWeight | string } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Called when the value of TextClock fontWeight is set + * + * @param { number | FontWeight | string } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + fontWeight(value: number | FontWeight | string): TextClockAttribute; + + /** + * Called when the value of TextClock fontFamily is set + * + * @param { ResourceStr } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the value of TextClock fontFamily is set + * + * @param { ResourceStr } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Called when the value of TextClock fontFamily is set + * + * @param { ResourceStr } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + fontFamily(value: ResourceStr): TextClockAttribute; + + /** + * Called when the text shadow is set. + * + * @param { ShadowOptions | Array } value - The shadow options. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 11 + */ + /** + * Called when the text shadow is set. + * + * @param { ShadowOptions | Array } value - The shadow options. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + textShadow(value: ShadowOptions | Array): TextClockAttribute; + + /** + * Called when the text fontFeature is set. + * + * @param { string } value - The fontFeature. + * normal | , + * where = [ | on | off ], like: "ss01" 0 + * number of can be single or multiple, and separated by comma ','. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 11 + */ + /** + * Called when the text fontFeature is set. + * + * @param { string } value - The fontFeature. + * normal | , + * where = [ | on | off ], like: "ss01" 0 + * number of can be single or multiple, and separated by comma ','. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + fontFeature(value: string): TextClockAttribute; + + /** + * Set the content modifier of textclock. + * + * @param { ContentModifier } modifier - The content modifier of textclock. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + contentModifier(modifier: ContentModifier): TextClockAttribute; + + /** + * Set hour format + * + * @param { Optional } dateTimeOptions - Indicates whether a leading 0 is required for the hour. + * @returns { TextClockAttribute } the attribute of the text clock + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + dateTimeOptions(dateTimeOptions: Optional): TextClockAttribute; +} + +/** + * Defines TextClock Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines TextClock Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * Defines TextClock Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + * @noninterop + */ +declare const TextClock: TextClockInterface; + +/** + * Defines TextClock Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines TextClock Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * Defines TextClock Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + * @noninterop + */ +declare const TextClockInstance: TextClockAttribute; diff --git a/api/@internal/component/ets/text_picker.d.ts b/api/@internal/component/ets/text_picker.d.ts index 760696eb412a0bbf9adf608d76beaa3056adedcb..df039e0b3abe120bcdf5244881741222c59d0fcf 100644 --- a/api/@internal/component/ets/text_picker.d.ts +++ b/api/@internal/component/ets/text_picker.d.ts @@ -18,6 +18,14 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource, ResourceColor, Offset, Dimension, ResourceStr } from './units'; +import { CommonMethod, PickerTextStyle, PickerDialogButtonStyle, Rectangle, BlurStyle, ShadowOptions, ShadowStyle, HoverModeAreaType, BackgroundBlurStyleOptions, BackgroundEffectOptions, Optional, Callback, Bindable } from './common'; +import { DialogAlignment } from './alertDialog'; +import { CrownSensitivity, TextOverflow } from './enums'; +import { LengthMetrics } from './../Graphics'; +/*** endif */ + /** * Define the contents of each selector item. * @@ -33,2157 +41,1897 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare interface TextPickerRangeContent { - /** - * Image resource. - * If the value is a string, such as **"/common/hello.png"**, it represents the path to the image. - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Image resource. - * If the value is a string, such as **"/common/hello.png"**, it represents the path to the image. - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - icon: string | Resource; - - /** - * Text information. - * - *

NOTE: - *
If the text length exceeds the column width, the text will be truncated. - *

- * - * @type { ?(string | Resource) } - * @default "" - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Text information. - * - *

NOTE: - *
If the text length exceeds the column width, the text will be truncated. - *

- * - * @type { ?(string | Resource) } - * @default "" - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - text?: string | Resource; - } - - /** - * Define the contents of text cascade picker. - * - * @interface TextCascadePickerRangeContent +declare interface TextPickerRangeContent { + /** + * Image resource. + * If the value is a string, such as **"/common/hello.png"**, it represents the path to the image. + * + * @type { string | Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Image resource. + * If the value is a string, such as **"/common/hello.png"**, it represents the path to the image. + * + * @type { string | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + icon: string | Resource; + + /** + * Text information. + * + *

NOTE: + *
If the text length exceeds the column width, the text will be truncated. + *

+ * + * @type { ?(string | Resource) } + * @default "" + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform * @since 10 */ /** - * Define the contents of text cascade picker. + * Text information. * - * @interface TextCascadePickerRangeContent + *

NOTE: + *
If the text length exceeds the column width, the text will be truncated. + *

+ * + * @type { ?(string | Resource) } + * @default "" * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + text?: string | Resource; +} + +/** + * Define the contents of text cascade picker. + * + * @interface TextCascadePickerRangeContent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ +/** + * Define the contents of text cascade picker. + * + * @interface TextCascadePickerRangeContent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare interface TextCascadePickerRangeContent { + /** + * Text information. + * + *

NOTE: + * If the text length exceeds the column width, the text will be truncated. + *

+ * + * @type { string | Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Text information. + * + *

NOTE: + * If the text length exceeds the column width, the text will be truncated. + *

+ * + * @type { string | Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + text: string | Resource; + + /** + * Linkage data. + * + * @type { ?TextCascadePickerRangeContent[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 */ - declare interface TextCascadePickerRangeContent { - /** - * Text information. - * - *

NOTE: - * If the text length exceeds the column width, the text will be truncated. - *

- * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Text information. - * - *

NOTE: - * If the text length exceeds the column width, the text will be truncated. - *

- * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - text: string | Resource; - - /** - * Linkage data. - * - * @type { ?TextCascadePickerRangeContent[] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Linkage data. - * - * @type { ?TextCascadePickerRangeContent[] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - children?: TextCascadePickerRangeContent[]; - } - - /** - * Defines the options of TextPicker. - * - * @interface TextPickerOptions + /** + * Linkage data. + * + * @type { ?TextCascadePickerRangeContent[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + children?: TextCascadePickerRangeContent[]; +} + +/** + * Defines the options of TextPicker. + * + * @interface TextPickerOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines the options of TextPicker. + * + * @interface TextPickerOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * Defines the options of TextPicker. + * + * @interface TextPickerOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare interface TextPickerOptions { + /** + * Data selection range of the picker. + * + * @type {string[] | Resource} * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Defines the options of TextPicker. + * Data selection range of the picker. + * Support the display of pictures, text and pictures plus text, or multi column plain text. * - * @interface TextPickerOptions + * @type {string[] | string[][] | Resource | TextPickerRangeContent[] | TextCascadePickerRangeContent[]} * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Defines the options of TextPicker. + * Data selection range of the picker. + * Support the display of pictures, text and pictures plus text, or multi column plain text. * - * @interface TextPickerOptions + * @type {string[] | string[][] | Resource | TextPickerRangeContent[] | TextCascadePickerRangeContent[]} * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare interface TextPickerOptions { - /** - * Data selection range of the picker. - * - * @type {string[] | Resource} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Data selection range of the picker. - * Support the display of pictures, text and pictures plus text, or multi column plain text. - * - * @type {string[] | string[][] | Resource | TextPickerRangeContent[] | TextCascadePickerRangeContent[]} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Data selection range of the picker. - * Support the display of pictures, text and pictures plus text, or multi column plain text. - * - * @type {string[] | string[][] | Resource | TextPickerRangeContent[] | TextCascadePickerRangeContent[]} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - range: string[] | string[][] | Resource | TextPickerRangeContent[] | TextCascadePickerRangeContent[]; - - /** - * Value of the default item in the range. - * The priority of this parameter is lower than that of selected. - * - *

NOTE: - * This parameter works only when the picker contains text only. - *

- * - * @type { ?string } - * @default value of the first item - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Value of the default item in the range. - * The priority of this parameter is lower than that of selected. - * For a single-column picker, use a value of the string type. - * For a multi-column (linked) picker, use a value of the string[] type. - * - *

NOTE: - *
This parameter works only when the picker contains text only. - *

- * - * @type { ?(string | string[]) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Value of the default item in the range. - * The priority of this parameter is lower than that of selected. - * For a single-column picker, use a value of the string type. - * For a multi-column (linked) picker, use a value of the string[] type. - * - *

NOTE: - * This parameter works only when the picker contains text only. - *

- * - * @type { ?(string | string[]) } - * @default value of the first item - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Value of the current selection. - * Only valid when only text is displayed. - * - * @type { ?(ResourceStr | ResourceStr[]) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - value?: ResourceStr | ResourceStr[]; - - /** - * Index of the default selected item in the array. - * The index is zero-based. - * - * @type { ?number } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Index of the default selected item in the array. - * The index is zero-based. - * For a single-column picker, use a value of the number type. - * For a multi-column (linked) picker, use a value of the number[]. - * - * @type { ?(number | number[]) } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Index of the default selected item in the array. - * The index is zero-based. - * For a single-column picker, use a value of the number type. - * For a multi-column (linked) picker, use a value of the number[]. - * - * @type { ?(number | number[]) } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - selected?: number | number[]; - - /** - * Width of each column in the picker. - * - *

NOTE: - *
If the text length exceeds the column width, the text will be truncated. - *

- * - * @type { ?LengthMetrics[] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - columnWidths?: LengthMetrics[]; - } - - /** - * TextPickerInterface - * - * @interface TextPickerInterface + range: string[] | string[][] | Resource | TextPickerRangeContent[] | TextCascadePickerRangeContent[]; + + /** + * Value of the default item in the range. + * The priority of this parameter is lower than that of selected. + * + *

NOTE: + * This parameter works only when the picker contains text only. + *

+ * + * @type { ?string } + * @default value of the first item * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * TextPickerInterface + * Value of the default item in the range. + * The priority of this parameter is lower than that of selected. + * For a single-column picker, use a value of the string type. + * For a multi-column (linked) picker, use a value of the string[] type. * - * @interface TextPickerInterface + *

NOTE: + *
This parameter works only when the picker contains text only. + *

+ * + * @type { ?(string | string[]) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * TextPickerInterface + * Value of the default item in the range. + * The priority of this parameter is lower than that of selected. + * For a single-column picker, use a value of the string type. + * For a multi-column (linked) picker, use a value of the string[] type. + * + *

NOTE: + * This parameter works only when the picker contains text only. + *

* - * @interface TextPickerInterface + * @type { ?(string | string[]) } + * @default value of the first item * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ - interface TextPickerInterface { - /** - * Defines the TextPicker constructor. - * - * @param { TextPickerOptions } options - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines the TextPicker constructor. - * - * @param { TextPickerOptions } options - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Defines the TextPicker constructor. - * - * @param { TextPickerOptions } options - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - (options?: TextPickerOptions): TextPickerAttribute; - } - - /** - * Defines the struct of DividerOptions. - * - * @interface DividerOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - declare interface DividerOptions { - /** - * Stroke width of the divider. - * The unit is vp by default. You can also specify it as px. The percentage type is not supported. - * - *

NOTE: - *
If the value is less than 0, the default value is used. - *
The maximum value allowed is half the height of the column. - *

- * - * @type { ?Dimension } - * @default 2.0px - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - strokeWidth?: Dimension; - - /** - * Color of the divider. - * - * @type { ?ResourceColor } - * @default '#33000000' - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - color?: ResourceColor; - - /** - * Distance between the divider and the start edge of the picker. - * The unit is vp by default. You can also specify it as px. The percentage type is not supported. - * - *

NOTE: - * Values less than 0 are invalid. The maximum value allowed is the width of the column. - *

- * - * @type { ?Dimension } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - startMargin?: Dimension; - - /** - * Distance between the divider and the end edge of the picker. - * The unit is vp by default. You can also specify it as px. The percentage type is not supported. - * - *

NOTE: - *
Values less than 0 are invalid. The maximum value allowed is the width of the column. - *

- * - * @type { ?Dimension } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - endMargin?: Dimension; - } - - /** - * Defines the text style options. - * - * @extends PickerTextStyle - * @interface TextPickerTextStyle - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 15 - */ - declare interface TextPickerTextStyle extends PickerTextStyle { - /** - * Minimum font size, used in conjunction with maxFontSize. - * When minFontSize and maxFontSize are set, - * the size setting in font is ineffective. - * The default maximum number of lines is 1, - * and the default height adaptation mode is MIN_FONT_SIZE_FIRST. - * - * @type { ?(number | string | Resource) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 15 - */ - minFontSize?: number | string | Resource; - - /** - * Maximum font size. - * - * @type { ?(number | string | Resource) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 15 - */ - maxFontSize?: number | string | Resource; - - /** - * Display mode when the text is too long. - * - *

NOTE: - * Ineffective when set to MARQUEE. - *

- * - * @type { ?TextOverflow } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 15 - */ - overflow?: TextOverflow; - } - - /** - * Provide an interface to set the background style of selected items. - * - * @interface PickerBackgroundStyle + /** + * Value of the current selection. + * Only valid when only text is displayed. + * + * @type { ?(ResourceStr | ResourceStr[]) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + value?: ResourceStr | ResourceStr[]; + + /** + * Value of the current selection. + * Only valid when only text is displayed. + * + * @type { ?(ResourceStr | ResourceStr[] | Bindable | Bindable) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 + * @arkts 1.2 + */ + value?: ResourceStr | ResourceStr[] | Bindable | Bindable; + + /** + * Index of the default selected item in the array. + * The index is zero-based. + * + * @type { ?number } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 */ - declare interface PickerBackgroundStyle { - /** - * Define the background color of selected item. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - color?: ResourceColor; - - /** - * Defines the border radius of selected items. - * - * @type { ?(LengthMetrics | BorderRadiuses | LocalizedBorderRadiuses) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - borderRadius?: LengthMetrics | BorderRadiuses | LocalizedBorderRadiuses; - } - /** - * Callback of the listened scroll stop event. + * Index of the default selected item in the array. + * The index is zero-based. + * For a single-column picker, use a value of the number type. + * For a multi-column (linked) picker, use a value of the number[]. * - * @typedef {function} TextPickerScrollStopCallback - * @param { string | string[] } value - Value of the selected item. - * @param { number | number[] } index - Index of the selected item. + * @type { ?(number | number[]) } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Index of the default selected item in the array. + * The index is zero-based. + * For a single-column picker, use a value of the number type. + * For a multi-column (linked) picker, use a value of the number[]. + * + * @type { ?(number | number[]) } + * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since 11 */ - declare type TextPickerScrollStopCallback = (value: string | string[], index: number | number[]) => void; - + selected?: number | number[]; + /** - * Callback of TextPicker item is selected event. + * Current selected subscript. * - * @typedef {function} OnTextPickerChangeCallback - * @param { string | string[] } selectItem - Value of the selected item. - * @param { number | number[] } index - Index of the selected item. + * @type { ?(number | number[] | Bindable | Bindable) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since 20 + * @arkts 1.2 */ - declare type OnTextPickerChangeCallback = (selectItem: string | string[], index: number | number[]) => void; - + selected?: number | number[] | Bindable | Bindable; + /** - * Callback of the listened onEnterSelectedArea event. + * Width of each column in the picker. + * + *

NOTE: + *
If the text length exceeds the column width, the text will be truncated. + *

* - * @typedef {function} TextPickerEnterSelectedAreaCallback - * @param { string | string[] } value - Value of the selected item. - * @param { number | number[] } index - Index of the selected item. + * @type { ?LengthMetrics[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - declare type TextPickerEnterSelectedAreaCallback = (value: string | string[], index: number | number[]) => void; - + columnWidths?: LengthMetrics[]; +} + +/** + * TextPickerInterface + * + * @interface TextPickerInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * TextPickerInterface + * + * @interface TextPickerInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * TextPickerInterface + * + * @interface TextPickerInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + * @noninterop + */ +interface TextPickerInterface { /** - * Style the text selector. + * Defines the TextPicker constructor. * - * @extends CommonMethod + * @param { TextPickerOptions } options + * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Style the text selector. + * Defines the TextPicker constructor. * - * @extends CommonMethod + * @param { TextPickerOptions } options + * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Style the text selector. + * Defines the TextPicker constructor. * - * @extends CommonMethod + * @param { TextPickerOptions } options + * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + (options?: TextPickerOptions): TextPickerAttribute; +} + +/** + * Defines the struct of DividerOptions. + * + * @interface DividerOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare interface DividerOptions { + /** + * Stroke width of the divider. + * The unit is vp by default. You can also specify it as px. The percentage type is not supported. + * + *

NOTE: + *
If the value is less than 0, the default value is used. + *
The maximum value allowed is half the height of the column. + *

+ * + * @type { ?Dimension } + * @default 2.0px + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - declare class TextPickerAttribute extends CommonMethod { - /** - * Sets the height of each item in the picker. - * - * @param { number | string } value - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Sets the height of each item in the picker. - * - * @param { number | string } value - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the height of each item in the picker. - * - * @param { number | string } value - Height of each item in the picker. - *
For the number type, the value range is [0, +∞). - *
For the string type, only numeric string values, for example, "56", are supported. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - defaultPickerItemHeight(value: number | string): TextPickerAttribute; - - /** - * Sets the height of each item in the picker. - * - * @param { Optional } height - Height of each item in the picker. - *
For the number type, the value range is [0, +∞). - *
For the string type, only numeric string values, for example, "56", are supported. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - defaultPickerItemHeight(height: Optional): TextPickerAttribute; - - /** - * Sets whether scrolling is loopable. - * - * @param { boolean } value - Whether scrolling is loopable. true: loopable; false: not loopable. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Sets whether scrolling is loopable. - * - * @param { boolean } value - Whether scrolling is loopable. true: loopable; false: not loopable. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - canLoop(value: boolean): TextPickerAttribute; - - /** - * Can scroll loop if true is set, on the contrary it can not. - * this API supports the undefined type for the isLoop parameter. - * - * @param { Optional } isLoop - Whether scrolling is loopable. true: loopable; false: not loopable. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - canLoop(isLoop: Optional): TextPickerAttribute; - - /** - * Sets the font color, font size, and font weight for the top and bottom items. - * - * @param { PickerTextStyle } value - Font color, font size, and font weight of the top and bottom items. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the font color, font size, and font weight for the top and bottom items. - * - * @param { PickerTextStyle } value - Font color, font size, and font weight of the top and bottom items. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - disappearTextStyle(value: PickerTextStyle): TextPickerAttribute; - - /** - * Sets the font color, font size, and font weight for the top and bottom items. - * This API supports the undefined type for the style parameter. - * - * @param { Optional } style - Font color, font size, and font weight of the top and bottom items. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - disappearTextStyle(style: Optional): TextPickerAttribute; - - /** - * Sets the text style of disappearing items - * - * @param { Optional } style - indicates the text style of disappearing items. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - disappearTextStyle(style: Optional): TextPickerAttribute; - - /** - * Sets the font color, font size, and font weight for all items except the top, bottom, and selected items. - * - * @param { PickerTextStyle } value - Font color, font size, and font weight of all items except the top, - *
bottom, and selected items. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the font color, font size, and font weight for all items except the top, bottom, and selected items. - * - * @param { PickerTextStyle } value - indicates the text style of normal items. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - textStyle(value: PickerTextStyle): TextPickerAttribute; - - /** - * Sets the font color, font size, and font weight for all items except the top, bottom, and selected items. - * This API supports the undefined type for the style parameter. - * - * @param { Optional } style - Font color, font size, and font weight of all - *
items except the top, bottom, and selected items. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - textStyle(style: Optional): TextPickerAttribute; - - /** - * Sets the text style of normal items - * - * @param { Optional } style - indicates the text style of normal items. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - textStyle(style: Optional): TextPickerAttribute; - - /** - * Sets the font color, font size, and font weight for the selected item. - * - * @param { PickerTextStyle } value - Font color, font size, and font weight of the selected item.. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the font color, font size, and font weight for the selected item. - * - * @param { PickerTextStyle } value - Font color, font size, and font weight of the selected item. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - selectedTextStyle(value: PickerTextStyle): TextPickerAttribute; - - /** - * Sets the font color, font size, and font weight for the selected item. - * This API supports the undefined type for the style parameter. - * - * @param { Optional } style - Font color, font size, and font weight of the selected item. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - selectedTextStyle(style: Optional): TextPickerAttribute; - - /** - * Sets the text style of selected items - * - * @param { Optional } style - indicates the text style of selected items. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - selectedTextStyle(style: Optional): TextPickerAttribute; - - /** - * Sets whether to enable the text style change animation during the scrolling process. - * - * @param { boolean } disabled - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 15 - */ - disableTextStyleAnimation(disabled: boolean): TextPickerAttribute; - - /** - * Sets the style of the text items when the text style change animation during the scrolling process is disabled. - * - * @param { TextPickerTextStyle } style - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 15 - */ - defaultTextStyle(style: TextPickerTextStyle): TextPickerAttribute; - - /** - * Triggered when the OK button in the dialog box is clicked. - * - * @param { function } callback - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - * @deprecated since 10 - */ - onAccept(callback: (value: string, index: number) => void): TextPickerAttribute; - - /** - * Triggered when the Cancel button in the dialog box is clicked. - * - * @param { function } callback - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - * @deprecated since 10 - */ - onCancel(callback: () => void): TextPickerAttribute; - - /** - * Triggered when an item in the picker is selected. - * - * @param { function } callback - the callback of onChange. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Triggered when an item in the picker is selected. - * When the picker contains text only or both text and imagery, - * value indicates the text of the selected item. - * When the picker contains imagery only, value is empty. - * - * @param { function } callback - the callback of onChange. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Triggered when an item in the picker is selected. - * When the picker contains text only or both text and imagery, - * value indicates the text of the selected item. - * When the picker contains imagery only, value is empty. - * - * @param { function } callback - the callback of onChange. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - onChange(callback: (value: string | string[], index: number | number[]) => void): TextPickerAttribute; - - /** - * Triggered when the text picker snaps to the selected item. - * Compared to onChange, this API supports the undefined type for the callback parameter. - * - * @param { Optional } callback - the callback of onChange. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - onChange(callback: Optional): TextPickerAttribute; - - /** - * Triggered when the scrolling in the text picker stops. - * If the scrolling is initiated by a gesture, - * this event is triggered when the finger is lifted from the screen and the scrolling stops. - * - * @param { TextPickerScrollStopCallback } callback - Triggered when the scrolling - *
in the text picker stops. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - onScrollStop(callback: TextPickerScrollStopCallback): TextPickerAttribute; - - /** - * Triggered when the scrolling in the text picker stops. - * If the scrolling is initiated by a gesture, - * this event is triggered when the finger is lifted from the screen and the scrolling stops. - * - * @param { Optional } callback - Triggered when the scrolling - *
in the text picker stops. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - onScrollStop(callback: Optional): TextPickerAttribute; - - /** - * Triggered during the scrolling of the text picker when an item enters the divider area. - * When the picker contains text only or a combination of images and text, - * value indicates the text of the selected item. When the picker contains images only, value is empty. - * - * @param { TextPickerEnterSelectedAreaCallback } callback - Triggered during the scrolling of - *
the text picker when an item enters the divider area. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - onEnterSelectedArea(callback: TextPickerEnterSelectedAreaCallback): TextPickerAttribute; - - /** - * Sets the index of the default selected item in the array. - * Its priority is higher than that of the selected value in options. - * For a single-column picker, use a value of the number type. - * For a multi-column (linked) picker, use a value of the number[] type. - * - * @param { number | number[] } value - Index of the default selected item in the array. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the index of the default selected item in the array. - * Its priority is higher than that of the selected value in options. - * For a single-column picker, use a value of the number type. - * For a multi-column (linked) picker, use a value of the number[] type. - * - * @param { number | number[] } value - Index of the default selected item in the array. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - selectedIndex(value: number | number[]): TextPickerAttribute; - - /** - * Sets the index of the default selected item in the array. - * Its priority is higher than that of the selected value in options. - * For a single-column picker, use a value of the number type. For a multi-column (linked) picker, - * use a value of the number[] type. Compared to [selectedIndex](#selectedindex10), - * this API supports the undefined type for the index parameter. - * - * @param { Optional } index - Index of the default selected item in the array. - *
The index is zero-based.
If index is set to undefined, the default value 0 is used. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - selectedIndex(index: Optional): TextPickerAttribute; - - /** - * Sets the divider style. - * - * @param { DividerOptions | null } value - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - divider(value: DividerOptions | null): TextPickerAttribute; - - /** - * Sets the divider style. - * - * @param { Optional } textDivider - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - divider(textDivider: Optional): TextPickerAttribute; - - /** - * Sets the height for the fade effect. - * If this attribute is not set, the default fade effect is displayed. - * - *

NOTE: - *
Avoid changing the attribute data during the animation process of this component. - *

- * - * @param { Dimension } value - Height of the fade effect at the top and bottom edges of the content area. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - gradientHeight(value: Dimension): TextPickerAttribute; - - /** - * Specifies whether to enable haptic feedback. - * - * @param { Optional } enable - Whether to enable haptic feedback. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 18 - */ - enableHapticFeedback(enable: Optional): TextPickerAttribute; - - /** - * Sets the height for the fade effect. - * If this attribute is not set, the default fade effect is displayed. - * this API supports the undefinedtype for the height parameter. - * - *

NOTE: - *
Avoid changing the attribute data during the animation process of this component. - *

- * - * @param { Optional } height - THeight of the fade effect at the top and bottom edges of - *
the content area. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - gradientHeight(height: Optional): TextPickerAttribute; - - /** - * Sets the sensitivity to the digital crown rotation. - * - * @param { Optional } sensitivity - Sensitivity to the digital crown rotation. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - digitalCrownSensitivity(sensitivity: Optional): TextPickerAttribute; - - /** - * Sets the background style of selected items. - * - * @param { Optional } style - the background style of selected items. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - selectedBackgroundStyle(style: Optional): TextPickerAttribute; - } - - /** - * Defines the struct of TextPickerResult. - * - * @interface TextPickerResult + strokeWidth?: Dimension; + + /** + * Color of the divider. + * + * @type { ?ResourceColor } + * @default "#33000000" * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ + color?: ResourceColor; + /** - * Defines the struct of TextPickerResult. + * Distance between the divider and the start edge of the picker. + * The unit is vp by default. You can also specify it as px. The percentage type is not supported. * - * @interface TextPickerResult + *

NOTE: + * Values less than 0 are invalid. The maximum value allowed is the width of the column. + *

+ * + * @type { ?Dimension } + * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 10 + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ + startMargin?: Dimension; + /** - * Defines the struct of TextPickerResult. + * Distance between the divider and the end edge of the picker. + * The unit is vp by default. You can also specify it as px. The percentage type is not supported. * - * @interface TextPickerResult + *

NOTE: + *
Values less than 0 are invalid. The maximum value allowed is the width of the column. + *

+ * + * @type { ?Dimension } + * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - declare interface TextPickerResult { - /** - * The currently selected value. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * The currently selected value. - * Only valid when only text is displayed.When picture or picture plus text is displayed, the value of value is "". - * - * @type { string | string[] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * The currently selected value. - * Only valid when only text is displayed.When picture or picture plus text is displayed, the value of value is "". - * - * @type { string | string[] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - value: string | string[]; - - /** - * The subscript of the current selection. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * The subscript of the current selection. - * - * @type { number | number[] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * The subscript of the current selection. - * - * @type { number | number[] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - index: number | number[]; - } - - /** - * Defines the TextPickerDialogOptions for Text Picker Dialog. - * - * @extends TextPickerOptions - * @interface TextPickerDialogOptions + endMargin?: Dimension; +} + +/** + * Defines the text style options. + * + * @extends PickerTextStyle + * @interface TextPickerTextStyle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare interface TextPickerTextStyle extends PickerTextStyle { + /** + * Minimum font size, used in conjunction with maxFontSize. + * When minFontSize and maxFontSize are set, + * the size setting in font is ineffective. + * The default maximum number of lines is 1, + * and the default height adaptation mode is MIN_FONT_SIZE_FIRST. + * + * @type { ?(number | string | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ + minFontSize?: number | string | Resource; + /** - * Defines the TextPickerDialogOptions for Text Picker Dialog. + * Maximum font size. * - * @extends TextPickerOptions - * @interface TextPickerDialogOptions + * @type { ?(number | string | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 10 + * @atomicservice + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ + maxFontSize?: number | string | Resource; + /** - * Defines the TextPickerDialogOptions for Text Picker Dialog. + * Display mode when the text is too long. + * + *

NOTE: + * Ineffective when set to MARQUEE. + *

* - * @extends TextPickerOptions - * @interface TextPickerDialogOptions + * @type { ?TextOverflow } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 + */ + overflow?: TextOverflow; +} + +/** + * Provide an interface to set the background style of selected items. + * + * @interface PickerBackgroundStyle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +declare interface PickerBackgroundStyle { + /** + * Define the background color of selected item. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 */ - declare interface TextPickerDialogOptions extends TextPickerOptions { - /** - * Called when the default height of the selected element is set. - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the default height of the selected element is set. - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Height of the picker item. - * - * @type { ?(number | string) } - * @default 56 vp (selected) and 36 vp (unselected) - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - defaultPickerItemHeight?: number | string; - - /** - * Can scroll loop if true is set, on the contrary it can not. - * - * @type { ?boolean } - * @default true - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Whether to support scroll looping. - * The value true means to support scroll looping, and false means the opposite. - * - * @type { ?boolean } - * @default true - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - canLoop?: boolean; - - /** - * Text style of disappearing items - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Font color, font size, and font weight of the top and bottom items. - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - disappearTextStyle?: PickerTextStyle; - - /** - * Text style of normal items - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Font color, font size, and font weight of all items except the top, bottom, and selected items. - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - textStyle?: PickerTextStyle; - - /** - * Style of accept button. - * - *

NOTE: - *
In the acceptButtonStyle and cancelButtonStyle configurations, - *
only one primary field can be set to true at most. - *
If both the primary fields are set to true, neither will take effect. - *

- * - * @type { ?PickerDialogButtonStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - acceptButtonStyle?: PickerDialogButtonStyle; - - /** - * Style of cancel button. - * - *

NOTE: - *
In the acceptButtonStyle and cancelButtonStyle configurations, - *
only one primary field can be set to true at most. - *
If both the primary fields are set to true, neither will take effect. - *

- * - * @type { ?PickerDialogButtonStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - cancelButtonStyle?: PickerDialogButtonStyle; - - /** - * Text style of selected items - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Font color, font size, and font weight of the selected item. - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - selectedTextStyle?: PickerTextStyle; - - /** - * Sets whether to enable the text style change animation during the scrolling process. - * true: Disable the text style change animation. - * false: Enable the text style change animation. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 15 - */ - disableTextStyleAnimation?: boolean; - - /** - * Style of the text items when the text style change animation during the scrolling process is disabled. - * - *

NOTE: - *
It is effective only when disableTextStyleAnimation is true. - *

- * - * @type { ?TextPickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 15 - */ - defaultTextStyle?: TextPickerTextStyle; - - /** - * Called when the OK button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the OK button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Callback invoked when the OK button in the dialog box is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - onAccept?: (value: TextPickerResult) => void; - - /** - * Called when the Cancel button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the Cancel button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Callback invoked when the Cancel button in the dialog box is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - onCancel?: () => void; - - /** - * This event is triggered when a TextPicker text is selected in dialog. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * This event is triggered when a TextPicker text is selected in dialog. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Callback invoked when the text picker in the dialog box snaps to the selected item. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - onChange?: (value: TextPickerResult) => void; - - /** - * Callback invoked when the scrolling in the text picker of the dialog box stops. - * - * @type { ?Callback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - onScrollStop?: Callback; - - /** - * Represents the callback triggered during the scrolling of the text picker when an item enters the divider area. - * Compared to the onChange event, this event is triggered earlier, - * specifically when the scroll distance of the current column exceeds half the height of the selected item, - * which indicates that the item has entered the divider area. - * - *

NOTE: - *
In scenarios where the picker contains linked columns, - *
the use of this callback is not recommended. - *
The reason is that it identifies nodes where items enter the divider area during scrolling. - *
However, items that change in response to the scrolling do not themselves scroll. As a result, - *
he callback's return values will only reflect changes for the currently scrolling column, - *
while other non-scrolling columns will remain unchanged. - *

- * - * @type { ?Callback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - onEnterSelectedArea?: Callback; - - /** - * Mask Region of dialog. The size cannot exceed the main window. - * - * @type { ?Rectangle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Mask area of the dialog box. - * Events outside the mask area are transparently transmitted, and events within the mask area are not. - * - * @type { ?Rectangle } - * @default { x: 0, y: 0, width: '100%', height: '100%' } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - maskRect?: Rectangle; - - /** - * Defines the dialog alignment of the screen. - * - * @type { ?DialogAlignment } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Alignment mode of the dialog box in the vertical direction. - * - * @type { ?DialogAlignment } - * @default DialogAlignment.Default - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - alignment?: DialogAlignment; - - /** - * Defines the dialog offset. - * - * @type { ?Offset } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Offset of the dialog box based on the alignment settings. - * - * @type { ?Offset } - * @default { dx: 0 , dy: 0 } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - offset?: Offset; - - /** - * Defines the textPickerDialog's background color - * - * @type { ?ResourceColor } - * @default Color.Transparent - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Backplane color of the dialog box. - * - * @type { ?ResourceColor } - * @default Color.Transparent - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - backgroundColor?: ResourceColor; - - /** - * Defines the textPickerDialog's background blur Style - * - * @type { ?BlurStyle } - * @default BlurStyle.COMPONENT_ULTRA_THICK - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Background blur style of the dialog box. - * - * @type { ?BlurStyle } - * @default BlurStyle.COMPONENT_ULTRA_THICK - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - backgroundBlurStyle?: BlurStyle; - - /** - * Options for customizing the background blur style. - * - * @type { ?BackgroundBlurStyleOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 19 - */ - backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; - - /** - * Options for customizing the background effect. - * - * @type { ?BackgroundEffectOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 19 - */ - backgroundEffect?: BackgroundEffectOptions; - - /** - * Event callback when the dialog box appears. - * - *

NOTE: - *
1. The normal timing sequence is as follows: - * onWillAppear > onDidAppear > (onAccept/onCancel/onChange/onScrollStop) > onWillDisappear > onDidDisappear. - *
2. You can set the callback event for changing the dialog box display effect in onDidAppear. - * The settings take effect next time the dialog box appears. - *
3. If the user closes the dialog box immediately after it appears, - * onWillDisappearis invoked before onDidAppear. - *
4. If the dialog box is closed before its entrance animation is finished, this callback is not invoked. - *

- * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onDidAppear?: () => void; - - /** - * Event callback when the dialog box disappears. - * - *

NOTE: - *
The normal timing sequence is as follows: - *
onWillAppear > onDidAppear > (onAccept/onCancel/onChange/onScrollStop) > onWillDisappear > onDidDisappear. - *

- * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onDidDisappear?: () => void; - - /** - * Event callback when the dialog box is about to appear. - * - *

NOTE: - *
1. The normal timing sequence is as follows: - *
onWillAppear > onDidAppear > (onAccept/onCancel/onChange/onScrollStop) > onWillDisappear > onDidDisappear. - *
2. You can set the callback event for changing the dialog box display effect in onWillAppear. - *
the settings take effect next time the dialog box appears. - *

- * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * - * @since 12 - */ - onWillAppear?: () => void; - - /** - * Event callback when the dialog box is about to disappear. - * - *

NOTE: - *
1. The normal timing sequence is as follows: - * onWillAppear > onDidAppear > (onAccept/onCancel/onChange/onScrollStop) > onWillDisappear > onDidDisappear. - *
2. If the user closes the dialog box immediately after it appears, - * onWillDisappear is invoked before onDidAppear. - *

- * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onWillDisappear?: () => void; - - /** - * Shadow of the dialog box. - * Default value on 2-in-1 devices: ShadowStyle.OUTER_FLOATING_MD when the dialog box is focused - * and ShadowStyle.OUTER_FLOATING_SM otherwise. - * - * @type { ?(ShadowOptions | ShadowStyle) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - shadow?: ShadowOptions | ShadowStyle; - - /** - * Whether to enable the hover mode. - * - * @type { ?boolean } - * @default false - meaning not to enable the hover mode. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - enableHoverMode?: boolean; - - /** - * Display area of the dialog box in hover mode. - * - * @type { ?HoverModeAreaType } - * @default HoverModeAreaType.BOTTOM_SCREEN - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - hoverModeArea?: HoverModeAreaType; - - /** - * Whether to enable haptic feedback. - * true (default): Haptic feedback is enabled. - * false: Haptic feedback is disabled. - * - *

NOTE: - *
To enable haptic feedback, you must declare the ohos.permission.VIBRATE permission - *
under requestPermissions in the module.json5 file of the project. - *
"requestPermissions": [{"name": "ohos.permission.VIBRATE"}]. - *

- * - * @type { ?boolean } - * @default true - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 18 - */ - enableHapticFeedback?: boolean; - - /** - * Background style of selected items. - * - * @type { ?PickerBackgroundStyle } - * @default { color: $r('sys.color.comp_background_tertiary'), borderRadius: $r('sys.float.corner_radius_level12') } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - selectedBackgroundStyle?: PickerBackgroundStyle; - } - - /** - * Defines the TextPickerDialogOptionsExt for Text Picker Dialog. - * - * @extends TextPickerOptions - * @interface TextPickerDialogOptionsExt + color?: ResourceColor; + + /** + * Defines the border radius of selected items. + * + * @type { ?(LengthMetrics | BorderRadiuses | LocalizedBorderRadiuses) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ - declare interface TextPickerDialogOptionsExt extends TextPickerOptions { - /** - * Called when the default height of the selected element is set. - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - defaultPickerItemHeight?: number | string; - - /** - * Can scroll loop if true is set, on the contrary it can not. - * - * @type { ?boolean } - * @default true - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - canLoop?: boolean; - - /** - * Text style of disappearing items. - * - * @type { ?TextPickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - disappearTextStyle?: TextPickerTextStyle; - - /** - * Text style of normal items - * - * @type { ?TextPickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - textStyle?: TextPickerTextStyle; - - /** - * Style of accept button. - * - * @type { ?PickerDialogButtonStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - acceptButtonStyle?: PickerDialogButtonStyle; - - /** - * Style of cancel button. - * - * @type { ?PickerDialogButtonStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - cancelButtonStyle?: PickerDialogButtonStyle; - - /** - * Text style of selected items - * - * @type { ?TextPickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - selectedTextStyle?: TextPickerTextStyle; - - /** - * Defines whether to disable the text style animation. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - disableTextStyleAnimation?: boolean; - - /** - * Defines to set the default text style for options. - * - * @type { ?TextPickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - defaultTextStyle?: TextPickerTextStyle; - - /** - * Called when the OK button in the dialog is clicked. - * - * @type { ?Callback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onAccept?: Callback; - - /** - * Called when the Cancel button in the dialog is clicked. - * - * @type { ?VoidCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onCancel?: VoidCallback; - - /** - * This event is triggered when a TextPicker text is selected in dialog. - * - * @type { ?Callback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onChange?: Callback; - - /** - * This event is triggered when a TextPicker text is selected and scrolling has stopped in dialog. - * - * @type { ?Callback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onScrollStop?: Callback; - - /** - * This event is triggered when an item enters the selected area in dialog. - * - * @type { ?Callback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onEnterSelectedArea?: Callback; - - /** - * Mask Region of dialog. The size cannot exceed the main window. - * - * @type { ?Rectangle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - maskRect?: Rectangle; - - /** - * Defines the dialog alignment of the screen. - * - * @type { ?DialogAlignment } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - alignment?: DialogAlignment; - - /** - * Defines the dialog offset. - * - * @type { ?Offset } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - offset?: Offset; - - /** - * Defines the textPickerDialog's background color - * - * @type { ?ResourceColor } - * @default Color.Transparent - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - backgroundColor?: ResourceColor; - - /** - * Defines the textPickerDialog's background blur Style - * - * @type { ?BlurStyle } - * @default BlurStyle.COMPONENT_ULTRA_THICK - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - backgroundBlurStyle?: BlurStyle; - - /** - * Defines the textPickerDialog's background blur style with options - * - * @type { ?BackgroundBlurStyleOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; - - /** - * Defines the textPickerDialog's background effect with options - * - * @type { ?BackgroundEffectOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - backgroundEffect?: BackgroundEffectOptions; - - /** - * Callback function when the dialog appears. - * - * @type { ?VoidCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onDidAppear?: VoidCallback; - - /** - * Callback function when the dialog disappears. - * - * @type { ?VoidCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onDidDisappear?: VoidCallback; - - /** - * Callback function before the dialog openAnimation starts. - * - * @type { ?VoidCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onWillAppear?: VoidCallback; - - /** - * Callback function before the dialog closeAnimation starts. - * - * @type { ?VoidCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onWillDisappear?: VoidCallback; - - /** - * Defines the dialog's shadow. - * - * @type { ?(ShadowOptions | ShadowStyle) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - shadow?: ShadowOptions | ShadowStyle; - - /** - * Defines whether to respond to the hover mode. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - enableHoverMode?: boolean; - - /** - * Defines the dialog's display area in hover mode. - * - * @type { ?HoverModeAreaType } - * @default HoverModeAreaType.BOTTOM_SCREEN - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - hoverModeArea?: HoverModeAreaType; - - /** - * Enable or disable haptic feedback. - * - * @type { ?boolean } - * @default true - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - enableHapticFeedback?: boolean; - - /** - * Background style of selected items. - * - * @type { ?PickerBackgroundStyle } - * @default { color: $r('sys.color.comp_background_tertiary'), borderRadius: $r('sys.float.corner_radius_level12') } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - selectedBackgroundStyle?: PickerBackgroundStyle; - } - - /** - * Defines TextPickerDialog which uses show method to show TextPicker dialog. + borderRadius?: LengthMetrics | BorderRadiuses | LocalizedBorderRadiuses; +} + +/** + * Callback of the listened scroll stop event. + * + * @typedef {function} TextPickerScrollStopCallback + * @param { string | string[] } value - Value of the selected item. + * @param { number | number[] } index - Index of the selected item. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare type TextPickerScrollStopCallback = (value: string | string[], index: number | number[]) => void; + +/** + * Callback of TextPicker item is selected event. + * + * @typedef {function} OnTextPickerChangeCallback + * @param { string | string[] } selectItem - Value of the selected item. + * @param { number | number[] } index - Index of the selected item. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare type OnTextPickerChangeCallback = (selectItem: string | string[], index: number | number[]) => void; + +/** + * Callback of the listened onEnterSelectedArea event. + * + * @typedef {function} TextPickerEnterSelectedAreaCallback + * @param { string | string[] } value - Value of the selected item. + * @param { number | number[] } index - Index of the selected item. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare type TextPickerEnterSelectedAreaCallback = (value: string | string[], index: number | number[]) => void; + +/** + * Style the text selector. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Style the text selector. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * Style the text selector. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + * @noninterop + */ +declare class TextPickerAttribute extends CommonMethod { + /** + * Sets the height of each item in the picker. * + * @param { number | string } value + * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Defines TextPickerDialog which uses show method to show TextPicker dialog. + * Sets the height of each item in the picker. * + * @param { number | string } value + * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * A text picker dialog box is a dialog box that allows users to select text from the given range. + * Sets the height of each item in the picker. * + * @param { number | string } value - Height of each item in the picker. + *
For the number type, the value range is [0, +∞]. For the string type, + *
only numeric string values, for example, "56", are supported. + * @returns { TextPickerAttribute } + * @default 56 vp (selected) and 36 vp (unselected). * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare class TextPickerDialog { - /** - * Invoking method display. - * - * @param { TextPickerDialogOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Invoking method display. - * - * @param { TextPickerDialogOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Shows a text picker in the given settings. - * - * @param { TextPickerDialogOptions } options - Parameters of the text picker dialog box. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - * @deprecated since 18 - * @useinstead ohos.arkui.UIContext.UIContext#showTextPickerDialog - */ - static show(options?: TextPickerDialogOptions); - } - - /** - * Defines TextPicker Component. + defaultPickerItemHeight(value: number | string): TextPickerAttribute; + + /** + * Sets the height of each item in the picker. * + * @param { Optional } height - Height of each item in the picker. + *
For the number type, the value range is [0, +∞]. + *
For the string type, only numeric string values, for example, "56", are supported. + * @default 56 vp (selected) and 36 vp (unselected). + * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + defaultPickerItemHeight(height: Optional): TextPickerAttribute; + + /** + * Sets whether scrolling is loopable. + * + * @param { boolean } value - Whether scrolling is loopable. true: loopable; false: not loopable. + * @default true + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 */ /** - * Defines TextPicker Component. + * Sets whether scrolling is loopable. * + * @param { boolean } value - Whether scrolling is loopable. true: loopable; false: not loopable. + * @default true + * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 10 + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ + canLoop(value: boolean): TextPickerAttribute; + /** - * Creates a text picker based on the selection range specified by range. + * Can scroll loop if true is set, on the contrary it can not. + * this API supports the undefined type for the isLoop parameter. * + * @param { Optional } isLoop - Whether scrolling is loopable. true: loopable; false: not loopable. + * @default true + * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + canLoop(isLoop: Optional): TextPickerAttribute; + + /** + * Sets the font color, font size, and font weight for the top and bottom items. + * + * @param { PickerTextStyle } value - Font color, font size, and font weight of the top and bottom items. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 */ - declare const TextPicker: TextPickerInterface; - /** - * Defines TextPicker Component instance. + * Sets the font color, font size, and font weight for the top and bottom items. * + * @param { PickerTextStyle } value - Font color, font size, and font weight of the top and bottom items. + * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ + disappearTextStyle(value: PickerTextStyle): TextPickerAttribute; + /** - * Defines TextPicker Component instance. + * Sets the font color, font size, and font weight for the top and bottom items. + * This API supports the undefined type for the style parameter. * + * @param { Optional } style - Font color, font size, and font weight of the top and bottom items. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + disappearTextStyle(style: Optional): TextPickerAttribute; + + /** + * Sets the font color, font size, and font weight for all items except the top, bottom, and selected items. + * + * @param { PickerTextStyle } value - Font color, font size, and font weight of all items except the top, + *
bottom, and selected items. + * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Defines TextPicker Component instance. + * Sets the font color, font size, and font weight for all items except the top, bottom, and selected items. * + * @param { PickerTextStyle } value - indicates the text style of normal items. + * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare const TextPickerInstance: TextPickerAttribute; - \ No newline at end of file + textStyle(value: PickerTextStyle): TextPickerAttribute; + + /** + * Sets the font color, font size, and font weight for all items except the top, bottom, and selected items. + * This API supports the undefined type for the style parameter. + * + * @param { Optional } style - Font color, font size, and font weight of all + *
items except the top, bottom, and selected items. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + textStyle(style: Optional): TextPickerAttribute; + + /** + * Sets the font color, font size, and font weight for the selected item. + * + * @param { PickerTextStyle } value - Font color, font size, and font weight of the selected item.. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Sets the font color, font size, and font weight for the selected item. + * + * @param { PickerTextStyle } value - Font color, font size, and font weight of the selected item. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + selectedTextStyle(value: PickerTextStyle): TextPickerAttribute; + + /** + * Sets the font color, font size, and font weight for the selected item. + * This API supports the undefined type for the style parameter. + * + * @param { Optional } style - Font color, font size, and font weight of the selected item. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + selectedTextStyle(style: Optional): TextPickerAttribute; + + /** + * Sets whether to enable the text style change animation during the scrolling process. + * + * @param { boolean } disabled + * @default false + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 + */ + disableTextStyleAnimation(disabled: boolean): TextPickerAttribute; + + /** + * Sets the style of the text items when the text style change animation during the scrolling process is disabled. + * + * @param { TextPickerTextStyle } style + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 + */ + defaultTextStyle(style: TextPickerTextStyle): TextPickerAttribute; + + /** + * Triggered when the OK button in the dialog box is clicked. + * + * @param { function } callback + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + * @deprecated since 10 + */ + onAccept(callback: (value: string, index: number) => void): TextPickerAttribute; + + /** + * Triggered when the Cancel button in the dialog box is clicked. + * + * @param { function } callback + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + * @deprecated since 10 + */ + onCancel(callback: () => void): TextPickerAttribute; + + /** + * Triggered when an item in the picker is selected. + * + * @param { function } callback - the callback of onChange. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Triggered when an item in the picker is selected. + * When the picker contains text only or both text and imagery, + * value indicates the text of the selected item. + * When the picker contains imagery only, value is empty. + * + * @param { function } callback - the callback of onChange. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Triggered when an item in the picker is selected. + * When the picker contains text only or both text and imagery, + * value indicates the text of the selected item. + * When the picker contains imagery only, value is empty. + * + * @param { function } callback - the callback of onChange. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onChange(callback: (value: string | string[], index: number | number[]) => void): TextPickerAttribute; + + /** + * Triggered when the text picker snaps to the selected item. + * Compared to onChange, this API supports the undefined type for the callback parameter. + * + * @param { Optional } callback - the callback of onChange. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + onChange(callback: Optional): TextPickerAttribute; + + /** + * Triggered when the scrolling in the text picker stops. + * If the scrolling is initiated by a gesture, + * this event is triggered when the finger is lifted from the screen and the scrolling stops. + * + * @param { TextPickerScrollStopCallback } callback - Triggered when the scrolling + *
in the text picker stops. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 + */ + onScrollStop(callback: TextPickerScrollStopCallback): TextPickerAttribute; + + /** + * Triggered when the scrolling in the text picker stops. + * If the scrolling is initiated by a gesture, + * this event is triggered when the finger is lifted from the screen and the scrolling stops. + * + * @param { Optional } callback - Triggered when the scrolling + *
in the text picker stops. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + onScrollStop(callback: Optional): TextPickerAttribute; + + /** + * Triggered during the scrolling of the text picker when an item enters the divider area. + * When the picker contains text only or a combination of images and text, + * value indicates the text of the selected item. When the picker contains images only, value is empty. + * + * @param { TextPickerEnterSelectedAreaCallback } callback - Triggered during the scrolling of + *
the text picker when an item enters the divider area. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + onEnterSelectedArea(callback: TextPickerEnterSelectedAreaCallback): TextPickerAttribute; + + /** + * Sets the index of the default selected item in the array. + * Its priority is higher than that of the selected value in options. + * For a single-column picker, use a value of the number type. + * For a multi-column (linked) picker, use a value of the number[] type. + * + * @param { number | number[] } value - Index of the default selected item in the array. + * @default 0 + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Sets the index of the default selected item in the array. + * Its priority is higher than that of the selected value in options. + * For a single-column picker, use a value of the number type. + * For a multi-column (linked) picker, use a value of the number[] type. + * + * @param { number | number[] } value - Index of the default selected item in the array. + * @default 0 + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + selectedIndex(value: number | number[]): TextPickerAttribute; + + /** + * Sets the index of the default selected item in the array. + * Its priority is higher than that of the selected value in options. + * For a single-column picker, use a value of the number type. For a multi-column (linked) picker, + * use a value of the number[] type. Compared to [selectedIndex](#selectedindex10), + * this API supports the undefined type for the index parameter. + * + * @param { Optional } index - Index of the default selected item in the array. + *
The index is zero-based.
If index is set to undefined, the default value 0 is used. + * @default 0 + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + selectedIndex(index: Optional): TextPickerAttribute; + + /** + * Sets the divider style. + * + * @param { DividerOptions | null } value + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + divider(value: DividerOptions | null): TextPickerAttribute; + + /** + * Sets the divider style. + * + * @param { Optional } textDivider + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + divider(textDivider: Optional): TextPickerAttribute; + + /** + * Sets the height for the fade effect. + * If this attribute is not set, the default fade effect is displayed. + * + *

NOTE: + *
Avoid changing the attribute data during the animation process of this component. + *

+ * + * @param { Dimension } value - Height of the fade effect at the top and bottom edges of the content area. + * @default 36vp + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + gradientHeight(value: Dimension): TextPickerAttribute; + + /** + * Specifies whether to enable haptic feedback. + * + * @param { Optional } enable - Whether to enable haptic feedback. + * @default true + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + enableHapticFeedback(enable: Optional): TextPickerAttribute; + + /** + * Sets the height for the fade effect. + * If this attribute is not set, the default fade effect is displayed. + * this API supports the undefinedtype for the height parameter. + * + *

NOTE: + *
Avoid changing the attribute data during the animation process of this component. + *

+ * + * @param { Optional } height - THeight of the fade effect at the top and bottom edges of + *
the content area. + * @default 36vp + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + gradientHeight(height: Optional): TextPickerAttribute; + + /** + * Sets the sensitivity to the digital crown rotation. + * + * @param { Optional } sensitivity - Sensitivity to the digital crown rotation. + * @default CrownSensitivity.MEDIUM + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + digitalCrownSensitivity(sensitivity: Optional): TextPickerAttribute; + + /** + * Sets the background style of selected items. + * + * @param { Optional } style - the background style of selected items. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + selectedBackgroundStyle(style: Optional): TextPickerAttribute; +} + +/** + * Defines the struct of TextPickerResult. + * + * @interface TextPickerResult + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines the struct of TextPickerResult. + * + * @interface TextPickerResult + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * Defines the struct of TextPickerResult. + * + * @interface TextPickerResult + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare interface TextPickerResult { + /** + * The currently selected value. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * The currently selected value. + * Only valid when only text is displayed.When picture or picture plus text is displayed, the value of value is "". + * + * @type { string | string[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * The currently selected value. + * Only valid when only text is displayed.When picture or picture plus text is displayed, the value of value is "". + * + * @type { string | string[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + value: string | string[]; + + /** + * The subscript of the current selection. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * The subscript of the current selection. + * + * @type { number | number[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * The subscript of the current selection. + * + * @type { number | number[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + index: number | number[]; +} + +/** + * Defines the TextPickerDialogOptions for Text Picker Dialog. + * + * @extends TextPickerOptions + * @interface TextPickerDialogOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines the TextPickerDialogOptions for Text Picker Dialog. + * + * @extends TextPickerOptions + * @interface TextPickerDialogOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * Defines the TextPickerDialogOptions for Text Picker Dialog. + * + * @extends TextPickerOptions + * @interface TextPickerDialogOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare interface TextPickerDialogOptions extends TextPickerOptions { + /** + * Called when the default height of the selected element is set. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the default height of the selected element is set. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Height of the picker item. + * + * @type { ?(number | string) } + * @default 56 vp (selected) and 36 vp (unselected) + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + defaultPickerItemHeight?: number | string; + + /** + * Can scroll loop if true is set, on the contrary it can not. + * + * @type { ?boolean } + * @default true + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Whether to support scroll looping. + * The value true means to support scroll looping, and false means the opposite. + * + * @type { ?boolean } + * @default true + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + canLoop?: boolean; + + /** + * Text style of disappearing items + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Font color, font size, and font weight of the top and bottom items. + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + disappearTextStyle?: PickerTextStyle; + + /** + * Text style of normal items + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Font color, font size, and font weight of all items except the top, bottom, and selected items. + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + textStyle?: PickerTextStyle; + + /** + * Style of accept button. + * + *

NOTE: + *
In the acceptButtonStyle and cancelButtonStyle configurations, + *
only one primary field can be set to true at most. + *
If both the primary fields are set to true, neither will take effect. + *

+ * + * @type { ?PickerDialogButtonStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + acceptButtonStyle?: PickerDialogButtonStyle; + + /** + * Style of cancel button. + * + *

NOTE: + *
In the acceptButtonStyle and cancelButtonStyle configurations, + *
only one primary field can be set to true at most. + *
If both the primary fields are set to true, neither will take effect. + *

+ * + * @type { ?PickerDialogButtonStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + cancelButtonStyle?: PickerDialogButtonStyle; + + /** + * Text style of selected items + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Font color, font size, and font weight of the selected item. + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + selectedTextStyle?: PickerTextStyle; + + /** + * Sets whether to enable the text style change animation during the scrolling process. + * true: Disable the text style change animation. + * false: Enable the text style change animation. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 + */ + disableTextStyleAnimation?: boolean; + + /** + * Style of the text items when the text style change animation during the scrolling process is disabled. + * + *

NOTE: + *
It is effective only when disableTextStyleAnimation is true. + *

+ * + * @type { ?TextPickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 + */ + defaultTextStyle?: TextPickerTextStyle; + + /** + * Called when the OK button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the OK button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Callback invoked when the OK button in the dialog box is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + onAccept?: (value: TextPickerResult) => void; + + /** + * Called when the Cancel button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the Cancel button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Callback invoked when the Cancel button in the dialog box is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + onCancel?: () => void; + + /** + * This event is triggered when a TextPicker text is selected in dialog. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * This event is triggered when a TextPicker text is selected in dialog. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Callback invoked when the text picker in the dialog box snaps to the selected item. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + onChange?: (value: TextPickerResult) => void; + + /** + * Callback invoked when the scrolling in the text picker of the dialog box stops. + * + * @type { ?Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 + */ + onScrollStop?: Callback; + + /** + * Represents the callback triggered during the scrolling of the text picker when an item enters the divider area. + * Compared to the onChange event, this event is triggered earlier, + * specifically when the scroll distance of the current column exceeds half the height of the selected item, + * which indicates that the item has entered the divider area. + * + *

NOTE: + *
In scenarios where the picker contains linked columns, + *
the use of this callback is not recommended. + *
The reason is that it identifies nodes where items enter the divider area during scrolling. + *
However, items that change in response to the scrolling do not themselves scroll. As a result, + *
he callback's return values will only reflect changes for the currently scrolling column, + *
while other non-scrolling columns will remain unchanged. + *

+ * + * @type { ?Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + onEnterSelectedArea?: Callback; + + /** + * Mask Region of dialog. The size cannot exceed the main window. + * + * @type { ?Rectangle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Mask area of the dialog box. + * Events outside the mask area are transparently transmitted, and events within the mask area are not. + * + * @type { ?Rectangle } + * @default { x: 0, y: 0, width: '100%', height: '100%' } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + maskRect?: Rectangle; + + /** + * Defines the dialog alignment of the screen. + * + * @type { ?DialogAlignment } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Alignment mode of the dialog box in the vertical direction. + * + * @type { ?DialogAlignment } + * @default DialogAlignment.Default + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + alignment?: DialogAlignment; + + /** + * Defines the dialog offset. + * + * @type { ?Offset } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Offset of the dialog box based on the alignment settings. + * + * @type { ?Offset } + * @default { dx: 0 , dy: 0 } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + offset?: Offset; + + /** + * Defines the textPickerDialog's background color + * + * @type { ?ResourceColor } + * @default Color.Transparent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Backplane color of the dialog box. + * + * @type { ?ResourceColor } + * @default Color.Transparent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + backgroundColor?: ResourceColor; + + /** + * Defines the textPickerDialog's background blur Style + * + * @type { ?BlurStyle } + * @default BlurStyle.COMPONENT_ULTRA_THICK + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Background blur style of the dialog box. + * + * @type { ?BlurStyle } + * @default BlurStyle.COMPONENT_ULTRA_THICK + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + backgroundBlurStyle?: BlurStyle; + + /** + * Options for customizing the background blur style. + * + * @type { ?BackgroundBlurStyleOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; + + /** + * Options for customizing the background effect. + * + * @type { ?BackgroundEffectOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + backgroundEffect?: BackgroundEffectOptions; + + /** + * Event callback when the dialog box appears. + * + *

NOTE: + *
1. The normal timing sequence is as follows: + * onWillAppear > onDidAppear > (onAccept/onCancel/onChange/onScrollStop) > onWillDisappear > onDidDisappear. + *
2. You can set the callback event for changing the dialog box display effect in onDidAppear. + * The settings take effect next time the dialog box appears. + *
3. If the user closes the dialog box immediately after it appears, + * onWillDisappearis invoked before onDidAppear. + *
4. If the dialog box is closed before its entrance animation is finished, this callback is not invoked. + *

+ * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + onDidAppear?: () => void; + + /** + * Event callback when the dialog box disappears. + * + *

NOTE: + *
The normal timing sequence is as follows: + *
onWillAppear > onDidAppear > (onAccept/onCancel/onChange/onScrollStop) > onWillDisappear > onDidDisappear. + *

+ * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + onDidDisappear?: () => void; + + /** + * Event callback when the dialog box is about to appear. + * + *

NOTE: + *
1. The normal timing sequence is as follows: + *
onWillAppear > onDidAppear > (onAccept/onCancel/onChange/onScrollStop) > onWillDisappear > onDidDisappear. + *
2. You can set the callback event for changing the dialog box display effect in onWillAppear. + *
the settings take effect next time the dialog box appears. + *

+ * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + onWillAppear?: () => void; + + /** + * Event callback when the dialog box is about to disappear. + * + *

NOTE: + *
1. The normal timing sequence is as follows: + * onWillAppear > onDidAppear > (onAccept/onCancel/onChange/onScrollStop) > onWillDisappear > onDidDisappear. + *
2. If the user closes the dialog box immediately after it appears, + * onWillDisappear is invoked before onDidAppear. + *

+ * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + onWillDisappear?: () => void; + + /** + * Shadow of the dialog box. + * Default value on 2-in-1 devices: ShadowStyle.OUTER_FLOATING_MD when the dialog box is focused + * and ShadowStyle.OUTER_FLOATING_SM otherwise. + * + * @type { ?(ShadowOptions | ShadowStyle) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + shadow?: ShadowOptions | ShadowStyle; + + /** + * Whether to enable the hover mode. + * + * @type { ?boolean } + * @default false - meaning not to enable the hover mode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 + */ + enableHoverMode?: boolean; + + /** + * Display area of the dialog box in hover mode. + * + * @type { ?HoverModeAreaType } + * @default HoverModeAreaType.BOTTOM_SCREEN + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 + */ + hoverModeArea?: HoverModeAreaType; + + /** + * Whether to enable haptic feedback. + * true (default): Haptic feedback is enabled. + * false: Haptic feedback is disabled. + * + *

NOTE: + *
To enable haptic feedback, you must declare the ohos.permission.VIBRATE permission + *
under requestPermissions in the module.json5 file of the project. + *
"requestPermissions": [{"name": "ohos.permission.VIBRATE"}]. + *

+ * + * @type { ?boolean } + * @default true + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + enableHapticFeedback?: boolean; + + /** + * Background style of selected items. + * + * @type { ?PickerBackgroundStyle } + * @default true + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + selectedBackgroundStyle?: PickerBackgroundStyle; +} + +/** + * Defines TextPickerDialog which uses show method to show TextPicker dialog. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines TextPickerDialog which uses show method to show TextPicker dialog. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * A text picker dialog box is a dialog box that allows users to select text from the given range. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare class TextPickerDialog { + /** + * Invoking method display. + * + * @param { TextPickerDialogOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Invoking method display. + * + * @param { TextPickerDialogOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Shows a text picker in the given settings. + * + * @param { TextPickerDialogOptions } options - Parameters of the text picker dialog box. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + * @deprecated since 18 + * @useinstead ohos.arkui.UIContext.UIContext#showTextPickerDialog + */ + static show(options?: TextPickerDialogOptions); +} + +/** + * Defines TextPicker Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines TextPicker Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * Creates a text picker based on the selection range specified by range. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + * @noninterop + */ +declare const TextPicker: TextPickerInterface; + +/** + * Defines TextPicker Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines TextPicker Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * Defines TextPicker Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + * @noninterop + */ +declare const TextPickerInstance: TextPickerAttribute; + diff --git a/api/@internal/component/ets/text_timer.d.ts b/api/@internal/component/ets/text_timer.d.ts index c6db62f919aa7f3d932b3ed3917229d3ff274786..c37788701c806dfa654bc3aad26d055e806ef65d 100644 --- a/api/@internal/component/ets/text_timer.d.ts +++ b/api/@internal/component/ets/text_timer.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonConfiguration,CommonMethod,ShadowOptions,ContentModifier } from './common' +import { ResourceColor,Length,ResourceStr } from './units' +import { FontStyle,FontWeight } from './enums' +/*** endif */ + /** * Provides a way to control the process. * @@ -38,717 +44,779 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare class TextTimerController { - /** - * constructor. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * constructor. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * constructor. - * A constructor used to create a TextTimerController object. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - constructor(); - - /** - * Provides a start event for timer. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Provides a start event for timer. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Starts the timer. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - start(); - - /** - * Provides a pause event for timer. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Provides a pause event for timer. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Pauses the timer. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - pause(); - - /** - * Provides an event to reset timer. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Provides an event to reset timer. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Resets the timer. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - reset(); - } - +declare class TextTimerController { + /** + * constructor. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * constructor. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ /** - * TextTimerConfiguration used by content modifier. + * constructor. + * A constructor used to create a TextTimerController object. * - * @extends CommonConfiguration - * @interface TextTimerConfiguration * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice - * @since 12 - */ - declare interface TextTimerConfiguration extends CommonConfiguration { - /** - * Timer duration, in milliseconds. - * It is effective only when isCountDown is true. - * The maximum value is 86400000 ms (24 hours). - * - *

NOTE: - *
If the value is between 0 and 86,400,000, it is used as the initial countdown time. - *
Otherwise, the default value is used as the initial countdown time. - *

- * - * @type { number } - * @default 60000 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - count: number; - - /** - * Whether the timer is a countdown. - * The value true means that the timer counts down, - * and false means that the timer counts up. - * - * @type { boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - isCountDown: boolean; - - /** - * Whether the timer has already started. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - started: boolean; - - /** - * Elapsed time of the timer, in the minimum unit of the format. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - elapsedTime: number; - } - + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + constructor(); + /** - * Defines the options of TextTimer. + * Provides a start event for timer. * - * @interface TextTimerOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Defines the options of TextTimer. + * Provides a start event for timer. * - * @interface TextTimerOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Parameters of the TextTimer component. + * Starts the timer. * - * @interface TextTimerOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - interface TextTimerOptions { - /** - * Sets whether to countdown.The default value is false. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Sets whether to countdown.The default value is false. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Whether the timer is a countdown. - * The value true means that the timer counts down, - * and false means that the timer counts up. - * - * @type { ?boolean } - Default value: false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - isCountDown?: boolean; - - /** - * Specifies the timer range. - * In the non-countDown scenario, a negative value indicates that the timer is not limited. - * The unit is millisecond. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Specifies the timer range. - * In the non-countDown scenario, a negative value indicates that the timer is not limited. - * The unit is millisecond. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Timer duration, in milliseconds. - * It is effective only when isCountDown is true. - * The maximum value is 86400000 ms (24 hours). - * - *

NOTE: - *
If the value is between 0 and 86,400,000, it is used as the initial countdown time. - *
Otherwise, the default value is used as the initial countdown time. - *

- * - * @type { ?number } - Default value: 60000 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - count?: number; - - /** - * Controller of Texttimer. - * - * @type { ?TextTimerController } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Controller of Texttimer. - * - * @type { ?TextTimerController } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * TextTimer controller. - * - * @type { ?TextTimerController } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - controller?: TextTimerController; - } - + start(); + /** - * Provides an interface for texttimer containers. + * Provides a start event for timer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + start():void; + + /** + * Provides a pause event for timer. * - * @interface TextTimerInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Provides an interface for texttimer containers. + * Provides a pause event for timer. * - * @interface TextTimerInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Provides an interface for texttimer containers. + * Pauses the timer. * - * @interface TextTimerInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - interface TextTimerInterface { - /** - * Defines the TextTimer constructor. - * - * @param { TextTimerOptions } options - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines the TextTimer constructor. - * - * @param { TextTimerOptions } options - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * A constructor used to create a TextTimerController object. - * - * @param { TextTimerOptions } options - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - (options?: TextTimerOptions): TextTimerAttribute; - } - + pause(); + /** - * Defines the TextTimer attribute functions. + * Provides a pause event for timer. * - * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + pause():void; + + /** + * Provides an event to reset timer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Defines the TextTimer attribute functions. + * Provides an event to reset timer. * - * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Defines the TextTimer attribute functions. + * Resets the timer. * - * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - declare class TextTimerAttribute extends CommonMethod { - /** - * Set the display time format, for example, now is hh/mm/ss/ms and current: hh-mm-ss-ms. - * The time format string can be hh, mm, ss, or ms. - * - * @param { string } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Set the display time format, for example, now is hh/mm/ss/ms and current: hh-mm-ss-ms. - * The time format string can be hh, mm, ss, or ms. - * - * @param { string } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the custom format. - * The value must contain at least one of the following keywords: HH, mm, ss, and SS. - * - *

NOTE: - *
If the specified date format is yy, MM, or dd, the default value is used instead. - *

- * - * @param { string } value - Custom format.Default value: 'HH:mm:ss.SS' - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - format(value: string): TextTimerAttribute; - - /** - * Called when the font color is set. - * - * @param { ResourceColor } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the font color is set. - * - * @param { ResourceColor } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the font color. - * - * @param { ResourceColor } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - fontColor(value: ResourceColor): TextTimerAttribute; - - /** - * Called when the font size is set. - * - * @param { Length } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the font size is set. - * - * @param { Length } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the font size. - * - * @param { Length } value - Font size.The default font size is 16 fp. - *
If fontSize is of the number type, the unit fp is used. - *
The value cannot be a percentage. - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - fontSize(value: Length): TextTimerAttribute; - - /** - * Called when the fontStyle is set - * - * @param { FontStyle } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the fontStyle is set - * - * @param { FontStyle } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the font style. - * - * @param { FontStyle } value - Font style.Default value: FontStyle.Normal - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - fontStyle(value: FontStyle): TextTimerAttribute; - - /** - * Called when the fontWeight is set - * - * @param { number | FontWeight | string } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the fontWeight is set - * - * @param { number | FontWeight | string } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Called when the fontWeight is set - * - * @param { number | FontWeight | string } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - /** - * Sets the font weight. - * - *

NOTE: - *
If the value is too large, the text may be clipped depending on the font. - *

- * - * @param { number | FontWeight | ResourceStr } value - Font weight. - *
For the number type, Value range: [100, 900], at an interval of 100.The default value is 400. - *
A larger value indicates a heavier font weight. - *
For the string type, only strings that represent a number. - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - fontWeight(value: number | FontWeight | ResourceStr): TextTimerAttribute; - - /** - * Called when the fontFamily is set - * - * @param { ResourceStr } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the fontFamily is set - * - * @param { ResourceStr } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the font family. - * - * @param { ResourceStr } value - Font family. Default font: 'HarmonyOS Sans' - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - fontFamily(value: ResourceStr): TextTimerAttribute; - - /** - * Called when the timer value is returned. - * - * @param { function } event - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the timer value is returned. - * - * @param { function } event - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Triggered when the time text changes. - * This event is not triggered when the screen is locked or the application is running in the background. - * When high-precision formats (such as SSS or SS) are used, the callback interval may vary. - * - * @param { function } event - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - onTimer(event: (utc: number, elapsedTime: number) => void): TextTimerAttribute; - - /** - * Called when the text shadow is set. - * - * @param { ShadowOptions | Array } value - The shadow options. - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Sets the text shadow. - * It supports input parameters in an array to implement multiple text shadows. - * This API does not work with the fill attribute or coloring strategy. - * - * @param { ShadowOptions | Array } value - The shadow options. - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - textShadow(value: ShadowOptions | Array): TextTimerAttribute; - - /** - * Creates a content modifier. - * - * @param { ContentModifier } modifier - The content modifier of texttimer. - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - contentModifier(modifier: ContentModifier): TextTimerAttribute; - } + reset(); + + /** + * Provides an event to reset timer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + reset():void; +} + +/** + * TextTimerConfiguration used by content modifier. + * + * @extends CommonConfiguration + * @interface TextTimerConfiguration + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare interface TextTimerConfiguration extends CommonConfiguration { + /** + * Timer duration, in milliseconds. + * It is effective only when isCountDown is true. + * The maximum value is 86400000 ms (24 hours). + * + *

NOTE: + *
If the value is between 0 and 86,400,000, it is used as the initial countdown time. + *
Otherwise, the default value is used as the initial countdown time. + *

+ * + * @type { number } + * @default 60000 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + count: number; + + /** + * Whether the timer is a countdown. + * The value true means that the timer counts down, + * and false means that the timer counts up. + * + * @type { boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + isCountDown: boolean; + + /** + * Whether the timer has already started. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + started: boolean; /** - * Defines TextTimer Component. + * Elapsed time of the timer, in the minimum unit of the format. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + elapsedTime: number; +} + +/** + * Defines the options of TextTimer. + * + * @interface TextTimerOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines the options of TextTimer. + * + * @interface TextTimerOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Parameters of the TextTimer component. + * + * @interface TextTimerOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ +interface TextTimerOptions { + /** + * Sets whether to countdown.The default value is false. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Sets whether to countdown.The default value is false. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Whether the timer is a countdown. + * The value true means that the timer counts down, + * and false means that the timer counts up. + * + * @type { ?boolean } - Default value: false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + isCountDown?: boolean; + + /** + * Specifies the timer range. + * In the non-countDown scenario, a negative value indicates that the timer is not limited. + * The unit is millisecond. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Specifies the timer range. + * In the non-countDown scenario, a negative value indicates that the timer is not limited. + * The unit is millisecond. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Timer duration, in milliseconds. + * It is effective only when isCountDown is true. + * The maximum value is 86400000 ms (24 hours). + * + *

NOTE: + *
If the value is between 0 and 86,400,000, it is used as the initial countdown time. + *
Otherwise, the default value is used as the initial countdown time. + *

+ * + * @type { ?number } - Default value: 60000 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + count?: number; + + /** + * Controller of Texttimer. * + * @type { ?TextTimerController } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Defines TextTimer Component. + * Controller of Texttimer. * + * @type { ?TextTimerController } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Defines TextTimer Component. + * TextTimer controller. * + * @type { ?TextTimerController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + controller?: TextTimerController; +} + +/** + * Provides an interface for texttimer containers. + * + * @interface TextTimerInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Provides an interface for texttimer containers. + * + * @interface TextTimerInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Provides an interface for texttimer containers. + * + * @interface TextTimerInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + * @noninterop + */ +interface TextTimerInterface { + /** + * Defines the TextTimer constructor. + * + * @param { TextTimerOptions } options + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Defines the TextTimer constructor. + * + * @param { TextTimerOptions } options + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * A constructor used to create a TextTimerController object. + * + * @param { TextTimerOptions } options + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + (options?: TextTimerOptions): TextTimerAttribute; +} + +/** + * Defines the TextTimer attribute functions. + * + * @extends CommonMethod + * @since 8 + */ +/** + * Defines the TextTimer attribute functions. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Defines the TextTimer attribute functions. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + * @noninterop + */ +declare class TextTimerAttribute extends CommonMethod { + /** + * Set the display time format, for example, now is hh/mm/ss/ms and current: hh-mm-ss-ms. + * The time format string can be hh, mm, ss, or ms. + * + * @param { string } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Set the display time format, for example, now is hh/mm/ss/ms and current: hh-mm-ss-ms. + * The time format string can be hh, mm, ss, or ms. + * + * @param { string } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the custom format. + * The value must contain at least one of the following keywords: HH, mm, ss, and SS. + * + *

NOTE: + *
If the specified date format is yy, MM, or dd, the default value is used instead. + *

+ * + * @param { string } value - Custom format.Default value: 'HH:mm:ss.SS' + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + format(value: string): TextTimerAttribute; + + /** + * Called when the font color is set. + * + * @param { ResourceColor } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the font color is set. + * + * @param { ResourceColor } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the font color. + * + * @param { ResourceColor } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + fontColor(value: ResourceColor): TextTimerAttribute; + + /** + * Called when the font size is set. + * + * @param { Length } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the font size is set. + * + * @param { Length } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the font size. + * + * @param { Length } value - Font size.The default font size is 16 fp. + *
If fontSize is of the number type, the unit fp is used. + *
The value cannot be a percentage. + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + fontSize(value: Length): TextTimerAttribute; + + /** + * Called when the fontStyle is set + * + * @param { FontStyle } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the fontStyle is set + * + * @param { FontStyle } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the font style. + * + * @param { FontStyle } value - Font style.Default value: FontStyle.Normal + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + fontStyle(value: FontStyle): TextTimerAttribute; + + /** + * Called when the fontWeight is set + * + * @param { number | FontWeight | string } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the fontWeight is set + * + * @param { number | FontWeight | string } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Called when the fontWeight is set + * + * @param { number | FontWeight | string } value + * @returns { TextTimerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - declare const TextTimer: TextTimerInterface; - /** - * Defines TextTimer Component instance. + * Sets the font weight. + * + *

NOTE: + *
If the value is too large, the text may be clipped depending on the font. + *

+ * + * @param { number | FontWeight | ResourceStr } value - Font weight. + *
For the number type, Value range: [100, 900], at an interval of 100.The default value is 400. + *
A larger value indicates a heavier font weight. + *
For the string type, only strings that represent a number. + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + fontWeight(value: number | FontWeight | ResourceStr): TextTimerAttribute; + + /** + * Called when the fontFamily is set * + * @param { ResourceStr } value + * @returns { TextTimerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Defines TextTimer Component instance. + * Called when the fontFamily is set * + * @param { ResourceStr } value + * @returns { TextTimerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Defines TextTimer Component instance. + * Sets the font family. * + * @param { ResourceStr } value - Font family. Default font: 'HarmonyOS Sans' + * @returns { TextTimerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + fontFamily(value: ResourceStr): TextTimerAttribute; + + /** + * Called when the timer value is returned. + * + * @param { function } event + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the timer value is returned. + * + * @param { function } event + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Triggered when the time text changes. + * This event is not triggered when the screen is locked or the application is running in the background. + * When high-precision formats (such as SSS or SS) are used, the callback interval may vary. + * + * @param { function } event + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + onTimer(event: (utc: number, elapsedTime: number) => void): TextTimerAttribute; + + /** + * Called when the text shadow is set. + * + * @param { ShadowOptions | Array } value - The shadow options. + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform * @since 11 */ - declare const TextTimerInstance: TextTimerAttribute; - \ No newline at end of file + /** + * Sets the text shadow. + * It supports input parameters in an array to implement multiple text shadows. + * This API does not work with the fill attribute or coloring strategy. + * + * @param { ShadowOptions | Array } value - The shadow options. + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + textShadow(value: ShadowOptions | Array): TextTimerAttribute; + + /** + * Creates a content modifier. + * + * @param { ContentModifier } modifier - The content modifier of texttimer. + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + contentModifier(modifier: ContentModifier): TextTimerAttribute; +} + +/** + * Defines TextTimer Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines TextTimer Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Defines TextTimer Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + * @noninterop + */ +declare const TextTimer: TextTimerInterface; + +/** + * Defines TextTimer Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines TextTimer Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Defines TextTimer Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + * @noninterop + */ +declare const TextTimerInstance: TextTimerAttribute; diff --git a/api/@internal/component/ets/time_picker.d.ts b/api/@internal/component/ets/time_picker.d.ts index 2609aae0ddbc03c0312d6e582aa1efeec3a2dc2f..93c323e4886a91e69bc686689c342d8e9972b2bc 100644 --- a/api/@internal/component/ets/time_picker.d.ts +++ b/api/@internal/component/ets/time_picker.d.ts @@ -18,6 +18,14 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ResourceColor, Offset } from './units'; +import { CommonMethod, PickerTextStyle, PickerDialogButtonStyle, Rectangle, BlurStyle, ShadowOptions, ShadowStyle, HoverModeAreaType, + BackgroundBlurStyleOptions, BackgroundEffectOptions, Optional, Callback, DateTimeOptions, Bindable } from './common'; +import { DialogAlignment } from './alertDialog'; +import { CrownSensitivity } from './enums'; +/*** endif */ + /** * Defines the struct of TimePickerResult. * @@ -40,1161 +48,1238 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare interface TimePickerResult { - /** - * Application hour - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Application hour - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Hour portion of the selected time. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - hour: number; - - /** - * Application minute - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Application minute - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Minute portion of the selected time. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - minute: number; - - /** - * Second portion of the selected time. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - second: number; - } - +declare interface TimePickerResult { + /** + * Application hour + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ /** - * Type of the TimePicker that need to be displayed. - * @enum {number} + * Application hour + * + * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since 10 */ /** - * Type of the TimePicker that need to be displayed. - * @enum {number} + * Hour portion of the selected time. + * + * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 - */ - declare enum TimePickerFormat { - /** - * Hour and minute. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Hour and minute. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - HOUR_MINUTE, - - /** - * Hour and minute and second - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Hour and minute and second - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - HOUR_MINUTE_SECOND, - } - + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + hour: number; + /** - * Defines the options of TimePicker. + * Application minute * - * @interface TimePickerOptions + * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Defines the options of TimePicker. + * Application minute * - * @interface TimePickerOptions + * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Defines the options of TimePicker. + * Minute portion of the selected time. * - * @interface TimePickerOptions + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + minute: number; + + /** + * Second portion of the selected time. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + second: number; +} + +/** + * Type of the TimePicker that need to be displayed. + * @enum {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ +/** + * Type of the TimePicker that need to be displayed. + * @enum {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare enum TimePickerFormat { + /** + * Hour and minute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Hour and minute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + HOUR_MINUTE, + + /** + * Hour and minute and second + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform * @since 11 */ - declare interface TimePickerOptions { - /** - * Specifies the time selector check time. - * - * @type { ?Date } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Specifies the time selector check time. - * - * @type { ?Date } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Specifies the time selector check time. - * - * @type { ?Date } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - selected?: Date; - - /** - * Specifies the format of the TimePicker that need to be displayed. - * - * @type { ?TimePickerFormat } - * @default HOUR_MINUTE - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Specifies the format of the TimePicker that need to be displayed. - * - * @type { ?TimePickerFormat } - * @default HOUR_MINUTE - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - format?: TimePickerFormat; - - /** - * Defines the start time of the time picker. - * - * @type { ?Date } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - start?: Date; - - /** - * Defines the end time of the time picker. - * - * @type { ?Date } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - end?: Date; - } - /** - * Defines the TimePicker Component. + * Hour and minute and second + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + HOUR_MINUTE_SECOND, +} + +/** + * Defines the options of TimePicker. + * + * @interface TimePickerOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines the options of TimePicker. + * + * @interface TimePickerOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * Defines the options of TimePicker. + * + * @interface TimePickerOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare interface TimePickerOptions { + /** + * Specifies the time selector check time. * - * @interface TimePickerInterface + * @type { ?Date } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Defines the TimePicker Component. + * Specifies the time selector check time. * - * @interface TimePickerInterface + * @type { ?Date } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Defines the TimePicker Component. + * Specifies the time selector check time. * - * @interface TimePickerInterface + * @type { ?Date } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ - interface TimePickerInterface { - /** - * Defines the TimePicker constructor. - * - * @param { TimePickerOptions } options - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines the TimePicker constructor. - * - * @param { TimePickerOptions } options - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Defines the TimePicker constructor. - * - * @param { TimePickerOptions } options - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - (options?: TimePickerOptions): TimePickerAttribute; - } - /** - * Define the internationalization parameter format. - * - * @typedef { import('../api/@ohos.intl').default.DateTimeOptions } DateTimeOptions + selected?: Date; + + /** + * Specifies the time selector check time. + * + * @type { ?(Date | Bindable) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since 20 + * @arkts 1.2 + */ + selected?: Date | Bindable; + + /** + * Specifies the format of the TimePicker that need to be displayed. + * + * @type { ?TimePickerFormat } + * @default HOUR_MINUTE + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 */ - declare type DateTimeOptions = import('../api/@ohos.intl').default.DateTimeOptions - /** - * Callback of the timePicker time is selected event. + * Specifies the format of the TimePicker that need to be displayed. * - * @typedef {function} OnTimePickerChangeCallback + * @type { ?TimePickerFormat } + * @default HOUR_MINUTE * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - declare type OnTimePickerChangeCallback = (result: TimePickerResult) => void; + format?: TimePickerFormat; /** - * Defines the TimePicker attribute functions. + * Defines the start time of the time picker. + * + * @type { ?Date } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + start?: Date; + + /** + * Defines the end time of the time picker. + * + * @type { ?Date } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + end?: Date; +} + +/** + * Defines the TimePicker Component. + * + * @interface TimePickerInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines the TimePicker Component. + * + * @interface TimePickerInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * Defines the TimePicker Component. + * + * @interface TimePickerInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + * @noninterop + */ +interface TimePickerInterface { + /** + * Defines the TimePicker constructor. * - * @extends CommonMethod + * @param { TimePickerOptions } options + * @returns { TimePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Defines the TimePicker attribute functions. + * Defines the TimePicker constructor. * - * @extends CommonMethod + * @param { TimePickerOptions } options + * @returns { TimePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Defines the TimePicker attribute functions. + * Defines the TimePicker constructor. * - * @extends CommonMethod + * @param { TimePickerOptions } options + * @returns { TimePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare class TimePickerAttribute extends CommonMethod { - /** - * Time Selector: indicates whether to display the 24-hour clock. - * - * @param { boolean } value - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Time Selector: indicates whether to display the 24-hour clock. - * - * @param { boolean } value - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Time Selector: indicates whether to display the 24-hour clock. - * - * @param { boolean } value - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - useMilitaryTime(value: boolean): TimePickerAttribute; - - /** - * Time Selector: indicates whether to display the 24-hour clock. - * - * @param { Optional } isMilitaryTime - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - useMilitaryTime(isMilitaryTime: Optional): TimePickerAttribute; - - /** - * Sets whether to enable the wheel mode. - * @param { boolean } value - indicates whether to enable the wheel mode. - * @returns { TimePickerAttribute } the attribute of the time picker - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Sets whether to enable the wheel mode. - * @param { boolean } value - indicates whether to enable the wheel mode. - * @returns { TimePickerAttribute } the attribute of the time picker - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - loop(value: boolean): TimePickerAttribute; - - /** - * Sets whether to enable the wheel mode. - * @param { Optional } isLoop - indicates whether to enable the wheel mode. - * @returns { TimePickerAttribute } the attribute of the time picker - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - loop(isLoop: Optional): TimePickerAttribute; - - /** - * Sets the text style of disappearing items - * - * @param { PickerTextStyle } value - indicates the text style of disappearing items. - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the text style of disappearing items - * - * @param { PickerTextStyle } value - indicates the text style of disappearing items. - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - disappearTextStyle(value: PickerTextStyle): TimePickerAttribute; - - /** - * Sets the text style of disappearing items - * - * @param { Optional } style - indicates the text style of disappearing items. - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - disappearTextStyle(style: Optional): TimePickerAttribute; - - /** - * Sets the text style of normal items - * - * @param { PickerTextStyle } value - indicates the text style of normal items. - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the text style of normal items - * - * @param { PickerTextStyle } value - indicates the text style of normal items. - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - textStyle(value: PickerTextStyle): TimePickerAttribute; - - /** - * Sets the text style of normal items - * - * @param { Optional } style - indicates the text style of normal items. - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - textStyle(style: Optional): TimePickerAttribute; - - /** - * Sets the text style of selected items - * - * @param { PickerTextStyle } value - indicates the text style of selected items. - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the text style of selected items - * - * @param { PickerTextStyle } value - indicates the text style of selected items. - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - selectedTextStyle(value: PickerTextStyle): TimePickerAttribute; - - /** - * Sets the text style of selected items - * - * @param { Optional } style - indicates the text style of selected items. - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - selectedTextStyle(style: Optional): TimePickerAttribute; - - /** - * Set time format - * - * @param { DateTimeOptions } value - indicates the format of the time display. - * @returns { TimePickerAttribute } the attribute of the time picker - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - dateTimeOptions(value: DateTimeOptions): TimePickerAttribute; - - /** - * Set time format - * - * @param { Optional } timeFormat - indicates the format of the time display. - * @returns { TimePickerAttribute } the attribute of the time picker - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - dateTimeOptions(timeFormat: Optional): TimePickerAttribute; - - /** - * This event is triggered when a TimePicker time is selected. - * - * @param { function } callback - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * This event is triggered when a TimePicker time is selected. - * - * @param { function } callback - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * This event is triggered when a TimePicker time is selected. - * - * @param { function } callback - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - onChange(callback: (value: TimePickerResult) => void): TimePickerAttribute; - - /** - * This event is triggered when a TimePicker time is selected. - * - * @param { Optional } callback - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - onChange(callback: Optional): TimePickerAttribute; - - /** - * This event is triggered when an item enters the selected area. - * - * @param { Callback } callback - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - onEnterSelectedArea(callback: Callback): TimePickerAttribute; - - /** - * Enable or disable haptic feedback. - * - * @param { boolean } enable - Default value is true, set false to disable haptic feedback. - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - enableHapticFeedback(enable: boolean): TimePickerAttribute; - - /** - * Enable or disable haptic feedback. - * - * @param { Optional } enable - Default value is true, set false to disable haptic feedback. - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 18 - */ - enableHapticFeedback(enable: Optional): TimePickerAttribute; - - /** - * If the attribute is set, the crown rotation sensitivity can be changed. - * - * @param { Optional } sensitivity - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - digitalCrownSensitivity(sensitivity: Optional): TimePickerAttribute; - - /** - * Defines whether the AM/PM option is cascaded with the time in 12-hour mode. - * - * @param { boolean } enabled - Default value is false, set true to enable. - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - enableCascade(enabled: boolean): TimePickerAttribute; - } - + (options?: TimePickerOptions): TimePickerAttribute; +} +/** + * Define the internationalization parameter format. + * + * @typedef { import('../api/@ohos.intl').default.DateTimeOptions } DateTimeOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ +declare type DateTimeOptions = import('../api/@ohos.intl').default.DateTimeOptions + +/** + * Callback of the timePicker time is selected event. + * + * @typedef {function} OnTimePickerChangeCallback + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare type OnTimePickerChangeCallback = (result: TimePickerResult) => void; + +/** + * Defines the TimePicker attribute functions. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines the TimePicker attribute functions. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * Defines the TimePicker attribute functions. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + * @noninterop + */ +declare class TimePickerAttribute extends CommonMethod { /** - * Defines the TimePickerDialogOptions for Data Picker Dialog. + * Time Selector: indicates whether to display the 24-hour clock. * - * @extends TimePickerOptions - * @interface TimePickerDialogOptions + * @param { boolean } value + * @returns { TimePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Defines the TimePickerDialogOptions for Data Picker Dialog. + * Time Selector: indicates whether to display the 24-hour clock. * - * @extends TimePickerOptions - * @interface TimePickerDialogOptions + * @param { boolean } value + * @returns { TimePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Defines the TimePickerDialogOptions for Data Picker Dialog. + * Time Selector: indicates whether to display the 24-hour clock. * - * @extends TimePickerOptions - * @interface TimePickerDialogOptions + * @param { boolean } value + * @returns { TimePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare interface TimePickerDialogOptions extends TimePickerOptions { - /** - * Time Selector: indicates whether to display the 24-hour clock. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Time Selector: indicates whether to display the 24-hour clock. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Time Selector: indicates whether to display the 24-hour clock. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - useMilitaryTime?: boolean; - - /** - * Text style of disappearing items - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Text style of disappearing items - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - disappearTextStyle?: PickerTextStyle; - - /** - * Text style of normal items - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Text style of normal items - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - textStyle?: PickerTextStyle; - - /** - * Style of accept button. - * - * @type { ?PickerDialogButtonStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - acceptButtonStyle?: PickerDialogButtonStyle; - - /** - * Style of cancel button. - * - * @type { ?PickerDialogButtonStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - cancelButtonStyle?: PickerDialogButtonStyle; - - /** - * Text style of selected items - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Text style of selected items - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - selectedTextStyle?: PickerTextStyle; - - /** - * Mask Region of dialog. The size cannot exceed the main window. - * - * @type { ?Rectangle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Mask Region of dialog. The size cannot exceed the main window. - * - * @type { ?Rectangle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - maskRect?: Rectangle; - - /** - * Defines the dialog alignment of the screen. - * - * @type { ?DialogAlignment } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Defines the dialog alignment of the screen. - * - * @type { ?DialogAlignment } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - alignment?: DialogAlignment; - - /** - * Defines the dialog offset. - * - * @type { ?Offset } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Defines the dialog offset. - * - * @type { ?Offset } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - offset?: Offset; - - /** - * Called when the OK button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the OK button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the OK button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - onAccept?: (value: TimePickerResult) => void; - - /** - * Called when the Cancel button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the Cancel button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the Cancel button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - onCancel?: () => void; - - /** - * This event is triggered when a TimePicker Time or time is selected in dialog. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * This event is triggered when a TimePicker Time or time is selected in dialog. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * This event is triggered when a TimePicker Time or time is selected in dialog. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - onChange?: (value: TimePickerResult) => void; - - /** - * This event is triggered when an item enters the selected area in dialog. - * - * @type { ?Callback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - onEnterSelectedArea?: Callback; - - /** - * Defines the timePickerDialog's background color - * - * @type { ?ResourceColor } - * @default Color.Transparent - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Defines the timePickerDialog's background color - * - * @type { ?ResourceColor } - * @default Color.Transparent - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - backgroundColor?: ResourceColor; - - /** - * Defines the timePickerDialog's background blur Style - * - * @type { ?BlurStyle } - * @default BlurStyle.COMPONENT_ULTRA_THICK - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Defines the timePickerDialog's background blur Style - * - * @type { ?BlurStyle } - * @default BlurStyle.COMPONENT_ULTRA_THICK - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - backgroundBlurStyle?: BlurStyle; - - /** - * Defines the timePickerDialog's background blur style with options - * - * @type { ?BackgroundBlurStyleOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 19 - */ - backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; - - /** - * Defines the timePickerDialog's background effect with options - * - * @type { ?BackgroundEffectOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 19 - */ - backgroundEffect?: BackgroundEffectOptions; - - /** - * Defines whether the AM/PM option is cascaded with the time in 12-hour mode. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - enableCascade?: boolean; - - /** - * Callback function when the dialog appears. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onDidAppear?: () => void; - - /** - * Callback function when the dialog disappears. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onDidDisappear?: () => void; - - /** - * Callback function before the dialog openAnimation starts. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onWillAppear?: () => void; - - /** - * Callback function before the dialog closeAnimation starts. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onWillDisappear?: () => void; - - /** - * Defines the dialog's shadow. - * - * @type { ?(ShadowOptions | ShadowStyle) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - shadow?: ShadowOptions | ShadowStyle; - - /** - * Set time format - * - * @type { ?DateTimeOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - dateTimeOptions?: DateTimeOptions; - - /** - * Defines whether to respond to the hover mode. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - enableHoverMode?: boolean; - - /** - * Defines the dialog's display area in hover mode. - * - * @type { ?HoverModeAreaType } - * @default HoverModeAreaType.BOTTOM_SCREEN - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - hoverModeArea?: HoverModeAreaType; - - /** - * Enable or disable haptic feedback. - * - * @type { ?boolean } - * @default true - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 18 - */ - enableHapticFeedback?: boolean; - } - + useMilitaryTime(value: boolean): TimePickerAttribute; + /** - * Defines TimePickerDialog which uses show method to show TimePicker dialog. + * Time Selector: indicates whether to display the 24-hour clock. * + * @param { Optional } isMilitaryTime + * @returns { TimePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + useMilitaryTime(isMilitaryTime: Optional): TimePickerAttribute; + + /** + * Sets whether to enable the wheel mode. + * @param { boolean } value - indicates whether to enable the wheel mode. + * @returns { TimePickerAttribute } the attribute of the time picker + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Sets whether to enable the wheel mode. + * @param { boolean } value - indicates whether to enable the wheel mode. + * @returns { TimePickerAttribute } the attribute of the time picker + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ + loop(value: boolean): TimePickerAttribute; + + /** + * Sets whether to enable the wheel mode. + * @param { Optional } isLoop - indicates whether to enable the wheel mode. + * @returns { TimePickerAttribute } the attribute of the time picker + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + loop(isLoop: Optional): TimePickerAttribute; + /** - * Defines TimePickerDialog which uses show method to show TimePicker dialog. + * Sets the text style of disappearing items * + * @param { PickerTextStyle } value - indicates the text style of disappearing items. + * @returns { TimePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Defines TimePickerDialog which uses show method to show TimePicker dialog. + * Sets the text style of disappearing items * + * @param { PickerTextStyle } value - indicates the text style of disappearing items. + * @returns { TimePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare class TimePickerDialog { - /** - * Invoking method display. - * - * @param { TimePickerDialogOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Invoking method display. - * - * @param { TimePickerDialogOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Invoking method display. - * - * @param { TimePickerDialogOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - * @deprecated since 18 - * @useinstead ohos.arkui.UIContext.UIContext#showTimePickerDialog - */ - static show(options?: TimePickerDialogOptions); - } - + disappearTextStyle(value: PickerTextStyle): TimePickerAttribute; + /** - * Defines TimePicker Component. + * Sets the text style of disappearing items * + * @param { Optional } style - indicates the text style of disappearing items. + * @returns { TimePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + disappearTextStyle(style: Optional): TimePickerAttribute; + /** - * Defines TimePicker Component. + * Sets the text style of normal items * + * @param { PickerTextStyle } value - indicates the text style of normal items. + * @returns { TimePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Defines TimePicker Component. + * Sets the text style of normal items * + * @param { PickerTextStyle } value - indicates the text style of normal items. + * @returns { TimePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - declare const TimePicker: TimePickerInterface; - + textStyle(value: PickerTextStyle): TimePickerAttribute; + /** - * Defines TimePicker Component instance. + * Sets the text style of normal items * + * @param { Optional } style - indicates the text style of normal items. + * @returns { TimePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + textStyle(style: Optional): TimePickerAttribute; + /** - * Defines TimePicker Component instance. + * Sets the text style of selected items * + * @param { PickerTextStyle } value - indicates the text style of selected items. + * @returns { TimePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Defines TimePicker Component instance. + * Sets the text style of selected items * + * @param { PickerTextStyle } value - indicates the text style of selected items. + * @returns { TimePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + selectedTextStyle(value: PickerTextStyle): TimePickerAttribute; + + /** + * Sets the text style of selected items + * + * @param { Optional } style - indicates the text style of selected items. + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + selectedTextStyle(style: Optional): TimePickerAttribute; + + /** + * Set time format + * + * @param { DateTimeOptions } value - indicates the format of the time display. + * @returns { TimePickerAttribute } the attribute of the time picker + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - declare const TimePickerInstance: TimePickerAttribute; - \ No newline at end of file + dateTimeOptions(value: DateTimeOptions): TimePickerAttribute; + + /** + * Set time format + * + * @param { Optional } timeFormat - indicates the format of the time display. + * @returns { TimePickerAttribute } the attribute of the time picker + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + dateTimeOptions(timeFormat: Optional): TimePickerAttribute; + + /** + * This event is triggered when a TimePicker time is selected. + * + * @param { function } callback + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * This event is triggered when a TimePicker time is selected. + * + * @param { function } callback + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * This event is triggered when a TimePicker time is selected. + * + * @param { function } callback + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onChange(callback: (value: TimePickerResult) => void): TimePickerAttribute; + + /** + * This event is triggered when a TimePicker time is selected. + * + * @param { Optional } callback + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + onChange(callback: Optional): TimePickerAttribute; + + /** + * This event is triggered when an item enters the selected area. + * + * @param { Callback } callback + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + onEnterSelectedArea(callback: Callback): TimePickerAttribute; + + /** + * Enable or disable haptic feedback. + * + * @param { boolean } enable - Default value is true, set false to disable haptic feedback. + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + enableHapticFeedback(enable: boolean): TimePickerAttribute; + + /** + * Enable or disable haptic feedback. + * + * @param { Optional } enable - Default value is true, set false to disable haptic feedback. + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + enableHapticFeedback(enable: Optional): TimePickerAttribute; + + /** + * If the attribute is set, the crown rotation sensitivity can be changed. + * + * @param { Optional } sensitivity + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + digitalCrownSensitivity(sensitivity: Optional): TimePickerAttribute; + + /** + * Defines whether the AM/PM option is cascaded with the time in 12-hour mode. + * + * @param { boolean } enabled - Default value is false, set true to enable. + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + enableCascade(enabled: boolean): TimePickerAttribute; +} + +/** + * Defines the TimePickerDialogOptions for Data Picker Dialog. + * + * @extends TimePickerOptions + * @interface TimePickerDialogOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines the TimePickerDialogOptions for Data Picker Dialog. + * + * @extends TimePickerOptions + * @interface TimePickerDialogOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * Defines the TimePickerDialogOptions for Data Picker Dialog. + * + * @extends TimePickerOptions + * @interface TimePickerDialogOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare interface TimePickerDialogOptions extends TimePickerOptions { + /** + * Time Selector: indicates whether to display the 24-hour clock. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Time Selector: indicates whether to display the 24-hour clock. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Time Selector: indicates whether to display the 24-hour clock. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + useMilitaryTime?: boolean; + + /** + * Text style of disappearing items + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Text style of disappearing items + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + disappearTextStyle?: PickerTextStyle; + + /** + * Text style of normal items + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Text style of normal items + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + textStyle?: PickerTextStyle; + + /** + * Style of accept button. + * + * @type { ?PickerDialogButtonStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + acceptButtonStyle?: PickerDialogButtonStyle; + + /** + * Style of cancel button. + * + * @type { ?PickerDialogButtonStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + cancelButtonStyle?: PickerDialogButtonStyle; + + /** + * Text style of selected items + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Text style of selected items + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + selectedTextStyle?: PickerTextStyle; + + /** + * Mask Region of dialog. The size cannot exceed the main window. + * + * @type { ?Rectangle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Mask Region of dialog. The size cannot exceed the main window. + * + * @type { ?Rectangle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + maskRect?: Rectangle; + + /** + * Defines the dialog alignment of the screen. + * + * @type { ?DialogAlignment } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Defines the dialog alignment of the screen. + * + * @type { ?DialogAlignment } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + alignment?: DialogAlignment; + + /** + * Defines the dialog offset. + * + * @type { ?Offset } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Defines the dialog offset. + * + * @type { ?Offset } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + offset?: Offset; + + /** + * Called when the OK button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the OK button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Called when the OK button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + onAccept?: (value: TimePickerResult) => void; + + /** + * Called when the Cancel button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the Cancel button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Called when the Cancel button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + onCancel?: () => void; + + /** + * This event is triggered when a TimePicker Time or time is selected in dialog. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * This event is triggered when a TimePicker Time or time is selected in dialog. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * This event is triggered when a TimePicker Time or time is selected in dialog. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + onChange?: (value: TimePickerResult) => void; + + /** + * This event is triggered when an item enters the selected area in dialog. + * + * @type { ?Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + onEnterSelectedArea?: Callback; + + /** + * Defines the timePickerDialog's background color + * + * @type { ?ResourceColor } + * @default Color.Transparent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Defines the timePickerDialog's background color + * + * @type { ?ResourceColor } + * @default Color.Transparent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + backgroundColor?: ResourceColor; + + /** + * Defines the timePickerDialog's background blur Style + * + * @type { ?BlurStyle } + * @default BlurStyle.COMPONENT_ULTRA_THICK + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Defines the timePickerDialog's background blur Style + * + * @type { ?BlurStyle } + * @default BlurStyle.COMPONENT_ULTRA_THICK + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + backgroundBlurStyle?: BlurStyle; + + /** + * Defines the timePickerDialog's background blur style with options + * + * @type { ?BackgroundBlurStyleOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; + + /** + * Defines the timePickerDialog's background effect with options + * + * @type { ?BackgroundEffectOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + backgroundEffect?: BackgroundEffectOptions; + + /** + * Defines whether the AM/PM option is cascaded with the time in 12-hour mode. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + enableCascade?: boolean; + + /** + * Callback function when the dialog appears. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + onDidAppear?: () => void; + + /** + * Callback function when the dialog disappears. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + onDidDisappear?: () => void; + + /** + * Callback function before the dialog openAnimation starts. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + onWillAppear?: () => void; + + /** + * Callback function before the dialog closeAnimation starts. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + onWillDisappear?: () => void; + + /** + * Defines the dialog's shadow. + * + * @type { ?(ShadowOptions | ShadowStyle) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + shadow?: ShadowOptions | ShadowStyle; + + /** + * Set time format + * + * @type { ?DateTimeOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + dateTimeOptions?: DateTimeOptions; + + /** + * Defines whether to respond to the hover mode. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 + */ + enableHoverMode?: boolean; + + /** + * Defines the dialog's display area in hover mode. + * + * @type { ?HoverModeAreaType } + * @default HoverModeAreaType.BOTTOM_SCREEN + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 + */ + hoverModeArea?: HoverModeAreaType; + + /** + * Enable or disable haptic feedback. + * + * @type { ?boolean } + * @default true + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + enableHapticFeedback?: boolean; +} + +/** + * Defines TimePickerDialog which uses show method to show TimePicker dialog. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines TimePickerDialog which uses show method to show TimePicker dialog. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * Defines TimePickerDialog which uses show method to show TimePicker dialog. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare class TimePickerDialog { + /** + * Invoking method display. + * + * @param { TimePickerDialogOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Invoking method display. + * + * @param { TimePickerDialogOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Invoking method display. + * + * @param { TimePickerDialogOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + * @deprecated since 18 + * @useinstead ohos.arkui.UIContext.UIContext#showTimePickerDialog + */ + static show(options?: TimePickerDialogOptions); +} + +/** + * Defines TimePicker Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines TimePicker Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * Defines TimePicker Component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + * @noninterop + */ +declare const TimePicker: TimePickerInterface; + +/** + * Defines TimePicker Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines TimePicker Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * Defines TimePicker Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + * @noninterop + */ +declare const TimePickerInstance: TimePickerAttribute; diff --git a/api/@ohos.arkui.drawableDescriptor.d.ts b/api/@ohos.arkui.drawableDescriptor.d.ts index 3cee05526ebad735bd061af06a1220b85c0dc4ca..e57f057fc71547d07bb5349a5e903c81e25d4ed9 100644 --- a/api/@ohos.arkui.drawableDescriptor.d.ts +++ b/api/@ohos.arkui.drawableDescriptor.d.ts @@ -18,284 +18,515 @@ * @kit ArkUI */ - import image from './@ohos.multimedia.image'; +import image from './@ohos.multimedia.image'; - /** - * Use the DrawableDescriptor class to get drawable image. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Use the DrawableDescriptor class to get drawable image. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Use the DrawableDescriptor class to get drawable image. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export class DrawableDescriptor { - /** - * Creates a new DrawableDescriptor. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi Hide this for inner system use. - * @since 10 - */ - constructor(); - - /** - * Get pixelMap of drawable image. - * - * @returns { image.PixelMap } Return the PixelMap of the calling DrawableDescriptor object. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Get pixelMap of drawable image. - * - * @returns { image.PixelMap } Return the PixelMap of the calling DrawableDescriptor object. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Get pixelMap of drawable image. - * - * @returns { image.PixelMap } Return the PixelMap of the calling DrawableDescriptor object. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - getPixelMap(): image.PixelMap; - } - - /** - * Use the LayeredDrawableDescriptor class to get the foreground, the background and the mask DrawableDescriptor. - * - * @extends DrawableDescriptor - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Use the LayeredDrawableDescriptor class to get the foreground, the background and the mask DrawableDescriptor. - * - * @extends DrawableDescriptor - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Use the LayeredDrawableDescriptor class to get the foreground, the background and the mask DrawableDescriptor. - * - * @extends DrawableDescriptor - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export class LayeredDrawableDescriptor extends DrawableDescriptor { - /** - * Creates a new LayeredDrawableDescriptor. - * - * @param { DrawableDescriptor } [foreground] - Indicates the foreground option to create LayeredDrawableDescriptor. - * @param { DrawableDescriptor } [background] - Indicates the background option to create LayeredDrawableDescriptor. - * @param { DrawableDescriptor } [mask] - Indicates the mask option to create LayeredDrawableDescriptor. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - constructor( - foreground?: DrawableDescriptor, - background?: DrawableDescriptor, - mask?: DrawableDescriptor - ); - - /** - * Get DrawableDescriptor for the foreground. - * - * @returns { DrawableDescriptor } Return the DrawableDescriptor object of foreground. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Get DrawableDescriptor for the foreground. - * - * @returns { DrawableDescriptor } Return the DrawableDescriptor object of foreground. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Get DrawableDescriptor for the foreground. - * - * @returns { DrawableDescriptor } Return the DrawableDescriptor object of foreground. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - getForeground(): DrawableDescriptor; - - /** - * Get DrawableDescriptor for the background. - * - * @returns { DrawableDescriptor } Return the DrawableDescriptor object of background. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Get DrawableDescriptor for the background. - * - * @returns { DrawableDescriptor } Return the DrawableDescriptor object of background. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Get DrawableDescriptor for the background. - * - * @returns { DrawableDescriptor } Return the DrawableDescriptor object of background. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - getBackground(): DrawableDescriptor; - - /** - * Get DrawableDescriptor for the mask. - * - * @returns { DrawableDescriptor } Return the DrawableDescriptor object of mask. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Get DrawableDescriptor for the mask. - * - * @returns { DrawableDescriptor } Return the DrawableDescriptor object of mask. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Get DrawableDescriptor for the mask. - * - * @returns { DrawableDescriptor } Return the DrawableDescriptor object of mask. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - getMask(): DrawableDescriptor; - - - /** - * Get the clip path info of the adaptive icon mask. - * - * @returns { string } Return the clip path info of mask. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Get the clip path info of the adaptive icon mask. - * - * @returns { string } Return the clip path info of mask. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Get the clip path info of the adaptive icon mask. - * - * @returns { string } Return the clip path info of mask. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - static getMaskClipPath(): string; - } - - /** - * Use the PixelMapDrawableDescriptor class to get the resource of pixelmap or resource descriptor information. - * - * @extends DrawableDescriptor - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export class PixelMapDrawableDescriptor extends DrawableDescriptor { - /** - * Creates a new PixelMapDrawableDescriptor. - * @param { image.PixelMap } src - Indicates the resource to create PixelMapDrawableDescriptor. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - constructor(src?: image.PixelMap); - } - - /** - * Animation control options - * - * @interface AnimationOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - declare interface AnimationOptions { - /** - * The duration of animation playback once. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - duration?: number; - /** - * Animation playback times. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - iterations?: number; - } - - /** - * Define the data structure for PixelMap animations. - * - * @extends DrawableDescriptor - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export class AnimatedDrawableDescriptor extends DrawableDescriptor { - /** - * Creates a new AnimatedDrawableDescriptor. - * - * @param { Array } pixelMaps - PixelMap List. - * @param { AnimationOptions } [options] - Animation control options. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - constructor(pixelMaps: Array, options?: AnimationOptions); - } - \ No newline at end of file +/** + * Indicates the return result of the data to be fetched. + * + * @typedef DrawableDescriptorResult + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ +declare interface DrawableDescriptorResult { + /** + * DrawableDescriptor width.The default value is -1. + * + * @type { ?number } + * @readonly + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + readonly width?: number; + + /** + * DrawableDescriptor height.The default value is -1. + * + * @type { ?number } + * @readonly + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + readonly height?: number; +} + +/** + * DrawableDescriptor's option which is used in constructor. + * + * @typedef DrawableDescriptorOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ +declare interface DrawableDescriptorOptions { + /** + * If true, it will fetch the data using the uri when object is constructing.The default value is false. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + fetchWhenConstructingWithUri?: boolean; +} + +/** + * Use the DrawableDescriptor class to get drawable image. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ +/** + * Use the DrawableDescriptor class to get drawable image. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ +/** + * Use the DrawableDescriptor class to get drawable image. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ +export declare class DrawableDescriptor { + /** + * Creates a new DrawableDescriptor. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi Hide this for inner system use. + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 + */ + constructor(); + + /** + * Get pixelMap of drawable image. + * + * @returns { image.PixelMap } Return the PixelMap of the calling DrawableDescriptor object. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Get pixelMap of drawable image. + * + * @returns { image.PixelMap } Return the PixelMap of the calling DrawableDescriptor object. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Get pixelMap of drawable image. + * + * @returns { image.PixelMap } Return the PixelMap of the calling DrawableDescriptor object. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + getPixelMap(): image.PixelMap; + + /** + * Get pixelMap of drawable image. + * + * @returns { image.PixelMap | undefined } Return the PixelMap of the calling DrawableDescriptor object. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + getPixelMap(): image.PixelMap | undefined; + + /** + * Get original width of drawable object. + * + * @returns { number } Return the width of the DrawableDescriptor object. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + getOriginalWidth(): number; + + /** + * Get original height of drawable object. + * + * @returns { number } Return the height of the DrawableDescriptor object. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + getOriginalHeight(): number; + + /** + * Fetch the drawable's data whose corresponding uri is passed in constructor.This fetched data can be draw in Image view. + * + * @returns { Promise } Return the promise returned by the funciton. + * @throws { BusinessError } 100001 - Data loading failed. Maybe the uri is invalid. + * @throws { BusinessError } 100002 - Data decoding failed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + fetch(): Promise; + + /** + * Fetch the drawable's data whose corresponding uri is passed in constructor.This fetched data can be draw in Image view. + * + * @returns { DrawableDescriptorResult } Return the result of the DrawableDescriptor object. + * @throws { BusinessError } 100001 - Data loading failed. Maybe the uri is invalid. + * @throws { BusinessError } 100002 - Data decoding failed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + fetchSync(): DrawableDescriptorResult; +} + +/** + * Use the LayeredDrawableDescriptor class to get the foreground, the background and the mask DrawableDescriptor. + * + * @extends DrawableDescriptor + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ +/** + * Use the LayeredDrawableDescriptor class to get the foreground, the background and the mask DrawableDescriptor. + * + * @extends DrawableDescriptor + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ +/** + * Use the LayeredDrawableDescriptor class to get the foreground, the background and the mask DrawableDescriptor. + * + * @extends DrawableDescriptor + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ +export declare class LayeredDrawableDescriptor extends DrawableDescriptor { + /** + * Creates a new LayeredDrawableDescriptor. + * + * @param { DrawableDescriptor } [foreground] - Indicates the foreground option to create LayeredDrawableDescriptor. + * @param { DrawableDescriptor } [background] - Indicates the background option to create LayeredDrawableDescriptor. + * @param { DrawableDescriptor } [mask] - Indicates the mask option to create LayeredDrawableDescriptor. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + constructor( + foreground?: DrawableDescriptor, + background?: DrawableDescriptor, + mask?: DrawableDescriptor + ); + + /** + * Get DrawableDescriptor for the foreground. + * + * @returns { DrawableDescriptor } Return the DrawableDescriptor object of foreground. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Get DrawableDescriptor for the foreground. + * + * @returns { DrawableDescriptor } Return the DrawableDescriptor object of foreground. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Get DrawableDescriptor for the foreground. + * + * @returns { DrawableDescriptor } Return the DrawableDescriptor object of foreground. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + getForeground(): DrawableDescriptor; + + /** + * Get DrawableDescriptor for the foreground. + * + * @returns { DrawableDescriptor | undefined } Return the DrawableDescriptor object of foreground. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + getForeground(): DrawableDescriptor | undefined; + + /** + * Get DrawableDescriptor for the background. + * + * @returns { DrawableDescriptor } Return the DrawableDescriptor object of background. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Get DrawableDescriptor for the background. + * + * @returns { DrawableDescriptor } Return the DrawableDescriptor object of background. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Get DrawableDescriptor for the background. + * + * @returns { DrawableDescriptor } Return the DrawableDescriptor object of background. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + getBackground(): DrawableDescriptor; + + /** + * Get DrawableDescriptor for the background. + * + * @returns { DrawableDescriptor | undefined } Return the DrawableDescriptor object of background. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + getBackground(): DrawableDescriptor | undefined; + + /** + * Get DrawableDescriptor for the mask. + * + * @returns { DrawableDescriptor } Return the DrawableDescriptor object of mask. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Get DrawableDescriptor for the mask. + * + * @returns { DrawableDescriptor } Return the DrawableDescriptor object of mask. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Get DrawableDescriptor for the mask. + * + * @returns { DrawableDescriptor } Return the DrawableDescriptor object of mask. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + getMask(): DrawableDescriptor; + + /** + * Get DrawableDescriptor for the mask. + * + * @returns { DrawableDescriptor | undefined } Return the DrawableDescriptor object of mask. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + getMask(): DrawableDescriptor | undefined; + + + /** + * Get the clip path info of the adaptive icon mask. + * + * @returns { string } Return the clip path info of mask. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Get the clip path info of the adaptive icon mask. + * + * @returns { string } Return the clip path info of mask. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Get the clip path info of the adaptive icon mask. + * + * @returns { string } Return the clip path info of mask. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + static getMaskClipPath(): string; +} + +/** + * Use the PixelMapDrawableDescriptor class to get the resource of pixelmap or resource descriptor information. + * + * @extends DrawableDescriptor + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ +export declare class PixelMapDrawableDescriptor extends DrawableDescriptor { + /** + * Creates a new PixelMapDrawableDescriptor. + * @param { image.PixelMap } src - Indicates the resource to create PixelMapDrawableDescriptor. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + constructor(src?: image.PixelMap); + + /** + * Creates a new PixelMapDrawableDescriptor. + * @param { image.PixelMap | ResourceStr } src - Indicates the resource to create PixelMapDrawableDescriptor. + * @param { DrawableDescriptorOptions } options - Indicates the option to create PixelMapDrawableDescriptor. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + constructor(src?: image.PixelMap | ResourceStr, options?: DrawableDescriptorOptions); +} + +/** + * Animation control options + * + * @interface AnimationOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ +export declare interface AnimationOptions { + /** + * The duration of animation playback once. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + duration?: number; + /** + * Animation playback times. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + iterations?: number; + + /** + * If true, it will fetch the data using the uri when object is constructing.The default value is false. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + fetchWhenConstructingWithUri?: boolean; +} + +/** + * Define the data structure for PixelMap animations. + * + * @extends DrawableDescriptor + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ +export declare class AnimatedDrawableDescriptor extends DrawableDescriptor { + /** + * Creates a new AnimatedDrawableDescriptor. + * + * @param { Array } pixelMaps - PixelMap List. + * @param { AnimationOptions } [options] - Animation control options. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + constructor(pixelMaps: Array, options?: AnimationOptions); + + /** + * Creates a new AnimatedDrawableDescriptor. + * @param { Array | ResourceStr } pixelMaps - Indicates the resource to create AnimatedDrawableDescriptor. + * @param { ?AnimationOptions } [options] - Animation control options. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + constructor(pixelMaps: Array | ResourceStr, options?: AnimationOptions); + + /** + * Get the running status of animation. + * + * @returns { boolean } Return the running status of animation. + * @throws { BusinessError } 100001 - Image data is not ready.Maybe you should fetch the data first. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + isRunning(): boolean; + + /** + * Start the animation. + * + * @throws { BusinessError } 100001 - Image data is not ready.Maybe you should fetch the data first. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + start(): void; + + /** + * Stop the animation. + * + * @throws { BusinessError } 100001 - Image data is not ready.Maybe you should fetch the data first. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + stop(): void; +} diff --git a/api/@ohos.arkui.drawableDescriptor.static.d.ets b/api/@ohos.arkui.drawableDescriptor.static.d.ets deleted file mode 100644 index e9c0a538cb02dc915d8f4658a154a9f72b98188b..0000000000000000000000000000000000000000 --- a/api/@ohos.arkui.drawableDescriptor.static.d.ets +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ - -import image from './@ohos.multimedia.image'; - -/** - * Use the DrawableDescriptor class to get drawable image. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare class DrawableDescriptor { - /** - * Creates a new DrawableDescriptor. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi Hide this for inner system use. - * @since 20 - */ - constructor(); - - /** - * Get pixelMap of drawable image. - * - * @returns { image.PixelMap | undefined } Return the PixelMap of the calling DrawableDescriptor object. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - getPixelMap(): image.PixelMap | undefined; -} - -/** - * Use the LayeredDrawableDescriptor class to get the foreground, the background and the mask DrawableDescriptor. - * - * @extends DrawableDescriptor - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare class LayeredDrawableDescriptor extends DrawableDescriptor { - /** - * Creates a new LayeredDrawableDescriptor. - * - * @param { DrawableDescriptor } [foreground] - Indicates the foreground option to create LayeredDrawableDescriptor. - * @param { DrawableDescriptor } [background] - Indicates the background option to create LayeredDrawableDescriptor. - * @param { DrawableDescriptor } [mask] - Indicates the mask option to create LayeredDrawableDescriptor. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - constructor( - foreground?: DrawableDescriptor, - background?: DrawableDescriptor, - mask?: DrawableDescriptor - ); - - /** - * Get DrawableDescriptor for the foreground. - * - * @returns { DrawableDescriptor | undefined } Return the DrawableDescriptor object of foreground. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - getForeground(): DrawableDescriptor | undefined; - - /** - * Get DrawableDescriptor for the background. - * - * @returns { DrawableDescriptor | undefined } Return the DrawableDescriptor object of background. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - getBackground(): DrawableDescriptor | undefined; - - /** - * Get DrawableDescriptor for the mask. - * - * @returns { DrawableDescriptor | undefined } Return the DrawableDescriptor object of mask. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - getMask(): DrawableDescriptor | undefined; - - /** - * Get the clip path info of the adaptive icon mask. - * - * @returns { string } Return the clip path info of mask. - * @static - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - static getMaskClipPath(): string; -} - -/** - * Use the PixelMapDrawableDescriptor class to get the resource of pixelmap or resource descriptor information. - * - * @extends DrawableDescriptor - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare class PixelMapDrawableDescriptor extends DrawableDescriptor { - /** - * Creates a new PixelMapDrawableDescriptor. - * @param { image.PixelMap } [src] - Indicates the resource to create PixelMapDrawableDescriptor. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - constructor(src?: image.PixelMap); -} - -/** - * Animation control options - * - * @interface AnimationOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export interface AnimationOptions { - /** - * The duration of animation playback once. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - duration?: number; - /** - * Animation playback times. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - iterations?: number; -} - -/** - * Define the data structure for PixelMap animations. - * - * @extends DrawableDescriptor - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare class AnimatedDrawableDescriptor extends DrawableDescriptor { - /** - * Creates a new AnimatedDrawableDescriptor. - * - * @param { Array } pixelMaps - PixelMap List. - * @param { AnimationOptions } [options] - Animation control options. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - constructor(pixelMaps: Array, options?: AnimationOptions); -} diff --git a/api/arkui/CalendarPickerModifier.d.ts b/api/arkui/CalendarPickerModifier.d.ts index 21de4e7cfadad34a6a472cc637b71c007f03fbdc..61b33498a0cc339d817389664ec865cd14c886f1 100755 --- a/api/arkui/CalendarPickerModifier.d.ts +++ b/api/arkui/CalendarPickerModifier.d.ts @@ -38,6 +38,7 @@ * @crossplatform * @atomicservice * @since 20 + * @noninterop */ export declare class CalendarPickerModifier extends CalendarPickerAttribute implements AttributeModifier { diff --git a/api/arkui/CalendarPickerModifier.static.d.ets b/api/arkui/CalendarPickerModifier.static.d.ets deleted file mode 100644 index 557134644d66a93e924bd7fb942949e782730776..0000000000000000000000000000000000000000 --- a/api/arkui/CalendarPickerModifier.static.d.ets +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"), - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ - -import { AttributeModifier } from './component/common'; -import { CalendarPickerAttribute } from './component/calendarPicker'; - -/** - * Defines CalendarPicker Modifier - * - * @extends CalendarPickerAttribute - * @implements { AttributeModifier } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare class CalendarPickerModifier extends CalendarPickerAttribute implements AttributeModifier {} diff --git a/api/arkui/CounterModifier.d.ts b/api/arkui/CounterModifier.d.ts index c395cd96f5715861fab52400b7afc85045bc6f8e..fdf0e2d4e48aff98d43ca425efaaf7b8208d3792 100755 --- a/api/arkui/CounterModifier.d.ts +++ b/api/arkui/CounterModifier.d.ts @@ -39,6 +39,7 @@ * @crossplatform * @atomicservice * @since 20 + * @noninterop */ export declare class CounterModifier extends CounterAttribute implements AttributeModifier { diff --git a/api/arkui/DataPanelModifier.d.ts b/api/arkui/DataPanelModifier.d.ts index 84943a1dfde160d421ffc3487e08024f7c24195a..bec3fa3e6d01bef8c80469e59efc0b4d49a33237 100755 --- a/api/arkui/DataPanelModifier.d.ts +++ b/api/arkui/DataPanelModifier.d.ts @@ -39,6 +39,7 @@ * @crossplatform * @atomicservice * @since 20 + * @noninterop */ export declare class DataPanelModifier extends DataPanelAttribute implements AttributeModifier { diff --git a/api/arkui/DataPanelModifier.static.d.ets b/api/arkui/DataPanelModifier.static.d.ets deleted file mode 100644 index 7c8598720e867ea44e7656e43b3903858c5fdf00..0000000000000000000000000000000000000000 --- a/api/arkui/DataPanelModifier.static.d.ets +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"), - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ - -import { AttributeModifier } from './component/common'; -import { DataPanelAttribute } from './component/dataPanel'; - -/** - * Defines DataPanel Modifier - * - * @extends DataPanelAttribute - * @implements { AttributeModifier } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare class DataPanelModifier extends DataPanelAttribute implements AttributeModifier {} diff --git a/api/arkui/DatePickerModifier.d.ts b/api/arkui/DatePickerModifier.d.ts index 17395d0b5b27abe6bb9e1102ed3c759817b6fc98..f431857fba5c89553c02431b66be289f861f3e77 100755 --- a/api/arkui/DatePickerModifier.d.ts +++ b/api/arkui/DatePickerModifier.d.ts @@ -39,18 +39,18 @@ * @crossplatform * @atomicservice * @since 20 + * @noninterop */ - export declare class DatePickerModifier extends DatePickerAttribute implements AttributeModifier { +export declare class DatePickerModifier extends DatePickerAttribute implements AttributeModifier { - /** - * Defines the normal update attribute function. - * - * @param { DatePickerAttribute } instance - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - applyNormalAttribute?(instance: DatePickerAttribute): void; - } - \ No newline at end of file + /** + * Defines the normal update attribute function. + * + * @param { DatePickerAttribute } instance + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + applyNormalAttribute?(instance: DatePickerAttribute): void; +} diff --git a/api/arkui/DatePickerModifier.static.d.ets b/api/arkui/DatePickerModifier.static.d.ets deleted file mode 100644 index 3a606bd7ebe32caf33af8926d3e1062418b6e3d4..0000000000000000000000000000000000000000 --- a/api/arkui/DatePickerModifier.static.d.ets +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"), - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ - -import { AttributeModifier } from './component/common'; -import { DatePickerAttribute } from './component/datePicker'; - -/** - * Defines DatePicker Modifier - * - * @extends DatePickerAttribute - * @implements { AttributeModifier } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare class DatePickerModifier extends DatePickerAttribute implements AttributeModifier {} diff --git a/api/arkui/GaugeModifier.d.ts b/api/arkui/GaugeModifier.d.ts index ae81e8c6c090d67e94549e9c66465f4ef6bd6e4d..c3e3233da0323d6d5ed426bfd41f21a44a59b7ae 100755 --- a/api/arkui/GaugeModifier.d.ts +++ b/api/arkui/GaugeModifier.d.ts @@ -38,18 +38,18 @@ * @crossplatform * @atomicservice * @since 20 + * @noninterop */ - export declare class GaugeModifier extends GaugeAttribute implements AttributeModifier { +export declare class GaugeModifier extends GaugeAttribute implements AttributeModifier { - /** - * Defines the normal update attribute function. - * - * @param { GaugeAttribute } instance - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - applyNormalAttribute?(instance: GaugeAttribute): void; - } - \ No newline at end of file + /** + * Defines the normal update attribute function. + * + * @param { GaugeAttribute } instance + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + applyNormalAttribute?(instance: GaugeAttribute): void; +} diff --git a/api/arkui/GaugeModifier.static.d.ets b/api/arkui/GaugeModifier.static.d.ets deleted file mode 100644 index 5cef8e49fb80c7b999bf8543f65d9bf5bea69d56..0000000000000000000000000000000000000000 --- a/api/arkui/GaugeModifier.static.d.ets +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"), - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ - -import { AttributeModifier } from './component/common'; -import { GaugeAttribute } from './component/gauge'; - -/** - * Defines Gauge Modifier - * - * @extends GaugeAttribute - * @implements { AttributeModifier } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare class GaugeModifier extends GaugeAttribute implements AttributeModifier {} diff --git a/api/arkui/ImageAnimatorModifier.d.ts b/api/arkui/ImageAnimatorModifier.d.ts index 1d218be07077c523cddba8b1f3e77d7eb597397f..a2be6d61060c031f3f73000c56dfe86dcad344cf 100755 --- a/api/arkui/ImageAnimatorModifier.d.ts +++ b/api/arkui/ImageAnimatorModifier.d.ts @@ -39,18 +39,18 @@ * @crossplatform * @atomicservice * @since 20 + * @noninterop */ - export declare class ImageAnimatorModifier extends ImageAnimatorAttribute implements AttributeModifier { +export declare class ImageAnimatorModifier extends ImageAnimatorAttribute implements AttributeModifier { - /** - * Defines the normal update attribute function. - * - * @param { ImageAnimatorAttribute } instance - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - applyNormalAttribute?(instance: ImageAnimatorAttribute): void; - } - \ No newline at end of file + /** + * Defines the normal update attribute function. + * + * @param { ImageAnimatorAttribute } instance + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + applyNormalAttribute?(instance: ImageAnimatorAttribute): void; +} diff --git a/api/arkui/ImageAnimatorModifier.static.d.ets b/api/arkui/ImageAnimatorModifier.static.d.ets deleted file mode 100644 index d529ab6b33a56a010a82b61bfe936834c8714a1e..0000000000000000000000000000000000000000 --- a/api/arkui/ImageAnimatorModifier.static.d.ets +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"), - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ - -import { AttributeModifier } from './component/common'; -import { ImageAnimatorAttribute } from './component/imageAnimator'; - -/** - * Defines ImageAnimator Modifier - * - * @extends ImageAnimatorAttribute - * @implements { AttributeModifier } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare class ImageAnimatorModifier extends ImageAnimatorAttribute implements AttributeModifier {} diff --git a/api/arkui/LoadingProgressModifier.d.ts b/api/arkui/LoadingProgressModifier.d.ts index aff18090c2cd4f8549c6fed7ffe51118b2b0948d..dae599ed590742f0dfbe22c187ded989f8c52c8b 100755 --- a/api/arkui/LoadingProgressModifier.d.ts +++ b/api/arkui/LoadingProgressModifier.d.ts @@ -39,18 +39,18 @@ * @crossplatform * @atomicservice * @since 20 + * @noninterop */ - export declare class LoadingProgressModifier extends LoadingProgressAttribute implements AttributeModifier { +export declare class LoadingProgressModifier extends LoadingProgressAttribute implements AttributeModifier { - /** - * Defines the normal update attribute function. - * - * @param { LoadingProgressAttribute } instance - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - applyNormalAttribute?(instance: LoadingProgressAttribute): void; - } - \ No newline at end of file + /** + * Defines the normal update attribute function. + * + * @param { LoadingProgressAttribute } instance + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + applyNormalAttribute?(instance: LoadingProgressAttribute): void; +} diff --git a/api/arkui/LoadingProgressModifier.static.d.ets b/api/arkui/LoadingProgressModifier.static.d.ets deleted file mode 100644 index 90113fe5c9617c691c2e8ea2ab093f93209b0edf..0000000000000000000000000000000000000000 --- a/api/arkui/LoadingProgressModifier.static.d.ets +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"), - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ - -import { AttributeModifier } from './component/common'; -import { LoadingProgressAttribute } from './component/loadingProgress'; - -/** - * Defines LoadingProgress Modifier - * - * @extends LoadingProgressAttribute - * @implements { AttributeModifier } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare class LoadingProgressModifier extends LoadingProgressAttribute implements AttributeModifier {} diff --git a/api/arkui/PatternLockModifier.d.ts b/api/arkui/PatternLockModifier.d.ts index 1a46b6dc48bd0b746d9f414ae2ca4f34b47c8022..7510b65332ad73fd89ce9bed04a9e82f6f535c32 100755 --- a/api/arkui/PatternLockModifier.d.ts +++ b/api/arkui/PatternLockModifier.d.ts @@ -39,18 +39,18 @@ * @crossplatform * @atomicservice * @since 20 + * @noninterop */ - export declare class PatternLockModifier extends PatternLockAttribute implements AttributeModifier { +export declare class PatternLockModifier extends PatternLockAttribute implements AttributeModifier { - /** - * Defines the normal update attribute function. - * - * @param { PatternLockAttribute } instance - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - applyNormalAttribute?(instance: PatternLockAttribute): void; - } - \ No newline at end of file + /** + * Defines the normal update attribute function. + * + * @param { PatternLockAttribute } instance + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + applyNormalAttribute?(instance: PatternLockAttribute): void; +} diff --git a/api/arkui/PatternLockModifier.static.d.ets b/api/arkui/PatternLockModifier.static.d.ets deleted file mode 100644 index 138b23d4c2be3505d3a64205c4153b68b9f39e82..0000000000000000000000000000000000000000 --- a/api/arkui/PatternLockModifier.static.d.ets +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"), - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ - -import { AttributeModifier } from './component/common'; -import { PatternLockAttribute } from './component/patternLock'; - -/** - * Defines PatternLock Modifier - * - * @extends PatternLockAttribute - * @implements { AttributeModifier } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare class PatternLockModifier extends PatternLockAttribute implements AttributeModifier {} diff --git a/api/arkui/ProgressModifier.d.ts b/api/arkui/ProgressModifier.d.ts index 55c9ad0ac0ab427d771f5837cf0eb65a98fd2e23..ac6897282a69af5e0ebde9c2db35215df5f22d00 100755 --- a/api/arkui/ProgressModifier.d.ts +++ b/api/arkui/ProgressModifier.d.ts @@ -39,6 +39,7 @@ * @crossplatform * @atomicservice * @since 20 + * @noninterop */ export declare class ProgressModifier extends ProgressAttribute implements AttributeModifier { diff --git a/api/arkui/ProgressModifier.static.d.ets b/api/arkui/ProgressModifier.static.d.ets deleted file mode 100644 index ebaee4f49d48d0f6a56d12926825ca1eefc3be5f..0000000000000000000000000000000000000000 --- a/api/arkui/ProgressModifier.static.d.ets +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"), - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ - -import { AttributeModifier } from './component/common'; -import { ProgressAttribute } from './component/progress'; - -/** - * Defines Progress Modifier - * - * @extends ProgressAttribute - * @implements { AttributeModifier } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare class ProgressModifier extends ProgressAttribute implements AttributeModifier {} diff --git a/api/arkui/QRCodeModifier.d.ts b/api/arkui/QRCodeModifier.d.ts index 9af7096a96b96f735330fc59f3dd25583a724dcf..0ec51bac5f9035dfe0513c61a6e6cea8fe4405d7 100644 --- a/api/arkui/QRCodeModifier.d.ts +++ b/api/arkui/QRCodeModifier.d.ts @@ -25,23 +25,12 @@ * Defines QRCode Modifier * * @extends QRCodeAttribute - * @implements { AttributeModifier } + * @implements AttributeModifier * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @atomicservice * @since 12 -*/ -/** - * Defines QRCode Modifier - * - * @extends QRCodeAttribute - * @implements { AttributeModifier } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 * @noninterop - */ +*/ export declare class QRCodeModifier extends QRCodeAttribute implements AttributeModifier { /** diff --git a/api/arkui/QRCodeModifier.static.d.ets b/api/arkui/QRCodeModifier.static.d.ets deleted file mode 100644 index 10159e95ee44d34c76c7e8be418aa1b1e4c324aa..0000000000000000000000000000000000000000 --- a/api/arkui/QRCodeModifier.static.d.ets +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"), - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ - -import { AttributeModifier } from './component/common'; -import { QRCodeAttribute } from './component/qrcode'; - -/** - * Defines QRCode Modifier - * - * @extends QRCodeAttribute - * @implements { AttributeModifier } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare class QRCodeModifier extends QRCodeAttribute implements AttributeModifier {} diff --git a/api/arkui/TextClockModifier.d.ts b/api/arkui/TextClockModifier.d.ts index 6202ad05ad6e2fe964ff150743db8214f2ac6488..d53c2c4dce7ebbb692493ddc7ae3359c45de63ad 100755 --- a/api/arkui/TextClockModifier.d.ts +++ b/api/arkui/TextClockModifier.d.ts @@ -39,18 +39,18 @@ * @crossplatform * @atomicservice * @since 20 + * @noninterop */ - export declare class TextClockModifier extends TextClockAttribute implements AttributeModifier { +export declare class TextClockModifier extends TextClockAttribute implements AttributeModifier { - /** - * Defines the normal update attribute function. - * - * @param { TextClockAttribute } instance - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - applyNormalAttribute?(instance: TextClockAttribute): void; - } - \ No newline at end of file + /** + * Defines the normal update attribute function. + * + * @param { TextClockAttribute } instance + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + applyNormalAttribute?(instance: TextClockAttribute): void; +} diff --git a/api/arkui/TextClockModifier.static.d.ets b/api/arkui/TextClockModifier.static.d.ets deleted file mode 100644 index 298e919c3b7b4f32c1da947d6dbf21fbb9a7bdf1..0000000000000000000000000000000000000000 --- a/api/arkui/TextClockModifier.static.d.ets +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"), - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ - -import { AttributeModifier } from './component/common'; -import { TextClockAttribute } from './component/textClock'; - -/** - * Defines TextClock Modifier - * - * @extends TextClockAttribute - * @implements { AttributeModifier } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare class TextClockModifier extends TextClockAttribute implements AttributeModifier {} diff --git a/api/arkui/TextPickerModifier.d.ts b/api/arkui/TextPickerModifier.d.ts index 5c3b23651467247ed28c13becb9a27f4ee2ec4c2..63a5d0f7aac1eebde142276329b6b4a4926a524b 100755 --- a/api/arkui/TextPickerModifier.d.ts +++ b/api/arkui/TextPickerModifier.d.ts @@ -39,18 +39,18 @@ * @crossplatform * @atomicservice * @since 20 + * @noninterop */ - export declare class TextPickerModifier extends TextPickerAttribute implements AttributeModifier { +export declare class TextPickerModifier extends TextPickerAttribute implements AttributeModifier { - /** - * Defines the normal update attribute function. - * - * @param { TextPickerAttribute } instance - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - applyNormalAttribute?(instance: TextPickerAttribute): void; - } - \ No newline at end of file + /** + * Defines the normal update attribute function. + * + * @param { TextPickerAttribute } instance + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + applyNormalAttribute?(instance: TextPickerAttribute): void; +} diff --git a/api/arkui/TextPickerModifier.static.d.ets b/api/arkui/TextPickerModifier.static.d.ets deleted file mode 100644 index 2afedd0db7f99f48914115d789b0a8fe0a2a6094..0000000000000000000000000000000000000000 --- a/api/arkui/TextPickerModifier.static.d.ets +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"), - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ - -import { AttributeModifier } from './component/common'; -import { TextPickerAttribute } from './component/textPicker'; - -/** - * Defines TextPicker Modifier - * - * @extends TextPickerAttribute - * @implements { AttributeModifier } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare class TextPickerModifier extends TextPickerAttribute implements AttributeModifier {} diff --git a/api/arkui/TextTimerModifier.d.ts b/api/arkui/TextTimerModifier.d.ts index 077408c26a5fe9654beb9bbddd89ef83c18b8cde..ee31eba0b923b60a3657176ed20d4ce2e2bef61f 100755 --- a/api/arkui/TextTimerModifier.d.ts +++ b/api/arkui/TextTimerModifier.d.ts @@ -39,18 +39,18 @@ * @crossplatform * @atomicservice * @since 20 + * @noninterop */ - export declare class TextTimerModifier extends TextTimerAttribute implements AttributeModifier { +export declare class TextTimerModifier extends TextTimerAttribute implements AttributeModifier { - /** - * Defines the normal update attribute function. - * - * @param { TextTimerAttribute } instance - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - applyNormalAttribute?(instance: TextTimerAttribute): void; - } - \ No newline at end of file + /** + * Defines the normal update attribute function. + * + * @param { TextTimerAttribute } instance + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + applyNormalAttribute?(instance: TextTimerAttribute): void; +} diff --git a/api/arkui/TextTimerModifier.static.d.ets b/api/arkui/TextTimerModifier.static.d.ets deleted file mode 100644 index bf0eb6339b4bb851bfce35362d226123a80b3108..0000000000000000000000000000000000000000 --- a/api/arkui/TextTimerModifier.static.d.ets +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"), - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ - -import { AttributeModifier } from './component/common'; -import { TextTimerAttribute } from './component/textTimer'; - -/** - * Defines TextTimer Modifier - * - * @extends TextTimerAttribute - * @implements { AttributeModifier } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare class TextTimerModifier extends TextTimerAttribute implements AttributeModifier {} diff --git a/api/arkui/TimePickerModifier.d.ts b/api/arkui/TimePickerModifier.d.ts index 1e891b50e7c8ec33af31f61fcadc66dc48067936..42ca865f052ae5f06ba5efa611685baea3318c49 100755 --- a/api/arkui/TimePickerModifier.d.ts +++ b/api/arkui/TimePickerModifier.d.ts @@ -39,18 +39,18 @@ * @crossplatform * @atomicservice * @since 20 + * @noninterop */ - export declare class TimePickerModifier extends TimePickerAttribute implements AttributeModifier { +export declare class TimePickerModifier extends TimePickerAttribute implements AttributeModifier { - /** - * Defines the normal update attribute function. - * - * @param { TimePickerAttribute } instance - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - applyNormalAttribute?(instance: TimePickerAttribute): void; - } - \ No newline at end of file + /** + * Defines the normal update attribute function. + * + * @param { TimePickerAttribute } instance + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + applyNormalAttribute?(instance: TimePickerAttribute): void; +} diff --git a/api/arkui/TimePickerModifier.static.d.ets b/api/arkui/TimePickerModifier.static.d.ets deleted file mode 100644 index 7ae997b7b01fe795b1a97a162f40fc5b2364da97..0000000000000000000000000000000000000000 --- a/api/arkui/TimePickerModifier.static.d.ets +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"), - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ - -import { AttributeModifier } from './component/common'; -import { TimePickerAttribute } from './component/timePicker'; - -/** - * Defines TimePicker Modifier - * - * @extends TimePickerAttribute - * @implements { AttributeModifier } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare class TimePickerModifier extends TimePickerAttribute implements AttributeModifier {} diff --git a/api/arkui/component/badge.static.d.ets b/api/arkui/component/badge.static.d.ets deleted file mode 100644 index 39bf73cb95a794311555e27a34fe1f62c930da61..0000000000000000000000000000000000000000 --- a/api/arkui/component/badge.static.d.ets +++ /dev/null @@ -1,284 +0,0 @@ -/* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"), - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ -'use static'; - -/** - * @file - * @kit ArkUI - * @arkts static - */ -import { ResourceColor, Length, Position, Resource, ResourceStr } from './units'; -import { FontWeight } from './enums'; -import { CommonMethod } from './common'; -import { memo, ComponentBuilder } from './../stateManagement/runtime'; -import { AttributeModifier, CommonMethod } from './common'; -import { memo, ComponentBuilder } from './../stateManagement/runtime'; -import { AttributeModifier, CommonMethod } from './common'; -/** - * Defines the badge position property. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare enum BadgePosition { - /** - * The badge is displayed in the upper right corner of the parent component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - RightTop, - /** - * The badge is vertically centered on the right of the parent component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - Right, - /** - * The badge is vertically centered on the left of the parent component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - Left -} -/** - * BadgeStyle object - * - * @interface BadgeStyle - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface BadgeStyle { - /** - * Font color. - * - * @type { ?ResourceColor } - * @default Color.White - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - color?: ResourceColor; - /** - * Text size. - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - fontSize?: number | string; - /** - * Size of a badge. - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - badgeSize?: number | string; - /** - * Badge color. - * - * @type { ?ResourceColor } - * @default Color.Red - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - badgeColor?: ResourceColor; - /** - * Border color of the background. - * - * @type { ?ResourceColor } - * @default Color.Red - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - borderColor?: ResourceColor; - /** - * Border width of the background. - * This parameter cannot be set in percentage. - * Unit: vp - * - * @type { ?Length } - * @default 1 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - borderWidth?: Length; - /** - * Define the font weight of the badge. - * - * @type { ?(number | FontWeight | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - fontWeight?: number | FontWeight | string; -} -/** - * Provides basic parameters for creating a badge. - * - * @interface BadgeParam - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface BadgeParam { - /** - * Position to display the badge relative to the parent component. - * - *

NOTE: - *
With the Position type, percentage values are not supported. - *
If an invalid value is set, the default value (0,0), - * which indicates the upper left corner of the component, will be used. - *
With the BadgePosition type, the position is mirrored based on the Direction property. - *

- * - * @type { ?(BadgePosition | Position) } - * @default BadgePosition.RightTop - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - position?: BadgePosition | Position; - /** - * Style of the badge, including the font color, font size, badge color, and badge size. - * - * @type { BadgeStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - style: BadgeStyle; -} -/** - * Inherits from BadgeParam and has all attributes of BadgeParam. - * - * @extends BadgeParam - * @interface BadgeParamWithNumber - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface BadgeParamWithNumber extends BadgeParam { - /** - * Number of notifications. - * - *

NOTE: - *
If the value is less than or equal to 0 and less than the value of maxCount, no badge is displayed. - *
Value range: [-2147483648, 2147483647] - *
If the value is out of the range, - * it will be adjusted by adding or subtracting 4294967296 to bring it back within the range. - *
If the value is not an integer, it is rounded off to the nearest integer. - *

- * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - count: number; - /** - * Maximum number of notifications. When the maximum number is reached, only maxCount+ is displayed. - * - *

NOTE: - *
Value range: [-2147483648, 2147483647] - *
If the value is out of the range, - * it will be adjusted by adding or subtracting 4294967296 to bring it back within the range. - *
If the value is not an integer, it is rounded off to the nearest integer. - *

- * - * @type { ?number } - * @default 99 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - maxCount?: number; -} -/** - * Inherits from BadgeParam and has all attributes of BadgeParam. - * - * @extends BadgeParam - * @interface BadgeParamWithString - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface BadgeParamWithString extends BadgeParam { - /** - * Text string of the prompt content. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - value: string; -} -export declare interface BadgeAttribute extends CommonMethod { - /** - * Set the attribute modifier - * - * @param { AttributeModifier | AttributeModifier | undefined } modifier - * @returns { BadgeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; -} -/** - * Define BadgeParamWithString's property 'value' type - * - * @typedef { string | Resource } BadgeParamWithStringType - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export type BadgeParamWithStringType = string | Resource; -/** - * Define BadgeStyle's size-relative properties type - * - * @typedef { number | string | Resource } BadgeParamWithString - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export type BadgeStyleSizeType = number | string | Resource; - -/** - * Defines Badge Component. - * - * @param { BadgeParamWithNumber | BadgeParamWithString } value - * @param { function } [content_] - container - * @returns { BadgeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare function Badge( - value: BadgeParamWithNumber | BadgeParamWithString, - @memo - content_?: () => void -): BadgeAttribute; diff --git a/api/arkui/component/calendarPicker.static.d.ets b/api/arkui/component/calendarPicker.static.d.ets deleted file mode 100644 index cfac7b2e0476b3f7c8e9617ee6ffc3b46fffa2dd..0000000000000000000000000000000000000000 --- a/api/arkui/component/calendarPicker.static.d.ets +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -'use static'; - -/** - * @file - * @kit ArkUI - * @arkts static - */ -import { Resource } from '../../global/resource'; -import { CommonMethod, PickerTextStyle, Callback, BlurStyle, PickerDialogButtonStyle, ShadowOptions, ShadowStyle, HoverModeAreaType, DateRange, BackgroundBlurStyleOptions, BackgroundEffectOptions, Optional } from './common'; -import { Offset, VoidCallback, ResourceColor } from './units'; -import { memo, ComponentBuilder } from './../stateManagement/runtime'; -import { AttributeModifier } from './common'; -/** - * The type of alignment between entry and calendar. - * @enum {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare enum CalendarAlign { - /** - * The value of calendar align type start. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - START = 0, - /** - * The value of calendar align type center. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - CENTER = 1, - /** - * The value of calendar align type end. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - END = 2 -} -/** - * Defines the options of CalendarPicker. - * @interface CalendarOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface CalendarOptions { - /** - * Specifies the radius of the background of the day in calendar. - * @type { ?(number | Resource) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - hintRadius?: number | Resource; - /** - * Specifies the date selector check date. - * @type { ?Date } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - selected?: Date; - /** - * Defines the start date of the calendar date. - * - * @type { ?Date } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - start?: Date; - /** - * Defines the end date of the calendar date. - * - * @type { ?Date } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - end?: Date; - /** - * Defines the disabled date range for the calendar picker. - * - * @type { ?DateRange[] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - disabledDateRange?: DateRange[]; -} -/** - * Defines the CalendarPicker component attribute functions. - * - * @extends CommonMethod - * @interface CalendarPickerAttribute - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface CalendarPickerAttribute extends CommonMethod { - /** - * Set the alignment between entry and calendar dialog. - * @param { CalendarAlign } alignType - The type of alignment between entry and calendar dialog. - * @param { Offset } offset - The offset between entry and calendar dialog. - * @returns { CalendarPickerAttribute } the attribute of the CalendarPicker. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - edgeAlign(alignType: CalendarAlign | undefined, offset?: Offset | undefined): this; - /** - * Sets the text style of entry - * @param { PickerTextStyle } value - indicates the text style of entry. - * @returns { CalendarPickerAttribute } the attribute of the CalendarPicker. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - textStyle(value: PickerTextStyle | undefined): this; - /** - * Callback for selected date changed. - * Anonymous Object Rectification. - * @param { Callback } callback - callback for selected date changed. - * @returns { CalendarPickerAttribute } the attribute of the CalendarPicker. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onChange(callback: Callback | undefined): this; - /** - * Defines whether the calendar picker marks today. - * - * @param { boolean } enabled - whether the calendar picker marks today. - * @returns { CalendarPickerAttribute } the attribute of the calendar picker. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - markToday(enabled: boolean | undefined): this; - /** - * Set the attribute modifier - * - * @param { AttributeModifier | AttributeModifier | undefined } modifier - * @returns { CalendarPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; -} -/** - * Defines the DatePickerDialogOptions for Calendar Picker Dialog. - * @extends CalendarOptions - * @interface CalendarDialogOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface CalendarDialogOptions extends CalendarOptions { - /** - * Called when the OK button in the dialog is clicked. - * Anonymous Object Rectification. - * @type { ?Callback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onAccept?: Callback; - /** - * Called when the Cancel button in the dialog is clicked. - * Anonymous Object Rectification. - * @type { ?VoidCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onCancel?: VoidCallback; - /** - * This event is triggered when a date is selected in dialog. - * Anonymous Object Rectification. - * @type { ?Callback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onChange?: Callback; - /** - * Defines the calendarPickerDialog's background color - * - * @type { ?ResourceColor } - * @default Color.Transparent - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - backgroundColor?: ResourceColor; - /** - * Defines the calendarPickerDialog's background blur Style - * - * @type { ?BlurStyle } - * @default BlurStyle.COMPONENT_ULTRA_THICK - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - backgroundBlurStyle?: BlurStyle; - /** - * Defines the calendarPickerDialog's background blur style with options - * - * @type { ?BackgroundBlurStyleOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; - /** - * Defines the calendarPickerDialog's background effect with options - * - * @type { ?BackgroundEffectOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - backgroundEffect?: BackgroundEffectOptions; - /** - * Style of accept button. - * - * @type { ?PickerDialogButtonStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - acceptButtonStyle?: PickerDialogButtonStyle; - /** - * Style of cancel button. - * - * @type { ?PickerDialogButtonStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - cancelButtonStyle?: PickerDialogButtonStyle; - /** - * Callback function when the dialog appears. - * Anonymous Object Rectification. - * - * @type { ?VoidCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onDidAppear?: VoidCallback; - /** - * Callback function when the dialog disappears. - * Anonymous Object Rectification. - * - * @type { ?VoidCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onDidDisappear?: VoidCallback; - /** - * Callback function before the dialog openAnimation starts. - * Anonymous Object Rectification. - * - * @type { ?VoidCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onWillAppear?: VoidCallback; - /** - * Callback function before the dialog closeAnimation starts. - * Anonymous Object Rectification. - * - * @type { ?VoidCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onWillDisappear?: VoidCallback; - /** - * Defines the dialog's shadow. - * - * @type { ?(ShadowOptions | ShadowStyle) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - shadow?: ShadowOptions | ShadowStyle; - /** - * Defines whether to respond to the hover mode. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - enableHoverMode?: boolean; - /** - * Defines the dialog's display area in hover mode. - * - * @type { ?HoverModeAreaType } - * @default HoverModeAreaType.BOTTOM_SCREEN - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - hoverModeArea?: HoverModeAreaType; - /** - * Defines the calendar picker marks today. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - markToday?: boolean; -} -/** - * Defines CalendarPickerDialog which uses show method to show CalendarPicker dialog. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare class CalendarPickerDialog { - /** - * Invoking method display. - * @param { CalendarDialogOptions } options - the option of th calendarPicker. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - static show(options?: CalendarDialogOptions): void; -} - -/** - * Defines CalendarPicker Component. - * - * @param { CalendarOptions } [options] - * @param { function } [content_] - container - * @returns { CalendarPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare function CalendarPicker( - options?: CalendarOptions, - @memo - content_?: () => void -): CalendarPickerAttribute; diff --git a/api/arkui/component/counter.static.d.ets b/api/arkui/component/counter.static.d.ets deleted file mode 100644 index 94b299fd73f944ecc2d2758fccb615c7f72feb3b..0000000000000000000000000000000000000000 --- a/api/arkui/component/counter.static.d.ets +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -'use static'; - -/** - * @file - * @kit ArkUI - * @arkts static - */ -import { CommonMethod } from './common'; -import { VoidCallback } from './units'; -import { memo, ComponentBuilder } from './../stateManagement/runtime'; -import { AttributeModifier, CommonMethod } from './common'; -import { memo, ComponentBuilder } from './../stateManagement/runtime'; -import { AttributeModifier, CommonMethod } from './common'; -export declare interface CounterAttribute extends CommonMethod { - /** - * Listen to the event that the value increases. - * Anonymous Object Rectification. - * - * @param { VoidCallback } event - * @returns { CounterAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onInc(event: VoidCallback | undefined): this; - /** - * Listens to the number decrease event. - * Anonymous Object Rectification. - * - * @param { VoidCallback } event - * @returns { CounterAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onDec(event: VoidCallback | undefined): this; - /** - * Indicates whether the decrease button of counter component is available or not. - * - * @param { boolean } value - If true, the decrease button is available and can respond to operations such as clicking. If false, click operations are not responded. - * @returns { CounterAttribute } The attribute of the counter. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - enableDec(value: boolean | undefined): this; - /** - * Indicates whether the increase button of counter component is available or not. - * - * @param { boolean } value - If true, the increase button is available and can respond to operations such as clicking. If false, click operations are not responded. - * @returns { CounterAttribute } The attribute of the counter. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - enableInc(value: boolean | undefined): this; - attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; -} -export declare function Counter( -@memo -content_?: () => void): CounterAttribute; diff --git a/api/arkui/component/dataPanel.static.d.ets b/api/arkui/component/dataPanel.static.d.ets deleted file mode 100644 index 41e2b7cb19c2e25a94da7239b58fee1159bb82d5..0000000000000000000000000000000000000000 --- a/api/arkui/component/dataPanel.static.d.ets +++ /dev/null @@ -1,226 +0,0 @@ -/* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -'use static'; - -/** - * @file - * @kit ArkUI - * @arkts static - */ -import { ResourceColor, Length } from './units'; -import { CommonMethod, ContentModifier, CommonConfiguration, MultiShadowOptions } from './common'; -import { memo, ComponentBuilder } from './../stateManagement/runtime'; -import { AttributeModifier, CommonMethod } from './common'; -import { memo, ComponentBuilder } from './../stateManagement/runtime'; -import { AttributeModifier, CommonMethod } from './common'; -/** - * DataPanelType enum - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare enum DataPanelType { - /** - * Line Type - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - Line, - /** - * Line Rainbow - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - Circle -} -/** - * ColorStop type - * @typedef { object } ColorStop - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface ColorStop { - /** - * Color property. - * @type { ResourceColor } color - the color value. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - color: ResourceColor; - /** - * Offset property. - * @type { Length } offset - the color offset. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - offset: Length; -} -/** - * LinearGradient class - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare class LinearGradient { - /** - * Constructor. - * - * @param { ColorStop[] } colorStops - the LinearGradient constructor parameter. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - constructor(colorStops: ColorStop[]); -} -/** - * Defines the options of Shadow. - * - * @extends MultiShadowOptions - * @interface DataPanelShadowOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface DataPanelShadowOptions extends MultiShadowOptions { - /** - * Current shadow colors. - * - * @type { ?Array } - * @default Consistent with valueColors - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - colors?: Array; -} -/** - * Defines the options of DataPanel. - * - * @interface DataPanelOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface DataPanelOptions { - /** - * Current data value. the max length is 9. - * - * @type { number[] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - values: number[]; - /** - * Maximum value of the current data. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - max?: number; - /** - * DataPanel Type - * - * @type { ?DataPanelType } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - type?: DataPanelType; -} -/** - * DataPanelConfiguration used by dataPanel content modifier - * - * @extends CommonConfiguration - * @interface DataPanelConfiguration - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface DataPanelConfiguration extends CommonConfiguration { - /** - * Current data value. the max length is 9. - * - * @type { number[] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - values: number[]; - /** - * Maximum value of the current data. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - maxValue: number; -} -export declare interface DataPanelAttribute extends CommonMethod { - /** - * Disable the special effect of the data ratio chart. - * - * @param { boolean } value - * @returns { DataPanelAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - closeEffect(value: boolean | undefined): this; - /** - * Set the value colors of the data ratio chart. - * - * @param { Array } value - the value colors of the data ratio chart. - * @returns { DataPanelAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - valueColors(value: Array | undefined): this; - /** - * Set track background color of the data ratio chart. - * - * @param { ResourceColor } value - track background color of the data ratio chart. - * @returns { DataPanelAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - trackBackgroundColor(value: ResourceColor | undefined): this; - /** - * Set the stroke width of the data ratio chart. - * - * @param { Length } value - the stroke width of the data ratio chart. - * @returns { DataPanelAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - strokeWidth(value: Length | undefined): this; - /** - * Set the shadow width of the data ratio chart. - * - * @param { DataPanelShadowOptions } value - the track shadow width of the data ratio chart. - * @returns { DataPanelAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - trackShadow(value: DataPanelShadowOptions | undefined): this; - /** - * Set the content modifier of data panel. - * - * @param { ContentModifier } modifier - The content modifier of data panel. - * @returns { DataPanelAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - contentModifier(modifier: ContentModifier | undefined): this; - attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; -} -export declare function DataPanel(options: DataPanelOptions, -@memo -content_?: () => void): DataPanelAttribute; diff --git a/api/arkui/component/datePicker.static.d.ets b/api/arkui/component/datePicker.static.d.ets deleted file mode 100644 index 7b7ace0ffde6067af2d039f0d83b1cbfbe8cb5f5..0000000000000000000000000000000000000000 --- a/api/arkui/component/datePicker.static.d.ets +++ /dev/null @@ -1,622 +0,0 @@ -/* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -'use static'; - -/** - * @file - * @kit ArkUI - * @arkts static - */ -import { CommonMethod, PickerTextStyle, PickerDialogButtonStyle, Rectangle, Callback, BlurStyle, ShadowOptions, ShadowStyle, HoverModeAreaType, BackgroundBlurStyleOptions, BackgroundEffectOptions, Optional, DateTimeOptions, Bindable } from './common'; -import { ResourceColor, Offset, VoidCallback } from './units'; -import { DialogAlignment } from './alertDialog'; -import { CrownSensitivity } from './enums'; -import { memo, ComponentBuilder } from './../stateManagement/runtime'; -import { AttributeModifier } from './common'; -/** - * Defines the struct of DatePickerResult. - * - * @interface DatePickerResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface DatePickerResult { - /** - * Year of the selected date. - * - *

NOTE: - *
Value range: depends on start and end. - * If start and end are not set, the default range is [1970, 2100]. - *

- * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - year?: number; - /** - * Month index of the selected date. - * The index is zero-based. 0 indicates January, and 11 indicates December. - * - *

NOTE: - *
Value range: depends on start and end. If start and end are not set, the default range is [0, 11]. - *

- * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - month?: number; - /** - * Day of the selected date. - * - *

NOTE: - *
Value range: depends on start and end. If start and end are not set, the default range is [1, 31]. - *

- * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - day?: number; -} -/** - * Defines the mode of the date picker. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare enum DatePickerMode { - /** - * The date displays three columns: year, month, and day. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - DATE = 0, - /** - * The date displays two columns: year and month. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - YEAR_AND_MONTH = 1, - /** - * Defines a mode that displays the date in months and days of the month. - * In this mode, if the month changes from December to January, - * the year does not increment by one; if the month changes from January to December, - * the year does not decrement by one. The year remains fixed at the currently set value. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - MONTH_AND_DAY = 2 -} -/** - * Parameters of the date picker. - * - * @interface DatePickerOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface DatePickerOptions { - /** - * Start date of the picker. - * - * @type { ?Date } - * @default Date('1970-1-1') - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - start?: Date; - /** - * End date of the picker. - * - * @type { ?Date } - * @default Date('2100-12-31') - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - end?: Date; - /** - * Specifies the date selector check date or time selector check time. - * - * @type { ?(Date | Bindable) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - selected?: Date | Bindable; - /** - * Date columns to be displayed. - * - *

NOTE: - *
In DatePickerDialog, with showTime=true, this parameter has no effect and the default three columns for year, - *
month, and day are displayed. - *

- * - * @type { ?DatePickerMode } - * @default DatePickerMode.DATE - which means to display three columns: year, month, and day. - *
Decimal values are rounded off. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - mode?: DatePickerMode; -} -export declare interface DatePickerAttribute extends CommonMethod { - /** - * Specifies whether to display the lunar calendar. - * - * @param { boolean } value - Whether to display the lunar calendar. - *
- true: Display the lunar calendar. - *
- false: Do not display the lunar. - * @default false - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - lunar(value: boolean | undefined): this; - /** - * Sets the text style for the top and bottom items. - * - * @param { PickerTextStyle } value - Font color, font size, and font weight of the top and bottom items. - * @default {
color: '#ff182431',
font: {
size: '14fp',
weight: FontWeight.Regular
}
} - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - disappearTextStyle(value: PickerTextStyle | undefined): this; - /** - * Sets the text style for all items except the top, bottom, and selected items. - * - * @param { PickerTextStyle } value - Font color, font size, and font weight of all items except the top, - *
bottom, and selected items. - * @default {
color: '#ff182431',
font: {
size: '16fp',
weight: FontWeight.Regular
}
} - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - textStyle(value: PickerTextStyle | undefined): this; - /** - * Sets the text style for the selected item. - * - * @param { PickerTextStyle } value - Font color, font size, and font weight of the selected item. - * @default {
color: '#ff007dff',
font: {
size: '20vp',
weight: FontWeight.Medium
}
} - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - selectedTextStyle(value: PickerTextStyle | undefined): this; - /** - * Triggered when a date is selected. - * Anonymous Object Rectification. - * - * @param { Callback } callback - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onDateChange(callback: Callback | undefined): this; - /** - * Sets the sensitivity to the digital crown rotation. - * - * @param { Optional } sensitivity - Sensitivity to the digital crown rotation. - * @default CrownSensitivity.MEDIUM - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - digitalCrownSensitivity(sensitivity: CrownSensitivity | undefined): this; - /** - * Sets whether to enable haptic feedback. - * - * @param { Optional } enable - Whether to enable haptic feedback. - *
true (default): Haptic feedback is enabled. - *
false: Haptic feedback is disabled. - * @default true - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - enableHapticFeedback(enable: boolean | undefined): this; - attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; -} -/** - * Defines the style of the lunar calendar switch in the DatePickerDialog component. - * - * @interface LunarSwitchStyle - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface LunarSwitchStyle { - /** - * Background color of the switch when it is on. - * - * @type { ?ResourceColor } - * @default $r('sys.color.ohos_id_color_text_primary_actived') - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - selectedColor?: ResourceColor; - /** - * Border color of the switch when it is off. - * - * @type { ?ResourceColor } - * @default $r('sys.color.ohos_id_color_switch_outline_off') - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - unselectedColor?: ResourceColor; - /** - * Color of the icon inside the switch. - * - * @type { ?ResourceColor } - * @default Color.White - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - strokeColor?: ResourceColor; -} -/** - * Parameters of the date picker dialog box. - * - * @extends DatePickerOptions - * @interface DatePickerDialogOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface DatePickerDialogOptions extends DatePickerOptions { - /** - * Whether to display the lunar calendar. - * The value true means to display the lunar calendar, and false means the opposite. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - lunar?: boolean; - /** - * Whether to display the lunar calendar switch. - * The value true means to display the lunar calendar switch, and false means the opposite. - * - * @type { ?boolean } value - indicates whether to show the switch to display the lunar. - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - lunarSwitch?: boolean; - /** - * Style of the lunar calendar switch. - * - * @type { ?LunarSwitchStyle } - * @default { selectedColor: $r('sys.color.ohos_id_color_text_primary_actived'), - *
unselectedColor: $r('sys.color.ohos_id_color_switch_outline_off'), strokeColor: Color.White }. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - lunarSwitchStyle?: LunarSwitchStyle; - /** - * Whether to display the time item. - * The value true means to display the time item, and false means the opposite. - * - *

NOTE: - *
With showTime=true, the mode parameter has no effect and the default three columns for year, - *
month, and day are displayed. - *

- * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - showTime?: boolean; - /** - * Whether to display time in 24-hour format. - * The value true means to display time in 24-hour format, and false means the opposite. - * - *

NOTE: - *
When the display time is in 12-hour format, the AM/PM zone does not change depending on the hour portion. - *

- * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - useMilitaryTime?: boolean; - /** - * Font color, font size, and font width for the top and bottom items. - * - * @type { ?PickerTextStyle } - * @default {
color: '#ff182431',
font: {
size: '14fp',
weight: FontWeight.Regular
}
} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - disappearTextStyle?: PickerTextStyle; - /** - * Font color, font size, and font width of all items except the top, bottom, and selected items. - * - * @type { ?PickerTextStyle } - * @default {
color: '#ff182431',
font: {
size: '16fp',
weight: FontWeight.Regular
}
} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - textStyle?: PickerTextStyle; - /** - * Style of accept button. - * - *

NOTE: - *
In the acceptButtonStyle and cancelButtonStyle configurations, - *
only one primary field can be set to true at most. - *
If both the primary fields are set to true, neither will take effect. - *

- * - * @type { ?PickerDialogButtonStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - acceptButtonStyle?: PickerDialogButtonStyle; - /** - * Style of cancel button. - * - *

NOTE: - *
In the acceptButtonStyle and cancelButtonStyle configurations, - *
only one primary field can be set to true at most. - *
If both the primary fields are set to true, neither will take effect. - *

- * - * @type { ?PickerDialogButtonStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - cancelButtonStyle?: PickerDialogButtonStyle; - /** - * Font color, font size, and font width of the selected item. - * - * @type { ?PickerTextStyle } - * @default {
color: '#ff007dff',
font: {
size: '20vp',
weight: FontWeight.Medium
} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - selectedTextStyle?: PickerTextStyle; - /** - * Mask area of the dialog box. - * Events outside the mask area are transparently transmitted, and events within the mask area are not. - * - * @type { ?Rectangle } - * @default { x: 0, y: 0, width: '100%', height: '100%' } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - maskRect?: Rectangle; - /** - * Alignment mode of the dialog box in the vertical direction. - * - * @type { ?DialogAlignment } - * @default DialogAlignment.Default - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - alignment?: DialogAlignment; - /** - * Offset of the dialog box based on the alignment settings. - * - * @type { ?Offset } - * @default { dx: 0 , dy: 0 } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - offset?: Offset; - /** - * Callback invoked when the Cancel button in the dialog box is clicked. - * Anonymous Object Rectification. - * - * @type { ?VoidCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onCancel?: VoidCallback; - /** - * Callback invoked when the OK button in the dialog box is clicked. - * - *

NOTE: - *
When showTime is set to true, the hour and minute in the value returned by - *
the callback are the hour and minute selected in the picker. Otherwise, - *
the hour and minute are the hour and minute of the system time. - *

- * - * @type { ?Callback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onDateAccept?: Callback; - /** - * Callback invoked when the selected item in the picker changes. - * Anonymous Object Rectification. - * - *

NOTE: - *
When showTime is set to true, the hour and minute in the value returned by - *
the callback are the hour and minute selected in the picker. Otherwise, - *
the hour and minute are the hour and minute of the system time. - *

- * - * @type { ?Callback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onDateChange?: Callback; - /** - * Backplane color of the dialog box. - * - * @type { ?ResourceColor } - * @default Color.Transparent - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - backgroundColor?: ResourceColor; - /** - * Background blur style of the dialog box. - * - * @type { ?BlurStyle } - * @default BlurStyle.COMPONENT_ULTRA_THICK - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - backgroundBlurStyle?: BlurStyle; - /** - * Options for customizing the background blur style. - * - * @type { ?BackgroundBlurStyleOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; - /** - * Options for customizing the background effect. - * - * @type { ?BackgroundEffectOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - backgroundEffect?: BackgroundEffectOptions; - /** - * Event callback when the dialog box appears. - * - *

NOTE: - *
1. The normal timing sequence is as follows: onWillAppear > onDidAppear > - * (onDateAccept/onCancel/onDateChange) > onWillDisappear > onDidDisappear. - *
2. You can set the callback event for changing the dialog box display effect in onDidAppear. - * The settings take effect next time the dialog box appears. - *
3. If the user closes the dialog box immediately after it appears, - * onWillDisappear is invoked before onDidAppear. - *
4. If the dialog box is closed before its entrance animation is finished, - * this callback is not invoked. - *

- * - * @type { ?VoidCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onDidAppear?: VoidCallback; - /** - * Event callback when the dialog box disappears. - * - *

NOTE: - *
1. The normal timing sequence is as follows: onWillAppear > onDidAppear > - *
(onDateAccept/onCancel/onDateChange) > onWillDisappear > onDidDisappear. - *

- * - * @type { ?VoidCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onDidDisappear?: VoidCallback; - /** - * Event callback when the dialog box is about to appear. - * - *

NOTE: - *
1. The normal timing sequence is as follows: onWillAppear > onDidAppear > - * (onDateAccept/onCancel/onDateChange) > onWillDisappear > onDidDisappear. - *
2. You can set the callback event for changing the dialog box display effect in onWillAppear. - * The settings take effect next time the dialog box appears. - *

- * - * @type { ?VoidCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onWillAppear?: VoidCallback; - /** - * Event callback when the dialog box is about to disappear. - * - *

NOTE: - *
1. The normal timing sequence is as follows: onWillAppear > onDidAppear > - * (onDateAccept/onCancel/onDateChange) > onWillDisappear > onDidDisappear. - *
2. If the user closes the dialog box immediately after it appears, - * onWillDisappear is invoked before onDidAppear. - *

- * - * @type { ?VoidCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onWillDisappear?: VoidCallback; - /** - * Shadow of the dialog box. - * Default value on 2-in-1 devices: ShadowStyle.OUTER_FLOATING_MD - * when the dialog box is focused and ShadowStyle.OUTER_FLOATING_SM - * - * @type { ?(ShadowOptions | ShadowStyle) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - shadow?: ShadowOptions | ShadowStyle; - /** - * Whether to display a leading zero for the hours and minutes. - * - *

NOTE: - *
Currently only the configuration of the hour and minute parameters is supported. - *

- * - * @type { ?DateTimeOptions } - * @default hour: In the 24-hour format, it defaults to 2-digit, which means a leading zero is used; - *
In the 12-hour format, it defaults to numeric, which means no leading zero is used. - *
minute: defaults to 2-digit, which means a leading zero is used. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - dateTimeOptions?: DateTimeOptions; - /** - * Whether to enable the hover mode. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - enableHoverMode?: boolean; - /** - * Display area of the dialog box in hover mode. - * - * @type { ?HoverModeAreaType } - * @default HoverModeAreaType.BOTTOM_SCREEN - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - hoverModeArea?: HoverModeAreaType; - /** - * Whether to enable haptic feedback. - * The value true means to enable haptic feedback, and false means the opposite - * - * @type { ?boolean } - * @default true - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - enableHapticFeedback?: boolean; -} -/** - * Defines DatePickerDialog which uses show method to show DatePicker dialog. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare class DatePickerDialog { -} -export declare function DatePicker(options?: DatePickerOptions, -@memo -content_?: () => void): DatePickerAttribute; diff --git a/api/arkui/component/gauge.static.d.ets b/api/arkui/component/gauge.static.d.ets deleted file mode 100644 index 8f727eab9111f00437b8c2b6a9cd4ee36a4417ea..0000000000000000000000000000000000000000 --- a/api/arkui/component/gauge.static.d.ets +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -'use static'; - -/** - * @file - * @kit ArkUI - * @arkts static - */ -import { CommonMethod, CommonConfiguration, ContentModifier, MultiShadowOptions, Optional } from './common'; -import { CustomBuilder } from './builder'; -import { ResourceStr, Dimension, ResourceColor, Length } from "./units"; -import { LinearGradient } from "./dataPanel"; -import { memo, ComponentBuilder } from "./../stateManagement/runtime"; -import { AttributeModifier, CommonMethod } from "./common"; -import { memo, ComponentBuilder } from "./../stateManagement/runtime"; -import { AttributeModifier, CommonMethod } from "./common"; -/** - * Defines Gauge constructor options. - * - * @interface GaugeOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export interface GaugeOptions { - /** - * Set current data value. - * Anonymous Object Rectification. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - value: number; - /** - * Set current segment minimum value. - * Anonymous Object Rectification. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - min?: number; - /** - * Set current segment maximum value. - * Anonymous Object Rectification. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - max?: number; -} -/** - * Defines the options of gauge track shadow. - * - * @extends MultiShadowOptions - * @interface GaugeShadowOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface GaugeShadowOptions extends MultiShadowOptions { -} -/** - * Defines the options of gauge indicator. - * - * @interface GaugeIndicatorOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface GaugeIndicatorOptions { - /** - * Current indicator icon path. - * - * @type { ?ResourceStr } option type - the current option type. - * @default system style. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - icon?: ResourceStr; - /** - * Current indicator space. - * - * @type { ?Dimension } indicator space - the current indicator space. - * @default 8 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - space?: Dimension; -} -/** - * GaugeConfiguration used by content modifier - * - * @extends CommonConfiguration - * @interface GaugeConfiguration - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface GaugeConfiguration extends CommonConfiguration { - /** - * Current data value. - * - * @type { number } data value - the current data value. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - value: number; - /** - * Current Segment Minimum Value. - * - * @type { number } segment minimum value - the current segment minimum value. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - min: number; - /** - * Current Segment Maximum Value. - * - * @type { number } segment maximum value - the current segment maximum value. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - max: number; -} -export declare interface GaugeAttribute extends CommonMethod { - /** - * Sets the value for the current profile. - * - * @param { number } value - * @returns { GaugeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - value(value: number | undefined): this; - /** - * Set the start angle. Clock 0 is 0 degrees and clockwise is positive. - * - * @param { number } angle - * @returns { GaugeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - startAngle(angle: number | undefined): this; - /** - * Sets the end angle position. Clock 0 is 0 degrees and clockwise is positive. - * - * @param { number } angle - * @returns { GaugeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - endAngle(angle: number | undefined): this; - /** - * Set the color of the chart. You can set the solid color and segmented gradient color. - * - * @param { ResourceColor | LinearGradient | Array<[ResourceColor | LinearGradient, number]> } colors - section colors of gauge drawing. - * @returns { GaugeAttribute } returns the instance of the GaugeAttribute. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - colors(colors: ResourceColor | LinearGradient | Array<[ - ResourceColor | LinearGradient, - number - ]> | undefined): this; - /** - * Sets the thickness of the ring chart. - * - * @param { Length } length - * @returns { GaugeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - strokeWidth(length: Length | undefined): this; - /** - * Sets description content of the ring chart. - * - * @param { CustomBuilder } value - description content builder of the gauge drawing. - * @returns { GaugeAttribute } returns the instance of the GaugeAttribute. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - description(value: CustomBuilder | undefined): this; - /** - * Sets track shadow of the ring chart. - * - * @param { GaugeShadowOptions } value - track shadow options of the gauge drawing. - * @returns { GaugeAttribute } returns the instance of the GaugeAttribute. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - trackShadow(value: GaugeShadowOptions | undefined): this; - /** - * Sets indicator options of the ring chart. - * - * @param { GaugeIndicatorOptions } value - indicator options of the gauge drawing. - * @returns { GaugeAttribute } returns the instance of the GaugeAttribute. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - indicator(value: GaugeIndicatorOptions | undefined): this; - /** - * Sets if mark to privacy sensitive. - * - * @param { Optional } isPrivacySensitiveMode - indicates if mark to privacy sensitive . - * @returns { GaugeAttribute } returns the instance of the GaugeAttribute. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - privacySensitive(isPrivacySensitiveMode: boolean | undefined): this; - /** - * Set the content modifier of gauge. - * - * @param { ContentModifier } modifier - The content modifier of gauge. - * @returns { GaugeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - contentModifier(modifier: ContentModifier | undefined): this; - attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; -} -export declare function Gauge(options: GaugeOptions, -@memo -content_?: () => void): GaugeAttribute; diff --git a/api/arkui/component/image.static.d.ets b/api/arkui/component/image.static.d.ets deleted file mode 100644 index dddfb7a9c24c5f4de7b8f774cdcd06bfe853803b..0000000000000000000000000000000000000000 --- a/api/arkui/component/image.static.d.ets +++ /dev/null @@ -1,812 +0,0 @@ -/* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -'use static'; - -/** - * @file - * @kit ArkUI - * @arkts static - */ -import image from '../../@ohos.multimedia.image'; -import drawing from '../../@ohos.graphics.drawing'; -import matrix4 from '../../@ohos.matrix4'; -import { BusinessError } from '../../@ohos.base'; -import { DrawableDescriptor } from '../../@ohos.arkui.drawableDescriptor'; -import { ImageAIOptions, ImageAnalyzerConfig } from './imageCommon'; -import { ResourceStr, ResourceColor, ColorFilter, EdgeWidths, ColorMetrics } from './units'; -import { ImageFit, ImageRepeat, CopyOptions } from './enums'; -import { Resource } from '../../global/resource'; -import { CommonMethod, PointLightStyle, PixelMap } from './common'; -import { memo, ComponentBuilder } from './../stateManagement/runtime'; -import { AttributeModifier, CommonMethod } from './common'; -import { memo, ComponentBuilder } from './../stateManagement/runtime'; -import { AttributeModifier, CommonMethod } from './common'; -/** - * Import the DrawingColorFilter type object for image color filter setting. - * - * @typedef { drawing.ColorFilter } DrawingColorFilter - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export type DrawingColorFilter = drawing.ColorFilter; -/** - * Enumerates all the levels available for the image resolution quality. - * - * @typedef { image.ResolutionQuality } ResolutionQuality - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 20 - */ -export type ResolutionQuality = image.ResolutionQuality; -/** - * Lattice for dividing an image into grids. - * - * @typedef { drawing.Lattice } DrawingLattice - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export type DrawingLattice = drawing.Lattice; -/** - * Object matrix used for setting image transformations. - * - * @typedef { matrix4.Matrix4Transit } Matrix4Transit - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export type ImageMatrix = matrix4.Matrix4Transit; -/** - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 20 - */ -export declare enum ImageRenderMode { - /** - * Render according to the original image, including colors. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - Original, - /** - * Render the image as a template image, ignoring the color information of the image. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - Template -} -/** - * Specify image's content. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare enum ImageContent { - /** - * Make image empty. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - EMPTY = 0 -} -/** - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare enum DynamicRangeMode { - /** - * Allow image content to use an unrestricted extended range. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - HIGH = 0, - /** - * Allow image content to use some extended range. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - CONSTRAINT = 1, - /** - * Restrict the image content dynamic range to the standard range. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - STANDARD = 2 -} -/** - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare enum ImageInterpolation { - /** - * Do not use interpolated image data. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - None, - /** - * Low usage of interpolated image data. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - Low, - /** - * Interpolated image data is used moderately. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - Medium, - /** - * High usage of interpolated image data may affect the speed of image rendering. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - High -} -/** - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare enum ImageRotateOrientation { - /** - * Rotate according to the image rotation - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - AUTO = 0, - /** - * Ignore the rotation of the image - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - UP = 1, - /** - * Based on image rotation, rotate clockwise 90 degrees - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - RIGHT = 2, - /** - * Based on image rotation, rotate clockwise 180 degrees - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - DOWN = 3, - /** - * Based on image rotation, rotate clockwise 270 degrees - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - LEFT = 4, - /** - * Flip the orignial image horizontally - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - UP_MIRRORED = 5, - /** - * Flip the orignial image horizontally and rotate clockwise 90 degrees - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - RIGHT_MIRRORED = 6, - /** - * Flip the orignial image vertically - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - DOWN_MIRRORED = 7, - /** - * Flip the orignial image horizontally and rotate clockwise 270 degrees - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - LEFT_MIRRORED = 8 -} -/** - * ImageCompleteEvent - * - * @interface ImageCompleteEvent - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export interface ImageCompleteEvent { - /** - * The width of the image source. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - width: number; - /** - * The height of the image source. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - height: number; - /** - * The width of the component source. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - componentWidth: number; - /** - * The height of the component source. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - componentHeight: number; - /** - * The value of the status of the image being loaded successfully. - * If the returned status value is 0, the image data is successfully loaded. - * If the returned status value is 1, the image is successfully decoded. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - loadingStatus: number; - /** - * The width of the picture that is actually drawn. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - contentWidth: number; - /** - * The height of the picture that is actually drawn. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - contentHeight: number; - /** - * The actual draw is offset from the x-axis of the component itself. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - contentOffsetX: number; - /** - * The actual draw is offset from the y-axis of the component itself. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - contentOffsetY: number; -} -/** - * Defines source size of image. - * - * @interface ImageSourceSize - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export interface ImageSourceSize { - /** - * Set width. - * Anonymous Object Rectification. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - width: number; - /** - * Set height. - * Anonymous Object Rectification. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - height: number; -} -/** - * Defines the ColorContent. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare class ColorContent { - /** - * Indicates the ColorContent to original value. - * - * @type { ColorContent } - * @readonly - * @static - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - static readonly ORIGIN: ColorContent; -} -export declare interface ImageAttribute extends CommonMethod { - /** - * Sets the placeholder image displayed during loading. - * - *

NOTE: - *
This attribute does not take effect when the parameter type of the component is AnimatedDrawableDescriptor. - *

- * - * @param { string | Resource | PixelMap } value - Placeholder image displayed during loading, Default value is null. - * @returns { ImageAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - alt(value: string | Resource | PixelMap | undefined): this; - /** - * Specifies whether to display the image in the system language direction. - * - *

NOTE: - *
This attribute does not take effect when the parameter type of the component is AnimatedDrawableDescriptor. - *

- * - * @param { boolean } value - Whether to display the image in the system language direction, Default value is false. - * @returns { ImageAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - matchTextDirection(value: boolean | undefined): this; - /** - * Sets whether the display size of the image follows the source size. - * - *

NOTE: - *
This attribute does not take effect when the parameter type of the component is AnimatedDrawableDescriptor. - *

- * - * @param { boolean } value - Whether to fit the image to the size of the image source, Default value is false. - * @returns { ImageAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - fitOriginalSize(value: boolean | undefined): this; - /** - * Sets the fill color to be superimposed on the image. - * By default, no fill color is applied. If an invalid value is passed, the system uses the default theme color: - * black in light mode and white in dark mode. - * - *

NOTE: - *
This attribute applies only to SVG images. - *
This attribute does not take effect when the parameter type of the component is AnimatedDrawableDescriptor. - *

- * - * @param { ResourceColor | ColorContent | ColorMetrics } color - * @returns { ImageAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - fillColor(color: ResourceColor | ColorContent | ColorMetrics | undefined): this; - /** - * Sets how the image is resized to fit its container. - * - * @param { ImageFit } value - How the image is resized to fit its container, Default value is ImageFit.Cover. - * @returns { ImageAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - objectFit(value: ImageFit | undefined): this; - /** - * Sets the transformation matrix of the image. - * - * @param { ImageMatrix } matrix - * @returns { ImageAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - imageMatrix(matrix: ImageMatrix | undefined): this; - /** - * Set the repeat style of the picture - * - *

NOTE: - *
This attribute is not applicable to SVG images. - *
This attribute does not take effect when the parameter type of the component is AnimatedDrawableDescriptor. - *

- * - * @param { ImageRepeat } value - How the image is repeated, Default value is ImageRepeat.NoRepeat. - * @returns { ImageAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - objectRepeat(value: ImageRepeat | undefined): this; - /** - * Specifies whether to resize the image source based on the size of the display area during image decoding. - * - *

NOTE: - *
This attribute does not take effect when the parameter type of the component is AnimatedDrawableDescriptor - * or SVG. - *

- * - * @param { boolean } value - Whether to resize the image source based on the size of the display area - * during image decoding, Default value is false. - * @returns { ImageAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - autoResize(value: boolean | undefined): this; - /** - * Sets the rendering mode of the image. - * - *

NOTE: - *
This attribute is not applicable to SVG images. - *
When ColorFilter is set, this attribute is not effective. - *
This attribute does not take effect when the parameter type of the component is AnimatedDrawableDescriptor. - *

- * - * @param { ImageRenderMode } value - Rendering mode of the image, Default value is ImageRenderMode.Original. - * @returns { ImageAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - renderMode(value: ImageRenderMode | undefined): this; - /** - * Sets the dynamic range of the image to be displayed. - * - *

NOTE: - *
This attribute is not applicable to SVG images. - *

- * - * @param { DynamicRangeMode } value - Dynamic range of the image. - * @returns { ImageAttribute } Returns the instance of the ImageAttribute, Default value is - * dynamicRangeMode.Standard. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - dynamicRangeMode(value: DynamicRangeMode | undefined): this; - /** - * Sets the interpolation effect of the image, which can alleviate aliasing that occurs when the image is zoomed. - * - *

NOTE: - *
This attribute is not applicable to SVG images. - *
This attribute does not take effect when the parameter type of the component is AnimatedDrawableDescriptor. - *

- * - * @param { ImageInterpolation } value - Interpolation effect of the image, Default value is ImageInterpolation.Low. - * @returns { ImageAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - interpolation(value: ImageInterpolation | undefined): this; - /** - * Sets the decoding size of the image. - * The original picture is decoded into a picture of a specified size. The unit of the number type is px. - * Anonymous Object Rectification. - * - *

NOTE: - *
This attribute works only when the target size is smaller than the source size. - *
This attribute is not applicable to SVG images or PixelMap objects. - *
This attribute does not take effect when the parameter type of the component is AnimatedDrawableDescriptor. - *

- * - * @param { ImageSourceSize } value - Decoding size of the image. - * @returns { ImageAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - sourceSize(value: ImageSourceSize | undefined): this; - /** - * Specifies whether to load the image synchronously. - * - *

NOTE: - *
This attribute does not take effect when the parameter type of the component is AnimatedDrawableDescriptor. - *

- * - * @param { boolean } value - Whether to load the image synchronously, Default value is false. - * @returns { ImageAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - syncLoad(value: boolean | undefined): this; - /** - * Sets the color filter for the image. - * - *

NOTE: - *
When this attribute is set, renderMode is not effective. - *

- * - * @param { ColorFilter | DrawingColorFilter } value - Color filter of the image. - * @returns { ImageAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - colorFilter(value: ColorFilter | DrawingColorFilter | undefined): this; - /** - * Whether the image can be copied. - * - * NOTE: - *
SVG images cannot be copied. - *
This attribute does not take effect when the parameter type of the component is AnimatedDrawableDescriptor. - *

- * - * @param { CopyOptions } value - Specifies whether the image can be copied, Default value is CopyOptions.None. - * @returns { ImageAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - copyOption(value: CopyOptions | undefined): this; - /** - * Specifies whether the image is draggable. - * - *

NOTE: - *
This attribute cannot be used together with the onDragStart event. - *

- * - * @param { boolean } value - Whether the image is draggable, Default value is true. - * @returns { ImageAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - draggable(value: boolean | undefined): this; - /** - * Defines the PointLight - * - * @param { PointLightStyle } value - The point light style. - * @returns { ImageAttribute } The attribute of the image. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 20 - */ - pointLight(value: PointLightStyle | undefined): this; - /** - * SVG anti-aliasing. - * The range of the parameter values is (0.333, 1.333]. - * Default value is 0.0. - * - * @param { number } value - The degree of anti-aliasing. - * @returns { ImageAttribute } The attribute of the image. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 20 - */ - edgeAntialiasing(value: number | undefined): this; - /** - * This callback is triggered when an image is successfully loaded. - * The size of the image source that is successfully loaded is returned, in pixels. - * - * @param { ImageOnCompleteCallback } callback - * @returns { ImageAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onComplete(callback: ImageOnCompleteCallback | undefined): this; - /** - * Triggered when an error occurs during image loading. - * The field of "message" carries the detailed information of failed image loading. - * - *

NOTE: - *
This event is not triggered if the parameter type of the component is AnimatedDrawableDescriptor. - *

- * - * @param { ImageErrorCallback } callback - * @returns { ImageAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onError(callback: ImageErrorCallback | undefined): this; - /** - * When the loaded source file is a svg image, this callback is triggered when the playback of the svg image is complete. - * If the svg image is a wireless loop image, this callback is not triggered. - * - *

NOTE: - *
Only SVG images are supported. - *
This event is not triggered if the parameter type of the component is AnimatedDrawableDescriptor. - *

- * - * @param { function } event - * @returns { ImageAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onFinish(event: (() => void) | undefined): this; - /** - * Sets whether to enable the AI analyzer - * - *

NOTE: - *
This attribute cannot be used together with the overlay attribute. If they are set at the same time, - * the CustomBuilder attribute in overlay has no effect. This attribute depends on device capabilities. - *
Images to be analyzed must be static, non-vector images. That is, SVG and GIF images cannot be analyzed. - * Pixel maps in RGBA_8888 format can be passed in for analysis. - *
The placeholder images (specified by alt) cannot be analyzed. An image can be analyzed only when - * objectRepeat is set to ImageRepeat.NoRepeat and obscured is disabled. - *
Analysis is performed based on the complete original image. If the clip, margin, borderRadius, - * position, or objectFit attribute is set, the image is not displayed completely. - * If renderMode is used to apply a mask, analysis is still performed based on the complete original image. - * The copyOption attribute does not affect the AI analyzer. - *
This attribute does not take effect when the parameter type of the component is AnimatedDrawableDescriptor. - *
The ohos.permission.INTERNET permission must be declared. - *

- * - * @param { boolean} enable - Whether to enable the AI analyzer, Default value is false. - * @returns { ImageAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - enableAnalyzer(enable: boolean | undefined): this; - /** - * Set image analyzer with config. - * - * @param { ImageAnalyzerConfig } config - * @returns { ImageAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 20 - */ - analyzerConfig(config: ImageAnalyzerConfig | undefined): this; - /** - * Sets the resizable image options. - * - *

NOTE: - *
Resizing is effective for drag previews and placeholder images. - *
When ResizableOptions is set to a valid value, the objectRepeat attribute does not take effect. - *
When the sum of the values of top and bottom is greater than the source image height, - * or the sum of the values of left and right is greater than the source image width, - * the ResizableOptions attribute does not take effect. - *
This attribute does not take effect when the parameter type of the component is AnimatedDrawableDescriptor - * or SVG. - *

- * - * @param { ResizableOptions } value - Resizable image options. - * @returns { ImageAttribute } Returns the instance of the ImageAttribute. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - resizable(value: ResizableOptions | undefined): this; - /** - * Set the quality enhancement level of image. - * - * @param { boolean } supported - Whether to support sensitive privacy information. - * @returns { ImageAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - privacySensitive(supported: boolean | undefined): this; - /** - * Set the quality enhancement level of image. - * - * @param { ResolutionQuality } imageQuality - * @returns { ImageAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 20 - */ - enhancedImageQuality(imageQuality: ResolutionQuality | undefined): this; - /** - * Sets the display orientation of the image content. - * - * @param { ImageRotateOrientation } orientation - Display orientation of the image content, Default value - * is ImageRotateOrientation.UP. - * @returns { ImageAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - orientation(orientation: ImageRotateOrientation | undefined): this; - attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; -} -/** - * @typedef { function } ImageErrorCallback - * @param { ImageError } error - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export type ImageErrorCallback = (error: ImageError) => void; -/** - * ImageOnCompleteCallback - * - * @typedef { function } ImageOnCompleteCallback - * @param { ImageCompleteEvent } loadEvent - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export type ImageOnCompleteCallback = (loadEvent?: ImageCompleteEvent) => void; -/** - * @interface ImageError - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface ImageError { - /** - * Component width. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - componentWidth: number; - /** - * Component height. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - componentHeight: number; - /** - * Message. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - message: string; - /** - * Business Error. - * - * @type { ?BusinessError } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - error?: BusinessError; -} -/** - * Image resizable options - * - * @interface ResizableOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface ResizableOptions { - /** - * Image slice widths. - * - * @type { ?EdgeWidths } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - slice?: EdgeWidths; - /** - * Image lattice. - * - * @type { ?DrawingLattice } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - lattice?: DrawingLattice; -} -export declare function Image(src: PixelMap | ResourceStr | DrawableDescriptor | ImageContent | PixelMap | ResourceStr | DrawableDescriptor, imageAIOptions?: ImageAIOptions, -@memo -content_?: () => void): ImageAttribute; diff --git a/api/arkui/component/imageAnimator.static.d.ets b/api/arkui/component/imageAnimator.static.d.ets deleted file mode 100644 index 9c0e461708ba32fc98a7d112faefd4f40bc52831..0000000000000000000000000000000000000000 --- a/api/arkui/component/imageAnimator.static.d.ets +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -'use static'; - -/** - * @file - * @kit ArkUI - * @arkts static - */ -import { Resource } from '../../global/resource'; -import { CommonMethod, PixelMap } from './common'; -import { AnimationStatus, FillMode } from './enums'; -import { memo, ComponentBuilder } from './../stateManagement/runtime'; -import { AttributeModifier, CommonMethod } from './common'; -import { memo, ComponentBuilder } from './../stateManagement/runtime'; -import { AttributeModifier, CommonMethod } from './common'; -/** - * Defines the ImageFrameInfo Interface. - * - * @interface ImageFrameInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export interface ImageFrameInfo { - /** - * Image path - * - * @type { string | Resource | PixelMap } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - src: string | Resource | PixelMap; - /** - * Image width - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - width?: number | string; - /** - * Image height - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - height?: number | string; - /** - * Vertical coordinate of the image relative to the upper left corner of the component - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - top?: number | string; - /** - * Horizontal coordinate of the image relative to the upper left corner of the component - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - left?: number | string; - /** - * Playback duration of this image frame, in milliseconds. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - duration?: number; -} -export declare interface ImageAnimatorAttribute extends CommonMethod { - /** - * Sets the image frame information. - * - *

NOTE: - *
Dynamic update is not supported. - *

- * - * @param { Array } value - Image frame informatio, Default value is []. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - images(value: Array | undefined): this; - /** - * Sets the playback state of the animation. - * - * @param { AnimationStatus } value - Playback state of the animation, Default value is AnimationStatus.Initial. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - state(value: AnimationStatus | undefined): this; - /** - * Sets the playback duration. - * The unit is millisecond. - * - *

NOTE: - *
This attribute does not take effect when a separate duration is set for any of the image frames. - *

- * - * @param { number } value - Playback duration, Default value is 1000. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - duration(value: number | undefined): this; - /** - * Sets the playback direction. - * - * @param { boolean } value - Playback direction, Default value is false. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - reverse(value: boolean | undefined): this; - /** - * Sets whether the image size is fixed at the component size. - * - * @param { boolean } value - Whether the image size is fixed at the component size, Default value is true. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - fixedSize(value: boolean | undefined): this; - /** - * Sets the status before and after execution of the animation in the current playback direction. - * - * @param { FillMode } value - Status before and after execution of the animation in the current playback direction, - * Default value is FillMode.Forwards. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - fillMode(value: FillMode | undefined): this; - /** - * Sets the number of times that the animation is played. - * Played once by default - * - * @param { number } value - Number of times that the animation is played, Default value is 1. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - iterations(value: number | undefined): this; - /** - * Sets whether the component should automatically pause or resume based on its visibility, using the system's - * onVisibleAreaChange event. - * - * @param { boolean } monitorInvisibleArea - Whether the component should automatically pause or resume based on - * its visibility, using the system's onVisibleAreaChange event, Default value is false. - * @returns { ImageAnimatorAttribute } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - monitorInvisibleArea(monitorInvisibleArea: boolean | undefined): this; - /** - * Status callback, which is triggered when the animation starts to play. - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onStart(event: (() => void) | undefined): this; - /** - * Status callback, which is triggered when the animation pauses. - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onPause(event: (() => void) | undefined): this; - /** - * Status callback, triggered when the animation is replayed - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onRepeat(event: (() => void) | undefined): this; - /** - * Status callback, which is triggered when the animation playback returns to the initial state. - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onCancel(event: (() => void) | undefined): this; - /** - * Status callback, which is triggered when the animation playback is complete or stopped. - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onFinish(event: (() => void) | undefined): this; - attributeModifier( - modifier: AttributeModifier | AttributeModifier | undefined): this; -} -export declare function ImageAnimator( -@memo -content_?: () => void): ImageAnimatorAttribute; diff --git a/api/arkui/CounterModifier.static.d.ets b/api/arkui/component/imageCommon.d.ets similarity index 44% rename from api/arkui/CounterModifier.static.d.ets rename to api/arkui/component/imageCommon.d.ets index 6e7332acc7205d011143f6eb78b6b2fa52b4d845..a6a2bae70bd3713625c89ceb5b43880e70062a9c 100644 --- a/api/arkui/CounterModifier.static.d.ets +++ b/api/arkui/component/imageCommon.d.ets @@ -1,10 +1,10 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"), + * Copyright (c) 2024-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -12,22 +12,28 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * @file * @kit ArkUI * @arkts 1.2 */ -import { AttributeModifier } from './component/common'; -import { CounterAttribute } from './component/counter'; -/** - * Defines Counter Modifier - * - * @extends CounterAttribute - * @implements { AttributeModifier } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare class CounterModifier extends CounterAttribute implements AttributeModifier {} +// WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION! + +import { memo, ComponentBuilder, __memo_context_type, __memo_id_type } from './../stateManagement/runtime' +export enum ImageAnalyzerType { + SUBJECT = 0, + TEXT = 1, + OBJECT_LOOKUP = 2 +} +export interface ImageAnalyzerController { + getImageAnalyzerSupportTypes(): Array +} +export interface ImageAnalyzerConfig { + types: Array; +} +export interface ImageAIOptions { + types?: Array; + aiController?: ImageAnalyzerController; +} diff --git a/api/arkui/component/imageCommon.static.d.ets b/api/arkui/component/imageCommon.static.d.ets deleted file mode 100644 index 04a4b5d397275bf3486dba62ca13acb7ccf45100..0000000000000000000000000000000000000000 --- a/api/arkui/component/imageCommon.static.d.ets +++ /dev/null @@ -1,119 +0,0 @@ -'use static'; -/* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -'use static'; - -/** - * @file - * @kit ArkUI - * @arkts static - */ - -/** - * Defines the image analyze type. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare enum ImageAnalyzerType { - /** - * Image analyze type subject. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - SUBJECT = 0, - /** - * Image analyze type text. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - TEXT, - /** - * Image analyze type object lookup. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - OBJECT_LOOKUP -} -/** - * Image analyzer controller. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare class ImageAnalyzerController { - /** - * Constructor. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - constructor(); - /** - * Get image analyzer support types. - * - * @returns { ImageAnalyzerType[] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - getImageAnalyzerSupportTypes(): ImageAnalyzerType[]; -} -/** - * Image analyzer config. - * - * @interface ImageAnalyzerConfig - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface ImageAnalyzerConfig { - /** - * Image analyze types. - * - * @type { ImageAnalyzerType[] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - types: ImageAnalyzerType[]; -} -/** - * Image ai options. - * - * @interface ImageAIOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface ImageAIOptions { - /** - * Image analyze types. - * - * @type { ?ImageAnalyzerType[] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - types?: ImageAnalyzerType[]; - /** - * Image analyze types. - * - * @type { ?ImageAnalyzerController } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - aiController?: ImageAnalyzerController; -} diff --git a/api/arkui/component/loadingProgress.static.d.ets b/api/arkui/component/loadingProgress.static.d.ets deleted file mode 100644 index 4c5bf43ad7d147d96652f3458a532c1c4c5feb3d..0000000000000000000000000000000000000000 --- a/api/arkui/component/loadingProgress.static.d.ets +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -'use static'; - -/** - * @file - * @kit ArkUI - * @arkts static - */ -import { CommonMethod, ContentModifier, CommonConfiguration } from './common'; -import { ResourceColor } from './units'; -import { memo, ComponentBuilder } from './../stateManagement/runtime'; -import { AttributeModifier, CommonMethod } from './common'; -import { memo, ComponentBuilder } from './../stateManagement/runtime'; -import { AttributeModifier, CommonMethod } from './common'; -/** - * Load style of progress bar. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare enum LoadingProgressStyle { - /** - * Default style. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - Default, - /** - * Announcement style. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - Circular, - /** - * The style of the track. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - Orbital -} -export declare interface LoadingProgressAttribute extends CommonMethod { - /** - * Load the color of the progress bar. - * - * @param { ResourceColor } value - * @returns { LoadingProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - color(value: ResourceColor | undefined): this; - /** - * Whether to display the LoadingProgress content. - * - * @param { boolean } value - indicates the state of LoadingProgress content - * @returns { LoadingProgressAttribute } the attribute of the LoadingProgress. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - enableLoading(value: boolean | undefined): this; - /** - * Set the content modifier of loadingProgress. - * - * @param { ContentModifier } modifier - The contentModifier of LoadingProgress. - * @returns { LoadingProgressAttribute} the attribute of the loading progress - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - contentModifier(modifier: ContentModifier | undefined): this; - attributeModifier( - modifier: AttributeModifier | AttributeModifier | undefined): this; -} -/** - * LoadingProgressConfiguration used by LoadingProgress contentModifier - * - * @extends CommonConfiguration - * @interface LoadingProgressConfiguration - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface LoadingProgressConfiguration extends CommonConfiguration { - /** - * Whether to enable the LoadingProgress content. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - enableLoading: boolean; -} -/** - * @param { () => void } content_ - * @returns { LoadingProgressAttribute } - */ -export declare function LoadingProgress( - content_?: () => void -): LoadingProgressAttribute; diff --git a/api/arkui/component/patternLock.static.d.ets b/api/arkui/component/patternLock.static.d.ets deleted file mode 100644 index b03e435b43eb2fc36eec377df2e3b11ff5357c12..0000000000000000000000000000000000000000 --- a/api/arkui/component/patternLock.static.d.ets +++ /dev/null @@ -1,255 +0,0 @@ -/* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -'use static'; - -/** - * @file - * @kit ArkUI - * @arkts static - */ -import { ResourceColor, Length } from './units'; -import { LengthMetrics } from '../Graphics'; -import { CommonMethod, Callback, Optional } from './common'; -import { memo, ComponentBuilder } from './../stateManagement/runtime'; -import { AttributeModifier, CommonMethod } from './common'; -import { memo, ComponentBuilder } from './../stateManagement/runtime'; -import { AttributeModifier, CommonMethod } from './common'; -/** - * The challenge result based on input pattern for control pattern lock component. - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare enum PatternLockChallengeResult { - /** - * The challenge result is correct. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - CORRECT = 1, - /** - * The challenge result is wrong. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - WRONG = 2 -} -/** - * Defines the options of active circle style. - * - * @interface CircleStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface CircleStyleOptions { - /** - * The circle color when cell is active state. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - color?: ResourceColor; - /** - * The circle radius when cell is active state. - * - * @type { ?LengthMetrics } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - radius?: LengthMetrics; - /** - * Enable the wave effect when cell is active. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - enableWaveEffect?: boolean; - /** - * Enable the activity circle style displayed in the foreground. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - enableForeground?: boolean; -} -/** - * Provides methods for control pattern lock component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare class PatternLockController { - /** - * A constructor used to create a PatternLockController instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - constructor(); - /** - * Reset pattern lock. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - reset(): void; - /** - * Sets the authentication challenge result for the pattern password. - * @param { PatternLockChallengeResult } result - Authentication challenge result of the pattern password. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - setChallengeResult(result: PatternLockChallengeResult): void; -} -export declare interface PatternLockAttribute extends CommonMethod { - /** - * Sets the width and height (same value) of the component. - * - *

NOTE: - *
If this attribute is set to 0 or a negative number, the component is not displayed. - *

- * - * @param { Length } value - Width and height of the component, Default value is 288vp. - * @returns { PatternLockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - sideLength(value: Length | undefined): this; - /** - * Sets the radius of the dots in a grid. - * - *

NOTE: - *
If this attribute is set to 0 or a negative value, the default value is used. - *

- * - * @param { Length } value - Radius of the dots in a grid, Default value is 6vp. - * @returns { PatternLockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - circleRadius(value: Length | undefined): this; - /** - * Sets the background color. - * - * @param { ResourceColor } value - Background color. - * @returns { PatternLockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - backgroundColor(value: ResourceColor | undefined): this; - /** - * Sets the fill color of the grid dot in the unselected state. - * - * @param { ResourceColor } value - Fill color of the grid dot in the unselected state, Default value is '#ff182431'. - * @returns { PatternLockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - regularColor(value: ResourceColor | undefined): this; - /** - * Sets the fill color of the grid dot in the selected state. - * - * @param { ResourceColor } value - Fill color of the grid dot in the selected state, Default value is '#ff182431'. - * @returns { PatternLockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - selectedColor(value: ResourceColor | undefined): this; - /** - * Sets the fill color of the grid dot in the activated state, which is when the dot is highlighted but not selected. - * - * @param { ResourceColor } value - Fill color of the grid dot in the activated state, Default value is '#ff182431'. - * @returns { PatternLockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - activeColor(value: ResourceColor | undefined): this; - /** - * Sets the path color. - * - * @param { ResourceColor } value - Path color, Default value is '#33182431'. - * @returns { PatternLockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - pathColor(value: ResourceColor | undefined): this; - /** - * Sets the width of the path stroke. - * - *

NOTE: - *
If this attribute is set to **0** or a negative value, the path stroke is not displayed. - *

- * - * @param { number | string } value - Width of the path stroke, Default value is 12vp. - * @returns { PatternLockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - pathStrokeWidth(value: number | string | undefined): this; - /** - * Invoked when the pattern password input is complete. - * - * @param { function } callback - * @returns { PatternLockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onPatternComplete(callback: ((input: Array) => void) | undefined): this; - /** - * Sets whether to allow the user to reset the component status (that is, clear the input) by touching the component - * again after the input is complete. - * - * @param { boolean } value - Whether to allow the user to reset the component status (that is, clear the input) by - * touching the component again after the input is complete, Default value is true. - * @returns { PatternLockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - autoReset(value: boolean | undefined): this; - /** - * Called when connecting to a grid dot. - * @param { Callback } callback - A callback instance used when connection to a grid dot. - * @returns { PatternLockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onDotConnect(callback: Callback | undefined): this; - /** - * Sets the background circle style for the dots in a grid when they are in the activated state. - * - * @param { Optional } options - Background circle style of the dots in the activated state. - * @returns { PatternLockAttribute } PatternLockAttribute - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - activateCircleStyle(options: CircleStyleOptions | undefined): this; - /** - * Sets whether unselected dots in the grid are automatically selected when the password path passes over them. - * - * @param { boolean } skipped - Whether unselected dots in the grid are automatically selected when the password - * path passes over them, Default value is false. - * @returns { PatternLockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - skipUnselectedPoint(skipped: boolean | undefined): this; - attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; -} -export declare function PatternLock(controller?: PatternLockController, -@memo -content_?: () => void): PatternLockAttribute; diff --git a/api/arkui/component/progress.d.ets b/api/arkui/component/progress.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..e901a518f577198dfd2afd3b0dbdd9cc6fd44909 --- /dev/null +++ b/api/arkui/component/progress.d.ets @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2024-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ + + +// WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION! + +import { memo, ComponentBuilder, __memo_context_type, __memo_id_type } from './../stateManagement/runtime' +import { Length, PX, VP, LPX, ResourceColor, Font, VisualEffect, Filter, UniformDataType, Blender, SizeOptions, ConstraintSizeOptions, ChainWeightOptions, Padding, LocalizedPadding, Margin, LocalizedMargin, Position, BorderOptions, EdgeStyles, EdgeWidths, LocalizedEdgeWidths, EdgeColors, LocalizedEdgeColors, BorderRadiuses, LocalizedBorderRadiuses, OutlineOptions, EdgeOutlineStyles, Dimension, EdgeOutlineWidths, OutlineRadiuses, Area, Edges, LocalizedEdges, LocalizedPosition, ResourceStr, AccessibilityOptions, PixelMap } from './units' +import { Resource } from './../../../api/global/resource' +import { CommonMethod, DrawModifier, Rectangle, Callback_Array_TouchTestInfo_TouchResult, TouchTestInfo, TouchResult, PixelRoundPolicy, BackgroundEffectOptions, ForegroundEffectOptions, BorderImageOption, OutlineStyle, Callback_ClickEvent_Void, ClickEvent, Callback_Boolean_HoverEvent_Void, HoverEvent, AccessibilityCallback, Callback_MouseEvent_Void, MouseEvent, Callback_TouchEvent_Void, TouchEvent, Callback_KeyEvent_Void, KeyEvent, Callback_KeyEvent_Boolean, AnimateParam, TransitionOptions, TransitionEffect, MotionBlurOptions, InvertOptions, TranslateOptions, ScaleOptions, RotateOptions, Callback_Area_Area_Void, Literal_Union_Number_Literal_Number_offset_span_lg_md_sm_xs, Literal_Number_offset_span, AlignRuleOption, LocalizedAlignRuleOptions, ClickEffect, Callback_DragEvent_String_Union_CustomBuilder_DragItemInfo, DragEvent, CustomBuilder, DragItemInfo, Callback_DragEvent_String_Void, Callback_PreDragStatus_Void, PreDragStatus, Type_CommonMethod_linearGradient_value, Tuple_ResourceColor_Number, Type_CommonMethod_sweepGradient_value, Tuple_Length_Length, Type_CommonMethod_radialGradient_value, MotionPathOptions, ShadowOptions, ShadowStyle, ProgressMask, StateStyles, PixelStretchEffectOptions, AttributeModifier, GestureModifier, BackgroundBrightnessOptions, Callback_GestureInfo_BaseGestureEvent_GestureJudgeResult, GestureRecognizerJudgeBeginCallback, ShouldBuiltInRecognizerParallelWithCallback, Callback_TouchEvent_HitTestMode, SizeChangeCallback, SafeAreaType, SafeAreaEdge, Literal_Alignment_align, BlurStyle, BackgroundBlurStyleOptions, ForegroundBlurStyleOptions, TransitionFinishCallback, BlurOptions, LinearGradientBlurOptions, EffectType, sharedTransitionOptions, ChainStyle, DragPreviewOptions, DragInteractionOptions, OverlayOptions, BlendMode, BlendApplyType, GeometryTransitionOptions, PopupOptions, CustomPopupOptions, MenuElement, MenuOptions, ContextMenuOptions, ModalTransition, ContentCoverOptions, SheetOptions, VisibleAreaChangeCallback, ContentModifier, CommonConfiguration } from './common' + +export interface ProgressOptions { + value: number; + total?: number; + style?: ProgressStyle; + type?: ProgressType; +} +export enum ProgressType { + LINEAR = 0, + Linear = 0, + RING = 1, + Ring = 1, + ECLIPSE = 2, + Eclipse = 2, + SCALE_RING = 3, + ScaleRing = 3, + CAPSULE = 4, + Capsule = 4 +} +export enum ProgressStatus { + LOADING = 0, + PROGRESSING = 1 +} +export interface ProgressStyleOptions extends CommonProgressStyleOptions { + strokeWidth?: Length; + scaleCount?: number; + scaleWidth?: Length; +} +export interface CommonProgressStyleOptions { + enableSmoothEffect?: boolean; +} +export interface ScanEffectOptions { + enableScanEffect?: boolean; +} +export interface EclipseStyleOptions extends CommonProgressStyleOptions { +} +export interface ScaleRingStyleOptions extends CommonProgressStyleOptions { + strokeWidth?: Length; + scaleWidth?: Length; + scaleCount?: number; +} +export interface RingStyleOptions extends ScanEffectOptions { + strokeWidth?: Length; + shadow?: boolean; + status?: ProgressStatus; +} +export interface LinearStyleOptions extends ScanEffectOptions { + strokeWidth?: Length; + strokeRadius?: PX | VP | LPX | Resource; +} +export interface CapsuleStyleOptions extends ScanEffectOptions { + borderColor?: ResourceColor; + borderWidth?: Length; + content?: string; + font?: Font; + fontColor?: ResourceColor; + showDefaultPercentage?: boolean; +} +export enum ProgressStyle { + LINEAR = 0, + Linear = 0, + RING = 1, + Ring = 1, + ECLIPSE = 2, + Eclipse = 2, + SCALE_RING = 3, + ScaleRing = 3, + CAPSULE = 4, + Capsule = 4 +} +export interface ProgressStyleMap { +} +export type ProgressInterface = (options: ProgressOptions) => ProgressAttribute; +export interface ProgressAttribute extends CommonMethod { + @memo + value(value: number): this; + @memo + color(value: ResourceColor): this; + @memo + style(value: LinearStyleOptions | RingStyleOptions | CapsuleStyleOptions | ProgressStyleOptions): this; + @memo + privacySensitive(value: boolean | undefined): this; + @memo + contentModifier(value: ContentModifier): this; +} +export interface ProgressConfiguration extends CommonConfiguration { + value: number; + total: number; +} +@memo +@ComponentBuilder +export declare function Progress( + options: ProgressOptions, + @memo + content_?: () => void, +): ProgressAttribute diff --git a/api/arkui/component/progress.static.d.ets b/api/arkui/component/progress.static.d.ets deleted file mode 100644 index bd4cecad830d316f2621131b1205a54a2254e638..0000000000000000000000000000000000000000 --- a/api/arkui/component/progress.static.d.ets +++ /dev/null @@ -1,505 +0,0 @@ -/* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -'use static'; - -/** - * @file - * @kit ArkUI - * @arkts static - */ -import { ResourceColor, Length, PX, VP, LPX, Font, ResourceStr } from './units'; -import { Resource } from '../../global/resource'; -import { CommonMethod, Optional, ContentModifier, CommonConfiguration } from './common'; -import { LinearGradient } from './dataPanel'; -import { LengthMetrics } from '../Graphics'; -import { memo, ComponentBuilder } from './../stateManagement/runtime'; -import { AttributeModifier, CommonMethod } from './common'; -import { memo, ComponentBuilder } from './../stateManagement/runtime'; -import { AttributeModifier, CommonMethod } from './common'; -/** - * Defines the option of Progress. - * - * @interface ProgressOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface ProgressOptions { - /** - * Sets the value of Progress. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - value: number; - /** - * Sets the total of Progress. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - total?: number; - /** - * Sets the type of Progress. - * - * @type { ?ProgressType } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - type?: ProgressType; -} -/** - * Type of progress bar - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare enum ProgressType { - /** - * Linear progress bar style. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - Linear = 0, - /** - * Ring progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - Ring = 1, - /** - * Eclipse progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - Eclipse = 2, - /** - * ScaleRing progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - ScaleRing = 3, - /** - * Capsule progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - Capsule = 4 -} -/** - * Current status of progress bar. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare enum ProgressStatus { - /** - * Loading status. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - LOADING, - /** - * Processing status. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - PROGRESSING -} -/** - * Defines style options for progress component. - * - * @extends CommonProgressStyleOptions - * @interface ProgressStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface ProgressStyleOptions extends CommonProgressStyleOptions { - /** - * Defines the strokeWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - strokeWidth?: Length; - /** - * Defines the scaleCount property. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - scaleCount?: number; - /** - * Defines the scaleWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - scaleWidth?: Length; -} -/** - * Progress common style options. - * - * @interface CommonProgressStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface CommonProgressStyleOptions { - /** - * Enable smooth effect. - * - * @type { ?boolean } - * @default true - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - enableSmoothEffect?: boolean; -} -/** - * Defines the enable scan effect. - * - * @interface ScanEffectOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface ScanEffectOptions { - /** - * Enable scan effect. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - enableScanEffect?: boolean; -} -/** - * Defines the Eclipse style Options. - * - * @extends CommonProgressStyleOptions - * @interface EclipseStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface EclipseStyleOptions extends CommonProgressStyleOptions { -} -/** - * Defines the ScaleRing style Options. - * - * @extends CommonProgressStyleOptions - * @interface ScaleRingStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface ScaleRingStyleOptions extends CommonProgressStyleOptions { - /** - * Defines the strokeWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - strokeWidth?: Length; - /** - * Defines the scaleWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - scaleWidth?: Length; - /** - * Defines the scaleCount property. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - scaleCount?: number; -} -/** - * Defines the ring style Options. - * - * @extends ScanEffectOptions, CommonProgressStyleOptions - * @interface RingStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface RingStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { - /** - * Defines the strokeWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - strokeWidth?: Length; - /** - * Enables progress shadow. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - shadow?: boolean; - /** - * The status of progress, default is PROGRESSING. Set to LOADING status will trigger the loading animation. - * - * @type { ?ProgressStatus } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - status?: ProgressStatus; -} -/** - * Defines the linear style Options. - * - * @extends ScanEffectOptions, CommonProgressStyleOptions - * @interface LinearStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface LinearStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { - /** - * Defines the strokeWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - strokeWidth?: Length; - /** - * Defines the stroke radius property. - * - * @type { ?(PX | VP | LPX | Resource) } - * @default strokeWidth / 2 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - strokeRadius?: PX | VP | LPX | Resource; -} -/** - * Defines the capsule style Options. - * - * @extends ScanEffectOptions, CommonProgressStyleOptions - * @interface CapsuleStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface CapsuleStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { - /** - * Set the inner border color. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - borderColor?: ResourceColor; - /** - * Set the border width. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - borderWidth?: Length; - /** - * Set the text content. - * - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - content?: string; - /** - * Set the text style. - * - * @type { ?Font } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - font?: Font; - /** - * Set the text fontColor. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - fontColor?: ResourceColor; - /** - * show default percentage. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - showDefaultPercentage?: boolean; - /** - * Set border rounded corner radius. - * - * @type { ?LengthMetrics } - * @default height / 2 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - borderRadius?: LengthMetrics; -} -/** - * Type of progress bar - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare enum ProgressStyle { - /** - * Linear progress bar style. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - Linear, - /** - * Ring progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - Ring, - /** - * Eclipse progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - Eclipse, - /** - * ScaleRing progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - ScaleRing, - /** - * Capsule progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - Capsule -} -/** - * Defines the map for progress type and style. - * - * @interface ProgressStyleMap - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ -export declare interface ProgressStyleMap { -} -export declare interface ProgressAttribute extends CommonMethod { - /** - * Called when the current progress value is set. - * - * @param { number } value - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - value(value: number | undefined): this; - /** - * Called when the progress bar foreground is set. - * - * @param { ResourceColor | LinearGradient } value - indicates the color of the progress. - * @returns { ProgressAttribute } the attribute of the progress. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - color(value: ResourceColor | LinearGradient | undefined): this; - /** - * Called when the style of progress bar is set. - * - * @param { LinearStyleOptions | RingStyleOptions | CapsuleStyleOptions | ProgressStyleOptions } value - indicates the style of the progress. - * @returns { ProgressAttribute } the attribute of the progress. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - style(value: LinearStyleOptions | RingStyleOptions | CapsuleStyleOptions | ProgressStyleOptions | undefined): this; - /** - * Sets if mark to privacy sensitive. - * - * @param { Optional } isPrivacySensitiveMode - indicates if mark to privacy sensitive. - * @returns { ProgressAttribute } the attribute of the progress. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - privacySensitive(isPrivacySensitiveMode: boolean | undefined): this; - /** - * Set the contentModifier of progress. - * - * @param { ContentModifier } modifier - The contentModifier of progress. - * @returns { ProgressAttribute } the attribute of the progress. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - contentModifier(modifier: ContentModifier | undefined): this; - attributeModifier( - modifier: AttributeModifier | AttributeModifier | undefined): this; -} -/** - * ProgressConfiguration used by progress contentModifier - * - * @extends CommonConfiguration - * @interface ProgressConfiguration - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface ProgressConfiguration extends CommonConfiguration { - /** - * The value of Progress. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - value: number; - /** - * The total of Progress. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - total: number; -} -export declare function Progress(options: ProgressOptions, -@memo -content_?: () => void): ProgressAttribute; diff --git a/api/arkui/component/qrcode.static.d.ets b/api/arkui/component/qrcode.static.d.ets deleted file mode 100644 index a599442f4713347020e61204c4f8eb407112463c..0000000000000000000000000000000000000000 --- a/api/arkui/component/qrcode.static.d.ets +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -'use static'; - -/** - * @file - * @kit ArkUI - * @arkts static - */ -import { CommonMethod } from './common'; -import { ResourceColor, ResourceStr } from './units'; -import { Resource } from '../../global/resource'; -import { memo, ComponentBuilder } from './../stateManagement/runtime'; -import { AttributeModifier, CommonMethod } from './common'; -import { memo, ComponentBuilder } from './../stateManagement/runtime'; -import { AttributeModifier, CommonMethod } from './common'; -export declare interface QRCodeAttribute extends CommonMethod { - /** - * Called when the QR code color is set. - * - * @param { ResourceColor } value - * @returns { QRCodeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - color(value: ResourceColor | undefined): this; - /** - * Called when setting the QR code background color. - * - * @param { ResourceColor } value - * @returns { QRCodeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - backgroundColor(value: ResourceColor | undefined): this; - /** - * Set the opacity of the QR code content color. - * @param { number | Resource } value - indicates the opacity of the QR code content color. The value is between 0 and 1, with a default value of 1. - * @returns { QRCodeAttribute } the attribute of the QR code - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - contentOpacity(value: number | Resource | undefined): this; - attributeModifier( - modifier: AttributeModifier | AttributeModifier | undefined): this; -} -export declare function QRCode(value: string, -@memo -content_?: () => void): QRCodeAttribute; diff --git a/api/arkui/component/textClock.static.d.ets b/api/arkui/component/textClock.static.d.ets deleted file mode 100644 index 747432ddf873b788801784758cb9bc7481e8c57d..0000000000000000000000000000000000000000 --- a/api/arkui/component/textClock.static.d.ets +++ /dev/null @@ -1,257 +0,0 @@ -/* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -'use static'; - -/** - * @file - * @kit ArkUI - * @arkts static - */ -import { CommonConfiguration, CommonMethod, ShadowOptions, ContentModifier, Optional, DateTimeOptions } from './common'; -import { ResourceColor, Length, ResourceStr } from './units'; -import { FontStyle, FontWeight } from './enums'; -import { memo, ComponentBuilder } from './../stateManagement/runtime'; -import { AttributeModifier, CommonMethod } from './common'; -import { memo, ComponentBuilder } from './../stateManagement/runtime'; -import { AttributeModifier, CommonMethod } from './common'; -/** - * Provides a way to control the textclock status. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare class TextClockController { - /** - * constructor. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - constructor(); - /** - * Provides a start event for textclock. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - start(): void; - /** - * Provides a stop event for textclock. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - stop(): void; -} -/** - * TextClockConfiguration used by text clock content modifier - * - * @extends CommonConfiguration - * @interface TextClockConfiguration - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface TextClockConfiguration extends CommonConfiguration { - /** - * Specifies the current time zone. - * The valid value is an integer ranging from - 14 to 12, - * Where a negative value indicates the eastern time zone, for example, -8. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - timeZoneOffset: number; - /** - * TextClock is started or not. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - started: boolean; - /** - * The time of the TextClock. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - timeValue: number; -} -/** - * Options to construct TextClock component. - * - * @interface TextClockOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface TextClockOptions { - /** - * Time zone offset. - * Anonymous Object Rectification. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - timeZoneOffset?: number; - /** - * TextClock controller. - * Anonymous Object Rectification. - * - * @type { ?TextClockController } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - controller?: TextClockController; -} -export declare interface TextClockAttribute extends CommonMethod { - /** - * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". - * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), - * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), - * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). - * The default value is "hh:mm:ss" when TextClock is not in a form. - * The default value is "hh:mm" when TextClock is in a form. - * If the value has second or millisecond, the value will be set to the default value. - * - * @param { ResourceStr } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - format(value: ResourceStr | undefined): this; - /** - * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". - * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), - * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), - * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). - * The default value is "hh:mm:ss" when TextClock is not in a form. - * The default value is "hh:mm" when TextClock is in a form. - * If the value has second or millisecond, the value will be set to the default value. - * - * @param { string } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - format(value: string | undefined): this; - /** - * Provides a date change callback. - * The callback parameter is Unix Time Stamp, - * The number of milliseconds that have elapsed since January 1, 1970 (UTC). - * The minimum callback interval for this event default is seconds when TextClock is not in a form. - * The minimum callback interval for this event is minutes when TextClock is in a form. - * If visibility is Hidden the callback be disabled when TextClock is in a form. - * You can listen to this callback, - * Use the format attribute method to customize data display in the callback. - * - * @param { function } event - Listening date event callback. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onDateChange(event: ((value: number) => void) | undefined): this; - /** - * Called when the value of TextClock fontColor is set - * - * @param { ResourceColor } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - fontColor(value: ResourceColor | undefined): this; - /** - * Called when the value of TextClock fontSize is set - * - * @param { Length } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - fontSize(value: Length | undefined): this; - /** - * Called when the value of TextClock fontStyle is set - * - * @param { FontStyle } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - fontStyle(value: FontStyle | undefined): this; - /** - * Called when the value of TextClock fontWeight is set - * - * @param { number | FontWeight | string } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - fontWeight(value: number | FontWeight | string | undefined): this; - /** - * Called when the value of TextClock fontFamily is set - * - * @param { ResourceStr } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - fontFamily(value: ResourceStr | undefined): this; - /** - * Called when the text shadow is set. - * - * @param { ShadowOptions | Array } value - The shadow options. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - textShadow(value: ShadowOptions | Array | undefined): this; - /** - * Called when the text fontFeature is set. - * - * @param { string } value - The fontFeature. - * normal | , - * where = [ | on | off ], like: "ss01" 0 - * number of can be single or multiple, and separated by comma ','. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - fontFeature(value: string | undefined): this; - /** - * Set the content modifier of textclock. - * - * @param { ContentModifier } modifier - The content modifier of textclock. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - contentModifier(modifier: ContentModifier | undefined): this; - /** - * Set hour format - * - * @param { Optional } dateTimeOptions - Indicates whether a leading 0 is required for the hour. - * @returns { TextClockAttribute } the attribute of the text clock - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - dateTimeOptions(dateTimeOptions: DateTimeOptions | undefined): this; - attributeModifier( - modifier: AttributeModifier | AttributeModifier | undefined): this; -} -export declare function TextClock(options?: TextClockOptions, -@memo -content_?: () => void): TextClockAttribute; diff --git a/api/arkui/component/textPicker.static.d.ets b/api/arkui/component/textPicker.static.d.ets index 145bfd1d026c18a39acf5068ccb92e4dc1f10b99..c3dbc6fb75acae0666f025c65b4f41f8897b52dd 100644 --- a/api/arkui/component/textPicker.static.d.ets +++ b/api/arkui/component/textPicker.static.d.ets @@ -12,21 +12,22 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -'use static'; +use static; /** * @file * @kit ArkUI * @arkts static */ -import { Resource } from '../../global/resource'; -import { ResourceColor, Offset, Dimension, ResourceStr } from './units'; +import { Resource, ResourceColor, Offset, Dimension, ResourceStr } from "./units"; import { CommonMethod, PickerTextStyle, PickerDialogButtonStyle, Rectangle, BlurStyle, ShadowOptions, ShadowStyle, HoverModeAreaType, BackgroundBlurStyleOptions, BackgroundEffectOptions, Optional, Callback, Bindable, BindableResourceStr, BindableResourceStrArray } from './common'; -import { DialogAlignment } from './alertDialog'; -import { CrownSensitivity, TextOverflow } from './enums'; +import { DialogAlignment } from "./alertDialog"; +import { CrownSensitivity, TextOverflow } from "./enums"; import { LengthMetrics } from './../Graphics'; -import { memo, ComponentBuilder } from './../stateManagement/runtime'; -import { AttributeModifier } from './common'; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; +import { AttributeModifier, CommonMethod } from "./common"; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; +import { AttributeModifier, CommonMethod } from "./common"; /** * Define the contents of each selector item. * diff --git a/api/arkui/component/textTimer.static.d.ets b/api/arkui/component/textTimer.static.d.ets deleted file mode 100644 index f401fd2d3635bc68106c462235829b834f0fefac..0000000000000000000000000000000000000000 --- a/api/arkui/component/textTimer.static.d.ets +++ /dev/null @@ -1,274 +0,0 @@ -/* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -'use static'; - -/** - * @file - * @kit ArkUI - * @arkts static - */ -import { CommonConfiguration, CommonMethod, ShadowOptions, ContentModifier } from './common'; -import { ResourceColor, Length, ResourceStr } from './units'; -import { FontStyle, FontWeight } from './enums'; -import { memo, ComponentBuilder } from './../stateManagement/runtime'; -import { AttributeModifier, CommonMethod } from './common'; -import { memo, ComponentBuilder } from './../stateManagement/runtime'; -import { AttributeModifier, CommonMethod } from './common'; -/** - * Provides a way to control the process. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare class TextTimerController { - /** - * constructor. - * A constructor used to create a TextTimerController object. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - constructor(); - /** - * Provides a start event for timer. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - start(): void; - /** - * Provides a pause event for timer. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - pause(): void; - /** - * Provides an event to reset timer. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - reset(): void; -} -/** - * TextTimerConfiguration used by content modifier. - * - * @extends CommonConfiguration - * @interface TextTimerConfiguration - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface TextTimerConfiguration extends CommonConfiguration { - /** - * Timer duration, in milliseconds. - * It is effective only when isCountDown is true. - * The maximum value is 86400000 ms (24 hours). - * - *

NOTE: - *
If the value is between 0 and 86,400,000, it is used as the initial countdown time. - *
Otherwise, the default value is used as the initial countdown time. - *

- * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - count: number; - /** - * Whether the timer is a countdown. - * The value true means that the timer counts down, - * and false means that the timer counts up. - * - * @type { boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - isCountDown: boolean; - /** - * Whether the timer has already started. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - started: boolean; - /** - * Elapsed time of the timer, in the minimum unit of the format. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - elapsedTime: number; -} -/** - * Parameters of the TextTimer component. - * - * @interface TextTimerOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export interface TextTimerOptions { - /** - * Whether the timer is a countdown. - * The value true means that the timer counts down, - * and false means that the timer counts up. - * - * @type { ?boolean } - Default value: false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - isCountDown?: boolean; - /** - * Timer duration, in milliseconds. - * It is effective only when isCountDown is true. - * The maximum value is 86400000 ms (24 hours). - * - *

NOTE: - *
If the value is between 0 and 86,400,000, it is used as the initial countdown time. - *
Otherwise, the default value is used as the initial countdown time. - *

- * - * @type { ?number } - Default value: 60000 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - count?: number; - /** - * TextTimer controller. - * - * @type { ?TextTimerController } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - controller?: TextTimerController; -} -export declare interface TextTimerAttribute extends CommonMethod { - /** - * Sets the custom format. - * The value must contain at least one of the following keywords: HH, mm, ss, and SS. - * - *

NOTE: - *
If the specified date format is yy, MM, or dd, the default value is used instead. - *

- * - * @param { string } value - Custom format.Default value: 'HH:mm:ss.SS' - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - format(value: string | undefined): this; - /** - * Sets the font color. - * - * @param { ResourceColor } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - fontColor(value: ResourceColor | undefined): this; - /** - * Sets the font size. - * - * @param { Length } value - Font size.The default font size is 16 fp. - *
If fontSize is of the number type, the unit fp is used. - *
The value cannot be a percentage. - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - fontSize(value: Length | undefined): this; - /** - * Sets the font style. - * - * @param { FontStyle } value - Font style.Default value: FontStyle.Normal - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - fontStyle(value: FontStyle | undefined): this; - /** - * Sets the font weight. - * - *

NOTE: - *
If the value is too large, the text may be clipped depending on the font. - *

- * - * @param { number | FontWeight | ResourceStr } value - Font weight. - *
For the number type, Value range: [100, 900], at an interval of 100.The default value is 400. - *
A larger value indicates a heavier font weight. - *
For the string type, only strings that represent a number. - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - fontWeight(value: number | FontWeight | ResourceStr | undefined): this; - /** - * Called when the fontWeight is set - * - * @param { number | FontWeight | string } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - fontWeight(value: number | FontWeight | string | undefined): this; - /** - * Sets the font family. - * - * @param { ResourceStr } value - Font family. Default font: 'HarmonyOS Sans' - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - fontFamily(value: ResourceStr | undefined): this; - /** - * Triggered when the time text changes. - * This event is not triggered when the screen is locked or the application is running in the background. - * When high-precision formats (such as SSS or SS) are used, the callback interval may vary. - * - * @param { function } event - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onTimer(event: ((utc: number, elapsedTime: number) => void) | undefined): this; - /** - * Sets the text shadow. - * It supports input parameters in an array to implement multiple text shadows. - * This API does not work with the fill attribute or coloring strategy. - * - * @param { ShadowOptions | Array } value - The shadow options. - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - textShadow(value: ShadowOptions | Array | undefined): this; - /** - * Creates a content modifier. - * - * @param { ContentModifier } modifier - The content modifier of texttimer. - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - contentModifier(modifier: ContentModifier | undefined): this; - attributeModifier( - modifier: AttributeModifier | AttributeModifier | undefined): this; -} -export declare function TextTimer(options?: TextTimerOptions, -@memo -content_?: () => void): TextTimerAttribute; diff --git a/api/arkui/component/timePicker.static.d.ets b/api/arkui/component/timePicker.static.d.ets deleted file mode 100644 index 356bc61fb24695e49cc1779a487d3de51b62512a..0000000000000000000000000000000000000000 --- a/api/arkui/component/timePicker.static.d.ets +++ /dev/null @@ -1,475 +0,0 @@ -/* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -'use static'; - -/** - * @file - * @kit ArkUI - * @arkts static - */ -import { ResourceColor, Offset } from './units'; -import { CommonMethod, PickerTextStyle, PickerDialogButtonStyle, Rectangle, BlurStyle, ShadowOptions, ShadowStyle, HoverModeAreaType, BackgroundBlurStyleOptions, BackgroundEffectOptions, Optional, Callback, DateTimeOptions, Bindable } from './common'; -import { DialogAlignment } from './alertDialog'; -import { CrownSensitivity } from './enums'; -import { memo, ComponentBuilder } from './../stateManagement/runtime'; -import { AttributeModifier } from './common'; -/** - * Defines the struct of TimePickerResult. - * - * @interface TimePickerResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface TimePickerResult { - /** - * Hour portion of the selected time. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - hour: number; - /** - * Minute portion of the selected time. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - minute: number; - /** - * Second portion of the selected time. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - second: number; -} -/** - * Type of the TimePicker that need to be displayed. - * @enum {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare enum TimePickerFormat { - /** - * Hour and minute. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - HOUR_MINUTE, - /** - * Hour and minute and second - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - HOUR_MINUTE_SECOND -} -/** - * Defines the options of TimePicker. - * - * @interface TimePickerOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface TimePickerOptions { - /** - * Specifies the time selector check time. - * - * @type { ?(Date | Bindable) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - selected?: Date | Bindable; - /** - * Specifies the format of the TimePicker that need to be displayed. - * - * @type { ?TimePickerFormat } - * @default HOUR_MINUTE - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - format?: TimePickerFormat; - /** - * Defines the start time of the time picker. - * - * @type { ?Date } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - start?: Date; - /** - * Defines the end time of the time picker. - * - * @type { ?Date } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - end?: Date; -} -/** - * Callback of the timePicker time is selected event. - * - * @typedef {function} OnTimePickerChangeCallback - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export type OnTimePickerChangeCallback = (result: TimePickerResult) => void; -export declare interface TimePickerAttribute extends CommonMethod { - /** - * Time Selector: indicates whether to display the 24-hour clock. - * - * @param { boolean } value - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - useMilitaryTime(value: boolean | undefined): this; - /** - * Sets whether to enable the wheel mode. - * @param { boolean } value - indicates whether to enable the wheel mode. - * @returns { TimePickerAttribute } the attribute of the time picker - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - loop(value: boolean | undefined): this; - /** - * Sets the text style of disappearing items - * - * @param { PickerTextStyle } value - indicates the text style of disappearing items. - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - disappearTextStyle(value: PickerTextStyle | undefined): this; - /** - * Sets the text style of normal items - * - * @param { PickerTextStyle } value - indicates the text style of normal items. - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - textStyle(value: PickerTextStyle | undefined): this; - /** - * Sets the text style of selected items - * - * @param { PickerTextStyle } value - indicates the text style of selected items. - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - selectedTextStyle(value: PickerTextStyle | undefined): this; - /** - * Set time format - * - * @param { DateTimeOptions } value - indicates the format of the time display. - * @returns { TimePickerAttribute } the attribute of the time picker - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - dateTimeOptions(value: DateTimeOptions | undefined): this; - /** - * This event is triggered when a TimePicker time is selected. - * - * @param { Optional } callback - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onChange(callback: OnTimePickerChangeCallback | undefined): this; - /** - * This event is triggered when an item enters the selected area. - * - * @param { Callback } callback - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onEnterSelectedArea(callback: Callback | undefined): this; - /** - * Enable or disable haptic feedback. - * - * @param { boolean } enable - Default value is true, set false to disable haptic feedback. - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - enableHapticFeedback(enable: boolean | undefined): this; - /** - * If the attribute is set, the crown rotation sensitivity can be changed. - * - * @param { Optional } sensitivity - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - digitalCrownSensitivity(sensitivity: CrownSensitivity | undefined): this; - /** - * Defines whether the AM/PM option is cascaded with the time in 12-hour mode. - * - * @param { boolean } enabled - Default value is false, set true to enable. - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - enableCascade(enabled: boolean | undefined): this; - attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; -} -/** - * Defines the TimePickerDialogOptions for Data Picker Dialog. - * - * @extends TimePickerOptions - * @interface TimePickerDialogOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare interface TimePickerDialogOptions extends TimePickerOptions { - /** - * Time Selector: indicates whether to display the 24-hour clock. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - useMilitaryTime?: boolean; - /** - * Text style of disappearing items - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - disappearTextStyle?: PickerTextStyle; - /** - * Text style of normal items - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - textStyle?: PickerTextStyle; - /** - * Style of accept button. - * - * @type { ?PickerDialogButtonStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - acceptButtonStyle?: PickerDialogButtonStyle; - /** - * Style of cancel button. - * - * @type { ?PickerDialogButtonStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - cancelButtonStyle?: PickerDialogButtonStyle; - /** - * Text style of selected items - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - selectedTextStyle?: PickerTextStyle; - /** - * Mask Region of dialog. The size cannot exceed the main window. - * - * @type { ?Rectangle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - maskRect?: Rectangle; - /** - * Defines the dialog alignment of the screen. - * - * @type { ?DialogAlignment } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - alignment?: DialogAlignment; - /** - * Defines the dialog offset. - * - * @type { ?Offset } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - offset?: Offset; - /** - * Called when the OK button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onAccept?: (value: TimePickerResult) => void; - /** - * Called when the Cancel button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onCancel?: () => void; - /** - * This event is triggered when a TimePicker Time or time is selected in dialog. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onChange?: (value: TimePickerResult) => void; - /** - * This event is triggered when an item enters the selected area in dialog. - * - * @type { ?Callback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onEnterSelectedArea?: Callback; - /** - * Defines the timePickerDialog's background color - * - * @type { ?ResourceColor } - * @default Color.Transparent - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - backgroundColor?: ResourceColor; - /** - * Defines the timePickerDialog's background blur Style - * - * @type { ?BlurStyle } - * @default BlurStyle.COMPONENT_ULTRA_THICK - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - backgroundBlurStyle?: BlurStyle; - /** - * Defines the timePickerDialog's background blur style with options - * - * @type { ?BackgroundBlurStyleOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; - /** - * Defines the timePickerDialog's background effect with options - * - * @type { ?BackgroundEffectOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - backgroundEffect?: BackgroundEffectOptions; - /** - * Defines whether the AM/PM option is cascaded with the time in 12-hour mode. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - enableCascade?: boolean; - /** - * Callback function when the dialog appears. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onDidAppear?: () => void; - /** - * Callback function when the dialog disappears. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onDidDisappear?: () => void; - /** - * Callback function before the dialog openAnimation starts. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onWillAppear?: () => void; - /** - * Callback function before the dialog closeAnimation starts. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - onWillDisappear?: () => void; - /** - * Defines the dialog's shadow. - * - * @type { ?(ShadowOptions | ShadowStyle) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - shadow?: ShadowOptions | ShadowStyle; - /** - * Set time format - * - * @type { ?DateTimeOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - dateTimeOptions?: DateTimeOptions; - /** - * Defines whether to respond to the hover mode. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - enableHoverMode?: boolean; - /** - * Defines the dialog's display area in hover mode. - * - * @type { ?HoverModeAreaType } - * @default HoverModeAreaType.BOTTOM_SCREEN - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - hoverModeArea?: HoverModeAreaType; - /** - * Enable or disable haptic feedback. - * - * @type { ?boolean } - * @default true - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - enableHapticFeedback?: boolean; -} -/** - * Defines TimePickerDialog which uses show method to show TimePicker dialog. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ -export declare class TimePickerDialog { -} -export declare function TimePicker(options?: TimePickerOptions, -@memo -content_?: () => void): TimePickerAttribute;