diff --git a/api/@internal/component/ets/action_sheet.d.ts b/api/@internal/component/ets/action_sheet.d.ts index 8c34b13777e9de6b6ecf005da9a75431311e99ba..e1e91230026d685c2c7ce7524cd599219d2d85d9 100644 --- a/api/@internal/component/ets/action_sheet.d.ts +++ b/api/@internal/component/ets/action_sheet.d.ts @@ -18,6 +18,19 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource } from '../../global/resource'; +import { + VoidCallback, ResourceStr, ResourceColor, Dimension, BorderRadiuses, LocalizedEdgeColors, EdgeColors, + EdgeWidths, LocalizedEdgeWidths, EdgeStyles, LocalizedBorderRadiuses +} from './units'; +import { Callback, DismissReason, Rectangle, BlurStyle, TransitionEffect, ShadowOptions, HoverModeAreaType, + ShadowStyle, BackgroundBlurStyleOptions, BackgroundEffectOptions } from './common'; +import { DialogButtonStyle, BorderStyle } from './enums'; +import { DialogAlignment } from './alertDialog'; +import { LevelOrder, LevelMode, ImmersiveMode } from '../../@ohos.promptAction'; +/*** endif */ + /** * The information of sheet. * @@ -40,7 +53,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface SheetInfo { /** @@ -59,13 +73,14 @@ interface SheetInfo { * @since 10 */ /** - * Sheet text. + * Title Properties * * @type { string | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ title: string | Resource; @@ -85,13 +100,14 @@ interface SheetInfo { * @since 10 */ /** - * Sheet icon. By default, no icon is displayed. + * Icon Properties. * * @type { ?(string | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ icon?: string | Resource; @@ -120,48 +136,51 @@ interface SheetInfo { * @since 11 */ /** - * Callback when the sheet is selected. + * Callback method after the operation. * Anonymous Object Rectification. * * @type { VoidCallback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ action: VoidCallback; } /** - * Provides information about the action to dismiss the dialog box. + * Component dialog dismiss action. * * @interface DismissDialogAction * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DismissDialogAction { /** - * Callback for dismissing the dialog box. This API is called only when the dialog box needs to be exited. + * Defines dialog dismiss function. * * @type { Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dismiss: Callback; /** - * Reason why the dialog box cannot be dismissed. You must specify whether to close the dialog box for each of the - * listed actions. + * Dismiss reason type. * * @type { DismissReason } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ reason: DismissReason; } @@ -173,7 +192,8 @@ declare interface DismissDialogAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface ActionSheetButtonOptions { /** @@ -194,16 +214,14 @@ interface ActionSheetButtonOptions { * @since 11 */ /** - * Whether to respond when the button is clicked. The value true means to respond when the button is clicked, - * and false means the opposite. - * Anonymous Object Rectification. - * + * Enable switch of confirmation button * @type { ?boolean } * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enabled?: boolean; @@ -225,8 +243,7 @@ interface ActionSheetButtonOptions { * @since 11 */ /** - * Whether the button is the default focus. The value true means that the button is the default focus, - * and false means the opposite. + * Default focus switch of confirmation button * Anonymous Object Rectification. * * @type { ?boolean } @@ -234,7 +251,8 @@ interface ActionSheetButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ defaultFocus?: boolean; @@ -256,7 +274,7 @@ interface ActionSheetButtonOptions { * @since 11 */ /** - * Button style. + * Style of confirmation button. * Anonymous Object Rectification. * * @type { ?DialogButtonStyle } @@ -264,7 +282,8 @@ interface ActionSheetButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ style?: DialogButtonStyle; @@ -293,14 +312,15 @@ interface ActionSheetButtonOptions { * @since 11 */ /** - * Button text. + * Text content of the confirmation button. * Anonymous Object Rectification. * * @type { string | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ value: string | Resource; @@ -329,14 +349,15 @@ interface ActionSheetButtonOptions { * @since 11 */ /** - * Callback invoked when the button is selected. + * Method executed by the callback. * Anonymous Object Rectification. * * @type { VoidCallback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ action: VoidCallback; } @@ -348,29 +369,32 @@ interface ActionSheetButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface ActionSheetOffset { /** - * Offset of the action sheet along the x-axis relative to the alignment position. + * Dx of the pop-up window relative to the alignment position. * Anonymous Object Rectification. - * + * * @type { number | string | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ dx: number | string | Resource; /** - * Offset of the action sheet along the y-axis relative to the alignment position. + * Dy of the pop-up window relative to the alignment position. * Anonymous Object Rectification. * * @type { number | string | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ dy: number | string | Resource; } @@ -419,7 +443,8 @@ declare type ImmersiveMode = import('../api/@ohos.promptAction').ImmersiveMode; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ActionSheetOptions { @@ -439,13 +464,14 @@ interface ActionSheetOptions * @since 10 */ /** - * Title of the dialog box. + * Title Properties * * @type { string | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ title: string | Resource; @@ -457,12 +483,13 @@ interface ActionSheetOptions * @since 10 */ /** - * Subtitle of the dialog box. + * Subtitle Properties * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ subtitle?: ResourceStr; @@ -482,13 +509,14 @@ interface ActionSheetOptions * @since 10 */ /** - * Content of the dialog box. + * message Properties * * @type { string | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ message: string | Resource; @@ -517,15 +545,14 @@ interface ActionSheetOptions * @since 11 */ /** - * Information about the confirm button. When the dialog box has focus and focus has not been shifted using the Tab - * key, the button responds to the Enter key by default, and multiple dialog boxes can gain focus consecutively - * to respond automatically. The default response to the Enter key does not work when defaultFocus is set to true. + * Invoke the commit function. * * @type { ?ActionSheetButtonOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ confirm?: ActionSheetButtonOptions; @@ -554,14 +581,15 @@ interface ActionSheetOptions * @since 11 */ /** - * Callback invoked when the dialog box is closed after the overlay is clicked. + * Execute Cancel Function. * Anonymous Object Rectification. * * @type { ?VoidCallback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ cancel?: VoidCallback; @@ -581,13 +609,14 @@ interface ActionSheetOptions * @since 10 */ /** - * Options in the dialog box. Each option supports the image, text, and callback. + * The Array of sheets * * @type { Array } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ sheets: Array; @@ -607,15 +636,14 @@ interface ActionSheetOptions * @since 10 */ /** - * Whether to close the dialog box when the overlay is clicked. + * Allows users to click the mask layer to exit. * * @type { ?boolean } - * @default true - The value true means to close the dialog box when the overlay is clicked, and false means - * the opposite. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ autoCancel?: boolean; @@ -635,18 +663,14 @@ interface ActionSheetOptions * @since 10 */ /** - * Alignment mode of the dialog box in the vertical direction. - *

NOTE: - *
If showInSubWindow is set to true in UIExtension, the dialog box is aligned with the host window based - * on UIExtension. - *

+ * Alignment in the vertical direction. * * @type { ?DialogAlignment } - * @default DialogAlignment.Bottom * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ alignment?: DialogAlignment; @@ -675,15 +699,14 @@ interface ActionSheetOptions * @since 11 */ /** - * Offset of the dialog box relative to the alignment position. - *
When alignment is set to Top, TopStart, or TopEnd: {dx: 0,dy: "40vp"} - *
When alignment is set to any other value: {dx: 0,dy: "-40vp"} + * Offset of the pop-up window relative to the alignment position. * * @type { ?ActionSheetOffset } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: ActionSheetOffset; @@ -696,18 +719,14 @@ interface ActionSheetOptions * @since 10 */ /** - * Mask area of the dialog box. Events outside the mask area are transparently transmitted, - * and events within the mask area are not. - *

NOTE: - *
maskRect does not take effect when showInSubWindow is set to true. - *

+ * Mask Region of dialog. The size cannot exceed the main window. * * @type { ?Rectangle } - * @default - {x:0,y:0, width:'100%', height:'100%'} * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maskRect?: Rectangle; @@ -721,18 +740,15 @@ interface ActionSheetOptions * @since 11 */ /** - * Whether to show the dialog box in a subwindow when the dialog box needs to be displayed outside the main window. - *

NOTE: - *
A dialog box whose showInSubWindow attribute is true cannot trigger the display of another dialog box whose - * showInSubWindow attribute is also true. - *

- * + * Whether to display in the sub window. + * * @type { ?boolean } * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ showInSubWindow?: boolean; @@ -745,13 +761,14 @@ interface ActionSheetOptions * @since 11 */ /** - * Whether the dialog box is a modal. A modal dialog box has a mask applied, while a non-modal dialog box does not. + * Whether it is a modal dialog * @type { ?boolean } * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isModal?: boolean; @@ -765,18 +782,15 @@ interface ActionSheetOptions * @since 11 */ /** - * Background color of the dialog box. - *

NOTE: - *
When backgroundColor is set to a non-transparent color, backgroundBlurStyle must be set to BlurStyle.NONE; - * otherwise, the color display may not meet the expected effect. - *

+ * Defines the actionSheet's background color * * @type { ?ResourceColor } * @default Color.Transparent * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor?: ResourceColor; @@ -790,19 +804,15 @@ interface ActionSheetOptions * @since 11 */ /** - * Background blur style of the dialog box. - *

NOTE: - *
Setting this parameter to BlurStyle.NONE disables the background blur. When backgroundBlurStyle is set to a - * value other than NONE, do not set backgroundColor. If you do, the color display may not produce the expected - * visual effect. - *

+ * Defines the actionSheet's background blur Style * * @type { ?BlurStyle } * @default BlurStyle.COMPONENT_ULTRA_THICK * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyle?: BlurStyle; @@ -813,7 +823,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; @@ -824,166 +835,142 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundEffect?: BackgroundEffectOptions; /** - * Callback for interactive closure of the dialog box. - *

NOTE: - * 1. If this callback is registered, the dialog box will not be closed immediately after the user touches the - * mask or the Back button, presses the Esc key, or swipes left or right on the screen. The reason parameter in - * the callback is used to determine whether the dialog box can be closed. The reason returned by the component - * does not support the value CLOSE_BUTTON. - * 2. In the onWillDismiss callback, another onWillDismiss callback is not allowed. - *

+ * Callback function when the actionSheet interactive dismiss * * @type { ?Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDismiss?: Callback; /** - * Transition effect for the entrance and exit of the dialog box. - *

NOTE: - * 1. If this parameter is not set, the default effect is used. - * 2. Touching the Back button during the entrance animation pauses the entrance animation and starts the exit - * animation. The final effect is one obtained after the curves of the entrance and exit animations are combined. - * 3. Touching the Back button during the exit animation does not affect the animation playback. Touching the - * Back button again closes the application. - *

+ * Transition parameters of opening/closing ActionSheet. * * @type { ?TransitionEffect } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ transition?: TransitionEffect; /** - * Corner radius of the background. You can set the radius for each of the four corners individually. + * Defines the actionSheet's corner radius. * * @type { ?(Dimension | BorderRadiuses | LocalizedBorderRadiuses) } - * @default - {topLeft:'32vp', topRight:'32vp', bottomLeft:'32vp', bottomRight:'32vp'}, The corner radius is subject - * to the component size, with the maximum value being half of the component width or height. If the value is - * negative, the default value is used. When set to a percentage, the value defines the radius as a percentage of the - * parent component's width or height. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ cornerRadius?: Dimension | BorderRadiuses | LocalizedBorderRadiuses; /** - * Width of the dialog box. + * Defines the actionSheet's width. * * @type { ?Dimension } - * @default - Default maximum width of the dialog box: 400 vp, - * When this parameter is set to a percentage, the reference width of the dialog box is the width of the window - * where the dialog box is located. You can decrease or increase the width as needed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width?: Dimension; /** - * Height of the dialog box. + * Defines the actionSheet's height. * * @type { ?Dimension } - * @default - Default maximum height of the dialog box: 0.9 x (Window height – Safe area) - *
When this parameter is set to a percentage, the reference height of the dialog box is the height of the - * window where the dialog box is located minus the safe area. You can decrease or increase the height as needed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ height?: Dimension; /** - * Border width of the dialog box. - * You can set the width for all four sides or set separate widths for individual sides. + * Defines the actionSheet's border width. * * @type { ?(Dimension | EdgeWidths | LocalizedEdgeWidths) } - * @default 0 - When set to a percentage, the value defines the border width as a percentage of the parent dialog - * box's width. If the left and right borders are greater than its width, or the top and bottom borders are greater - * than its height, the dialog box may not display as expected. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderWidth?: Dimension | EdgeWidths | LocalizedEdgeWidths; /** - * Border color of the dialog box. - *

NOTE: - *
When borderColor is of type LocalizedEdgeColors, the layout order can be dynamically adjusted based on the - * user's language settings. - *

+ * Defines the actionSheet's border color. * * @type { ?(ResourceColor | EdgeColors | LocalizedEdgeColors) } - * @default Color.Black - borderColor must be used with borderWidth in pairs. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderColor?: ResourceColor | EdgeColors | LocalizedEdgeColors; /** - * Border style of the dialog box. + * Defines the actionSheet's border style. * * @type { ?(BorderStyle | EdgeStyles) } - * @default BorderStyle.Solid - borderStyle must be used with borderWidth in pairs. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderStyle?: BorderStyle | EdgeStyles; /** - * Shadow of the dialog box. + * Defines the actionSheet's shadow. * * @type { ?(ShadowOptions | ShadowStyle) } - * @default - Default value on 2-in-1 devices: ShadowStyle.OUTER_FLOATING_MD when the dialog box is focused and - * ShadowStyle.OUTER_FLOATING_SM otherwise. * @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; /** - * Whether to enable the hover mode. + * Defines whether to respond to the hover mode. * * @type { ?boolean } - * @default false - meaning not to enable the hover mode. + * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enableHoverMode?: boolean; /** - * Display area of the dialog box in hover mode. + * Defines the actionSheet's display area in hover mode. * * @type { ?HoverModeAreaType } * @default HoverModeAreaType.BOTTOM_SCREEN * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ hoverModeArea?: HoverModeAreaType; @@ -994,7 +981,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onDidAppear?: Callback; @@ -1005,7 +993,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onDidDisappear?: Callback; @@ -1016,7 +1005,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onWillAppear?: Callback; @@ -1027,45 +1017,46 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDisappear?: Callback; /** - * Display level of the dialog box. + * Determine the display level of the dialog. * * @type { ?LevelMode } - * @default LevelMode.OVERLAY - This parameter takes effect only when showInSubWindow is set to false. + * @default LevelMode.OVERLAY * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ levelMode?: LevelMode; /** - * Unique ID of the node under the display level for the page-level dialog box. - *

NOTE: - *
This parameter takes effect only when levelMode is set to LevelMode.EMBEDDED. - *

+ * The uniqueId of any node in the router or navigation page. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ levelUniqueId?: number; /** - * Overlay effect for the page-level dialog box. + * Determine the immersive mode of the dialog. * * @type { ?ImmersiveMode } - * @default ImmersiveMode.DEFAULT - This parameter takes effect only when levelMode is set to LevelMode.EMBEDDED. + * @default ImmersiveMode.DEFAULT * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ immersiveMode?: ImmersiveMode; @@ -1077,7 +1068,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ levelOrder?: LevelOrder; } diff --git a/api/@internal/component/ets/alert_dialog.d.ts b/api/@internal/component/ets/alert_dialog.d.ts index 9c7ee8c1d04a61a64d5a4ee66e40507161c11518..474a46701f77c083e01cc91c4a765d9946008dfd 100644 --- a/api/@internal/component/ets/alert_dialog.d.ts +++ b/api/@internal/component/ets/alert_dialog.d.ts @@ -18,6 +18,17 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { + ResourceStr, ResourceColor, VoidCallback, Offset, Dimension, BorderRadiuses, LocalizedBorderRadiuses, EdgeWidths, + LocalizedEdgeWidths, EdgeColors, LocalizedEdgeColors, EdgeStyles +} from './units'; +import { WordBreak, DialogButtonStyle, BorderStyle } from './enums'; +import { Rectangle, BlurStyle, Callback, TransitionEffect, ShadowOptions, ShadowStyle, HoverModeAreaType, DismissReason, + BackgroundBlurStyleOptions, BackgroundEffectOptions } from './common'; +import { LevelOrder, ImmersiveMode, LevelMode } from '../../@ohos.promptAction'; +/*** endif */ + /** * The alignment of dialog, * @@ -40,7 +51,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 DialogAlignment { /** @@ -62,7 +74,8 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Top, @@ -85,7 +98,8 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Center, @@ -108,7 +122,8 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Bottom, @@ -131,7 +146,8 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Default, @@ -154,7 +170,8 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ TopStart, @@ -177,7 +194,8 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ TopEnd, @@ -200,7 +218,8 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CenterStart, @@ -223,7 +242,8 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CenterEnd, @@ -246,7 +266,8 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BottomStart, @@ -269,7 +290,8 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BottomEnd, } @@ -289,7 +311,8 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice -* @since 11 +* @since arkts {'1.1':'11','1.2':'20'} +* @arkts 1.1&1.2 */ declare enum DialogButtonDirection { /** @@ -305,7 +328,8 @@ declare enum DialogButtonDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ AUTO = 0, @@ -322,7 +346,8 @@ declare enum DialogButtonDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ HORIZONTAL = 1, @@ -339,7 +364,8 @@ declare enum DialogButtonDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ VERTICAL = 2, } @@ -351,7 +377,8 @@ declare enum DialogButtonDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface AlertDialogButtonBaseOptions { /** @@ -375,14 +402,14 @@ declare interface AlertDialogButtonBaseOptions { */ /** * Enable switch of button. - * Anonymous Object Rectification. * * @type { ?boolean } * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enabled?: boolean; @@ -407,14 +434,14 @@ declare interface AlertDialogButtonBaseOptions { */ /** * Default focus switch of button. - * Anonymous Object Rectification. * * @type { ?boolean } * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ defaultFocus?: boolean; @@ -439,14 +466,14 @@ declare interface AlertDialogButtonBaseOptions { */ /** * Style of button. - * Anonymous Object Rectification. * * @type { ?DialogButtonStyle } * @default - * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ style?: DialogButtonStyle; @@ -469,13 +496,13 @@ declare interface AlertDialogButtonBaseOptions { */ /** * Text content of button. - * Anonymous Object Rectification. * * @type { ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ value: ResourceStr; @@ -498,13 +525,13 @@ declare interface AlertDialogButtonBaseOptions { */ /** * Text color of button. - * Anonymous Object Rectification. * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor?: ResourceColor; @@ -527,13 +554,13 @@ declare interface AlertDialogButtonBaseOptions { */ /** * Background color of button. - * Anonymous Object Rectification. * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor?: ResourceColor; @@ -562,7 +589,8 @@ declare interface AlertDialogButtonBaseOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ action: VoidCallback; } @@ -594,7 +622,8 @@ declare interface AlertDialogButtonBaseOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface AlertDialogButtonOptions extends AlertDialogButtonBaseOptions { /** @@ -608,13 +637,13 @@ declare interface AlertDialogButtonOptions extends AlertDialogButtonBaseOptions */ /** * Define whether the button responds to Enter/Space key by default. - * Anonymous Object Rectification. * * @type { ?boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ primary?: boolean; } @@ -626,7 +655,8 @@ declare interface AlertDialogButtonOptions extends AlertDialogButtonBaseOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextStyle { /** @@ -636,7 +666,8 @@ declare interface TextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ wordBreak?: WordBreak; } @@ -674,7 +705,8 @@ declare type LevelOrder = import('../api/@ohos.promptAction').LevelOrder; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface AlertDialogParam { /** @@ -699,7 +731,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ title?: ResourceStr; @@ -716,7 +749,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ subtitle?: ResourceStr; @@ -742,7 +776,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ message: ResourceStr; @@ -768,7 +803,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ autoCancel?: boolean; @@ -798,13 +834,13 @@ declare interface AlertDialogParam { */ /** * Execute Cancel Function. - * Anonymous Object Rectification. * * @type { ?VoidCallback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ cancel?: VoidCallback; @@ -830,7 +866,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ alignment?: DialogAlignment; @@ -856,7 +893,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: Offset; @@ -882,7 +920,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ gridCount?: number; @@ -901,7 +940,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maskRect?: Rectangle; @@ -922,7 +962,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ showInSubWindow?: boolean; @@ -941,7 +982,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isModal?: boolean; @@ -962,7 +1004,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor?: ResourceColor; @@ -983,7 +1026,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyle?: BlurStyle; @@ -994,7 +1038,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; @@ -1005,7 +1050,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundEffect?: BackgroundEffectOptions; @@ -1016,7 +1062,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDismiss?: Callback; @@ -1027,7 +1074,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ transition?: TransitionEffect; @@ -1038,7 +1086,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ cornerRadius?: Dimension | BorderRadiuses | LocalizedBorderRadiuses; @@ -1049,7 +1098,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width?: Dimension; @@ -1060,7 +1110,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ height?: Dimension; @@ -1071,7 +1122,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderWidth?: Dimension | EdgeWidths | LocalizedEdgeWidths; @@ -1082,7 +1134,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderColor?: ResourceColor | EdgeColors | LocalizedEdgeColors; @@ -1093,7 +1146,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderStyle?: BorderStyle | EdgeStyles; @@ -1104,7 +1158,8 @@ declare interface AlertDialogParam { * @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; @@ -1115,7 +1170,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textStyle?: TextStyle; @@ -1127,7 +1183,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enableHoverMode?: boolean; @@ -1139,7 +1196,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ hoverModeArea?: HoverModeAreaType; @@ -1150,7 +1208,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onDidAppear?: Callback; @@ -1161,7 +1220,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onDidDisappear?: Callback; @@ -1172,7 +1232,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onWillAppear?: Callback; @@ -1183,7 +1244,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDisappear?: Callback; @@ -1195,7 +1257,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ levelMode?: LevelMode; @@ -1206,7 +1269,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ levelUniqueId?: number; @@ -1218,7 +1282,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ immersiveMode?: ImmersiveMode; @@ -1230,7 +1295,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ levelOrder?: LevelOrder; } @@ -1260,7 +1326,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface AlertDialogParamWithConfirm extends AlertDialogParam { /** @@ -1295,7 +1362,8 @@ declare interface AlertDialogParamWithConfirm extends AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ confirm?: AlertDialogButtonBaseOptions; } @@ -1307,7 +1375,8 @@ declare interface AlertDialogParamWithConfirm extends AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DismissDialogAction { /** @@ -1317,7 +1386,8 @@ declare interface DismissDialogAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dismiss: Callback; @@ -1328,7 +1398,8 @@ declare interface DismissDialogAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ reason: DismissReason; } @@ -1358,7 +1429,8 @@ declare interface DismissDialogAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface AlertDialogParamWithButtons extends AlertDialogParam { /** @@ -1387,13 +1459,13 @@ declare interface AlertDialogParamWithButtons extends AlertDialogParam { */ /** * First button. - * Anonymous Object Rectification. * * @type { AlertDialogButtonBaseOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ primaryButton: AlertDialogButtonBaseOptions; @@ -1429,7 +1501,8 @@ declare interface AlertDialogParamWithButtons extends AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ secondaryButton: AlertDialogButtonBaseOptions; } @@ -1451,7 +1524,8 @@ declare interface AlertDialogParamWithButtons extends AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface AlertDialogParamWithOptions extends AlertDialogParam { /** @@ -1467,7 +1541,8 @@ declare interface AlertDialogParamWithOptions extends AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ buttons: Array; @@ -1486,7 +1561,8 @@ declare interface AlertDialogParamWithOptions extends AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ buttonDirection?: DialogButtonDirection; } diff --git a/api/@internal/component/ets/alphabet_indexer.d.ts b/api/@internal/component/ets/alphabet_indexer.d.ts index c809c09254f1853b50106f97f4de2125743f9bab..7fad879eefce4738531e38246333c5e8367e0897 100644 --- a/api/@internal/component/ets/alphabet_indexer.d.ts +++ b/api/@internal/component/ets/alphabet_indexer.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod, BlurStyle } from './common' +import { ResourceColor, Length, Position } from './units' +import { Font } from './units' +/*** endif */ + /** * indexer align property. * @@ -40,7 +46,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 IndexerAlign { /** @@ -62,7 +69,8 @@ declare enum IndexerAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Left, @@ -85,7 +93,8 @@ declare enum IndexerAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Right, @@ -95,7 +104,8 @@ declare enum IndexerAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ START, @@ -105,7 +115,8 @@ declare enum IndexerAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ END, } @@ -117,7 +128,8 @@ declare enum IndexerAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface AlphabetIndexerOptions { /** @@ -146,13 +158,13 @@ interface AlphabetIndexerOptions { */ /** * Alphabetical index string array. - * Anonymous Object Rectification. - * + * * @type { Array } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ arrayValue: Array; /** @@ -181,13 +193,13 @@ interface AlphabetIndexerOptions { */ /** * ID of the selected item. - * Anonymous Object Rectification. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selected: number; } @@ -214,7 +226,8 @@ interface AlphabetIndexerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface AlphabetIndexerInterface { /** @@ -257,7 +270,8 @@ interface AlphabetIndexerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ (options: AlphabetIndexerOptions): AlphabetIndexerAttribute; } @@ -270,7 +284,8 @@ interface AlphabetIndexerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnAlphabetIndexerSelectCallback = (index: number) => void; @@ -282,7 +297,8 @@ declare type OnAlphabetIndexerSelectCallback = (index: number) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnAlphabetIndexerPopupSelectCallback = (index: number) => void; @@ -295,7 +311,8 @@ declare type OnAlphabetIndexerPopupSelectCallback = (index: number) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnAlphabetIndexerRequestPopupDataCallback = (index: number) => Array; @@ -321,7 +338,8 @@ declare type OnAlphabetIndexerRequestPopupDataCallback = (index: number) => Arra * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class AlphabetIndexerAttribute extends CommonMethod { /** @@ -361,7 +379,8 @@ declare class AlphabetIndexerAttribute extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ declare class AnimatorAttribute extends CommonMethod { /** @@ -142,7 +156,8 @@ declare class AnimatorAttribute extends CommonMethod { * @returns { AnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ state(value: AnimationStatus): AnimatorAttribute; @@ -153,7 +168,8 @@ declare class AnimatorAttribute extends CommonMethod { * @returns { AnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ duration(value: number): AnimatorAttribute; @@ -164,7 +180,8 @@ declare class AnimatorAttribute extends CommonMethod { * @returns { AnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ curve(value: Curve): AnimatorAttribute; @@ -175,7 +192,8 @@ declare class AnimatorAttribute extends CommonMethod { * @returns { AnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ delay(value: number): AnimatorAttribute; @@ -186,7 +204,8 @@ declare class AnimatorAttribute extends CommonMethod { * @returns { AnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ fillMode(value: FillMode): AnimatorAttribute; @@ -197,7 +216,8 @@ declare class AnimatorAttribute extends CommonMethod { * @returns { AnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ iterations(value: number): AnimatorAttribute; @@ -208,7 +228,8 @@ declare class AnimatorAttribute extends CommonMethod { * @returns { AnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ playMode(value: PlayMode): AnimatorAttribute; @@ -219,7 +240,8 @@ declare class AnimatorAttribute extends CommonMethod { * @returns { AnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ motion(value: SpringMotion | FrictionMotion | ScrollMotion): AnimatorAttribute; @@ -230,7 +252,8 @@ declare class AnimatorAttribute extends CommonMethod { * @returns { AnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ onStart(event: () => void): AnimatorAttribute; @@ -241,7 +264,8 @@ declare class AnimatorAttribute extends CommonMethod { * @returns { AnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ onPause(event: () => void): AnimatorAttribute; @@ -252,7 +276,8 @@ declare class AnimatorAttribute extends CommonMethod { * @returns { AnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ onRepeat(event: () => void): AnimatorAttribute; @@ -263,7 +288,8 @@ declare class AnimatorAttribute extends CommonMethod { * @returns { AnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ onCancel(event: () => void): AnimatorAttribute; @@ -274,7 +300,8 @@ declare class AnimatorAttribute extends CommonMethod { * @returns { AnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ onFinish(event: () => void): AnimatorAttribute; @@ -285,7 +312,8 @@ declare class AnimatorAttribute extends CommonMethod { * @returns { AnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ onFrame(event: (value: number) => void): AnimatorAttribute; } diff --git a/api/@internal/component/ets/badge.d.ts b/api/@internal/component/ets/badge.d.ts index 81847f88d68e8072fc04554189f86043689fd299..c6c2b41db5983991eb9bf9b4eca3f457be773e2b 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 } from './units'; +import { FontWeight } from './enums'; +import { CommonMethod } from './common'; +/*** endif */ + /** * Defines the badge position property. * @@ -50,7 +56,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum BadgePosition { /** @@ -75,13 +82,14 @@ declare enum BadgePosition { * @since 10 */ /** - * The badge is displayed in the upper right corner of the parent component. + * The dot is displayed vertically centered on the right. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RightTop, @@ -107,13 +115,14 @@ declare enum BadgePosition { * @since 10 */ /** - * The badge is vertically centered on the right of the parent component. + * Dots are displayed in the upper right corner. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Right, @@ -139,13 +148,14 @@ declare enum BadgePosition { * @since 10 */ /** - * The badge is vertically centered on the left of the parent component. + * The dot is displayed in the left vertical center. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Left, } @@ -182,7 +192,8 @@ declare enum BadgePosition { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface BadgeStyle { /** @@ -210,15 +221,15 @@ declare interface BadgeStyle { * @since 10 */ /** - * Font color. + * Text Color * * @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 */ color?: ResourceColor; @@ -257,22 +268,15 @@ declare interface BadgeStyle { * @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. - *

+ * Text size. * * @type { ?(number | ResourceStr) } - * @default 10 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ fontSize?: number | ResourceStr; @@ -311,23 +315,15 @@ declare interface BadgeStyle { * @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. - *

+ * Size of a badge. * * @type { ?(number | ResourceStr) } - * @default 16 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ badgeSize?: number | ResourceStr; @@ -356,15 +352,15 @@ declare interface BadgeStyle { * @since 10 */ /** - * Badge color. + * Color of the badge. * * @type { ?ResourceColor } - * @default Color.Red * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ badgeColor?: ResourceColor; @@ -377,14 +373,14 @@ declare interface BadgeStyle { * @since 10 */ /** - * Border color of the background. + * Define the border color of the badge. * * @type { ?ResourceColor } - * @default Color.Red * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ borderColor?: ResourceColor; @@ -397,16 +393,14 @@ declare interface BadgeStyle { * @since 10 */ /** - * Border width of the background. - * This parameter cannot be set in percentage. - * Unit: vp + * Define the border width of the badge. * * @type { ?Length } - * @default 1 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ borderWidth?: Length; @@ -428,20 +422,14 @@ declare interface BadgeStyle { * @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. - *

+ * Define the font weight of the badge. * * @type { ?(number | FontWeight | ResourceStr) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ fontWeight?: number | FontWeight | ResourceStr; } @@ -471,14 +459,15 @@ declare interface BadgeStyle { * @since 10 */ /** - * Provides basic parameters for creating a badge. + * Defines the base param of badge. * * @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 { /** @@ -506,22 +495,15 @@ declare interface BadgeParam { * @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. - *

+ * Set the display position of the prompt point. * * @type { ?(BadgePosition | Position) } - * @default BadgePosition.RightTop * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ position?: BadgePosition | Position; @@ -550,14 +532,15 @@ declare interface BadgeParam { * @since 10 */ /** - * Style of the badge, including the font color, font size, badge color, and badge size. + * 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 * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ style: BadgeStyle; } @@ -590,7 +573,7 @@ declare interface BadgeParam { * @since 10 */ /** - * Inherits from BadgeParam and has all attributes of BadgeParam. + * Defines the badge param with count and maxCount. * * @extends BadgeParam * @interface BadgeParamWithNumber @@ -598,7 +581,8 @@ declare interface BadgeParam { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface BadgeParamWithNumber extends BadgeParam { /** @@ -626,22 +610,15 @@ declare interface BadgeParamWithNumber extends BadgeParam { * @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. - *

+ * Set the number of reminder messages. * * @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 */ count: number; @@ -670,22 +647,15 @@ declare interface BadgeParamWithNumber extends BadgeParam { * @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. - *

+ * Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. * * @type { ?number } - * @default 99 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maxCount?: number; } @@ -718,7 +688,7 @@ declare interface BadgeParamWithNumber extends BadgeParam { * @since 10 */ /** - * Inherits from BadgeParam and has all attributes of BadgeParam. + * Defines the badge param with string value. * * @extends BadgeParam * @interface BadgeParamWithString @@ -726,7 +696,8 @@ declare interface BadgeParamWithNumber extends BadgeParam { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface BadgeParamWithString extends BadgeParam { /** @@ -764,7 +735,7 @@ declare interface BadgeParamWithString extends BadgeParam { * @since 11 */ /** - * Prompt content. + * Text string of the prompt content. * * @type { ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -772,6 +743,7 @@ declare interface BadgeParamWithString extends BadgeParam { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ value: ResourceStr; } @@ -808,7 +780,8 @@ declare interface BadgeParamWithString extends BadgeParam { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface BadgeInterface { /** @@ -859,7 +832,8 @@ interface BadgeInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (value: BadgeParamWithNumber): BadgeAttribute; @@ -911,7 +885,8 @@ interface BadgeInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (value: BadgeParamWithString): BadgeAttribute; } @@ -948,9 +923,10 @@ interface BadgeInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ -declare class BadgeAttribute extends CommonMethod {} +declare class BadgeAttribute extends CommonMethod { } /** * Defines Badge Component. @@ -1015,3 +991,29 @@ declare const Badge: BadgeInterface; * @since 11 */ declare const BadgeInstance: BadgeAttribute; + +/** + * Define BadgeParamWithString's property 'value' type + * + * @typedef { string | Resource } BadgeParamWithStringType + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare type BadgeParamWithStringType = string | Resource; + +/** + * Define BadgeStyle's size-relative properties type + * + * @typedef { number | string | Resource } BadgeStyleSizeType + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare type BadgeStyleSizeType = number | string | Resource; \ No newline at end of file diff --git a/api/@internal/component/ets/blank.d.ts b/api/@internal/component/ets/blank.d.ts index 19c7cf5a0f0814a37dfe4dc51bb82d7071d3a021..80958fccc971168677c02058b968d180706aaa06 100644 --- a/api/@internal/component/ets/blank.d.ts +++ b/api/@internal/component/ets/blank.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod } from './common'; +import { ResourceColor } from './units'; +/*** endif */ + /** * Create Blank. * @@ -50,7 +55,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface BlankInterface { /** @@ -81,8 +87,7 @@ interface BlankInterface { * @since 10 */ /** - * Minimum size of the Blank component in the container along the main axis.
- * Default value: **0**. + * The minimum size of the blank fill assembly on the container spindle. * * @param { number | string } min * @returns { BlankAttribute } @@ -90,7 +95,8 @@ interface BlankInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (min?: number | string): BlankAttribute; } @@ -127,7 +133,8 @@ interface BlankInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class BlankAttribute extends CommonMethod { /** @@ -158,8 +165,7 @@ declare class BlankAttribute extends CommonMethod { * @since 10 */ /** - * Sets the color to fill the blank.
- * Default value: **Color.Transparent**. + * color: set color. * * @param { ResourceColor } value * @returns { BlankAttribute } @@ -167,7 +173,8 @@ declare class BlankAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ color(value: ResourceColor): BlankAttribute; } diff --git a/api/@internal/component/ets/button.d.ts b/api/@internal/component/ets/button.d.ts index 1818a77db92979a7e9857f42cb4f43cea67d12d0..7a662349a28b4c1e5f745cdb2577355bd7b2a724 100644 --- a/api/@internal/component/ets/button.d.ts +++ b/api/@internal/component/ets/button.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource } from '../../global/resource'; +import { ResourceStr, ResourceColor, Length, Font } from './units'; +import { TextOverflow, FontWeight, FontStyle, TextHeightAdaptivePolicy } from './enums'; +import { CommonConfiguration, CommonMethod, ContentModifier } from './common'; +/*** endif */ + /** * Provides a button component. * @@ -50,7 +57,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ButtonType { /** @@ -81,7 +89,8 @@ declare enum ButtonType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Capsule, @@ -113,7 +122,8 @@ declare enum ButtonType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Circle, @@ -145,7 +155,8 @@ declare enum ButtonType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Normal, @@ -156,7 +167,8 @@ declare enum ButtonType { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ ROUNDED_RECTANGLE = 3, } @@ -178,7 +190,8 @@ declare enum ButtonType { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ButtonStyleMode { /** @@ -196,7 +209,8 @@ declare enum ButtonStyleMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NORMAL = 0, @@ -215,7 +229,8 @@ declare enum ButtonStyleMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EMPHASIZED = 1, @@ -234,7 +249,8 @@ declare enum ButtonStyleMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TEXTUAL = 2, } @@ -247,7 +263,8 @@ declare enum ButtonStyleMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ButtonRole { /** @@ -257,7 +274,8 @@ declare enum ButtonRole { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NORMAL = 0, @@ -268,7 +286,8 @@ declare enum ButtonRole { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ERROR = 1, } @@ -282,7 +301,8 @@ declare enum ButtonRole { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type ButtonTriggerClickCallback = (xPos: number, yPos: number) => void; @@ -294,7 +314,8 @@ declare type ButtonTriggerClickCallback = (xPos: number, yPos: number) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ButtonConfiguration extends CommonConfiguration { @@ -305,7 +326,8 @@ declare interface ButtonConfiguration extends CommonConfiguration { /** @@ -918,7 +1040,8 @@ declare class ButtonAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ type(value: ButtonType): ButtonAttribute; @@ -958,7 +1081,8 @@ declare class ButtonAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ stateEffect(value: boolean): ButtonAttribute; @@ -981,7 +1105,8 @@ declare class ButtonAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ buttonStyle(value: ButtonStyleMode): ButtonAttribute; @@ -1004,7 +1129,8 @@ declare class ButtonAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ controlSize(value: ControlSize): ButtonAttribute; @@ -1017,7 +1143,8 @@ declare class ButtonAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ role(value: ButtonRole): ButtonAttribute; @@ -1057,7 +1184,8 @@ declare class ButtonAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor(value: ResourceColor): ButtonAttribute; @@ -1097,7 +1225,8 @@ declare class ButtonAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize(value: Length): ButtonAttribute; @@ -1137,7 +1266,8 @@ declare class ButtonAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontWeight(value: number | FontWeight | string): ButtonAttribute; @@ -1177,7 +1307,8 @@ declare class ButtonAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontStyle(value: FontStyle): ButtonAttribute; @@ -1217,7 +1348,8 @@ declare class ButtonAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontFamily(value: string | Resource): ButtonAttribute; @@ -1229,7 +1361,8 @@ declare class ButtonAttribute 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): ButtonAttribute; @@ -1272,6 +1405,7 @@ declare class ButtonAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ minFontScale(scale: number | Resource): ButtonAttribute; @@ -1290,9 +1424,9 @@ declare class ButtonAttribute extends CommonMethod { * @param { number | Resource } scale * @returns { ButtonAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ maxFontScale(scale: number | Resource): ButtonAttribute; } diff --git a/api/@internal/component/ets/calendar.d.ts b/api/@internal/component/ets/calendar.d.ts index ecac65717c5fb55fb559f20f98b5ff8e78ce7ef9..333097cb9ede6be04d2f3c574c5711a4069354a8 100644 --- a/api/@internal/component/ets/calendar.d.ts +++ b/api/@internal/component/ets/calendar.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ResourceColor } from './units' +import { Axis } from './enums' +/*** endif */ + /** * Provides a monthly view component to display information such as date, shift break, and schedule. * @@ -33,7 +38,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ interface CalendarDay { /** @@ -53,7 +59,8 @@ interface CalendarDay { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ index: number; @@ -74,7 +81,8 @@ interface CalendarDay { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ lunarMonth: string; @@ -93,7 +101,8 @@ interface CalendarDay { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ lunarDay: string; @@ -112,7 +121,8 @@ interface CalendarDay { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ dayMark: string; @@ -131,7 +141,8 @@ interface CalendarDay { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ dayMarkValue: string; @@ -150,7 +161,8 @@ interface CalendarDay { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ year: number; @@ -169,7 +181,8 @@ interface CalendarDay { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ month: number; @@ -188,7 +201,8 @@ interface CalendarDay { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ day: number; @@ -207,7 +221,8 @@ interface CalendarDay { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ isFirstOfLunar: boolean; @@ -228,7 +243,8 @@ interface CalendarDay { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ hasSchedule: boolean; @@ -247,7 +263,8 @@ interface CalendarDay { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ markLunarDay: boolean; } @@ -267,7 +284,8 @@ interface CalendarDay { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ interface MonthData { /** @@ -285,7 +303,8 @@ interface MonthData { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ year: number; @@ -304,7 +323,8 @@ interface MonthData { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ month: number; @@ -323,7 +343,8 @@ interface MonthData { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ data: CalendarDay[]; } @@ -343,7 +364,8 @@ interface MonthData { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ interface CurrentDayStyle { /** @@ -361,7 +383,8 @@ interface CurrentDayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ dayColor?: ResourceColor; @@ -380,7 +403,8 @@ interface CurrentDayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ lunarColor?: ResourceColor; @@ -399,7 +423,8 @@ interface CurrentDayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ markLunarColor?: ResourceColor; @@ -418,7 +443,8 @@ interface CurrentDayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ dayFontSize?: number; @@ -437,7 +463,8 @@ interface CurrentDayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ lunarDayFontSize?: number; @@ -456,7 +483,8 @@ interface CurrentDayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ dayHeight?: number; @@ -475,7 +503,8 @@ interface CurrentDayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ dayWidth?: number; @@ -494,7 +523,8 @@ interface CurrentDayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ gregorianCalendarHeight?: number; @@ -513,7 +543,8 @@ interface CurrentDayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ dayYAxisOffset?: number; @@ -532,7 +563,8 @@ interface CurrentDayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ lunarDayYAxisOffset?: number; @@ -551,7 +583,8 @@ interface CurrentDayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ underscoreXAxisOffset?: number; @@ -570,7 +603,8 @@ interface CurrentDayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ underscoreYAxisOffset?: number; @@ -589,7 +623,8 @@ interface CurrentDayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ scheduleMarkerXAxisOffset?: number; @@ -608,7 +643,8 @@ interface CurrentDayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ scheduleMarkerYAxisOffset?: number; @@ -627,7 +663,8 @@ interface CurrentDayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ colSpace?: number; @@ -646,7 +683,8 @@ interface CurrentDayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ dailyFiveRowSpace?: number; @@ -665,7 +703,8 @@ interface CurrentDayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ dailySixRowSpace?: number; @@ -684,7 +723,8 @@ interface CurrentDayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ lunarHeight?: number; @@ -703,7 +743,8 @@ interface CurrentDayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ underscoreWidth?: number; @@ -722,7 +763,8 @@ interface CurrentDayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ underscoreLength?: number; @@ -741,7 +783,8 @@ interface CurrentDayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ scheduleMarkerRadius?: number; @@ -760,7 +803,8 @@ interface CurrentDayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ boundaryRowOffset?: number; @@ -779,7 +823,8 @@ interface CurrentDayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ boundaryColOffset?: number; } @@ -799,7 +844,8 @@ interface CurrentDayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ interface NonCurrentDayStyle { /** @@ -817,7 +863,8 @@ interface NonCurrentDayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ nonCurrentMonthDayColor?: ResourceColor; @@ -836,7 +883,8 @@ interface NonCurrentDayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ nonCurrentMonthLunarColor?: ResourceColor; @@ -855,7 +903,8 @@ interface NonCurrentDayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ nonCurrentMonthWorkDayMarkColor?: ResourceColor; @@ -874,7 +923,8 @@ interface NonCurrentDayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ nonCurrentMonthOffDayMarkColor?: ResourceColor; } @@ -894,7 +944,8 @@ interface NonCurrentDayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ interface TodayStyle { /** @@ -912,7 +963,8 @@ interface TodayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ focusedDayColor?: ResourceColor; @@ -931,7 +983,8 @@ interface TodayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ focusedLunarColor?: ResourceColor; @@ -950,7 +1003,8 @@ interface TodayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ focusedAreaBackgroundColor?: ResourceColor; @@ -969,7 +1023,8 @@ interface TodayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ focusedAreaRadius?: number; } @@ -989,7 +1044,8 @@ interface TodayStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ interface WeekStyle { /** @@ -1007,7 +1063,8 @@ interface WeekStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ weekColor?: ResourceColor; @@ -1026,7 +1083,8 @@ interface WeekStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ weekendDayColor?: ResourceColor; @@ -1045,7 +1103,8 @@ interface WeekStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ weekendLunarColor?: ResourceColor; @@ -1064,7 +1123,8 @@ interface WeekStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ weekFontSize?: number; @@ -1083,7 +1143,8 @@ interface WeekStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ weekHeight?: number; @@ -1102,7 +1163,8 @@ interface WeekStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ weekWidth?: number; @@ -1121,7 +1183,8 @@ interface WeekStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ weekAndDayRowSpace?: number; } @@ -1141,7 +1204,8 @@ interface WeekStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ interface WorkStateStyle { /** @@ -1159,7 +1223,8 @@ interface WorkStateStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ workDayMarkColor?: ResourceColor; @@ -1178,7 +1243,8 @@ interface WorkStateStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ offDayMarkColor?: ResourceColor; @@ -1197,7 +1263,8 @@ interface WorkStateStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ workDayMarkSize?: number; @@ -1216,7 +1283,8 @@ interface WorkStateStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ offDayMarkSize?: number; @@ -1235,7 +1303,8 @@ interface WorkStateStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ workStateWidth?: number; @@ -1254,7 +1323,8 @@ interface WorkStateStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ workStateHorizontalMovingDistance?: number; @@ -1273,7 +1343,8 @@ interface WorkStateStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ workStateVerticalMovingDistance?: number; } @@ -1293,7 +1364,8 @@ interface WorkStateStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CalendarSelectedDate { /** @@ -1311,7 +1383,8 @@ declare interface CalendarSelectedDate { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ year: number; @@ -1330,7 +1403,8 @@ declare interface CalendarSelectedDate { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ month: number; @@ -1349,7 +1423,8 @@ declare interface CalendarSelectedDate { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ day: number; } @@ -1369,7 +1444,8 @@ declare interface CalendarSelectedDate { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CalendarRequestedData { /** @@ -1387,7 +1463,8 @@ declare interface CalendarRequestedData { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ year: number; @@ -1406,7 +1483,8 @@ declare interface CalendarRequestedData { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ month: number; @@ -1425,7 +1503,8 @@ declare interface CalendarRequestedData { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ currentYear: number; @@ -1444,7 +1523,8 @@ declare interface CalendarRequestedData { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ currentMonth: number; @@ -1463,7 +1543,8 @@ declare interface CalendarRequestedData { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ monthState: number; } @@ -1481,7 +1562,8 @@ declare interface CalendarRequestedData { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CalendarController { /** @@ -1497,7 +1579,8 @@ declare class CalendarController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -1518,6 +1601,17 @@ declare class CalendarController { */ backToToday(); + /** + * Back to day. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @form + * @since 20 + * @arkts 1.2 + */ + backToToday():void; + /** * To the specified element. * @@ -1536,6 +1630,88 @@ declare class CalendarController { * @since 10 */ goTo(value: { year: number; month: number; day: number }); + /** + * To the specified element. + * + * @param { CalendarSelectedDate } date + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @form + * @since 20 + * @arkts 1.2 + */ + goTo(date: CalendarSelectedDate): void; +} + +/** + * Defines the struct of CalendarRequestedMonths. + * + * @interface CalendarRequestedMonths + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @form + * @since 20 + * @arkts 1.2 + */ +declare interface CalendarRequestedMonths { + /** + * Default selected year/month/day. + * @type { CalendarSelectedDate } date + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @form + * @since 20 + * @arkts 1.2 + */ + date: CalendarSelectedDate; + + /** + * Dates contained in the current month. + * + * @type { MonthData } currentData + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @form + * @since 20 + * @arkts 1.2 + */ + currentData: MonthData; + + /** + * Dates contained in the previous month. + * + * @type { MonthData } preData + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @form + * @since 20 + * @arkts 1.2 + */ + preData: MonthData; + + /** + * Dates contained in the next month. + * + * @type { MonthData } nextData + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @form + * @since 20 + * @arkts 1.2 + */ + nextData: MonthData; + + /** + * Calendar controller. + * + * @type { ?CalendarController } controller + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @form + * @since 20 + * @arkts 1.2 + */ + controller?: CalendarController; } /** @@ -1553,7 +1729,8 @@ declare class CalendarController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ interface CalendarInterface { /** @@ -1582,6 +1759,19 @@ interface CalendarInterface { nextData: MonthData; controller?: CalendarController; }): CalendarAttribute; + + /** + * Set value. + * + * @param { CalendarRequestedMonths } value + * @returns { CalendarAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @form + * @since 20 + * @arkts 1.2 + */ + (value: CalendarRequestedMonths): CalendarAttribute; } /** @@ -1593,7 +1783,8 @@ interface CalendarInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CalendarAttribute { /** @@ -1613,7 +1804,8 @@ declare class CalendarAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ showLunar(value: boolean): CalendarAttribute; @@ -1634,7 +1826,8 @@ declare class CalendarAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ showHoliday(value: boolean): CalendarAttribute; @@ -1655,7 +1848,8 @@ declare class CalendarAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ needSlide(value: boolean): CalendarAttribute; @@ -1676,7 +1870,8 @@ declare class CalendarAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ startOfWeek(value: number): CalendarAttribute; @@ -1697,7 +1892,8 @@ declare class CalendarAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ offDays(value: number): CalendarAttribute; @@ -1718,7 +1914,8 @@ declare class CalendarAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ direction(value: Axis): CalendarAttribute; @@ -1739,7 +1936,8 @@ declare class CalendarAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ currentDayStyle(value: CurrentDayStyle): CalendarAttribute; @@ -1760,7 +1958,8 @@ declare class CalendarAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ nonCurrentDayStyle(value: NonCurrentDayStyle): CalendarAttribute; @@ -1781,7 +1980,8 @@ declare class CalendarAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ todayStyle(value: TodayStyle): CalendarAttribute; @@ -1802,7 +2002,8 @@ declare class CalendarAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ weekStyle(value: WeekStyle): CalendarAttribute; @@ -1823,7 +2024,8 @@ declare class CalendarAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ workStateStyle(value: WorkStateStyle): CalendarAttribute; @@ -1844,7 +2046,8 @@ declare class CalendarAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ onSelectChange(event: (event: CalendarSelectedDate) => void): CalendarAttribute; @@ -1865,7 +2068,8 @@ declare class CalendarAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ onRequestData( event: (event: CalendarRequestedData) => void, diff --git a/api/@internal/component/ets/calendar_picker.d.ts b/api/@internal/component/ets/calendar_picker.d.ts index 2ae7c8c787cde6ac58eb41bc6fa7850ffb1c0d2e..64f5844db6d5be69fe59a28a94c8c6580df0cf6e 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,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 */ interface CalendarPickerInterface { /** @@ -193,7 +211,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 +230,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 */ declare class CalendarPickerAttribute extends CommonMethod { /** @@ -231,10 +251,11 @@ declare class CalendarPickerAttribute extends CommonMethod } alignType - The type of alignment between entry and calendar dialog. @@ -243,7 +264,8 @@ declare class CalendarPickerAttribute extends CommonMethod, offset?: Offset): CalendarPickerAttribute; @@ -262,7 +284,8 @@ declare class CalendarPickerAttribute extends CommonMethod): CalendarPickerAttribute; @@ -302,18 +326,20 @@ declare class CalendarPickerAttribute extends CommonMethod): CalendarPickerAttribute; - /** + /** * Callback for selected date changed. * @param { Optional> } callback - callback for selected date changed. * @returns { CalendarPickerAttribute } the attribute of the CalendarPicker. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onChange(callback: Optional>): CalendarPickerAttribute; @@ -325,7 +351,8 @@ declare class CalendarPickerAttribute extends CommonMethod; @@ -396,7 +425,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 +452,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 +474,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 +496,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 +508,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 +520,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 +532,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 +544,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 +566,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 +588,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 +610,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 +632,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 +644,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 +657,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 +670,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 +683,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 +700,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 +717,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; } diff --git a/api/@internal/component/ets/canvas.d.ts b/api/@internal/component/ets/canvas.d.ts index 8821d237aae769bbb3b14515abdd94b2cb83a5e1..2bf4fd6649dcb9705e2966c7c0be6e617d877aff 100644 --- a/api/@internal/component/ets/canvas.d.ts +++ b/api/@internal/component/ets/canvas.d.ts @@ -18,6 +18,15 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod, Callback, PixelMap } from './common'; +import { FrameNode } from '../FrameNode'; +import { ImageAIOptions, ImageAnalyzerConfig } from './imageCommon'; +import { Matrix2D } from './matrix2d'; +import { VoidCallback, LengthMetricsUnit, LengthMetrics } from './units'; +import { Size } from '../Graphics'; +/*** endif */ + /** * Import the drawing canvas type object for Canvas. * @@ -73,7 +82,8 @@ declare type DrawingCanvas = import('../api/@ohos.graphics.drawing').default.Can * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare type CanvasFillRule = "evenodd" | "nonzero"; @@ -125,7 +135,8 @@ declare type CanvasFillRule = "evenodd" | "nonzero"; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare type CanvasLineCap = "butt" | "round" | "square"; @@ -189,7 +200,8 @@ declare type CanvasLineCap = "butt" | "round" | "square"; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare type CanvasLineJoin = "bevel" | "miter" | "round"; @@ -237,7 +249,8 @@ declare type CanvasLineJoin = "bevel" | "miter" | "round"; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare type CanvasDirection = "inherit" | "ltr" | "rtl"; @@ -246,9 +259,9 @@ declare type CanvasDirection = "inherit" | "ltr" | "rtl"; * "center": The text is centered. * "end": Where text aligns lines end (Left alignment refers to the local from left to right, * and right alignment refers to the local from right to left) - * "left": (Default) The text is left-aligned. + * "left": The text is left-aligned. * "right": The text is right-aligned. - * "start": Where the text snap line begins (Left alignment refers to the local from left to right, + * "start": (Default) Where the text snap line begins (Left alignment refers to the local from left to right, * and right alignment refers to the local from right to left) * * @typedef { "center" | "end" | "left" | "right" | "start" } CanvasTextAlign @@ -260,9 +273,9 @@ declare type CanvasDirection = "inherit" | "ltr" | "rtl"; * "center": The text is centered. * "end": Where text aligns lines end (Left alignment refers to the local from left to right, * and right alignment refers to the local from right to left) - * "left": (Default) The text is left-aligned. + * "left": The text is left-aligned. * "right": The text is right-aligned. - * "start": Where the text snap line begins (Left alignment refers to the local from left to right, + * "start": (Default) Where the text snap line begins (Left alignment refers to the local from left to right, * and right alignment refers to the local from right to left) * * @typedef { "center" | "end" | "left" | "right" | "start" } CanvasTextAlign @@ -275,9 +288,9 @@ declare type CanvasDirection = "inherit" | "ltr" | "rtl"; * "center": The text is centered. * "end": Where text aligns lines end (Left alignment refers to the local from left to right, * and right alignment refers to the local from right to left) - * "left": (Default) The text is left-aligned. + * "left": The text is left-aligned. * "right": The text is right-aligned. - * "start": Where the text snap line begins (Left alignment refers to the local from left to right, + * "start": (Default) Where the text snap line begins (Left alignment refers to the local from left to right, * and right alignment refers to the local from right to left) * * @typedef { "center" | "end" | "left" | "right" | "start" } CanvasTextAlign @@ -291,9 +304,9 @@ declare type CanvasDirection = "inherit" | "ltr" | "rtl"; * "center": The text is centered. * "end": Where text aligns lines end (Left alignment refers to the local from left to right, * and right alignment refers to the local from right to left) - * "left": (Default) The text is left-aligned. + * "left": The text is left-aligned. * "right": The text is right-aligned. - * "start": Where the text snap line begins (Left alignment refers to the local from left to right, + * "start": (Default) Where the text snap line begins (Left alignment refers to the local from left to right, * and right alignment refers to the local from right to left) * * @typedef { "center" | "end" | "left" | "right" | "start" } CanvasTextAlign @@ -301,7 +314,8 @@ declare type CanvasDirection = "inherit" | "ltr" | "rtl"; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare type CanvasTextAlign = "center" | "end" | "left" | "right" | "start"; @@ -369,7 +383,8 @@ declare type CanvasTextAlign = "center" | "end" | "left" | "right" | "start"; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare type CanvasTextBaseline = "alphabetic" | "bottom" | "hanging" | "ideographic" | "middle" | "top"; @@ -417,7 +432,8 @@ declare type CanvasTextBaseline = "alphabetic" | "bottom" | "hanging" | "ideogra * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare type ImageSmoothingQuality = "high" | "low" | "medium"; @@ -460,7 +476,8 @@ declare type FrameNode = import('../api/arkui/FrameNode').FrameNode; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CanvasGradient { /** @@ -503,7 +520,8 @@ declare class CanvasGradient { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ addColorStop(offset: number, color: string): void; @@ -550,7 +568,8 @@ declare class CanvasGradient { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CanvasPath { /** @@ -609,7 +628,8 @@ declare class CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void; @@ -661,7 +681,8 @@ declare class CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void; @@ -717,7 +738,8 @@ declare class CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void; @@ -749,7 +771,8 @@ declare class CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ closePath(): void; @@ -821,7 +844,8 @@ declare class CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ellipse( x: number, @@ -870,7 +894,8 @@ declare class CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ lineTo(x: number, y: number): void; @@ -910,7 +935,8 @@ declare class CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ moveTo(x: number, y: number): void; @@ -958,7 +984,8 @@ declare class CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void; @@ -1006,7 +1033,8 @@ declare class CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ rect(x: number, y: number, w: number, h: number): void; @@ -1062,7 +1090,8 @@ declare class CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class Path2D extends CanvasPath { /** @@ -1101,7 +1130,8 @@ declare class Path2D extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ addPath(path: Path2D, transform?: Matrix2D): void; @@ -1133,7 +1163,8 @@ declare class Path2D extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -1145,7 +1176,8 @@ declare class Path2D extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(unit: LengthMetricsUnit); @@ -1181,7 +1213,8 @@ declare class Path2D extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(path: Path2D); @@ -1194,7 +1227,8 @@ declare class Path2D extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(path: Path2D, unit: LengthMetricsUnit); @@ -1230,7 +1264,8 @@ declare class Path2D extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(d: string); @@ -1243,7 +1278,8 @@ declare class Path2D extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(description: string, unit: LengthMetricsUnit); } @@ -1280,7 +1316,8 @@ declare class Path2D extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CanvasPattern { /** @@ -1315,7 +1352,8 @@ declare interface CanvasPattern { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ setTransform(transform?: Matrix2D): void; } @@ -1352,7 +1390,8 @@ declare interface CanvasPattern { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextMetrics { /** @@ -1395,7 +1434,8 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly actualBoundingBoxAscent: number; @@ -1439,7 +1479,8 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly actualBoundingBoxDescent: number; @@ -1483,7 +1524,8 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly actualBoundingBoxLeft: number; @@ -1527,7 +1569,8 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly actualBoundingBoxRight: number; @@ -1571,7 +1614,8 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly alphabeticBaseline: number; @@ -1615,7 +1659,8 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly emHeightAscent: number; @@ -1659,7 +1704,8 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly emHeightDescent: number; @@ -1703,7 +1749,8 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly fontBoundingBoxAscent: number; @@ -1747,7 +1794,8 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly fontBoundingBoxDescent: number; @@ -1791,7 +1839,8 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly hangingBaseline: number; @@ -1835,7 +1884,8 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly ideographicBaseline: number; @@ -1875,7 +1925,8 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly width: number; @@ -1915,7 +1966,8 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly height: number; } @@ -1948,7 +2000,8 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ImageBitmap { /** @@ -1991,6 +2044,19 @@ declare class ImageBitmap { */ readonly height: number; + /** + * Indicates the height of the CSS pixel unit of ImageData. + * + * @return { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get height(): number; + /** * Indicates the width of the CSS pixel unit of ImageData. * @@ -2031,6 +2097,19 @@ declare class ImageBitmap { */ readonly width: number; + /** + * Indicates the width of the CSS pixel unit of ImageData. + * + * @return { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get width(): number; + /** * Releases all graphics resources associated with an ImageBitmap. * @@ -2059,7 +2138,8 @@ declare class ImageBitmap { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ close(): void; @@ -2149,6 +2229,19 @@ declare class ImageBitmap { * @since 12 */ constructor(data: PixelMap, unit: LengthMetricsUnit); + + /** + * Create an ImageBitmap object based on the transferred image path or PixelMap object. + * + * @param { PixelMap | string } src - image path or PixelMap object + * @param { LengthMetricsUnit } [unit] - the unit mode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(src: PixelMap | string, unit?: LengthMetricsUnit); } /** @@ -2179,7 +2272,8 @@ declare class ImageBitmap { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ImageData { /** @@ -2222,6 +2316,19 @@ declare class ImageData { */ readonly data: Uint8ClampedArray; + /** + * Array containing image pixel data + * + * @return { Uint8ClampedArray } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get data(): Uint8ClampedArray; + /** * Width of the image. * @@ -2262,6 +2369,19 @@ declare class ImageData { */ readonly height: number; + /** + * Height of the image. + * + * @return { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get height(): number; + /** * Height of the image. * @@ -2302,6 +2422,19 @@ declare class ImageData { */ readonly width: number; + /** + * Width of the image. + * + * @return { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get width(): number; + /** * Create an ImageData object based on the input parameters. * @@ -2357,7 +2490,8 @@ declare class ImageData { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(width: number, height: number, data?: Uint8ClampedArray, unit?: LengthMetricsUnit); } @@ -2390,7 +2524,8 @@ declare class ImageData { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RenderingContextSettings { /** @@ -2429,6 +2564,32 @@ declare class RenderingContextSettings { */ antialias?: boolean; + /** + * Get the status whether anti-aliasing is enabled for canvas. The default value is false. + * + * @return { boolean | undefined } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get antialias(): boolean | undefined; + + /** + * Set the status whether anti-aliasing is enabled for canvas. The default value is false. + * + * @param { boolean | undefined } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set antialias(antialias: boolean | undefined); + /** * Create an RenderingContextSettings object based on the antialias and alpha. * @@ -2461,7 +2622,8 @@ declare class RenderingContextSettings { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(antialias?: boolean); } @@ -2498,7 +2660,8 @@ declare class RenderingContextSettings { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CanvasRenderer extends CanvasPath { /** @@ -2513,6 +2676,30 @@ declare class CanvasRenderer extends CanvasPath { */ letterSpacing: LengthMetrics | string; + /** + * Get spacing for letter. + * + * @return { LengthMetrics | string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get letterSpacing(): LengthMetrics | string; + + /** + * Set spacing for letter. + * + * @param { LengthMetrics | string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set letterSpacing(letterSpacing: LengthMetrics | string); + /** * Transparency. The value ranges from 0.0 (completely transparent) to 1.0 (completely opaque). * If the value is out of range, the assignment is invalid. @@ -2557,6 +2744,34 @@ declare class CanvasRenderer extends CanvasPath { */ globalAlpha: number; + /** + * Get transparency. The value ranges from 0.0 (completely transparent) to 1.0 (completely opaque). + * If the value is out of range, the assignment is invalid. + * + * @return { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get globalAlpha(): number; + + /** + * Set transparency. The value ranges from 0.0 (completely transparent) to 1.0 (completely opaque). + * If the value is out of range, the assignment is invalid. + * + * @param { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set globalAlpha(globalAlpha: number); + /** * Type of composition operation applied when drawing a new shape. The following types are supported: * source-over: (Default) Draws a new drawing on top of an existing canvas context. @@ -2653,6 +2868,60 @@ declare class CanvasRenderer extends CanvasPath { */ globalCompositeOperation: string; + /** + * Get the type of composition operation applied when drawing a new shape. The following types are supported: + * source-over: (Default) Draws a new drawing on top of an existing canvas context. + * source-in: The new drawing is drawn only where the new drawing overlaps the target canvas. + * Everything else is transparent. + * source-out: Draws a new drawing where it does not overlap with the existing canvas content. + * source-atop: The new drawing is drawn only where it overlaps the content of the existing canvas. + * destination-over: Draws a new graphic behind the existing canvas content. + * destination-in: Existing canvas content remains where the new drawing overlaps the existing canvas content. + * Everything else is transparent. + * destination-out: Existing content remains where the new drawing does not overlap. + * destination-atop: The existing canvas retains only the part that overlaps with the new drawing, + * which is drawn behind the canvas content. + * lighter: The color of two overlapping shapes is determined by adding the color values. + * copy: Only new graphics are displayed. + * xor: In the image, those overlaps and other places outside of the normal drawing are transparent. + * + * @return { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get globalCompositeOperation(): string; + + /** + * Set the type of composition operation applied when drawing a new shape. The following types are supported: + * source-over: (Default) Draws a new drawing on top of an existing canvas context. + * source-in: The new drawing is drawn only where the new drawing overlaps the target canvas. + * Everything else is transparent. + * source-out: Draws a new drawing where it does not overlap with the existing canvas content. + * source-atop: The new drawing is drawn only where it overlaps the content of the existing canvas. + * destination-over: Draws a new graphic behind the existing canvas content. + * destination-in: Existing canvas content remains where the new drawing overlaps the existing canvas content. + * Everything else is transparent. + * destination-out: Existing content remains where the new drawing does not overlap. + * destination-atop: The existing canvas retains only the part that overlaps with the new drawing, + * which is drawn behind the canvas content. + * lighter: The color of two overlapping shapes is determined by adding the color values. + * copy: Only new graphics are displayed. + * xor: In the image, those overlaps and other places outside of the normal drawing are transparent. + * + * @param { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set globalCompositeOperation(globalCompositeOperation: string); + /** * Draw an image on a canvas * @@ -2693,7 +2962,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ drawImage(image: ImageBitmap | PixelMap, dx: number, dy: number): void; @@ -2745,7 +3015,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ drawImage(image: ImageBitmap | PixelMap, dx: number, dy: number, dw: number, dh: number): void; @@ -2813,7 +3084,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ drawImage( image: ImageBitmap | PixelMap, @@ -2855,7 +3127,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ beginPath(): void; @@ -2891,7 +3164,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ clip(fillRule?: CanvasFillRule): void; @@ -2931,7 +3205,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ clip(path: Path2D, fillRule?: CanvasFillRule): void; @@ -2967,7 +3242,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fill(fillRule?: CanvasFillRule): void; @@ -3007,7 +3283,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fill(path: Path2D, fillRule?: CanvasFillRule): void; @@ -3079,6 +3356,19 @@ declare class CanvasRenderer extends CanvasPath { */ stroke(path: Path2D): void; + /** + * Draws the specified path according to the current stroke style + * + * @param { Path2D } [path] - Specified stroke path object + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + stroke(path?: Path2D): void; + /** * Attributes that describe the fill color and style. The options are as follows: * color: Color String @@ -3133,6 +3423,40 @@ declare class CanvasRenderer extends CanvasPath { */ fillStyle: string | number | CanvasGradient | CanvasPattern; + /** + * Get the attributes specifie the color, gradient, or pattern to use inside shapes. The options are as follows: + * + * @return { string | number | CanvasGradient | CanvasPattern } + * string: Color String. + * number: Indicates the color with number. + * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. + * CanvasPattern: Template object. For details, see {@link CanvasPattern}. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get fillStyle(): string | number | CanvasGradient | CanvasPattern; + + /** + * Set the attributes specifie the color, gradient, or pattern to use inside shapes. The options are as follows: + * + * @param { string | number | CanvasGradient | CanvasPattern } + * string: Color String. + * number: Indicates the color with number. + * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. + * CanvasPattern: Template object. For details, see {@link CanvasPattern}. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set fillStyle(fillStyle: string | number | CanvasGradient | CanvasPattern); + /** * Attributes of the stroke color and style. The options are as follows: * color: Color String @@ -3188,9 +3512,45 @@ declare class CanvasRenderer extends CanvasPath { strokeStyle: string | number | CanvasGradient | CanvasPattern; /** - * Creates a linear gradient object that is specified along the parameter coordinates + * Get the attributes specifie the color, gradient, or pattern to use for the strokes (outlines) around shapes. + * The options are as follows: * - * @param { number } x0 - The x-axis coordinate of the start point. + * @return { string | number | CanvasGradient | CanvasPattern } + * string: Color String. + * number: Indicates the color with number. + * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. + * CanvasPattern: Template object. For details, see {@link CanvasPattern}. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get strokeStyle(): string | number | CanvasGradient | CanvasPattern; + + /** + * Set the attributes specifie the color, gradient, or pattern to use for the strokes (outlines) around shapes. + * The options are as follows: + * + * @param { string | number | CanvasGradient | CanvasPattern } + * string: Color String. + * number: Indicates the color with number. + * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. + * CanvasPattern: Template object. For details, see {@link CanvasPattern}. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set strokeStyle(strokeStyle: string | number | CanvasGradient | CanvasPattern); + + /** + * Creates a linear gradient object that is specified along the parameter coordinates + * + * @param { number } x0 - The x-axis coordinate of the start point. * @param { number } y0 - The y-axis coordinate of the start point. * @param { number } x1 - x-axis coordinate of the end point. * @param { number } y1 - y-axis coordinate of the end point. @@ -3235,7 +3595,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient; @@ -3299,7 +3660,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ createPattern(image: ImageBitmap, repetition: string | null): CanvasPattern | null; @@ -3359,7 +3721,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient; @@ -3386,7 +3749,8 @@ declare class CanvasRenderer extends CanvasPath { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ createConicGradient( startAngle: number, @@ -3498,6 +3862,64 @@ declare class CanvasRenderer extends CanvasPath { */ filter: string; + /** + * Provides filter effects such as blur and grayscale. You can get the following filter effects: + * blur(): Adds a Gaussian blur effect to the drawing + * brightness(): Provides a linear multiplication for the drawing and adjusts the brightness level. + * contrast(): Adjusts the contrast of the image. When the value is 0%, the image is completely black. + * When the value is 100%, there is no change in the image. + * grayscale(): Converts the image to a gray image. When the value is 100%, the image is completely gray. + * When the value is 0%, there is no change in the image. + * hue-rotate(): Perform color rotation on an image. When the value is 0 degrees, there is no change in the image. + * invert(): Inverted image (representing the effect of a photographic negative). When the value is 100%, + * the image is completely inverted. When the value is 0%, there is no change in the image. + * opacity(): Transparency of the image. At 0%, the image is completely transparent. + * When the value is 100%, there is no change in the image. + * saturate(): Perform saturation processing on the image. At 0%, the image is completely un-saturated. + * When the value is 100%, there is no change in the image. + * sepia(): The image is sepia (nostalgic style). At 100%, the image turns completely sepia. + * When the value is 0%, there is no change in the image. + * none: Turn off filter effects + * + * @return { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get filter(): string; + + /** + * Provides filter effects such as blur and grayscale. You can set the following filter effects: + * blur(): Adds a Gaussian blur effect to the drawing + * brightness(): Provides a linear multiplication for the drawing and adjusts the brightness level. + * contrast(): Adjusts the contrast of the image. When the value is 0%, the image is completely black. + * When the value is 100%, there is no change in the image. + * grayscale(): Converts the image to a gray image. When the value is 100%, the image is completely gray. + * When the value is 0%, there is no change in the image. + * hue-rotate(): Perform color rotation on an image. When the value is 0 degrees, there is no change in the image. + * invert(): Inverted image (representing the effect of a photographic negative). When the value is 100%, + * the image is completely inverted. When the value is 0%, there is no change in the image. + * opacity(): Transparency of the image. At 0%, the image is completely transparent. + * When the value is 100%, there is no change in the image. + * saturate(): Perform saturation processing on the image. At 0%, the image is completely un-saturated. + * When the value is 100%, there is no change in the image. + * sepia(): The image is sepia (nostalgic style). At 100%, the image turns completely sepia. + * When the value is 0%, there is no change in the image. + * none: Turn off filter effects + * + * @param { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set filter(filter: string); + /** * Creates a new, empty ImageData object of the specified size * @@ -3538,7 +3960,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ createImageData(sw: number, sh: number): ImageData; @@ -3582,7 +4005,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ createImageData(imagedata: ImageData): ImageData; @@ -3634,7 +4058,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getImageData(sx: number, sy: number, sw: number, sh: number): ImageData; @@ -3672,7 +4097,8 @@ declare class CanvasRenderer extends CanvasPath { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getPixelMap(sx: number, sy: number, sw: number, sh: number): PixelMap; @@ -3716,7 +4142,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ putImageData(imagedata: ImageData, dx: number | string, dy: number | string): void; @@ -3792,7 +4219,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ putImageData( imagedata: ImageData, @@ -3848,6 +4276,34 @@ declare class CanvasRenderer extends CanvasPath { */ imageSmoothingEnabled: boolean; + /** + * Get the status whether to smooth the image. The value true indicates that the image is smooth. + * The value false indicates that the image is not smooth. + * + * @return { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get imageSmoothingEnabled(): boolean; + + /** + * Set the status whether to smooth the image. The value true indicates that the image is smooth. + * The value false indicates that the image is not smooth. + * + * @param { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set imageSmoothingEnabled(imageSmoothingEnabled: boolean); + /** * Smoothness level of the current image. For details, see {@link ImageSmoothingQuality}. * @@ -3888,6 +4344,32 @@ declare class CanvasRenderer extends CanvasPath { */ imageSmoothingQuality: ImageSmoothingQuality; + /** + * Get the smoothness level of the current image. For details, see {@link ImageSmoothingQuality}. + * + * @return { ImageSmoothingQuality } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get imageSmoothingQuality(): ImageSmoothingQuality; + + /** + * Set the smoothness level of the current image. For details, see {@link ImageSmoothingQuality}. + * + * @param { ImageSmoothingQuality } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set imageSmoothingQuality(imageSmoothingQuality: ImageSmoothingQuality); + /** * Line segment endpoint attribute. For details, see {@link CanvasLineCap}. * @@ -3927,6 +4409,32 @@ declare class CanvasRenderer extends CanvasPath { * @since 11 */ lineCap: CanvasLineCap; + + /** + * Get the line segment endpoint attribute. For details, see {@link CanvasLineCap}. + * + * @return { CanvasLineCap } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get lineCap(): CanvasLineCap; + + /** + * Set the line segment endpoint attribute. For details, see {@link CanvasLineCap}. + * + * @param { CanvasLineCap } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set lineCap(lineCap: CanvasLineCap); /** * Dotted line offset attribute. @@ -3968,6 +4476,32 @@ declare class CanvasRenderer extends CanvasPath { */ lineDashOffset: number; + /** + * Get the dotted line offset attribute. + * + * @return { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get lineDashOffset(): number; + + /** + * Set the dotted line offset attribute. + * + * @param { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set lineDashOffset(lineDashOffset: number); + /** * Line segment connection point attribute. For details, see {@link CanvasLineJoin}. * @@ -4008,6 +4542,32 @@ declare class CanvasRenderer extends CanvasPath { */ lineJoin: CanvasLineJoin; + /** + * Get the line segment connection point attribute. For details, see {@link CanvasLineJoin}. + * + * @return { CanvasLineJoin } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get lineJoin(): CanvasLineJoin; + + /** + * Set the line segment connection point attribute. For details, see {@link CanvasLineJoin}. + * + * @param { CanvasLineJoin } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set lineJoin(lineJoin: CanvasLineJoin); + /** * Line thickness attribute. The value cannot be 0 or a negative number. * @@ -4048,6 +4608,32 @@ declare class CanvasRenderer extends CanvasPath { */ lineWidth: number; + /** + * Get the line thickness attribute. The value cannot be 0 or a negative number. + * + * @return { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get lineWidth(): number; + + /** + * Set the line thickness attribute. The value cannot be 0 or a negative number. + * + * @param { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set lineWidth(lineWidth: number); + /** * The value of this parameter cannot be 0 or a negative number. * @@ -4088,6 +4674,32 @@ declare class CanvasRenderer extends CanvasPath { */ miterLimit: number; + /** + * Get the value of this parameter cannot be 0 or a negative number. + * + * @return { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get miterLimit(): number; + + /** + * Set the value of this parameter cannot be 0 or a negative number. + * + * @param { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set miterLimit(miterLimit: number); + /** * Gets the current segment style. * @@ -4120,7 +4732,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getLineDash(): number[]; @@ -4160,7 +4773,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ setLineDash(segments: number[]): void; @@ -4208,7 +4822,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ clearRect(x: number, y: number, w: number, h: number): void; @@ -4256,7 +4871,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fillRect(x: number, y: number, w: number, h: number): void; @@ -4304,7 +4920,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeRect(x: number, y: number, w: number, h: number): void; @@ -4348,6 +4965,32 @@ declare class CanvasRenderer extends CanvasPath { */ shadowBlur: number; + /** + * Get the shadow blur radius. The value cannot be a negative number. + * + * @return { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get shadowBlur(): number; + + /** + * Set the shadow blur radius. The value cannot be a negative number. + * + * @param { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set shadowBlur(shadowBlur: number); + /** * Shadow color. * @@ -4388,6 +5031,32 @@ declare class CanvasRenderer extends CanvasPath { */ shadowColor: string; + /** + * Get the shadow color. + * + * @return { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get shadowColor(): string; + + /** + * Set the shadow color. + * + * @param { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set shadowColor(shadowColor: string); + /** * Horizontal offset distance of the shadow. * @@ -4406,27 +5075,53 @@ declare class CanvasRenderer extends CanvasPath { * @since 9 */ /** - * Horizontal offset distance of the shadow. + * Horizontal offset distance of the shadow. + * + * @type { number } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Horizontal offset distance of the shadow. + * + * @type { number } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + shadowOffsetX: number; + + /** + * Get the horizontal offset distance of the shadow. * - * @type { number } - * @default 0 + * @return { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form - * @since 10 + * @atomicservice + * @since 20 + * @arkts 1.2 */ + get shadowOffsetX(): number; + /** - * Horizontal offset distance of the shadow. + * Set the horizontal offset distance of the shadow. * - * @type { number } - * @default 0 + * @param { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since 20 + * @arkts 1.2 */ - shadowOffsetX: number; + set shadowOffsetX(shadowOffsetX: number); /** * Vertical offset distance of the shadow. @@ -4468,6 +5163,32 @@ declare class CanvasRenderer extends CanvasPath { */ shadowOffsetY: number; + /** + * Get the vertical offset distance of the shadow. + * + * @return { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get shadowOffsetY(): number; + + /** + * Set the vertical offset distance of the shadow. + * + * @param { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set shadowOffsetY(shadowOffsetY: number); + /** * Top of the stack pop-up state in the drawing state stack * @@ -4496,7 +5217,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ restore(): void; @@ -4528,7 +5250,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ save(): void; @@ -4576,7 +5299,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fillText(text: string, x: number, y: number, maxWidth?: number): void; @@ -4616,7 +5340,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ measureText(text: string): TextMetrics; @@ -4664,7 +5389,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeText(text: string, x: number, y: number, maxWidth?: number): void; @@ -4708,6 +5434,32 @@ declare class CanvasRenderer extends CanvasPath { */ direction: CanvasDirection; + /** + * Get the text drawing direction. For details, see {@link CanvasDirection}. + * + * @return { CanvasDirection } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get direction(): CanvasDirection; + + /** + * Set the text drawing direction. For details, see {@link CanvasDirection}. + * + * @param { CanvasDirection } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set direction(direction: CanvasDirection); + /** * Font style. * @@ -4748,6 +5500,32 @@ declare class CanvasRenderer extends CanvasPath { */ font: string; + /** + * Get the font style. + * + * @return { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get font(): string; + + /** + * Set the font style. + * + * @param { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set font(font: string); + /** * Text alignment mode. For details, see {@link CanvasTextAlign}. * @@ -4788,6 +5566,32 @@ declare class CanvasRenderer extends CanvasPath { */ textAlign: CanvasTextAlign; + /** + * Get the text alignment mode. For details, see {@link CanvasTextAlign}. + * + * @return { CanvasTextAlign } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get textAlign(): CanvasTextAlign; + + /** + * Set the text alignment mode. For details, see {@link CanvasTextAlign}. + * + * @param { CanvasTextAlign } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set textAlign(textAlign: CanvasTextAlign); + /** * Text baseline. For details, see {@link CanvasTextBaseline}. * @@ -4828,6 +5632,32 @@ declare class CanvasRenderer extends CanvasPath { */ textBaseline: CanvasTextBaseline; + /** + * Get the text baseline. For details, see {@link CanvasTextBaseline}. + * + * @return { CanvasTextBaseline } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get textBaseline(): CanvasTextBaseline; + + /** + * Set the text baseline. For details, see {@link CanvasTextBaseline}. + * + * @param { CanvasTextBaseline } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set textBaseline(textBaseline: CanvasTextBaseline); + /** * Obtains the currently applied transformation matrix. * @@ -4860,7 +5690,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getTransform(): Matrix2D; @@ -4892,7 +5723,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ resetTransform(): void; @@ -4932,7 +5764,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ rotate(angle: number): void; @@ -4972,7 +5805,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scale(x: number, y: number): void; @@ -5032,7 +5866,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void; @@ -5072,7 +5907,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ setTransform(transform?: Matrix2D): void; @@ -5132,7 +5968,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ transform(a: number, b: number, c: number, d: number, e: number, f: number): void; @@ -5172,7 +6009,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ translate(x: number, y: number): void; @@ -5198,7 +6036,8 @@ declare class CanvasRenderer extends CanvasPath { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ setPixelMap(value?: PixelMap): void; @@ -5234,7 +6073,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ transferFromImageBitmap(bitmap: ImageBitmap): void; @@ -5244,7 +6084,8 @@ declare class CanvasRenderer extends CanvasPath { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ saveLayer(): void; @@ -5254,18 +6095,20 @@ declare class CanvasRenderer extends CanvasPath { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ restoreLayer(): void; /** - * Clear the backing buffer, drawing state stack, any defined paths, and styles. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ + * Clear the backing buffer, drawing state stack, any defined paths, and styles. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ reset(): void; } @@ -5301,7 +6144,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CanvasRenderingContext2D extends CanvasRenderer { /** @@ -5344,6 +6188,20 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { */ readonly height: number; + /** + * The default value is 0, which is bound to the height of the specified canvas. The value is read-only. + * + * @return { number } + * @readonly + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get height(): number; + /** * The default value is 0, which is bound to the width of the specified canvas. The value is read-only. * @@ -5384,6 +6242,20 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { */ readonly width: number; + /** + * The default value is 0, which is bound to the width of the specified canvas. The value is read-only. + * + * @return { number } + * @readonly + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get width(): number; + /** * Frame node of the canvas. The default value is null. * @@ -5396,6 +6268,18 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { */ readonly canvas: FrameNode; + /** + * Frame node of the canvas. The default value is null. + * + * @return { FrameNode } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get canvas(): FrameNode; + /** * Generate a character string in the data url format. * @@ -5444,6 +6328,22 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { */ toDataURL(type?: string, quality?: any): string; + /** + * Generate a character string in the data url format. + * + * @param { string } [type] - Image format. The default value is image/png. + * @param { number } [quality] - If the image format is image/jpeg or image/webp, you can select the image quality from 0 to 1. + * If the value is out of the range, the default value 0.92 is used. + * @returns { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + toDataURL(type?: string, quality?: number): string; + /** * Start image analyzer. * @@ -5454,7 +6354,8 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { * @throws { BusinessError } 110003 - Image analysis is stopped. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ startImageAnalyzer(config: ImageAnalyzerConfig): Promise; @@ -5462,7 +6363,8 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { * Stop image analyzer. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ stopImageAnalyzer(): void; @@ -5511,7 +6413,8 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(settings?: RenderingContextSettings, unit?: LengthMetricsUnit); @@ -5527,7 +6430,8 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'onAttach', callback: Callback): void; @@ -5543,7 +6447,8 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'onAttach', callback?: Callback): void; @@ -5559,7 +6464,8 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'onDetach', callback: Callback): void; @@ -5575,7 +6481,8 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'onDetach', callback?: Callback): void; } @@ -5612,7 +6519,8 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class OffscreenCanvasRenderingContext2D extends CanvasRenderer { /** @@ -5663,6 +6571,22 @@ declare class OffscreenCanvasRenderingContext2D extends CanvasRenderer { */ toDataURL(type?: string, quality?: any): string; + /** + * Generate a character string in the data url format. + * + * @param { string } [type] - Image format. The default value is image/png. + * @param { number } [quality] - If the image format is image/jpeg or image/webp, you can select the image quality from 0 to 1. + * If the value is out of the range, the default value 0.92 is used. + * @returns { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + toDataURL(type?: string, quality?: number): string; + /** * transfer the content to ImageBitmap * @@ -5695,7 +6619,8 @@ declare class OffscreenCanvasRenderingContext2D extends CanvasRenderer { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ transferToImageBitmap(): ImageBitmap; @@ -5754,7 +6679,8 @@ declare class OffscreenCanvasRenderingContext2D extends CanvasRenderer { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(width: number, height: number, settings?: RenderingContextSettings, unit?: LengthMetricsUnit); } @@ -5790,7 +6716,8 @@ declare class OffscreenCanvasRenderingContext2D extends CanvasRenderer { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class OffscreenCanvas { /** @@ -5829,6 +6756,32 @@ declare class OffscreenCanvas { */ height: number; + /** + * Get the height of the off-screen canvas. + * + * @return { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get height(): number; + + /** + * Set the height of the off-screen canvas. + * + * @param { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set height(height: number); + /** * Width of the off-screen canvas. * @@ -5865,6 +6818,32 @@ declare class OffscreenCanvas { */ width: number; + /** + * Get the width of the off-screen canvas. + * + * @return { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get width(): number; + + /** + * Set the width of the off-screen canvas. + * + * @param { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set width(width: number); + /** * Exports rendered content as an ImageBitmap object * @@ -5897,7 +6876,8 @@ declare class OffscreenCanvas { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ transferToImageBitmap(): ImageBitmap; @@ -5922,7 +6902,8 @@ declare class OffscreenCanvas { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getContext(contextType: "2d", options?: RenderingContextSettings): OffscreenCanvasRenderingContext2D; @@ -5979,8 +6960,24 @@ declare class OffscreenCanvas { * @since 12 */ constructor(width: number, height: number, unit: LengthMetricsUnit); + + /** + * Constructor of the off-screen canvas, which is used to create an off-screen canvas object. + * + * @param { number } width - Width of the off-screen canvas. + * @param { number } height - Height of the off-screen canvas. + * @param { LengthMetricsUnit } [unit] - the unit mode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(width: number, height: number, unit?: LengthMetricsUnit); } +/*** if arkts 1.1 */ /** * Size info. * @@ -5988,7 +6985,8 @@ declare class OffscreenCanvas { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface Size { /** @@ -5998,7 +6996,8 @@ declare interface Size { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width: number; @@ -6009,10 +7008,12 @@ declare interface Size { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ height: number; } +/*** endif */ /** * Defines DrawingRenderingContext. @@ -6020,7 +7021,8 @@ declare interface Size { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class DrawingRenderingContext { @@ -6031,7 +7033,8 @@ declare class DrawingRenderingContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get size(): Size; @@ -6052,7 +7055,8 @@ declare class DrawingRenderingContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ invalidate(): void; @@ -6063,7 +7067,8 @@ declare class DrawingRenderingContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(unit?: LengthMetricsUnit); } @@ -6100,7 +7105,8 @@ declare class DrawingRenderingContext { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface CanvasInterface { /** @@ -6150,7 +7156,8 @@ interface CanvasInterface { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ (context?: CanvasRenderingContext2D | DrawingRenderingContext): CanvasAttribute; @@ -6162,7 +7169,8 @@ interface CanvasInterface { * @returns { CanvasAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ (context: CanvasRenderingContext2D | DrawingRenderingContext, imageAIOptions: ImageAIOptions): CanvasAttribute; } @@ -6199,7 +7207,8 @@ interface CanvasInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CanvasAttribute extends CommonMethod { /** @@ -6249,7 +7258,8 @@ declare class CanvasAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onReady(event: VoidCallback): CanvasAttribute; @@ -6260,7 +7270,8 @@ declare class CanvasAttribute extends CommonMethod { * @returns { CanvasAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableAnalyzer(enable: boolean): CanvasAttribute; } diff --git a/api/@internal/component/ets/checkbox.d.ts b/api/@internal/component/ets/checkbox.d.ts index 10261869716ca770c8a0fa1bf81aa97e006c9bd2..859d3b4930a8fc28f966209d85b3035899b47ebb 100644 --- a/api/@internal/component/ets/checkbox.d.ts +++ b/api/@internal/component/ets/checkbox.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonConfiguration, Callback, CommonMethod, ContentModifier, Optional } from './common'; +import { CustomBuilder } from './builder'; +import { ResourceColor, MarkStyle } from './units'; +import { CheckBoxShape } from './enums'; +/*** endif */ + /** * Defines the options of Checkbox. * @@ -50,7 +57,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CheckboxOptions { /** @@ -85,7 +93,8 @@ declare interface CheckboxOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ name?: string; @@ -121,7 +130,8 @@ declare interface CheckboxOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ group?: string; @@ -132,7 +142,8 @@ declare interface CheckboxOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ indicatorBuilder?: CustomBuilder; } @@ -145,7 +156,8 @@ declare interface CheckboxOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CheckBoxConfiguration extends CommonConfiguration { /** @@ -155,7 +167,8 @@ declare interface CheckBoxConfiguration extends CommonConfiguration; } @@ -214,7 +229,8 @@ declare interface CheckBoxConfiguration extends CommonConfiguration void; @@ -308,7 +325,8 @@ declare type OnCheckboxChangeCallback = (value: boolean) => void; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CheckboxAttribute extends CommonMethod { /** @@ -347,7 +365,8 @@ declare class CheckboxAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ select(value: boolean): CheckboxAttribute; @@ -360,7 +379,8 @@ declare class CheckboxAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ select(isSelected: Optional): CheckboxAttribute; @@ -400,7 +420,8 @@ declare class CheckboxAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedColor(value: ResourceColor): CheckboxAttribute; @@ -413,7 +434,8 @@ declare class CheckboxAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ selectedColor(resColor: Optional): CheckboxAttribute; @@ -436,7 +458,8 @@ declare class CheckboxAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shape(value: CheckBoxShape): CheckboxAttribute; @@ -449,7 +472,8 @@ declare class CheckboxAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ shape(shape: Optional): CheckboxAttribute; @@ -470,7 +494,8 @@ declare class CheckboxAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ unselectedColor(value: ResourceColor): CheckboxAttribute; @@ -482,7 +507,8 @@ declare class CheckboxAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ unselectedColor(resColor: Optional): CheckboxAttribute; @@ -503,7 +529,8 @@ declare class CheckboxAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ mark(value: MarkStyle): CheckboxAttribute; @@ -515,7 +542,8 @@ declare class CheckboxAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ mark(style: Optional): CheckboxAttribute; @@ -559,7 +587,6 @@ declare class CheckboxAttribute extends CommonMethod { */ /** * Called when the selection status changes. - * Anonymous Object Rectification. * * @param { OnCheckboxChangeCallback } callback * @returns { CheckboxAttribute } @@ -567,7 +594,8 @@ declare class CheckboxAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onChange(callback: OnCheckboxChangeCallback): CheckboxAttribute; @@ -580,7 +608,8 @@ declare class CheckboxAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onChange(callback: Optional): CheckboxAttribute; @@ -592,7 +621,8 @@ declare class CheckboxAttribute 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): CheckboxAttribute; @@ -604,7 +634,8 @@ declare class CheckboxAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ contentModifier(modifier: Optional>): CheckboxAttribute; } diff --git a/api/@internal/component/ets/checkboxgroup.d.ts b/api/@internal/component/ets/checkboxgroup.d.ts index 7d33b8fd86c87ac39076badec21bfbc102fb1940..4d420294b45f647639f573d710f09f8a81a9655a 100644 --- a/api/@internal/component/ets/checkboxgroup.d.ts +++ b/api/@internal/component/ets/checkboxgroup.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod, Optional } from './common'; +import { ResourceColor, MarkStyle } from './units'; +import { CheckBoxShape } from './enums'; +/*** endif */ + /** * CheckboxGroup SelectStatus * @@ -50,7 +56,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SelectStatus { /** @@ -81,7 +88,8 @@ declare enum SelectStatus { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ All, /** @@ -112,7 +120,8 @@ declare enum SelectStatus { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Part, /** @@ -143,7 +152,8 @@ declare enum SelectStatus { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, } @@ -180,7 +190,8 @@ declare enum SelectStatus { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CheckboxGroupOptions { /** @@ -215,7 +226,8 @@ declare interface CheckboxGroupOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ group?: string; } @@ -252,7 +264,8 @@ declare interface CheckboxGroupOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CheckboxGroupResult { /** @@ -287,7 +300,8 @@ declare interface CheckboxGroupResult { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ name: Array; /** @@ -322,7 +336,8 @@ declare interface CheckboxGroupResult { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ status: SelectStatus; } @@ -359,7 +374,8 @@ declare interface CheckboxGroupResult { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface CheckboxGroupInterface { /** @@ -398,7 +414,8 @@ interface CheckboxGroupInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (options?: CheckboxGroupOptions): CheckboxGroupAttribute; } @@ -413,7 +430,8 @@ interface CheckboxGroupInterface { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnCheckboxGroupChangeCallback = (value: CheckboxGroupResult) => void; @@ -449,7 +467,8 @@ declare type OnCheckboxGroupChangeCallback = (value: CheckboxGroupResult) => voi * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CheckboxGroupAttribute extends CommonMethod { /** @@ -488,7 +507,8 @@ declare class CheckboxGroupAttribute extends CommonMethod): CheckboxGroupAttribute; @@ -541,7 +562,8 @@ declare class CheckboxGroupAttribute extends CommonMethod): CheckboxGroupAttribute; @@ -575,7 +598,8 @@ declare class CheckboxGroupAttribute extends CommonMethod): CheckboxGroupAttribute; @@ -608,7 +633,8 @@ declare class CheckboxGroupAttribute extends CommonMethod): CheckboxGroupAttribute; @@ -672,7 +699,8 @@ declare class CheckboxGroupAttribute extends CommonMethod): CheckboxGroupAttribute; @@ -698,7 +727,8 @@ declare class CheckboxGroupAttribute extends CommonMethod): CheckboxGroupAttribute; } diff --git a/api/@internal/component/ets/circle.d.ts b/api/@internal/component/ets/circle.d.ts index 42e6cc834a3f90dea4e9c7c544bb2a43d7a7b38a..4e7132656dd857f10a27182e14d708a5a9b04198 100644 --- a/api/@internal/component/ets/circle.d.ts +++ b/api/@internal/component/ets/circle.d.ts @@ -18,6 +18,10 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonShapeMethod,CommonMethod } from './common'; +/*** endif */ + /** * Defines circle options for Circle component. * @@ -50,7 +54,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CircleOptions { /** @@ -96,6 +101,7 @@ declare interface CircleOptions { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ width?: Length; @@ -142,6 +148,7 @@ declare interface CircleOptions { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ height?: Length; } @@ -294,7 +301,8 @@ interface CircleInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CircleAttribute extends CommonShapeMethod {} @@ -361,3 +369,30 @@ declare const Circle: CircleInterface; * @since 11 */ declare const CircleInstance: CircleAttribute; + +/** + * Defines circle component. + * + * @interface CircleInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface CircleInterface { + /** + * Set the options for circle component. + * + * @param { CircleOptions } [value] - options to create circle component. + * @returns { CircleAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + (value?: CircleOptions): CircleAttribute; +} diff --git a/api/@internal/component/ets/column_split.d.ts b/api/@internal/component/ets/column_split.d.ts index f76e6cc09da387856ea2096a1079ca28614b94c2..4ad3617ad8ed6b196c97a1b150fcbea635c855ec 100644 --- a/api/@internal/component/ets/column_split.d.ts +++ b/api/@internal/component/ets/column_split.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Dimension } from './units'; +import { CommonMethod } from './common'; +/*** endif */ + /** * Defines the ColumnSplit component. * @@ -40,7 +45,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ColumnSplitInterface { /** @@ -65,7 +71,8 @@ interface ColumnSplitInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (): ColumnSplitAttribute; } @@ -85,7 +92,8 @@ interface ColumnSplitInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ColumnSplitDividerStyle { /** @@ -105,7 +113,8 @@ interface ColumnSplitDividerStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ startMargin?: Dimension; @@ -126,7 +135,8 @@ interface ColumnSplitDividerStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ endMargin?: Dimension; } @@ -153,7 +163,8 @@ interface ColumnSplitDividerStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ColumnSplitAttribute extends CommonMethod { /** @@ -181,7 +192,8 @@ declare class ColumnSplitAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ resizeable(value: boolean): ColumnSplitAttribute; @@ -202,7 +214,8 @@ declare class ColumnSplitAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ divider(value: ColumnSplitDividerStyle | null): ColumnSplitAttribute; } diff --git a/api/@internal/component/ets/common.d.ts b/api/@internal/component/ets/common.d.ts index d5e44aff827e87ee3173767125ef97b26796be47..e6f76e0fd384154b43db788e83c810d053b303e3 100644 --- a/api/@internal/component/ets/common.d.ts +++ b/api/@internal/component/ets/common.d.ts @@ -18,6 +18,58 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import Context from '../../application/Context'; +import { Resource } from '../../global/resource'; +import pointer from '../../@ohos.multimodalInput.pointer'; +import image from '../../@ohos.multimedia.image'; +import unifiedDataChannel from '../../@ohos.data.unifiedDataChannel'; +import promptAction from '../../@ohos.promptAction'; +import uniformTypeDescriptor from '../../@ohos.data.uniformTypeDescriptor'; +import Want from '../../@ohos.app.ability.Want'; +import { IntentionCode } from '../../@ohos.multimodalInput.intentionCode'; +import { SymbolGlyphModifier } from '../../arkui/SymbolGlyphModifier'; +import { CircleShape, EllipseShape, PathShape, RectShape } from '../../@ohos.arkui.shape'; +import uiObserver from '../../@ohos.arkui.observer'; +import { UIContext } from '../../@ohos.arkui.UIContext'; +import { DrawContext, LengthMetrics } from '../../arkui/Graphics'; +import uiEffect from '../../@ohos.graphics.uiEffect'; +import { FocusBoxStyle, FocusPriority } from './focus'; +import { ComponentContent } from '../../arkui/ComponentContent'; +import { ResizableOptions } from './image'; +import { Theme } from '../../@ohos.arkui.theme'; +import intl from '../../@ohos.intl'; +import { ButtonType, ButtonStyleMode, ButtonRole } from './button'; +import { + Area, ResourceColor, Dimension, ResourceStr, Font, Length, EdgeColors, + LocalizedEdgeColors, BorderRadiuses, EdgeWidths, LocalizedEdgeWidths, SizeOptions, Bias, + EdgeStyles, Position, LocalizedBorderRadiuses, Margin, ChainWeightOptions, Padding, LocalizedPadding, LocalizedMargin, + BorderOptions, OutlineOptions, EdgeOutlineStyles, EdgeOutlineWidths, OutlineRadiuses, Edges, LocalizedEdges, LocalizedPosition, + AccessibilityOptions, ConstraintSizeOptions, EdgeWidth, DirectionalEdgesT, VoidCallback + } from './units'; +import { BaseGestureEvent, GestureRecognizer, GestureJudgeResult, GestureType, + GestureMask, GestureHandler, GesturePriority, GestureInfo + } from './gesture'; +import { ScrollState } from './list'; +import { + AccessibilityHoverType, Curve, PlayMode, SharedTransitionEffectType, KeySource, BorderStyle, + HorizontalAlign, VerticalAlign, MouseButton, MouseAction, TransitionType, FontWeight, TouchType, + FontStyle, Color, ColoringStrategy, Placement, ArrowPointPosition, ClickEffectLevel, NestedScrollMode, HitTestMode, + Alignment, ImageRepeat, ImageSize, HoverEffect, Visibility, ItemAlign, Direction, Axis, GradientDirection, FunctionKey, + ModifierKey, ObscuredReasons, RenderFit, LineCapStyle, LineJoinStyle, PixelRoundCalcPolicy, IlluminatedType, TextDecorationType, + TextDecorationStyle, KeyType, ResponseType, BarState, EdgeEffect, ScrollSource, InteractionHand, AxisAction, AxisModel, CrownAction, + FocusDrawLevel, CrownSensitivity +} from './enums'; +import { TextRange } from './textCommon'; +import { StyledString } from './styledString'; +import { CircleAttribute } from './circle'; +import { RectAttribute } from './rect'; +import { PathAttribute } from './path'; +import { EllipseAttribute } from './ellipse'; +import { LocalStorage } from '../stateManagement/storages/localStorage'; +import { CustomBuilder } from './builder'; +/*** endif */ + /** * Defines the options of Component ClassDecorator. * @@ -77,11 +129,12 @@ declare interface ComponentOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface InputCounterOptions { /** - * It is the numerator bit of the percentage and used as a threshold. If the number of characters input + * It is the numerator bit of the percentage and used as a threshold. If the number of characters input * reaches the maximum number of characters multiplied by this threshold, the counter is displayed. * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -89,31 +142,17 @@ declare interface InputCounterOptions { * @since 11 */ /** - * It is the numerator bit of the percentage and used as a threshold. If the number of characters input + * It is the numerator bit of the percentage and used as a threshold. If the number of characters input * reaches the maximum number of characters multiplied by this threshold, the counter is displayed. - * - *

NOTE: - *
Threshold percentage for displaying the character counter. - *
The character counter is displayed when the number of characters that have been entered is greater than - * the maximum number of characters multiplied by the threshold percentage value. - *
When displayed, the character counter is in the following format: - *
Number of characters that have been entered/Maximum number of characters allowed. - *
It is visible when the number of characters entered is greater than - * the character limit multiplied by the threshold percentage value. - *
Value range: [1, 100] - *
If the value is not an integer, it is rounded down to the nearest integer. - *
If the value exceeds the valid value range, the character counter is not displayed. - *
If the value is undefined, the character counter is displayed, but this parameter has no effect. - *

- * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ thresholdPercentage?: number; - + /** * If the current input character count reaches the maximum character count and users want to exceed the * normal input, the border will turn red. If this parameter is true, the red border displayed. @@ -126,22 +165,13 @@ declare interface InputCounterOptions { /** * If the current input character count reaches the maximum character count and users want to exceed the * normal input, the border will turn red. If this parameter is true, the red border displayed. - * - *

NOTE: - *
Whether to highlight the text box border and character counter subscript in red. - *
If options is not set, the text box border and character counter subscript turn red - *
when the number of characters entered reaches the limit. - *
If the character counter is displayed and thresholdPercentage is set to a valid value, - * the text box border and character counter subscript turn red when the number of entered characters exceeds the limit. - *
The value true (default) means to highlight the text box border and character counter subscript in red. - *

- * * @type { ?boolean } * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ highlightBorder?: boolean; } @@ -153,7 +183,8 @@ declare interface InputCounterOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextDecorationOptions { /** @@ -163,7 +194,8 @@ declare interface TextDecorationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type: TextDecorationType; @@ -174,7 +206,8 @@ declare interface TextDecorationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ color?: ResourceColor; @@ -185,7 +218,8 @@ declare interface TextDecorationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ style?: TextDecorationStyle; } @@ -298,11 +332,71 @@ declare interface EntryOptions { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ useSharedStorage? : boolean, } +/** + * Provides an interface for the style of an divider including stroke width, color, start margin + * and end margin + * + * @interface DividerStyle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare interface DividerStyle { + /** + * Define the stroke width of the divider + * + * @type { Length } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + strokeWidth: Length; + + /** + * Define the color of the divider + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + color?: ResourceColor; + + /** + * Define the start margin of the divider + * + * @type { ?Length } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + startMargin?: Length; + + /** + * Define the end margin of the divider + * + * @type { ?Length } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + endMargin?: Length; +} + /** * Defines Entry ClassDecorator. * @@ -1078,13 +1172,7 @@ declare interface IMonitorValue { } /** - * The **AnimatableArithmetic** API defines the animation operation rules for - * non-number data types. To animate non-number data (such as arrays, structs, - * and colors), implement the addition, subtraction, multiplication, and - * equality judgment functions in the **AnimatableArithmetic\** API. - * In this way, the data can be involved in an interpolation operation of the - * animation and identify whether the data changes, that is, the non-number data - * is defined as the types that implement the **AnimatableArithmetic\** API. + * Define AnimatableArithmetic interface * * @interface AnimatableArithmetic * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1092,23 +1180,18 @@ declare interface IMonitorValue { * @since 10 */ /** - * The **AnimatableArithmetic** API defines the animation operation rules for - * non-number data types. To animate non-number data (such as arrays, structs, - * and colors), implement the addition, subtraction, multiplication, and - * equality judgment functions in the **AnimatableArithmetic\** API. - * In this way, the data can be involved in an interpolation operation of the - * animation and identify whether the data changes, that is, the non-number data - * is defined as the types that implement the **AnimatableArithmetic\** API. + * Define AnimatableArithmetic interface * * @interface AnimatableArithmetic * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface AnimatableArithmetic { /** - * Defines the addition rule of the data type. + * Define plus method * * @param { AnimatableArithmetic } rhs - another value * @returns { AnimatableArithmetic } new value which implements AnimatableArithmetic interface @@ -1117,19 +1200,20 @@ declare interface IMonitorValue { * @since 10 */ /** - * Defines the addition rule of the data type. + * Define plus method * * @param { AnimatableArithmetic } rhs - another value * @returns { AnimatableArithmetic } new value which implements AnimatableArithmetic interface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ plus(rhs: AnimatableArithmetic): AnimatableArithmetic; /** - * Defines the subtraction rule of the data type. + * Define subtract method * * @param { AnimatableArithmetic } rhs - another value * @returns { AnimatableArithmetic } new value which implements AnimatableArithmetic interface @@ -1138,19 +1222,20 @@ declare interface IMonitorValue { * @since 10 */ /** - * Defines the subtraction rule of the data type. + * Define subtract method * * @param { AnimatableArithmetic } rhs - another value * @returns { AnimatableArithmetic } new value which implements AnimatableArithmetic interface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ subtract(rhs: AnimatableArithmetic): AnimatableArithmetic; /** - * Defines the multiplication rule of the data type. + * Define multiply method * * @param { number } scale - scale value * @returns { AnimatableArithmetic } new value which implements AnimatableArithmetic interface @@ -1159,19 +1244,20 @@ declare interface IMonitorValue { * @since 10 */ /** - * Defines the multiplication rule of the data type. + * Define multiply method * * @param { number } scale - scale value * @returns { AnimatableArithmetic } new value which implements AnimatableArithmetic interface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ multiply(scale: number): AnimatableArithmetic; /** - * Defines the equality judgment rule of the data type. + * Define equals method * * @param { AnimatableArithmetic } rhs - another value * @returns { boolean } is equals @@ -1180,14 +1266,15 @@ declare interface IMonitorValue { * @since 10 */ /** - * Defines the equality judgment rule of the data type. + * Define equals method * * @param { AnimatableArithmetic } rhs - another value * @returns { boolean } is equals * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ equals(rhs: AnimatableArithmetic): boolean; } @@ -1222,7 +1309,7 @@ declare const Concurrent: MethodDecorator; * A function with this decorator is marked as sendable, and the function can be an shareable property of sendable-class object. * A typeAlias with this decorator is marked as sendable, and the typeAlias can be used to declare properties, variables, * and arguments that need to be assigned with sendable-function. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -1306,14 +1393,7 @@ declare const LocalStorageProp: (value: string) => PropertyDecorator; * Obtains the Context object associated with a component on the page. * * @param { Object } component - indicate the component on the page. - * If no component is passed in or the passed-in parameter type is invalid, the default context is returned. - * The default context is the context obtained by tracing the call chain of the API. - * If this API is used in an asynchronous callback or not initially called on the current page, the context of the - * instance may fail to be traced. In this case, undefined is returned. * @returns { Context } - * The context type depends on the ability type. - * For example, if this API is called on a page of the UIAbility, the return value type is UIAbilityContext; - * if this API is called on a page of the ExtensionAbility, the return value type is ExtensionContext. * @syscap SystemCapability.ArkUI.ArkUI.Full * @StageModelOnly * @since 9 @@ -1322,14 +1402,7 @@ declare const LocalStorageProp: (value: string) => PropertyDecorator; * Obtains the Context object associated with a component on the page. * * @param { Object } component - indicate the component on the page. - * If no component is passed in or the passed-in parameter type is invalid, the default context is returned. - * The default context is the context obtained by tracing the call chain of the API. - * If this API is used in an asynchronous callback or not initially called on the current page, the context of the - * instance may fail to be traced. In this case, undefined is returned. * @returns { Context } - * The context type depends on the ability type. - * For example, if this API is called on a page of the UIAbility, the return value type is UIAbilityContext; - * if this API is called on a page of the ExtensionAbility, the return value type is ExtensionContext. * @syscap SystemCapability.ArkUI.ArkUI.Full * @StageModelOnly * @crossplatform @@ -1339,14 +1412,7 @@ declare const LocalStorageProp: (value: string) => PropertyDecorator; * Obtains the Context object associated with a component on the page. * * @param { Object } component - indicate the component on the page. - * If no component is passed in or the passed-in parameter type is invalid, the default context is returned. - * The default context is the context obtained by tracing the call chain of the API. - * If this API is used in an asynchronous callback or not initially called on the current page, the context of the - * instance may fail to be traced. In this case, undefined is returned. * @returns { Context } - * The context type depends on the ability type. - * For example, if this API is called on a page of the UIAbility, the return value type is UIAbilityContext; - * if this API is called on a page of the ExtensionAbility, the return value type is ExtensionContext. * @syscap SystemCapability.ArkUI.ArkUI.Full * @StageModelOnly * @crossplatform @@ -1392,7 +1458,8 @@ declare const ReusableV2: ClassDecorator; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type ReuseIdCallback = () => string; @@ -1403,7 +1470,8 @@ declare const ReusableV2: ClassDecorator; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ReuseOptions { /** @@ -1413,7 +1481,8 @@ declare interface ReuseOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ reuseId? : ReuseIdCallback; } @@ -1477,7 +1546,8 @@ declare type Context = import('../api/application/Context').default; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare function postCardAction(component: Object, action: Object): void; @@ -1513,7 +1583,8 @@ declare function postCardAction(component: Object, action: Object): void; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface Configuration { /** @@ -1552,7 +1623,8 @@ declare interface Configuration { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly colorMode: string; @@ -1592,7 +1664,8 @@ declare interface Configuration { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly fontScale: number; } @@ -1629,7 +1702,8 @@ declare interface Configuration { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface Rectangle { /** @@ -1664,7 +1738,8 @@ declare interface Rectangle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ x?: Length; @@ -1700,7 +1775,8 @@ declare interface Rectangle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ y?: Length; @@ -1736,7 +1812,8 @@ declare interface Rectangle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ width?: Length; @@ -1772,7 +1849,8 @@ declare interface Rectangle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ height?: Length; } @@ -1799,7 +1877,8 @@ declare interface Rectangle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ExpectedFrameRateRange { /** @@ -1824,7 +1903,8 @@ declare interface ExpectedFrameRateRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ min: number, /** @@ -1849,7 +1929,8 @@ declare interface ExpectedFrameRateRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ max: number, /** @@ -1880,7 +1961,8 @@ declare interface ExpectedFrameRateRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ expected: number, } @@ -1889,11 +1971,6 @@ declare interface ExpectedFrameRateRange { * global $r function * * @param { string } value - * The value format is 'belonging.type.name'. - * belonging: group to which the resource belongs, which can be 'sys' or 'app'. - * type: resource type, which can be 'boolean', 'color', 'float', 'intarray', 'integer', 'pattern', 'plural', - * 'strarray', 'string', or 'media'. - * name: resource name, which is determined during resource definition. * @param { any[] } params * @returns { Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1903,11 +1980,6 @@ declare interface ExpectedFrameRateRange { * global $r function * * @param { string } value - * The value format is 'belonging.type.name'. - * belonging: group to which the resource belongs, which can be 'sys' or 'app'. - * type: resource type, which can be 'boolean', 'color', 'float', 'intarray', 'integer', 'pattern', 'plural', - * 'strarray', 'string', or 'media'. - * name: resource name, which is determined during resource definition. * @param { any[] } params * @returns { Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1918,11 +1990,6 @@ declare interface ExpectedFrameRateRange { * global $r function * * @param { string } value - * The value format is 'belonging.type.name'. - * belonging: group to which the resource belongs, which can be 'sys' or 'app'. - * type: resource type, which can be 'boolean', 'color', 'float', 'intarray', 'integer', 'pattern', 'plural', - * 'strarray', 'string', or 'media'. - * name: resource name, which is determined during resource definition. * @param { any[] } params * @returns { Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1934,11 +2001,6 @@ declare interface ExpectedFrameRateRange { * global $r function * * @param { string } value - * The value format is 'belonging.type.name'. - * belonging: group to which the resource belongs, which can be 'sys' or 'app'. - * type: resource type, which can be 'boolean', 'color', 'float', 'intarray', 'integer', 'pattern', 'plural', - * 'strarray', 'string', or 'media'. - * name: resource name, which is determined during resource definition. * @param { any[] } params * @returns { Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1949,14 +2011,25 @@ declare interface ExpectedFrameRateRange { */ declare function $r(value: string, ...params: any[]): Resource; +/** + * global $r function + * + * @param { string } value + * @param { (Object | null | undefined)[] } params + * @returns { Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare function $r(value: string, ...params: (Object | null | undefined)[]): Resource; + /** * global $rawfile function * * @param { string } value - * name of the file in the resources/rawfile directory of the project. - * When referencing resources of the Resource type, make sure the data type is the same as that of the attribute method. - * For example, if an attribute method supports the string | Resource types, the data type of the Resource type must be - * string. * @returns { Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 @@ -1965,10 +2038,6 @@ declare function $r(value: string, ...params: any[]): Resource; * global $rawfile function * * @param { string } value - * name of the file in the resources/rawfile directory of the project. - * When referencing resources of the Resource type, make sure the data type is the same as that of the attribute method. - * For example, if an attribute method supports the string | Resource types, the data type of the Resource type must be - * string. * @returns { Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form @@ -1978,10 +2047,6 @@ declare function $r(value: string, ...params: any[]): Resource; * global $rawfile function * * @param { string } value - * name of the file in the resources/rawfile directory of the project. - * When referencing resources of the Resource type, make sure the data type is the same as that of the attribute method. - * For example, if an attribute method supports the string | Resource types, the data type of the Resource type must be - * string. * @returns { Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -1992,16 +2057,13 @@ declare function $r(value: string, ...params: any[]): Resource; * global $rawfile function * * @param { string } value - * name of the file in the resources/rawfile directory of the project. - * When referencing resources of the Resource type, make sure the data type is the same as that of the attribute method. - * For example, if an attribute method supports the string | Resource types, the data type of the Resource type must be - * string. * @returns { Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare function $rawfile(value: string): Resource; /** @@ -2011,17 +2073,18 @@ declare function $rawfile(value: string): Resource; * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum AccessibilitySamePageMode { /** - * the first page and root page event is not send.but if application load new page whith navigation,the page event will be sent. - * this mode is to solve skipping focus + * the first page and root page event is not send.but if application load new page whith navigation,the page event will be sent. this mode is to solve skipping focus * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SEMI_SILENT = 0, /** @@ -2030,7 +2093,8 @@ declare enum AccessibilitySamePageMode { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ FULL_SILENT = 1, } @@ -2041,7 +2105,8 @@ declare enum AccessibilitySamePageMode { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum AccessibilityRoleType { /** @@ -2050,7 +2115,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ACTION_SHEET = 0, /** @@ -2059,7 +2125,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ALERT_DIALOG = 1, /** @@ -2068,7 +2135,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ INDEXER_COMPONENT = 2, /** @@ -2077,7 +2145,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ BADGE_COMPONENT = 3, /** @@ -2086,7 +2155,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ BLANK = 4, /** @@ -2095,7 +2165,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ BUTTON = 5, /** @@ -2104,7 +2175,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ BACK_BUTTON = 6, /** @@ -2113,7 +2185,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SHEET_DRAG_BAR = 7, /** @@ -2122,7 +2195,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CALENDAR_PICKER = 8, /** @@ -2131,7 +2205,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CALENDAR = 9, /** @@ -2140,7 +2215,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CANVAS = 10, /** @@ -2149,7 +2225,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CANVAS_GRADIENT = 11, /** @@ -2158,7 +2235,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CANVAS_PATTERN = 12, /** @@ -2167,7 +2245,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CHECKBOX = 13, /** @@ -2176,7 +2255,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CHECKBOX_GROUP = 14, /** @@ -2185,7 +2265,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CIRCLE = 15, /** @@ -2194,7 +2275,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ COLUMN_SPLIT = 16, /** @@ -2203,7 +2285,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ COLUMN = 17, /** @@ -2212,7 +2295,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CANVAS_RENDERING_CONTEXT_2D = 18, /** @@ -2221,7 +2305,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CHART = 19, /** @@ -2230,7 +2315,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ COUNTER = 20, /** @@ -2239,7 +2325,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CONTAINER_MODAL = 21, /** @@ -2248,7 +2335,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ DATA_PANEL = 22, /** @@ -2257,7 +2345,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ DATE_PICKER = 23, /** @@ -2266,7 +2355,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ DIALOG = 24, /** @@ -2275,7 +2365,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ DIVIDER = 25, /** @@ -2284,7 +2375,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ DRAG_BAR = 26, /** @@ -2293,7 +2385,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ EFFECT_COMPONENT = 27, /** @@ -2302,7 +2395,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ELLIPSE = 28, /** @@ -2311,7 +2405,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ FLEX = 29, /** @@ -2320,7 +2415,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ FLOW_ITEM = 30, /** @@ -2329,7 +2425,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ FORM_COMPONENT = 31, /** @@ -2338,7 +2435,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ FORM_LINK = 32, /** @@ -2347,7 +2445,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ GAUGE = 33, /** @@ -2356,7 +2455,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ GRID = 34, /** @@ -2365,7 +2465,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ GRID_COL = 35, /** @@ -2374,7 +2475,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ GRID_CONTAINER = 36, /** @@ -2383,7 +2485,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ GRID_ITEM = 37, /** @@ -2392,7 +2495,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ GRID_ROW = 38, /** @@ -2401,7 +2505,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ HYPERLINK = 39, /** @@ -2410,7 +2515,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE = 40, /** @@ -2419,7 +2525,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE_ANIMATOR = 41, /** @@ -2428,7 +2535,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE_BITMAP = 42, /** @@ -2437,7 +2545,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE_DATA = 43, /** @@ -2446,7 +2555,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE_SPAN = 44, /** @@ -2455,7 +2565,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ LABEL = 45, /** @@ -2464,7 +2575,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ LINE = 46, /** @@ -2473,7 +2585,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ LIST = 47, /** @@ -2482,7 +2595,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ LIST_ITEM = 48, /** @@ -2491,7 +2605,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ LIST_ITEM_GROUP = 49, /** @@ -2500,7 +2615,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ LOADING_PROGRESS = 50, /** @@ -2509,7 +2625,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ MARQUEE = 51, /** @@ -2518,7 +2635,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ MATRIX2D = 52, /** @@ -2527,7 +2645,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ MENU = 53, /** @@ -2536,7 +2655,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ MENU_ITEM = 54, /** @@ -2545,7 +2665,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ MENU_ITEM_GROUP = 55, /** @@ -2554,7 +2675,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ NAV_DESTINATION = 56, /** @@ -2563,7 +2685,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ NAV_ROUTER = 57, /** @@ -2572,7 +2695,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ NAVIGATION = 58, /** @@ -2581,7 +2705,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ NAVIGATION_BAR = 59, /** @@ -2590,7 +2715,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ NAVIGATION_MENU = 60, /** @@ -2599,7 +2725,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ NAVIGATOR = 61, /** @@ -2608,7 +2735,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ OFFSCREEN_CANVAS = 62, /** @@ -2617,7 +2745,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ OFFSCREEN_CANVAS_RENDERING_CONTEXT2D = 63, /** @@ -2626,7 +2755,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ OPTION = 64, /** @@ -2635,7 +2765,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ PANEL = 65, /** @@ -2644,7 +2775,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ PAPER_PAGE = 66, /** @@ -2653,7 +2785,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ PATH = 67, /** @@ -2662,7 +2795,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ PATH2D = 68, /** @@ -2671,7 +2805,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ PATTERN_LOCK = 69, /** @@ -2680,7 +2815,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ PICKER = 70, /** @@ -2689,7 +2825,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ PICKER_VIEW = 71, /** @@ -2698,7 +2835,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ PLUGIN_COMPONENT = 72, /** @@ -2707,7 +2845,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ POLYGON = 73, /** @@ -2716,7 +2855,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ POLYLINE = 74, /** @@ -2725,7 +2865,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ POPUP = 75, /** @@ -2734,7 +2875,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ PROGRESS = 76, /** @@ -2743,7 +2885,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ QRCODE = 77, /** @@ -2752,7 +2895,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RADIO = 78, /** @@ -2761,7 +2905,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RATING = 79, /** @@ -2770,7 +2915,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RECT = 80, /** @@ -2779,7 +2925,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ REFRESH = 81, /** @@ -2788,7 +2935,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RELATIVE_CONTAINER = 82, /** @@ -2797,7 +2945,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ REMOTE_WINDOW = 83, /** @@ -2806,7 +2955,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RICH_EDITOR = 84, /** @@ -2815,7 +2965,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RICH_TEXT = 85, /** @@ -2824,7 +2975,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ROLE_PAGER = 86, /** @@ -2833,7 +2985,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ROW = 87, /** @@ -2842,7 +2995,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ROW_SPLIT = 88, /** @@ -2851,7 +3005,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SCROLL = 89, /** @@ -2860,7 +3015,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SCROLL_BAR = 90, /** @@ -2869,7 +3025,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SEARCH = 91, /** @@ -2878,7 +3035,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SEARCH_FIELD = 92, /** @@ -2887,7 +3045,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SELECT = 93, /** @@ -2896,7 +3055,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SHAPE = 94, /** @@ -2905,7 +3065,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SIDEBAR_CONTAINER = 95, /** @@ -2914,7 +3075,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SLIDER = 96, /** @@ -2923,7 +3085,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SPAN = 97, /** @@ -2932,7 +3095,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ STACK = 98, /** @@ -2941,7 +3105,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ STEPPER = 99, /** @@ -2950,7 +3115,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ STEPPER_ITEM = 100, /** @@ -2959,7 +3125,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SWIPER = 101, /** @@ -2968,7 +3135,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SWIPER_INDICATOR = 102, /** @@ -2977,7 +3145,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SWITCH = 103, /** @@ -2986,7 +3155,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SYMBOL_GLYPH = 104, /** @@ -2995,7 +3165,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TAB_CONTENT = 105, /** @@ -3004,7 +3175,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TAB_BAR = 106, /** @@ -3013,7 +3185,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TABS = 107, /** @@ -3022,7 +3195,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TEXT = 108, /** @@ -3031,7 +3205,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TEXT_CLOCK = 109, /** @@ -3040,7 +3215,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TEXT_ENTRY = 110, /** @@ -3049,7 +3225,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TEXT_INPUT = 111, /** @@ -3058,7 +3235,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TEXT_PICKER = 112, /** @@ -3067,7 +3245,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TEXT_TIMER = 113, /** @@ -3076,7 +3255,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TEXT_AREA = 114, /** @@ -3085,7 +3265,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TEXT_FIELD = 115, /** @@ -3094,7 +3275,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TIME_PICKER = 116, /** @@ -3103,7 +3285,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TITLE_BAR = 117, /** @@ -3112,7 +3295,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TOGGLER = 118, /** @@ -3121,7 +3305,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ UI_EXTENSION_COMPONENT = 119, /** @@ -3130,7 +3315,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO = 120, /** @@ -3139,7 +3325,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ WATER_FLOW = 121, /** @@ -3148,7 +3335,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ WEB = 122, /** @@ -3157,7 +3345,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ XCOMPONENT = 123, /** @@ -3166,7 +3355,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ROLE_NONE = 124, } @@ -3179,7 +3369,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type AccessibilityFocusCallback = (isFocus: boolean) => void; @@ -3283,11 +3474,12 @@ declare type AccessibilityActionInterceptCallback = (action: AccessibilityAction * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FinishCallbackType { /** - * The callback is invoked when the entire animation is removed once it has finished. + * When the entire animation ends and will be removed immediately, the callback is triggered. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -3295,13 +3487,14 @@ declare enum FinishCallbackType { * @since 11 */ /** - * The callback is invoked when the entire animation is removed once it has finished. + * When the entire animation ends and will be removed immediately, the callback is triggered. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ REMOVED = 0, /** @@ -3313,14 +3506,14 @@ declare enum FinishCallbackType { * @since 11 */ /** - * The callback is invoked when the animation logically enters the falling state, - * though it may still be in its long tail state. + * When the animation is logically down but may still be in its long tail, the callback is triggered. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LOGICALLY = 1, } @@ -3342,7 +3535,8 @@ declare enum FinishCallbackType { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TouchTestStrategy { /** @@ -3354,13 +3548,14 @@ declare enum TouchTestStrategy { * @since 11 */ /** - * Custom dispatch has no effect; the system distributes events based on the hit status of the current node. + * Do framework touch test. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 0, @@ -3373,14 +3568,14 @@ declare enum TouchTestStrategy { * @since 11 */ /** - * The specified event is forwarded to a particular child node, and the system determines whether to - * distribute the event to other sibling nodes. + * Specify the component to do touch test and follow the framework touch test * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FORWARD_COMPETITION = 1, @@ -3393,14 +3588,14 @@ declare enum TouchTestStrategy { * @since 11 */ /** - * The specified event is forwarded to a particular child node, and the system no longer distributes - * the event to other sibling nodes. + * Specify the component to do touch test and not follow the framework touch test * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FORWARD = 2 } @@ -3437,7 +3632,8 @@ declare enum TouchTestStrategy { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface AnimateParam { /** @@ -3476,13 +3672,13 @@ declare interface AnimateParam { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ duration?: number; /** * Animation playback speed. A larger value indicates faster animation playback, and a smaller value indicates slower * animation playback. The value 0 means that there is no animation. - *
Default value: **1.0**. * * @type { ?number } * @default 1.0 @@ -3492,7 +3688,6 @@ declare interface AnimateParam { /** * Animation playback speed. A larger value indicates faster animation playback, and a smaller value indicates slower * animation playback. The value 0 means that there is no animation. - *
Default value: **1.0**. * * @type { ?number } * @default 1.0 @@ -3509,7 +3704,8 @@ declare interface AnimateParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ tempo?: number; /** @@ -3548,12 +3744,13 @@ declare interface AnimateParam { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ curve?: Curve | string | ICurve; /** - * Animation delay time, in ms. By default, the animation has no delay. + * Animation plays with delay,when set to a negative number, the animation plays in advance. * * @type { ?number } * @default 0 @@ -3561,7 +3758,7 @@ declare interface AnimateParam { * @since 7 */ /** - * Animation delay time, in ms. By default, the animation has no delay. + * Animation delay time, in ms. * * @type { ?number } * @default 0 @@ -3570,21 +3767,20 @@ declare interface AnimateParam { * @since 10 */ /** - * Animation delay time, in ms. By default, the animation has no delay. + * Animation delay time, in ms. * * @type { ?number } * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ delay?: number; /** - * Number of times that the animation is played. By default, the animation is played once. - * The value **-1** indicates that the animation is played for an unlimited number of times. - * The value **0** indicates that there is no animation. + * Animation iterations. When set to -1, the animation playing it repeatedly. The value range is greater than or equal to -1. * * @type { ?number } * @default 1 @@ -3592,9 +3788,7 @@ declare interface AnimateParam { * @since 7 */ /** - * Number of times that the animation is played. By default, the animation is played once. - * The value **-1** indicates that the animation is played for an unlimited number of times. - * The value **0** indicates that there is no animation. + * Animation iterations. When set to -1, the animation playing it repeatedly. The value range is greater than or equal to -1. * * @type { ?number } * @default 1 @@ -3603,21 +3797,20 @@ declare interface AnimateParam { * @since 10 */ /** - * Number of times that the animation is played. By default, the animation is played once. - * The value **-1** indicates that the animation is played for an unlimited number of times. - * The value **0** indicates that there is no animation. + * Animation iterations. When set to -1, the animation playing it repeatedly. The value range is greater than or equal to -1. * * @type { ?number } * @default 1 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ iterations?: number; /** - * Playback mode. By default, the animation is played from the beginning after the playback is complete. + * Animation playback mode. By default, the animation is played from the beginning after the playback is complete. * * @type { ?PlayMode } * @default PlayMode.Normal @@ -3625,7 +3818,7 @@ declare interface AnimateParam { * @since 7 */ /** - * Playback mode. By default, the animation is played from the beginning after the playback is complete. + * Animation playback mode. By default, the animation is played from the beginning after the playback is complete. * * @type { ?PlayMode } * @default PlayMode.Normal @@ -3634,7 +3827,7 @@ declare interface AnimateParam { * @since 9 */ /** - * Playback mode. By default, the animation is played from the beginning after the playback is complete. + * Animation playback mode. By default, the animation is played from the beginning after the playback is complete. * * @type { ?PlayMode } * @default PlayMode.Normal @@ -3644,7 +3837,7 @@ declare interface AnimateParam { * @since 10 */ /** - * Playback mode. By default, the animation is played from the beginning after the playback is complete. + * Animation playback mode. By default, the animation is played from the beginning after the playback is complete. * * @type { ?PlayMode } * @default PlayMode.Normal @@ -3652,19 +3845,20 @@ declare interface AnimateParam { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ playMode?: PlayMode; /** - * Callback invoked when the animation playback is complete. + * Callback invoked when the animation playback is complete or the ability is about to enter the background. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Callback invoked when the animation playback is complete. + * Callback invoked when the animation playback is complete or the ability is about to enter the background. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -3672,7 +3866,7 @@ declare interface AnimateParam { * @since 9 */ /** - * Callback invoked when the animation playback is complete. + * Callback invoked when the animation playback is complete or the ability is about to enter the background. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -3681,19 +3875,20 @@ declare interface AnimateParam { * @since 10 */ /** - * Callback invoked when the animation playback is complete. + * Callback invoked when the animation playback is complete or the ability is about to enter the background. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onFinish?: () => void; /** - * Type of the **onFinish** callback. + * Define the type of onFinish callback in animation. * * @type { ?FinishCallbackType } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -3702,32 +3897,33 @@ declare interface AnimateParam { * @since 11 */ /** - * Type of the **onFinish** callback. - * Default value: FinishCallbackType.REMOVED. + * Define the type of onFinish callback in animation. * * @type { ?FinishCallbackType } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ finishCallbackType?: FinishCallbackType; /** - * Expected frame rate range of the animation. + * Indicates expectedFrameRateRange including minimum、maximum and expected frame rate. * * @type { ?ExpectedFrameRateRange } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 11 */ /** - * Expected frame rate range of the animation. + * Indicates expectedFrameRateRange including minimum、maximum and expected frame rate. * * @type { ?ExpectedFrameRateRange } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ expectedFrameRateRange?: ExpectedFrameRateRange; } @@ -3757,28 +3953,25 @@ declare interface AnimateParam { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ICurve { /** - * Implements calculation. + * Get curve value by fraction. * - * @param { number } fraction - Current normalized time. Value range: [0, 1]. - *

**NOTE**: - *
A value less than 0 is handed as **0**. A value greater than 1 is handed as **1**. - *

+ * @param { number } fraction - Indicates the current normalized time parameter. Value range: [0, 1]. + * Note: If the value is less than 0, it will be processed as 0. If the value is greater than 1, 1 is used. * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Implements calculation. + * Get curve value by fraction. * - * @param { number } fraction - Current normalized time. Value range: [0, 1]. - *

**NOTE**: - *
A value less than 0 is handed as **0**. A value greater than 1 is handed as **1**. - *

+ * @param { number } fraction - Indicates the current normalized time parameter. Value range: [0, 1]. + * Note: If the value is less than 0, it will be processed as 0. If the value is greater than 1, 1 is used. * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -3786,18 +3979,17 @@ interface ICurve { * @since 10 */ /** - * Implements calculation. + * Get curve value by fraction. * - * @param { number } fraction - Current normalized time. Value range: [0, 1]. - *

**NOTE**: - *
A value less than 0 is handed as **0**. A value greater than 1 is handed as **1**. - *

+ * @param { number } fraction - Indicates the current normalized time parameter. Value range: [0, 1]. + * Note: If the value is less than 0, it will be processed as 0. If the value is greater than 1, 1 is used. * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interpolate(fraction: number): number; } @@ -3824,26 +4016,19 @@ interface ICurve { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface MotionPathOptions { /** - * Motion path of the translation animation. - * The **svg** path string is used. - * In the value, **start** and **end** can be used in place of the start point and end point, - * for example, **'Mstart.x start.y L50 50 Lend.x end.y Z'**. - * If this parameter is set to an empty string, the path animation is not set. + * The path info. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Motion path of the translation animation. - * The **svg** path string is used. - * In the value, **start** and **end** can be used in place of the start point and end point, - * for example, **'Mstart.x start.y L50 50 Lend.x end.y Z'**. - * If this parameter is set to an empty string, the path animation is not set. + * The path info. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -3851,24 +4036,19 @@ declare interface MotionPathOptions { * @since 10 */ /** - * Motion path of the translation animation. - * The **svg** path string is used. - * In the value, **start** and **end** can be used in place of the start point and end point, - * for example, **'Mstart.x start.y L50 50 Lend.x end.y Z'**. - * If this parameter is set to an empty string, the path animation is not set. + * The path info. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ path: string; /** - * Start point of the motion path. - * Value range: [0, 1]. - * A value less than 0 or greater than 1 evaluates to the default value **0**. + * The origin point info in range [0,1). * * @type { ?number } * @default 0.0 @@ -3876,9 +4056,7 @@ declare interface MotionPathOptions { * @since 7 */ /** - * Start point of the motion path. - * Value range: [0, 1]. - * A value less than 0 or greater than 1 evaluates to the default value **0**. + * The origin point info in range [0,1). * * @type { ?number } * @default 0.0 @@ -3887,24 +4065,20 @@ declare interface MotionPathOptions { * @since 10 */ /** - * Start point of the motion path. - * Value range: [0, 1]. - * A value less than 0 or greater than 1 evaluates to the default value **0**. + * The origin point info in range [0,1). * * @type { ?number } * @default 0.0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ from?: number; /** - * End point of the motion path. - * Value range: [0, 1]. - * A value less than 0 or greater than 1 evaluates to the default value **1**, - * provided that the value of **to** is greater than or equal to the value of **from**. + * he distance point info in range (0,1]. * * @type { ?number } * @default 1.0 @@ -3912,10 +4086,7 @@ declare interface MotionPathOptions { * @since 7 */ /** - * End point of the motion path. - * Value range: [0, 1]. - * A value less than 0 or greater than 1 evaluates to the default value **1**, - * provided that the value of **to** is greater than or equal to the value of **from**. + * he distance point info in range (0,1]. * * @type { ?number } * @default 1.0 @@ -3924,22 +4095,20 @@ declare interface MotionPathOptions { * @since 10 */ /** - * End point of the motion path. - * Value range: [0, 1]. - * A value less than 0 or greater than 1 evaluates to the default value **1**, - * provided that the value of **to** is greater than or equal to the value of **from**. + * The distance point info in range (0,1]. * * @type { ?number } * @default 1.0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ to?: number; /** - * Whether to rotate along the path. + * The rotate info. * * @type { ?boolean } * @default false @@ -3947,7 +4116,7 @@ declare interface MotionPathOptions { * @since 7 */ /** - * Whether to rotate along the path. + * The rotate info. * * @type { ?boolean } * @default false @@ -3956,14 +4125,15 @@ declare interface MotionPathOptions { * @since 10 */ /** - * Whether to rotate along the path. + * The rotate info. * * @type { ?boolean } * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ rotatable?: boolean; } @@ -3990,7 +4160,8 @@ declare interface MotionPathOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface sharedTransitionOptions { /** @@ -4002,10 +4173,7 @@ declare interface sharedTransitionOptions { * @since 7 */ /** - * Animation duration. - *
Default value: **1000**. - *
Unit: ms. - *
Value range: [0, +∞). + * Animation duration, in ms. * * @type { ?number } * @default 1000 @@ -4014,22 +4182,20 @@ declare interface sharedTransitionOptions { * @since 10 */ /** - * Animation duration. - *
Default value: **1000**. - *
Unit: ms. - *
Value range: [0, +∞). + * Animation duration, in ms. * * @type { ?number } * @default 1000 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ duration?: number; /** - * Animation curve.
You are advised to specify the curve using the Curve or ICurve type. + * Animation duration, in ms. * * @type { ?(Curve | string | ICurve) } * @default 1000 @@ -4037,11 +4203,7 @@ declare interface sharedTransitionOptions { * @since 7 */ /** - * Animation curve.
You are advised to specify the curve using the **Curve** or - * ** ICurve** type.
For the string type, this parameter indicates an animation - * interpolation curve. For available values, see the **curve** parameter in - * AnimateParam. - *
Default value: **Curve.Linear**. + * Animation curve. * * @type { ?(Curve | string | ICurve) } * @default 1000 @@ -4050,18 +4212,15 @@ declare interface sharedTransitionOptions { * @since 10 */ /** - * Animation curve.
You are advised to specify the curve using the **Curve** or - * ** ICurve** type.
For the string type, this parameter indicates an animation - * interpolation curve. For available values, see the **curve** parameter in - * AnimateParam. - *
Default value: **Curve.Linear**. + * Animation curve. * * @type { ?(Curve | string | ICurve) } * @default 1000 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ curve?: Curve | string | ICurve; @@ -4090,7 +4249,8 @@ declare interface sharedTransitionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ delay?: number; @@ -4116,7 +4276,8 @@ declare interface sharedTransitionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ motionPath?: MotionPathOptions; @@ -4142,7 +4303,8 @@ declare interface sharedTransitionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ zIndex?: number; @@ -4171,7 +4333,8 @@ declare interface sharedTransitionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ type?: SharedTransitionEffectType; } @@ -4191,7 +4354,8 @@ declare interface sharedTransitionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GeometryTransitionOptions { /** @@ -4211,12 +4375,13 @@ declare interface GeometryTransitionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ follow?: boolean; /** * Defines movement strategy of source and target in the hierarchy during geometry transition. - * + * * @type { ?TransitionHierarchyStrategy } * @default TransitionHierarchyStrategy.ADAPTIVE * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -4226,12 +4391,13 @@ declare interface GeometryTransitionOptions { */ /** * Defines movement strategy of source and target in the hierarchy during geometry transition. - * + * * @type { ?TransitionHierarchyStrategy } * @default TransitionHierarchyStrategy.ADAPTIVE * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ hierarchyStrategy?: TransitionHierarchyStrategy } @@ -4244,7 +4410,8 @@ declare interface GeometryTransitionOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LinearGradientOptions { /** @@ -4301,7 +4468,8 @@ declare interface LinearGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ angle?: number | string; @@ -4359,7 +4527,8 @@ declare interface LinearGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ direction?: GradientDirection; @@ -4416,7 +4585,8 @@ declare interface LinearGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ colors: Array<[ResourceColor, number]>; @@ -4474,7 +4644,8 @@ declare interface LinearGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ repeating?: boolean; } @@ -4487,7 +4658,8 @@ declare interface LinearGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SweepGradientOptions { /** @@ -4543,7 +4715,8 @@ declare interface SweepGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ center: [Length, Length]; @@ -4602,7 +4775,8 @@ declare interface SweepGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ start?: number | string; @@ -4659,7 +4833,8 @@ declare interface SweepGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ end?: number | string; @@ -4717,7 +4892,8 @@ declare interface SweepGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ rotation?: number | string; @@ -4774,10 +4950,11 @@ declare interface SweepGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ colors: Array<[ResourceColor, number]>; - + /** * Defines color description in ColorMetrics format for gradients. * This parameter takes precedence over colors parameter. @@ -4844,7 +5021,8 @@ declare interface SweepGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ repeating?: boolean; } @@ -4857,7 +5035,8 @@ declare interface SweepGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RadialGradientOptions { /** @@ -4913,7 +5092,8 @@ declare interface RadialGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ center: [Length, Length]; @@ -4970,7 +5150,8 @@ declare interface RadialGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ radius: Length; @@ -5027,7 +5208,8 @@ declare interface RadialGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ colors: Array<[ResourceColor, number]>; @@ -5085,7 +5267,8 @@ declare interface RadialGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ repeating?: boolean; } @@ -5111,7 +5294,8 @@ declare interface RadialGradientOptions { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TransitionHierarchyStrategy { /** @@ -5129,7 +5313,8 @@ declare enum TransitionHierarchyStrategy { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -5150,7 +5335,8 @@ declare enum TransitionHierarchyStrategy { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ADAPTIVE = 1, } @@ -5187,22 +5373,19 @@ declare enum TransitionHierarchyStrategy { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TranslateOptions { /** - * Translation distance along the x-axis. - * For the number type, the unit is VP, and the value range is (-∞, +∞). - * For the string type, the value follows the format of Length string type. + * The param of x direction. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Translation distance along the x-axis. - * For the number type, the unit is VP, and the value range is (-∞, +∞). - * For the string type, the value follows the format of Length string type. + * The param of x direction. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5210,9 +5393,7 @@ declare interface TranslateOptions { * @since 9 */ /** - * Translation distance along the x-axis. - * For the number type, the unit is VP, and the value range is (-∞, +∞). - * For the string type, the value follows the format of Length string type. + * The param of x direction. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5221,32 +5402,27 @@ declare interface TranslateOptions { * @since 10 */ /** - * Translation distance along the x-axis. - * For the number type, the unit is VP, and the value range is (-∞, +∞). - * For the string type, the value follows the format of length string type. + * The param of x direction. * * @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 */ x?: number | string; /** - * Translation distance along the y-axis. - * For the number type, the unit is VP, and the value range is (-∞, +∞). - * For the string type, the value follows the format of length string type. + * The param of y direction. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Translation distance along the y-axis. - * For the number type, the unit is VP, and the value range is (-∞, +∞). - * For the string type, the value follows the format of length string type. + * The param of y direction. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5254,9 +5430,7 @@ declare interface TranslateOptions { * @since 9 */ /** - * Translation distance along the y-axis. - * For the number type, the unit is VP, and the value range is (-∞, +∞). - * For the string type, the value follows the format of length string type. + * The param of y direction. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5265,30 +5439,27 @@ declare interface TranslateOptions { * @since 10 */ /** - * Translation distance along the y-axis. - * For the number type, the unit is VP, and the value range is (-∞, +∞). - * For the string type, the value follows the format of length string type. + * The param of y direction. * * @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 */ y?: number | string; /** - * Distance to translate along the z-axis. The value is a floating - * point number, the default value is 0.0, and the unit is px. + * The param of z direction. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Distance to translate along the z-axis. The value is a floating - * point number, the default value is 0.0, and the unit is px. + * The param of z direction. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5296,8 +5467,7 @@ declare interface TranslateOptions { * @since 9 */ /** - * Distance to translate along the z-axis. The value is a floating - * point number, the default value is 0.0, and the unit is px. + * The param of z direction. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5306,15 +5476,15 @@ declare interface TranslateOptions { * @since 10 */ /** - * Distance to translate along the z-axis. The value is a floating - * point number, the default value is 0.0, and the unit is px. + * The param of z direction. * * @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 */ z?: number | string; } @@ -5351,24 +5521,19 @@ declare interface TranslateOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ScaleOptions { /** - * Scale ratio along the x-axis. - * x > 1: The component is scaled up along the x-axis. - * 0 < x < 1: The component is scaled down along the x-axis. - * x < 0: The component is scaled in the reverse direction of the x-axis. + * The param of x direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Scale ratio along the x-axis. - * x > 1: The component is scaled up along the x-axis. - * 0 < x < 1: The component is scaled down along the x-axis. - * x < 0: The component is scaled in the reverse direction of the x-axis. + * The param of x direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5376,10 +5541,7 @@ declare interface ScaleOptions { * @since 9 */ /** - * Scale ratio along the x-axis. - * x > 1: The component is scaled up along the x-axis. - * 0 < x < 1: The component is scaled down along the x-axis. - * x < 0: The component is scaled in the reverse direction of the x-axis. + * The param of x direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5388,35 +5550,27 @@ declare interface ScaleOptions { * @since 10 */ /** - * Scale ratio along the x-axis. - * x > 1: The component is scaled up along the x-axis. - * 0 < x < 1: The component is scaled down along the x-axis. - * x < 0: The component is scaled in the reverse direction of the x-axis. + * The param of x direction. * * @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 */ x?: number; /** - * Scale ratio along the y-axis. - * y > 1: The component is scaled up along the y-axis. - * 0 < y < 1: The component is scaled down along the y-axis. - * y < 0: The component is scaled in the reverse direction of the y-axis. + * The param of y direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Scale ratio along the y-axis. - * y > 1: The component is scaled up along the y-axis. - * 0 < y < 1: The component is scaled down along the y-axis. - * y < 0: The component is scaled in the reverse direction of the y-axis. + * The param of y direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5424,10 +5578,7 @@ declare interface ScaleOptions { * @since 9 */ /** - * Scale ratio along the y-axis. - * y > 1: The component is scaled up along the y-axis. - * 0 < y < 1: The component is scaled down along the y-axis. - * y < 0: The component is scaled in the reverse direction of the y-axis. + * The param of y direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5436,33 +5587,27 @@ declare interface ScaleOptions { * @since 10 */ /** - * Scale ratio along the y-axis. - * y > 1: The component is scaled up along the y-axis. - * 0 < y < 1: The component is scaled down along the y-axis. - * y < 0: The component is scaled in the reverse direction of the y-axis. + * The param of y direction. * * @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 */ y?: number; /** - * Scale ratio along the z-axis. z > 1: The component is scaled up along the z-axis. - *
0 < z < 1: The component is scaled down along the z-axis. - *
z < 0: The component is scaled in the reverse direction of the z-axis. + * The param of z direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Scale ratio along the z-axis. z > 1: The component is scaled up along the z-axis. - *
0 < z < 1: The component is scaled down along the z-axis. - *
z < 0: The component is scaled in the reverse direction of the z-axis. + * The param of z direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5470,9 +5615,7 @@ declare interface ScaleOptions { * @since 9 */ /** - * Scale ratio along the z-axis. z > 1: The component is scaled up along the z-axis. - *
0 < z < 1: The component is scaled down along the z-axis. - *
z < 0: The component is scaled in the reverse direction of the z-axis. + * The param of z direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5481,28 +5624,27 @@ declare interface ScaleOptions { * @since 10 */ /** - * Scale ratio along the z-axis. z > 1: The component is scaled up along the z-axis. - *
0 < z < 1: The component is scaled down along the z-axis. - *
z < 0: The component is scaled in the reverse direction of the z-axis. + * The param of z direction. * * @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 */ z?: number; /** - * X coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of x. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * X coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of x. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5510,7 +5652,7 @@ declare interface ScaleOptions { * @since 9 */ /** - * X coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of x. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5519,26 +5661,27 @@ declare interface ScaleOptions { * @since 10 */ /** - * X coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of x. * * @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 */ centerX?: number | string; /** - * Y coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of y. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Y coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of y. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5546,7 +5689,7 @@ declare interface ScaleOptions { * @since 9 */ /** - * Y coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of y. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5555,18 +5698,162 @@ declare interface ScaleOptions { * @since 10 */ /** - * Y coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of y. * * @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 */ centerY?: number | string; } +/** + * Defines the align rule options of relative container. + * + * @interface AlignRuleParam + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare interface AlignRuleParam { + /** + * The param of anchor. + * + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + anchor: string; + /** + * The param of align. + * + * @type { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + align: T +} + +/** + * Defines the align rule options of relative container. + * + * @interface AlignRuleOption + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare interface AlignRuleOption { + /** + * The param of left align. + * + * @type { ?AlignRuleParam } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + left?:AlignRuleParam; + + /** + * The param of right align. + * + * @type { ?AlignRuleParam } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + right?: AlignRuleParam; + + /** + * The param of middle align. + * + * @type { ?AlignRuleParam } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + middle?: AlignRuleParam; + + /** + * The param of top align. + * + * @type { ?AlignRuleParam } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + top?: AlignRuleParam; + + /** + * The param of bottom align. + * + * @type { ?AlignRuleParam } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + bottom?: AlignRuleParam; + + /** + * The param of center align. + * + * @type { ?AlignRuleParam } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + center?: AlignRuleParam; + + /** + * Defines the bias ratio in horizontal and vertical direction. + * + * @type { ?Bias } + * @default {horizontal:0.5,vertical:0.5} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + bias?: Bias; +} + + /** * Defines the align rule options of relative container. * @@ -5613,9 +5900,7 @@ declare interface AlignRuleOption { * @since 10 */ /** - * Left alignment. - *
anchor: ID of the component that functions as the anchor point. - *
align: alignment mode relative to the anchor component. + * The param of left align. * * @type { ?object } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5644,9 +5929,7 @@ declare interface AlignRuleOption { * @since 10 */ /** - * Right alignment. - *
anchor: ID of the component that functions as the anchor point. - *
align: alignment mode relative to the anchor component. + * The param of right align. * * @type { ?object } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5675,9 +5958,7 @@ declare interface AlignRuleOption { * @since 10 */ /** - * Horizontal center alignment. - *
anchor: ID of the component that functions as the anchor point. - *
align: alignment mode relative to the anchor component. + * The param of middle align. * * @type { ?object } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5706,9 +5987,7 @@ declare interface AlignRuleOption { * @since 10 */ /** - * Top alignment. - *
anchor: ID of the component that functions as the anchor point. - *
align: alignment mode relative to the anchor component. + * The param of top align. * * @type { ?object } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5736,9 +6015,7 @@ declare interface AlignRuleOption { * @since 10 */ /** - * Bottom alignment. - *
anchor: ID of the component that functions as the anchor point. - *
align: alignment mode relative to the anchor component. + * The param of bottom align. * * @type { ?object } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5766,9 +6043,7 @@ declare interface AlignRuleOption { * @since 10 */ /** - * Vertical center alignment. - *
anchor: ID of the component that functions as the anchor point. - *
align: alignment mode relative to the anchor component. + * The param of center align. * * @type { ?object } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5790,8 +6065,7 @@ declare interface AlignRuleOption { * @since 11 */ /** - * Offset of the component under the anchor constraints. - *
The value is the ratio of the distance to the left/upper anchor to the total distance between anchors. + * Defines the bias ratio in horizontal and vertical direction. * * @type { ?Bias } * @default {horizontal:0.5,vertical:0.5} @@ -5811,29 +6085,32 @@ declare interface AlignRuleOption { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LocalizedHorizontalAlignParam { /** - * ID of the component that serves as the anchor. + * The anchor of localized align param. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 - */ + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ anchor: string; /** - * Horizontal alignment mode relative to the anchor component. + * The align of localized align param. * * @type { HorizontalAlign } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 - */ + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ align: HorizontalAlign; } @@ -5844,29 +6121,32 @@ declare interface LocalizedHorizontalAlignParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LocalizedVerticalAlignParam { /** - * ID of the component that serves as the anchor. + * The anchor of localized align param. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 - */ + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ anchor: string; /** - * Vertical alignment mode relative to the anchor component. + * The align of localized align param. * * @type { VerticalAlign } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 - */ + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ align: VerticalAlign; } @@ -5877,126 +6157,137 @@ declare interface LocalizedVerticalAlignParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LocalizedAlignRuleOptions { /** - * Left alignment with left-to-right scripts and right alignment with right-to-left scripts in the horizontal direction. + * The param of start align. * * @type { ?LocalizedHorizontalAlignParam } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start?: LocalizedHorizontalAlignParam; /** - * Right alignment with left-to-right scripts and left alignment with right-to-left scripts in the horizontal direction. + * The param of end align. * * @type { ?LocalizedHorizontalAlignParam } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ end?: LocalizedHorizontalAlignParam; /** - * Center alignment in the horizontal direction. + * The param of middle align. * * @type { ?LocalizedHorizontalAlignParam } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ middle?: LocalizedHorizontalAlignParam; /** - * Top alignment in the vertical direction. + * The param of top align. * * @type { ?LocalizedVerticalAlignParam } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ top?: LocalizedVerticalAlignParam; /** - * Bottom alignment in the vertical direction. + * The param of bottom align. * * @type { ?LocalizedVerticalAlignParam } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bottom?: LocalizedVerticalAlignParam; /** - * Center alignment in the vertical direction. + * The param of center align. * * @type { ?LocalizedVerticalAlignParam } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ center?: LocalizedVerticalAlignParam; /** - * Offset of the component under the anchor constraints. - *
The value is the ratio of the distance to the left/upper anchor to the total distance between anchors. + * Defines the bias ratio in horizontal and vertical direction. * * @type { ?Bias } * @default {horizontal:0.5,vertical:0.5} * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bias?: Bias; } /** - * Enumerates the chain styles in relative container. + * Defines the style of the chain in relative container. * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ChainStyle { /** - * Child components are evenly distributed among constraint anchors. + * Elements of the chain will be spread out. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SPREAD, /** - * All child components except the first and last ones are evenly distributed among constraint anchors. + * Elements except chain's head and tail will be spread out. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SPREAD_INSIDE, /** - * There is no gap between child components in the chain. + * Elements of the chain will be packed together. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PACKED, } @@ -6033,18 +6324,19 @@ declare enum ChainStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RotateOptions { /** - * X coordinate of the rotation axis vector. + * The param of x direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * X coordinate of the rotation axis vector. + * The param of x direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6052,7 +6344,7 @@ declare interface RotateOptions { * @since 9 */ /** - * X coordinate of the rotation axis vector. + * The param of x direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6061,26 +6353,27 @@ declare interface RotateOptions { * @since 10 */ /** - * X coordinate of the rotation axis vector. + * The param of x direction. * * @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 */ x?: number; /** - * Y coordinate of the rotation axis vector. + * The param of y direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Y coordinate of the rotation axis vector. + * The param of y direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6088,7 +6381,7 @@ declare interface RotateOptions { * @since 9 */ /** - * Y coordinate of the rotation axis vector. + * The param of y direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6097,26 +6390,27 @@ declare interface RotateOptions { * @since 10 */ /** - * Y coordinate of the rotation axis vector. + * The param of y direction. * * @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 */ y?: number; /** - * Z coordinate of the rotation axis vector. + * The param of z direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Z coordinate of the rotation axis vector. + * The param of z direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6124,7 +6418,7 @@ declare interface RotateOptions { * @since 9 */ /** - * Z coordinate of the rotation axis vector. + * The param of z direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6133,26 +6427,27 @@ declare interface RotateOptions { * @since 10 */ /** - * Z coordinate of the rotation axis vector. + * The param of z direction. * * @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 */ z?: number; /** - * X coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of x. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * X coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of x. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6160,7 +6455,7 @@ declare interface RotateOptions { * @since 9 */ /** - * X coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of x. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6169,33 +6464,34 @@ declare interface RotateOptions { * @since 10 */ /** - * X coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of x. * * @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 */ centerX?: number | string; /** - * Y coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of y. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Y coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of y. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 */ /** - * Y coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of y. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6204,19 +6500,20 @@ declare interface RotateOptions { * @since 10 */ /** - * Y coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of y. * * @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 */ centerY?: number | string; /** - * Z-axis anchor, that is, the z-component of the 3D rotation center point. + * The param of center point of z. * * @type { ?number } * @default 0 @@ -6226,7 +6523,7 @@ declare interface RotateOptions { * @since 10 */ /** - * Z-axis anchor, that is, the z-component of the 3D rotation center point. + * The param of center point of z. * * @type { ?number } * @default 0 @@ -6234,15 +6531,13 @@ declare interface RotateOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ centerZ?: number; /** - * Distance from the user to the z=0 plane. - * The axis and center of rotation are set based on the coordinate system, - * which remains where it is when the component is moved. - * + * The param of camera distance, value range (-∞, ∞). * @type { ?number } * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6251,17 +6546,15 @@ declare interface RotateOptions { * @since 10 */ /** - * Distance from the user to the z=0 plane. - * The axis and center of rotation are set based on the coordinate system, - * which remains where it is when the component is moved. - * + * The param of camera distance, value range (-∞, ∞). * @type { ?number } * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ perspective?: number; @@ -6297,11 +6590,13 @@ declare interface RotateOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ angle: number | string; } + /** * The param of rotate about angle. * @@ -6415,10 +6710,7 @@ declare interface RotateAngleOptions { */ declare interface TransitionOptions { /** - * Transition type.
- * Default value: **TransitionType.All**. - *
**NOTE**
If **type** is not specified, the default value **TransitionType.All** - * is used, which means that the transition effect works for both component addition and deletion. + * Defines the param of type. * * @type { ?TransitionType } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6427,11 +6719,7 @@ declare interface TransitionOptions { */ type?: TransitionType; /** - * Opacity of the component during transition, which is the value of the - * start point of insertion and the end point of deletion. - *
Value range: [0, 1]. - *
**NOTE**
If the value specified is less than 0, the value **0** is used. - * If the value specified is greater than 1, the value **1** is used. + * Defines the param of opacity. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6440,11 +6728,7 @@ declare interface TransitionOptions { */ opacity?: number; /** - * Translation of the component during transition, - * which is the value of the start point of insertion and the end point of deletion. - * **x**: distance to translate along the x-axis. - * **y**: distance to translate along the y-axis. - * **z**: distance to translate along the z-axis. + * Defines the param of translate. * * @type { ?TranslateOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6453,15 +6737,7 @@ declare interface TransitionOptions { */ translate?: TranslateOptions; /** - * Scaling of the component during transition, which is the value of the start point of insertion and the end point - * of deletion. **x**: scale factor along the x-axis. **y**: scale factor along the y-axis. **z**: scale factor along - * the z-axis (not effective for the current 2D graphics). **centerX** and **centerY**: scale center point. The - * default values are both **"50%"**, indicating the center point of the page. If the center point is (0, 0), it - * refers to the upper left corner of the component. - *

**NOTE**: - *
If **centerX** or **centerY** is set to an invalid string (for example, **"illegalString"**), - * the default value **"0"** is used. - *

+ * Defines the param of scale. * * @type { ?ScaleOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6470,11 +6746,7 @@ declare interface TransitionOptions { */ scale?: ScaleOptions; /** - * Rotation of the component during transition, which is the value of the start point of insertion and the end point - * of deletion. **x**: X-component of the rotation vector. **y**: Y-component of the rotation vector. **z**: - * Z-component of the rotation vector. **centerX** and **centerY**: rotation center point. The default values are - * both **"50%"**, indicating the center point of the page.If the center point is (0, 0), it refers to the upper left - * corner of the component. + * Defines the param of rotate. * * @type { ?RotateOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6501,7 +6773,8 @@ declare interface TransitionOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TransitionEdge { /** @@ -6519,12 +6792,13 @@ declare enum TransitionEdge { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ TOP, /** - * Bottom edge of the window. + * Bottom edge * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -6532,19 +6806,19 @@ declare enum TransitionEdge { * @since 10 */ /** - * Bottom edge of the window. + * Bottom edge * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BOTTOM, /** - * Start edge of the window, which is the left edge for left-to-right - * scripts and the right edge for right-to-left scripts. + * Start edge * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -6552,20 +6826,19 @@ declare enum TransitionEdge { * @since 10 */ /** - * Start edge of the window, which is the left edge for left-to-right - * scripts and the right edge for right-to-left scripts. + * Start edge * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ START, /** - * End edge of the window, which is the right edge for left-to-right scripts - * and the left edge for right-to-left scripts. + * End edge * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -6573,14 +6846,14 @@ declare enum TransitionEdge { * @since 10 */ /** - * End edge of the window, which is the right edge for left-to-right scripts - * and the left edge for right-to-left scripts. + * End edge * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ END } @@ -6619,28 +6892,79 @@ declare type TransitionEffects = { }; /** - * Defined the draw modifier of node. Provides draw callbacks for the associated Node. - * Each DrawModifier instance can be set for only one component. Repeated setting is not allowed. - * + * Defines the option of asymmetric transition. + * + * @interface AsymmetricTransitionOption * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice - * @since 12 + * @since 20 + * @arkts 1.2 */ -declare class DrawModifier { +declare interface AsymmetricTransitionOption { /** - * drawBehind Method. Executed before drawing associated Node. + * TransitionEffect used for appearing * - * @param { DrawContext } drawContext - The drawContext used to draw. + * @type { TransitionEffect } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice - * @since 12 + * @since 20 + * @arkts 1.2 + */ + appear: TransitionEffect; + + /** + * TransitionEffect used for disappearing + * + * @type { TransitionEffect } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + disappear: TransitionEffect; +} + +/** + * Defined the draw modifier of node. Provides draw callbacks for the associated Node. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare class DrawModifier { + /** + * drawBehind Method. Executed before drawing associated Node. + * + * @param { DrawContext } drawContext - The drawContext used to draw. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 */ drawBehind?(drawContext: DrawContext): void; /** - * drawContent Method. Executed when associated Node is drawing, the default drawContent method will be replaced + * drawBehind Method. Executed before drawing associated Node. + * + * @param { DrawContext } drawContext - The drawContext used to draw. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + drawBehind(drawContext: DrawContext): void; + + /** + * drawContent Method. Executed when associated Node is drawing, the default drawContent method will be replaced * if this method is set. * * @param { DrawContext } drawContext - The drawContext used to draw. @@ -6650,7 +6974,21 @@ declare class DrawModifier { * @since 12 */ drawContent?(drawContext: DrawContext): void; - + + /** + * drawContent Method. Executed when associated Node is drawing, the default drawContent method will be replaced + * if this method is set. + * + * @param { DrawContext } drawContext - The drawContext used to draw. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + drawContent(drawContext: DrawContext): void; + + /** * drawFront Method. Executed after drawing associated Node. * @@ -6663,23 +7001,25 @@ declare class DrawModifier { drawFront?(drawContext: DrawContext): void; /** - * drawforeground Method. Executed after drawing associated Node and its children. - * @param { DrawContext } drawContext - The drawContext used to draw + * drawFront Method. Executed after drawing associated Node. + * + * @param { DrawContext } drawContext - The drawContext used to draw. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 + * @arkts 1.2 */ - drawForeground?(drawContext: DrawContext): void; - + drawFront(drawContext: DrawContext): void; + /** * Invalidate the component, which will cause a re-render of the component. - * No overloading is allowed or needed. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ invalidate(): void; } @@ -6731,8 +7071,7 @@ declare class TransitionEffect< static readonly IDENTITY: TransitionEffect<"identity">; /** - * Applies a transition effect with the opacity changing from 0 to 1 when the component appears - * And from 1 to 0 when the component disappears. This is equivalent to **TransitionEffect.opacity(0)** + * Specifies a transition effect with transparency of 0, which is equivalent to TransitionEffect.opacity(0). * * @type { TransitionEffect<"opacity"> } * @readonly @@ -6743,8 +7082,7 @@ declare class TransitionEffect< * @since 10 */ /** - * Applies a transition effect with the opacity changing from 0 to 1 when the component appears - * And from 1 to 0 when the component disappears. This is equivalent to **TransitionEffect.opacity(0)** + * Specifies a transition effect with transparency of 0, which is equivalent to TransitionEffect.opacity(0). * * @type { TransitionEffect<"opacity"> } * @readonly @@ -6758,13 +7096,7 @@ declare class TransitionEffect< static readonly OPACITY: TransitionEffect<"opacity">; /** - * Applies a transition effect of sliding in from the start edge when the component - * appears and sliding out from the end edge when the component disappears. - * This means sliding in from the left edge and sliding out from the right edge for - * left-to-right scripts, and sliding in from the right edge and sliding out from - * the left edge for right-to-left scripts. This is equivalent to - * TransitionEffect.asymmetric(TransitionEffect.move(TransitionEdge.START), - * TransitionEffect.move(TransitionEdge.END)). + * Defines a slide transition effect * * @type { TransitionEffect< * "asymmetric", @@ -6779,13 +7111,7 @@ declare class TransitionEffect< * @since 10 */ /** - * Applies a transition effect of sliding in from the start edge when the component - * appears and sliding out from the end edge when the component disappears. - * This means sliding in from the left edge and sliding out from the right edge for - * left-to-right scripts, and sliding in from the right edge and sliding out from - * the left edge for right-to-left scripts. This is equivalent to - * TransitionEffect.asymmetric(TransitionEffect.move(TransitionEdge.START), - * TransitionEffect.move(TransitionEdge.END)). + * Defines a slide transition effect * * @type { TransitionEffect< * "asymmetric", @@ -6809,13 +7135,11 @@ declare class TransitionEffect< >; /** - * Applies a transition effect of sliding in from the right with first scaling down and then scaling up - * when the component appears and sliding out from the right - * with first scaling down and then scaling up when the component disappears. - * This transition effect comes with its own animation parameters, which can also be overridden. - * The default animation duration is 600 milliseconds, - * with a specified animation curve of cubicBezierCurve(0.24, 0.0, 0.50, 1.0) and a minimum scale factor of 0.8. - * + * Specify a transition effect where the element enters by shrinking first and then expanding as it slides in from the right, + * and exits by shrinking first and then expanding as it slides out to the left, with a minimum scale ratio of 0.8. + * It comes with default animation parameters, which can also be overridden. + * The default animation duration is set to 600ms, and the specified animation curve is cubicBezierCurve(0.24, 0.0, 0.50, 1.0). + * * @type { TransitionEffect<"slideSwitch"> } * @readonly * @static @@ -6825,13 +7149,11 @@ declare class TransitionEffect< * @since 10 */ /** - * Applies a transition effect of sliding in from the right with first scaling down and then scaling up - * when the component appears and sliding out from the right - * with first scaling down and then scaling up when the component disappears. - * This transition effect comes with its own animation parameters, which can also be overridden. - * The default animation duration is 600 milliseconds, - * with a specified animation curve of cubicBezierCurve(0.24, 0.0, 0.50, 1.0) and a minimum scale factor of 0.8. - * + * Specify a transition effect where the element enters by shrinking first and then expanding as it slides in from the right, + * and exits by shrinking first and then expanding as it slides out to the left, with a minimum scale ratio of 0.8. + * It comes with default animation parameters, which can also be overridden. + * The default animation duration is set to 600ms, and the specified animation curve is cubicBezierCurve(0.24, 0.0, 0.50, 1.0). + * * @type { TransitionEffect<"slideSwitch"> } * @readonly * @static @@ -6844,13 +7166,9 @@ declare class TransitionEffect< static readonly SLIDE_SWITCH: TransitionEffect<"slideSwitch">; /** - * Translation of the component during transition, which is the value of the start point - * of insertion and the end point of deletion. + * Creates a translate transition effect * - * @param { TranslateOptions } options - translate options. - *
-**x**: distance to translate along the x-axis. Unit is vp. - *
-**y**: distance to translate along the y-axis. Unit is vp. - *
-**z**: distance to translate along the z-axis. Unit is vp. + * @param { TranslateOptions } options - translate options * @returns { TransitionEffect<"translate"> } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -6858,13 +7176,9 @@ declare class TransitionEffect< * @since 10 */ /** - * Translation of the component during transition, which is the value of the start point - * of insertion and the end point of deletion. + * Creates a translate transition effect * - * @param { TranslateOptions } options - translate options. - *
-**x**: distance to translate along the x-axis. Unit is vp. - *
-**y**: distance to translate along the y-axis. Unit is vp. - *
-**z**: distance to translate along the z-axis. Unit is vp. + * @param { TranslateOptions } options - translate options * @returns { TransitionEffect<"translate"> } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -6875,20 +7189,19 @@ declare class TransitionEffect< static translate(options: TranslateOptions): TransitionEffect<"translate">; /** - * Rotation of the component during transition, which is the value of the start - * point of insertion and the end point of deletion. - *
- **x**: X-component of the rotation vector. - *
- **y**: Y-component of the rotation vector. - *
- **z**: Z-component of the rotation vector. - *
- **centerX** and **centerY**: rotation center point. The default values - * are both **"50%"**, indicating the center point of the page. - *
- If the center point is (0, 0), it refers to the upper left corner of the component. - *
- **centerZ**: z-axis anchor point, that is, the z-component of the 3D rotation - * center point. The default value is **0**. - *
- **perspective**: viewing distance. It is not supported for use in transition animations. - *
**Widget capability**: This API can be used in ArkTS widgets since API version 10. - * - * @param { RotateOptions } options - Rotate options. + * Creates a rotation transition effect + * + * @param { RotateOptions } options - rotate options + * Set the rotation effect for component transitions when inserting and deleting. + * The value represents the starting rotation point for the inserting animation and the ending rotation point for the deleting animation. + * -x: Horizontal component of the rotational vector. + * -y: Vertical component of the rotational vector. + * -z: Vertical component of the rotational vector. + * -centerX, centerY specify the rotation center point, with default values of "50%", + * meaning that the default rotation center point is the center point of the component. + * -The center point of (0, 0) represents the upper-left corner of the component. + * -centerZ refers to the Z-axis anchor point. The default value of centerZ is 0. + * -perspective indicates the visual distance. The perspective property does not support transition animation. * @returns { TransitionEffect<"rotate"> } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -6896,20 +7209,19 @@ declare class TransitionEffect< * @since 10 */ /** - * Rotation of the component during transition, which is the value of the start - * point of insertion and the end point of deletion. - *
- **x**: X-component of the rotation vector. - *
- **y**: Y-component of the rotation vector. - *
- **z**: Z-component of the rotation vector. - *
- **centerX** and **centerY**: rotation center point. The default values - * are both **"50%"**, indicating the center point of the page. - *
- If the center point is (0, 0), it refers to the upper left corner of the component. - *
- **centerZ**: z-axis anchor point, that is, the z-component of the 3D rotation - * center point. The default value is **0**. - *
- **perspective**: viewing distance. It is not supported for use in transition animations. - *
**Widget capability**: This API can be used in ArkTS widgets since API version 10. + * Creates a rotation transition effect * - * @param { RotateOptions } options - Rotate options. + * @param { RotateOptions } options - rotate options + * Set the rotation effect for component transitions when inserting and deleting. + * The value represents the starting rotation point for the inserting animation and the ending rotation point for the deleting animation. + * -x: Horizontal component of the rotational vector. + * -y: Vertical component of the rotational vector. + * -z: Vertical component of the rotational vector. + * -centerX, centerY specify the rotation center point, with default values of "50%", + * meaning that the default rotation center point is the center point of the component. + * -The center point of (0, 0) represents the upper-left corner of the component. + * -centerZ refers to the Z-axis anchor point. The default value of centerZ is 0. + * -perspective indicates the visual distance. The perspective property does not support transition animation. * @returns { TransitionEffect<"rotate"> } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -6920,8 +7232,7 @@ declare class TransitionEffect< static rotate(options: RotateOptions): TransitionEffect<"rotate">; /** - * Scaling of the component during transition, which is the value of the start point of insertion and - * the end point of deletion. + * Creates a scale transition effect * * @param { ScaleOptions } options - scale options * @returns { TransitionEffect<"scale"> } @@ -6931,8 +7242,7 @@ declare class TransitionEffect< * @since 10 */ /** - * Scaling of the component during transition, which is the value of the start point of insertion and - * the end point of deletion. + * Creates a scale transition effect * * @param { ScaleOptions } options - scale options * @returns { TransitionEffect<"scale"> } @@ -6980,9 +7290,7 @@ declare class TransitionEffect< static opacity(alpha: number): TransitionEffect<"opacity">; /** - * Slide-in and slide-out of the component from the screen edge during transition. - * It is essentially a translation effect, which is the value of the start point of insertion - * and the end point of deletion. + * Creates a move transition effect * * @param { TransitionEdge } edge - the edge that component will move to * @returns { TransitionEffect<"move"> } @@ -6992,9 +7300,7 @@ declare class TransitionEffect< * @since 10 */ /** - * Slide-in and slide-out of the component from the screen edge during transition. - * It is essentially a translation effect, which is the value of the start point of insertion - * and the end point of deletion. + * Creates a move transition effect * * @param { TransitionEdge } edge - the edge that component will move to * @returns { TransitionEffect<"move"> } @@ -7081,7 +7387,7 @@ declare class TransitionEffect< animation(value: AnimateParam): TransitionEffect; /** - * Combination of transition effects. + * Combines another transition effect * * @param { TransitionEffect } transitionEffect - transition effect which is be combined * @returns { TransitionEffect } combined transition effect @@ -7091,7 +7397,7 @@ declare class TransitionEffect< * @since 10 */ /** - * Combination of transition effects. + * Combines another transition effect * * @param { TransitionEffect } transitionEffect - transition effect which is be combined * @returns { TransitionEffect } combined transition effect @@ -7104,6 +7410,310 @@ declare class TransitionEffect< combine(transitionEffect: TransitionEffect): TransitionEffect; } +/** + * Defines the transition effect + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare class TransitionEffect { + + /** + * Disables the transition effect + * + * @type { TransitionEffect } + * @readonly + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + static readonly IDENTITY: TransitionEffect; + + /** + * Specifies a transition effect with transparency of 0, which is equivalent to TransitionEffect.opacity(0). + * + * @type { TransitionEffect } + * @readonly + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + static readonly OPACITY: TransitionEffect; + + /** + * Defines a slide transition effect + * + * @type { TransitionEffect } + * @readonly + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + static readonly SLIDE: TransitionEffect; + + /** + * Specify a transition effect where the element enters by shrinking first and then expanding as it slides in from the right, + * and exits by shrinking first and then expanding as it slides out to the left, with a minimum scale ratio of 0.8. + * It comes with default animation parameters, which can also be overridden. + * The default animation duration is set to 600ms, and the specified animation curve is cubicBezierCurve(0.24, 0.0, 0.50, 1.0). + * + * @type { TransitionEffect } + * @readonly + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + static readonly SLIDE_SWITCH: TransitionEffect; + + /** + * Creates a translate transition effect + * + * @param { TranslateOptions } options - translate options + * @returns { TransitionEffect } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + static translate(options: TranslateOptions): TransitionEffect; + + /** + * Creates a rotation transition effect + * + * @param { RotateOptions } options - rotate options + * Set the rotation effect for component transitions when inserting and deleting. + * The value represents the starting rotation point for the inserting animation and the ending rotation point for the deleting animation. + * -x: Horizontal component of the rotational vector. + * -y: Vertical component of the rotational vector. + * -z: Vertical component of the rotational vector. + * -centerX, centerY specify the rotation center point, with default values of "50%", + * meaning that the default rotation center point is the center point of the component. + * -The center point of (0, 0) represents the upper-left corner of the component. + * -centerZ refers to the Z-axis anchor point. The default value of centerZ is 0. + * -perspective indicates the visual distance. The perspective property does not support transition animation. + * @returns { TransitionEffect } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + static rotate(options: RotateOptions): TransitionEffect; + + /** + * Creates a scale transition effect + * + * @param { ScaleOptions } options - scale options + * @returns { TransitionEffect } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + static scale(options: ScaleOptions): TransitionEffect; + + /** + * Creates an opacity transition effect with alpha value + * + * @param { number } alpha - opacity alpha value, value range [0, 1]. + * Illegal values less than 0 are treated as 0, and illegal values greater than 1 are treated as 1. + * @returns { TransitionEffect } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + static opacity(alpha: number): TransitionEffect; + + /** + * Creates a move transition effect + * + * @param { TransitionEdge } edge - the edge that component will move to + * @returns { TransitionEffect } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + static move(edge: TransitionEdge): TransitionEffect; + + /** + * Creates an asymmetric transition effect + * + * @param { TransitionEffect } appear - the transition which will be attached when the component is appear + * @param { TransitionEffect } disappear - the transition which will be attached when the component is disappear + * @returns { TransitionEffect } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + static asymmetric(appear: TransitionEffect, disappear: TransitionEffect): TransitionEffect; + + /** + * identity or slideSwitch TransitionEffect constructor + * + * @param { 'identity' | 'slideSwitch' } type - transition type + * @param { undefined } effect - transition options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(type: 'identity' | 'slideSwitch', effect: undefined); + + /** + * opacity TransitionEffect constructor + * + * @param { 'opacity' } type - transition type + * @param { number } effect - transition options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(type: 'opacity', effect: number); + + /** + * move TransitionEffect constructor + * + * @param { 'move' } type - transition type + * @param { TransitionEdge } effect - transition options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(type: 'move', effect: TransitionEdge); + + /** + * translate TransitionEffect constructor + * + * @param { 'translate' } type - transition type + * @param { TranslateOptions } effect - transition options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(type: 'translate', effect:TranslateOptions); + + /** + * rotate TransitionEffect constructor + * + * @param { 'rotate' } type - transition type + * @param { RotateOptions } effect - transition options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(type: 'rotate', effect: RotateOptions); + + /** + * scale TransitionEffect constructor + * + * @param { 'scale' } type - transition type + * @param { ScaleOptions } effect - transition options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(type: 'scale', effect: ScaleOptions); + + /** + * asymmetric TransitionEffect constructor + * + * @param { 'asymmetric' } type - transition type + * @param { AsymmetricTransitionOption } effect - transition options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(type: 'asymmetric', effect: AsymmetricTransitionOption); + + /** + * Set the animation of current transition effect + * + * @param { AnimateParam } value - animation parameters + * @returns { TransitionEffect } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + animation(value: AnimateParam): TransitionEffect; + + /** + * Combines another transition effect + * + * @param { TransitionEffect } transitionEffect - transition effect which is be combined + * @returns { TransitionEffect } combined transition effect + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + combine(transitionEffect: TransitionEffect): TransitionEffect; +} + /** * Define Preview property * @@ -7321,7 +7931,8 @@ interface PreviewParams { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ItemDragInfo { /** @@ -7346,7 +7957,8 @@ declare interface ItemDragInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ x: number; @@ -7372,7 +7984,8 @@ declare interface ItemDragInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ y: number; } @@ -7383,7 +7996,8 @@ declare interface ItemDragInfo { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum EffectType { /** @@ -7391,7 +8005,8 @@ declare enum EffectType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 0, /** @@ -7399,7 +8014,8 @@ declare enum EffectType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ WINDOW_EFFECT = 1, } @@ -7410,7 +8026,8 @@ declare enum EffectType { * @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 PreDragStatus { /** @@ -7418,7 +8035,8 @@ declare enum PreDragStatus { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ACTION_DETECTING_STATUS = 0, @@ -7427,7 +8045,8 @@ declare enum PreDragStatus { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ READY_TO_TRIGGER_DRAG_ACTION = 1, @@ -7436,7 +8055,8 @@ declare enum PreDragStatus { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PREVIEW_LIFT_STARTED = 2, @@ -7445,7 +8065,8 @@ declare enum PreDragStatus { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PREVIEW_LIFT_FINISHED = 3, @@ -7454,7 +8075,8 @@ declare enum PreDragStatus { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PREVIEW_LANDING_STARTED = 4, @@ -7463,7 +8085,8 @@ declare enum PreDragStatus { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PREVIEW_LANDING_FINISHED = 5, @@ -7472,7 +8095,8 @@ declare enum PreDragStatus { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ACTION_CANCELED_BEFORE_DRAG = 6, @@ -7481,7 +8105,8 @@ declare enum PreDragStatus { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ PREPARING_FOR_DRAG_DETECTION = 7, } @@ -7508,7 +8133,8 @@ declare enum PreDragStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DragItemInfo { /** @@ -7533,7 +8159,8 @@ declare interface DragItemInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts{'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ pixelMap?: PixelMap; @@ -7559,7 +8186,8 @@ declare interface DragItemInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ builder?: CustomBuilder; @@ -7585,7 +8213,8 @@ declare interface DragItemInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ extraInfo?: string; } @@ -7626,60 +8255,48 @@ declare interface DragItemInfo { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @deprecated since 18 * @useinstead ohos.arkui.UIContext.UIContext#animateTo */ declare function animateTo(value: AnimateParam, event: () => void): void; /** - * Implements immediate delivery of an explicit animation through a **UIContext** object. - * When multiple property animations are loaded at once, you can call this API to immediately - * execute the transition animation for state changes caused by the specified closure function. + * Define animation functions for immediate distribution. * * @param { AnimateParam } value - Set animation effect parameters. * @param { function } event - Specify the closure function that displays dynamic effects, * and the system will automatically insert transition animations for state changes caused by the closure function. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare function animateToImmediately(value: AnimateParam, event: () => void): void; /** * Converts a value in vp units to a value in px. - * By default, the virtual pixel ratio of the screen where the current UI instance is located is used for conversion. - * If no UI instance is available, the virtual pixel ratio of the default screen is used instead. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Converts a value in vp units to a value in px. - * By default, the virtual pixel ratio of the screen where the current UI instance is located is used for conversion. - * If no UI instance is available, the virtual pixel ratio of the default screen is used instead. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * Converts a value in vp units to a value in px. - * By default, the virtual pixel ratio of the screen where the current UI instance is located is used for conversion. - * If no UI instance is available, the virtual pixel ratio of the default screen is used instead. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -7687,18 +8304,15 @@ declare function animateToImmediately(value: AnimateParam, event: () => void): v */ /** * Converts a value in vp units to a value in px. - * By default, the virtual pixel ratio of the screen where the current UI instance is located is used for conversion. - * If no UI instance is available, the virtual pixel ratio of the default screen is used instead. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @deprecated since 18 * @useinstead ohos.arkui.UIContext.UIContext#vp2px */ @@ -7706,38 +8320,26 @@ declare function vp2px(value: number): number; /** * Converts a number in units of px to a number in units of vp. - * By default, the virtual pixel ratio of the screen where the current UI instance is located is used for conversion. - * If no UI instance is available, the virtual pixel ratio of the default screen is used instead. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Converts a number in units of px to a number in units of vp. - * By default, the virtual pixel ratio of the screen where the current UI instance is located is used for conversion. - * If no UI instance is available, the virtual pixel ratio of the default screen is used instead. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * Converts a number in units of px to a number in units of vp. - * By default, the virtual pixel ratio of the screen where the current UI instance is located is used for conversion. - * If no UI instance is available, the virtual pixel ratio of the default screen is used instead. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -7745,18 +8347,15 @@ declare function vp2px(value: number): number; */ /** * Converts a number in units of px to a number in units of vp. - * By default, the virtual pixel ratio of the screen where the current UI instance is located is used for conversion. - * If no UI instance is available, the virtual pixel ratio of the default screen is used instead. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @deprecated since 18 * @useinstead ohos.arkui.UIContext.UIContext#px2vp */ @@ -7766,9 +8365,7 @@ declare function px2vp(value: number): number; * Converts a number in fp units to a number in px. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ @@ -7776,9 +8373,7 @@ declare function px2vp(value: number): number; * Converts a number in fp units to a number in px. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 @@ -7787,9 +8382,7 @@ declare function px2vp(value: number): number; * Converts a number in fp units to a number in px. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -7799,9 +8392,7 @@ declare function px2vp(value: number): number; * Converts a number in fp units to a number in px. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -7816,9 +8407,7 @@ declare function fp2px(value: number): number; * Converts a number in units of px to a number in units of fp. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ @@ -7826,9 +8415,7 @@ declare function fp2px(value: number): number; * Converts a number in units of px to a number in units of fp. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 @@ -7837,9 +8424,7 @@ declare function fp2px(value: number): number; * Converts a number in units of px to a number in units of fp. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -7849,9 +8434,7 @@ declare function fp2px(value: number): number; * Converts a number in units of px to a number in units of fp. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -7866,9 +8449,7 @@ declare function px2fp(value: number): number; * Converts a number in units of lpx to a number in units of px. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ @@ -7876,9 +8457,7 @@ declare function px2fp(value: number): number; * Converts a number in units of lpx to a number in units of px. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 @@ -7887,9 +8466,7 @@ declare function px2fp(value: number): number; * Converts a number in units of lpx to a number in units of px. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -7899,9 +8476,7 @@ declare function px2fp(value: number): number; * Converts a number in units of lpx to a number in units of px. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -7916,9 +8491,7 @@ declare function lpx2px(value: number): number; * Converts a number in units of px to a number in units of lpx. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ @@ -7926,9 +8499,7 @@ declare function lpx2px(value: number): number; * Converts a number in units of px to a number in units of lpx. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 @@ -7937,9 +8508,7 @@ declare function lpx2px(value: number): number; * Converts a number in units of px to a number in units of lpx. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -7949,9 +8518,7 @@ declare function lpx2px(value: number): number; * Converts a number in units of px to a number in units of lpx. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -7979,7 +8546,8 @@ declare function px2lpx(value: number): number; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace focusControl { /** @@ -8007,7 +8575,8 @@ declare namespace focusControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function requestFocus(value: string): boolean; } @@ -8029,6 +8598,17 @@ declare namespace focusControl { */ declare type PointerStyle = import('../api/@ohos.multimodalInput.pointer').default.PointerStyle; +/** + * Import the PointerStyle type object for setCursor. + * + * @typedef { pointer.PointerStyle } PointerStyle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type PointerStyle = pointer.PointerStyle; + /** * CursorControl * @@ -8042,7 +8622,8 @@ declare type PointerStyle = import('../api/@ohos.multimodalInput.pointer').defau * @namespace cursorControl * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace cursorControl { @@ -8057,11 +8638,12 @@ declare namespace cursorControl { /** * Change the mouse cursor style by param: 'PointerStyle'. * - * @param { PointerStyle } value - Cursor style. + * @param { PointerStyle } value * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function setCursor(value: PointerStyle): void; @@ -8078,7 +8660,8 @@ declare namespace cursorControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function restoreDefault(): void; } @@ -8115,7 +8698,8 @@ declare namespace cursorControl { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface EventTarget { /** @@ -8143,14 +8727,15 @@ declare interface EventTarget { * @since 10 */ /** - * Area information of the target element. + * Area of current target. * * @type { Area } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ area: Area; @@ -8162,7 +8747,8 @@ declare interface EventTarget { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ id?: string; } @@ -8189,7 +8775,8 @@ declare interface EventTarget { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SourceType { /** @@ -8206,12 +8793,13 @@ declare enum SourceType { * @since 10 */ /** - * Unknown device type. + * Unknown type. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Unknown, @@ -8234,7 +8822,8 @@ declare enum SourceType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Mouse, @@ -8257,7 +8846,8 @@ declare enum SourceType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ TouchScreen, } @@ -8284,7 +8874,8 @@ declare enum SourceType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SourceTool { /** @@ -8301,12 +8892,13 @@ declare enum SourceTool { * @since 10 */ /** - * Unknown input source. + * Unknown type. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Unknown, @@ -8329,7 +8921,8 @@ declare enum SourceTool { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Finger, @@ -8352,7 +8945,8 @@ declare enum SourceTool { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Pen, @@ -8362,7 +8956,8 @@ declare enum SourceTool { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MOUSE, @@ -8372,7 +8967,8 @@ declare enum SourceTool { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TOUCHPAD, @@ -8382,7 +8978,8 @@ declare enum SourceTool { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ JOYSTICK, } @@ -8412,7 +9009,8 @@ declare enum SourceTool { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum RepeatMode { /** @@ -8431,13 +9029,14 @@ declare enum RepeatMode { * @since 10 */ /** - * The source image's slices are tiled. Tiles beyond the border box will be clipped. + * Repeat mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Repeat, @@ -8457,13 +9056,14 @@ declare enum RepeatMode { * @since 10 */ /** - * The source image's slices are stretched to fill the border box. + * Stretch mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Stretch, @@ -8483,13 +9083,14 @@ declare enum RepeatMode { * @since 10 */ /** - * The source image's slices are tiled to fill the border box. Tiles may be compressed when needed. + * Round mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Round, @@ -8509,13 +9110,14 @@ declare enum RepeatMode { * @since 10 */ /** - * The source image's slices are tiled to fill the border box. Extra space will be distributed in between tiles. + * Space mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Space, } @@ -8545,18 +9147,19 @@ declare enum RepeatMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum BlurStyle { /** - * Thin material. + * Defines the thin card material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Thin material. + * Defines the thin card material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -8564,25 +9167,26 @@ declare enum BlurStyle { * @since 10 */ /** - * Thin material. + * Defines the thin card material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Thin, /** - * Regular material. + * Defines the regular card material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Regular material. + * Defines the regular card material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -8590,25 +9194,26 @@ declare enum BlurStyle { * @since 10 */ /** - * Regular material. + * Defines the regular card material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Regular, /** - * Thick material. + * Defines the thick card material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Thick material. + * Defines the thick card material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -8616,90 +9221,95 @@ declare enum BlurStyle { * @since 10 */ /** - * Thick material. + * Defines the thick card material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Thick, /** - * Material that creates the minimum depth of field effect. + * Defines the thin background material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Material that creates the minimum depth of field effect. + * Defines the thin background material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BACKGROUND_THIN, /** - * Material that creates a medium shallow depth of field effect. + * Defines the thin regular material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Material that creates a medium shallow depth of field effect. + * Defines the thin regular material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BACKGROUND_REGULAR, /** - * Material that creates a high shallow depth of field effect. + * Defines the thin thick material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Material that creates a high shallow depth of field effect. + * Defines the thin thick material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BACKGROUND_THICK, /** - * Material that creates the maximum depth of field effect. + * Defines the thin ultra thick material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Material that creates the maximum depth of field effect. + * Defines the thin ultra thick material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BACKGROUND_ULTRA_THICK, /** - * No blur. + * Defines none material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -8707,18 +9317,19 @@ declare enum BlurStyle { * @since 10 */ /** - * No blur. + * Defines none material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 - */ - NONE, + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + NONE, /** - * Component ultra-thin material. + * Defines the ultra thin component material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -8726,13 +9337,14 @@ declare enum BlurStyle { * @since 11 */ /** - * Component ultra-thin material. + * Defines the ultra thin component material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ COMPONENT_ULTRA_THIN = 8, @@ -8745,13 +9357,14 @@ declare enum BlurStyle { * @since 11 */ /** - * Component thin material. + * Defines the thin component material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ COMPONENT_THIN = 9, @@ -8764,13 +9377,14 @@ declare enum BlurStyle { * @since 11 */ /** - * Component regular material. + * Defines the regular component material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ COMPONENT_REGULAR = 10, @@ -8789,7 +9403,8 @@ declare enum BlurStyle { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ COMPONENT_THICK = 11, @@ -8808,7 +9423,8 @@ declare enum BlurStyle { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ COMPONENT_ULTRA_THICK = 12, } @@ -8820,7 +9436,8 @@ declare enum BlurStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum BlurStyleActivePolicy { /** @@ -8829,7 +9446,8 @@ declare enum BlurStyleActivePolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ FOLLOWS_WINDOW_ACTIVE_STATE = 0, @@ -8839,7 +9457,8 @@ declare enum BlurStyleActivePolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ ALWAYS_ACTIVE = 1, @@ -8849,7 +9468,8 @@ declare enum BlurStyleActivePolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ ALWAYS_INACTIVE = 2, } @@ -8869,7 +9489,8 @@ declare enum BlurStyleActivePolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ThemeColorMode { /** @@ -8885,7 +9506,8 @@ declare enum ThemeColorMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SYSTEM, @@ -8902,7 +9524,8 @@ declare enum ThemeColorMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LIGHT, @@ -8919,7 +9542,8 @@ declare enum ThemeColorMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ DARK, } @@ -8939,42 +9563,43 @@ declare enum ThemeColorMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum AdaptiveColor { /** - * Adaptive color mode is not used. - * The default color is used as the mask color. Using a mode other than **DEFAULT** can be more time-consuming. + * Defines the fixed value color adaptive mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Adaptive color mode is not used. - * The default color is used as the mask color. Using a mode other than **DEFAULT** can be more time-consuming. + * Defines the fixed value color adaptive mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT, /** - * Adaptive color mode is used. The average color value of the color picking area is used as the mask color. + * Defines the background average color adaptive mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Adaptive color mode is used. The average color value of the color picking area is used as the mask color. + * Defines the background average color adaptive mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ AVERAGE, } @@ -8994,57 +9619,61 @@ declare enum AdaptiveColor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ModalTransition { /** - * Slide-up and slide-down animation for the modal. + * Use default animation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Slide-up and slide-down animation for the modal. + * Use default animation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT, /** - * No transition animation for the modal. + * Use none animation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * No transition animation for the modal. + * Use none animation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NONE, /** - * Opacity gradient animation for the modal. + * Use alpha animation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Opacity gradient animation for the modal. + * Use alpha animation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ALPHA, } @@ -9066,7 +9695,8 @@ declare enum ModalTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface BackgroundBlurStyleOptions extends BlurStyleOptions { /** @@ -9077,7 +9707,8 @@ declare interface BackgroundBlurStyleOptions extends BlurStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ policy?: BlurStyleActivePolicy; @@ -9089,7 +9720,8 @@ declare interface BackgroundBlurStyleOptions extends BlurStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ inactiveColor?: ResourceColor; } @@ -9111,7 +9743,8 @@ declare interface BackgroundBlurStyleOptions extends BlurStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ForegroundBlurStyleOptions extends BlurStyleOptions {} @@ -9131,7 +9764,8 @@ declare interface ForegroundBlurStyleOptions extends BlurStyleOptions {} * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface BlurOptions { /** @@ -9147,7 +9781,8 @@ declare interface BlurOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ grayscale: [number, number]; } @@ -9160,18 +9795,20 @@ declare interface BlurOptions { * @crossplatform * @form * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SystemAdaptiveOptions { /** * Whether to disable system adaptive. - * + * * @type { ?boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ disableSystemAdaptation?: boolean; } @@ -9191,12 +9828,12 @@ declare interface SystemAdaptiveOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface BlurStyleOptions { /** - * Color mode used for the foreground blur. - *
Default value: **ThemeColorMode.SYSTEM**. + * color mode * * @type { ?ThemeColorMode } * @default ThemeColorMode.SYSTEM @@ -9204,21 +9841,20 @@ declare interface BlurStyleOptions { * @since 10 */ /** - * Color mode used for the foreground blur. - *
Default value: **ThemeColorMode.SYSTEM**. + * color mode * * @type { ?ThemeColorMode } * @default ThemeColorMode.SYSTEM * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ colorMode?: ThemeColorMode; /** - * Adaptive color mode. - *
Default value: **AdaptiveColor.DEFAULT**. + * adaptive color * * @type { ?AdaptiveColor } * @default AdaptiveColor.DEFAULT @@ -9226,28 +9862,29 @@ declare interface BlurStyleOptions { * @since 10 */ /** - * Adaptive color mode. - *
Default value: **AdaptiveColor.DEFAULT**. + * adaptive color * * @type { ?AdaptiveColor } * @default AdaptiveColor.DEFAULT * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ adaptiveColor?: AdaptiveColor; /** - * Foreground blur scale. - *
Default value: **1.0**. - *
Value range: [0.0, 1.0]. + * Define the scale of blur effect. + * The range of value is [0, 1]. The larger the value, the more obvious the blurring effect. + * A value of 0 indicates no blur effect and a value of 1 indicates a complete blur effect. * * @type { ?number } * @default 1.0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ scale?: number; @@ -9268,7 +9905,8 @@ declare interface BlurStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ blurOptions?: BlurOptions; } @@ -9288,14 +9926,13 @@ declare interface BlurStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface BackgroundEffectOptions { /** - * Blur radius. - * Value range: [0, +∞). - * Default value: **0**. + * Define the radius size of BackgroundEffect.The range of this value is [0, ∞) * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9303,22 +9940,19 @@ declare interface BackgroundEffectOptions { * @since 11 */ /** - * Blur radius. - * Value range: [0, +∞). - * Default value: **0**. + * Define the radius size of BackgroundEffect.The range of this value is [0, ∞) * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radius: number; /** - * Saturation. - * Value range: [0, +∞). - * Recommended value range: [0, 50]. + * Define the saturation of BackgroundEffect. Value range [0, ∞) * * @type { ?number } * @default 1 @@ -9327,24 +9961,21 @@ declare interface BackgroundEffectOptions { * @since 11 */ /** - * Saturation. - * Value range: [0, +∞). - * Recommended value range: [0, 50]. + * Define the saturation of BackgroundEffect. Value range [0, ∞) * * @type { ?number } * @default 1 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ saturation?: number; /** - * Brightness. - *
Value range: [0, +∞). - *
Default value: **1** Recommended value range: [0, 2]. - * + * Define the brightness of BackgroundEffect. Value range [0, ∞) + * The input parameter is the highlight proportion. 0 indicates no highlight effect, and 1 indicates the maximum highlight proportion. * @type { ?number } * @default 1 * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9352,21 +9983,20 @@ declare interface BackgroundEffectOptions { * @since 11 */ /** - * Brightness. - *
Value range: [0, +∞). - *
Default value: **1** Recommended value range: [0, 2]. - * + * Define the brightness of BackgroundEffect. Value range [0, ∞) + * The input parameter is the highlight proportion. 0 indicates no highlight effect, and 1 indicates the maximum highlight proportion. * @type { ?number } * @default 1 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ brightness?: number; /** - * Color. + * color the brightness of BackgroundEffect. * * @type { ?ResourceColor } * @default Color.Transparent @@ -9375,14 +10005,15 @@ declare interface BackgroundEffectOptions { * @since 11 */ /** - * Color. + * color the brightness of BackgroundEffect. * * @type { ?ResourceColor } * @default Color.Transparent * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ color?: ResourceColor; @@ -9403,7 +10034,8 @@ declare interface BackgroundEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ adaptiveColor?: AdaptiveColor; @@ -9424,7 +10056,8 @@ declare interface BackgroundEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ blurOptions?: BlurOptions; @@ -9436,7 +10069,8 @@ declare interface BackgroundEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ policy?: BlurStyleActivePolicy; @@ -9448,7 +10082,8 @@ declare interface BackgroundEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ inactiveColor?: ResourceColor; } @@ -9460,10 +10095,11 @@ declare interface BackgroundEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ForegroundEffectOptions { - + /** * Define the radius size of ForegroundEffect.The range of this value is [0, ∞) * @@ -9471,7 +10107,8 @@ declare interface ForegroundEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radius: number; } @@ -9491,7 +10128,8 @@ declare interface ForegroundEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PickerTextStyle { /** @@ -9503,13 +10141,14 @@ declare interface PickerTextStyle { * @since 10 */ /** - * Font color. + * Define the text color of picker. * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ color?: ResourceColor; @@ -9523,13 +10162,15 @@ declare interface PickerTextStyle { * @since 10 */ /** - * Text style. + * Define the text font of picker. + * Only support size and weight. * * @type { ?Font } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ font?: Font; } @@ -9541,7 +10182,8 @@ declare interface PickerTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PickerDialogButtonStyle { /** @@ -9551,7 +10193,8 @@ declare interface PickerDialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type?: ButtonType; @@ -9562,7 +10205,8 @@ declare interface PickerDialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ style?: ButtonStyleMode; @@ -9573,7 +10217,8 @@ declare interface PickerDialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ role?: ButtonRole; @@ -9584,7 +10229,8 @@ declare interface PickerDialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize?: Length; @@ -9595,7 +10241,8 @@ declare interface PickerDialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor?: ResourceColor; @@ -9606,7 +10253,8 @@ declare interface PickerDialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontWeight?: FontWeight | number | string; @@ -9617,7 +10265,8 @@ declare interface PickerDialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontStyle?: FontStyle; @@ -9628,7 +10277,8 @@ declare interface PickerDialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontFamily?: Resource | string; @@ -9639,7 +10289,8 @@ declare interface PickerDialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor?: ResourceColor; @@ -9650,7 +10301,8 @@ declare interface PickerDialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderRadius?: Length | BorderRadiuses; @@ -9661,7 +10313,8 @@ declare interface PickerDialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ primary?: boolean; } @@ -9681,7 +10334,8 @@ declare interface PickerDialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ShadowType { /** @@ -9697,24 +10351,26 @@ declare enum ShadowType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ COLOR, /** - * Blur. + * Define a blur type of shadow * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Blur. + * Define a blur type of shadow * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BLUR, } @@ -9751,18 +10407,19 @@ declare enum ShadowType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ShadowOptions { /** - * Blur radius of the shadow. + * Define the radius size of shadow * * @type { number | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Blur radius of the shadow. + * Define the radius size of shadow * * @type { number | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9770,7 +10427,7 @@ declare interface ShadowOptions { * @since 9 */ /** - * Blur radius of the shadow. + * Define the radius size of shadow * * @type { number | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9779,20 +10436,20 @@ declare interface ShadowOptions { * @since 10 */ /** - * Blur radius of the shadow. + * Define the radius size of shadow * * @type { number | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ radius: number | Resource; /** - * Shadow type. - *
Default value: **COLOR**. + * Define the type of shadow * * @type { ?ShadowType } * @default ShadowType.COLOR @@ -9801,27 +10458,27 @@ declare interface ShadowOptions { * @since 10 */ /** - * Shadow type. - *
Default value: **COLOR**. + * Define the type of shadow * * @type { ?ShadowType } * @default ShadowType.COLOR * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ type?: ShadowType; /** - * Color of the shadow. Default value: **Black** + * Define the color of shadow * * @type { ?(Color | string | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Color of the shadow. Default value: **Black** + * Define the color of shadow * * @type { ?(Color | string | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9829,7 +10486,7 @@ declare interface ShadowOptions { * @since 9 */ /** - * Color of the shadow. Default value: **Black** + * Define the color of shadow * * @type { ?(Color | string | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9838,26 +10495,27 @@ declare interface ShadowOptions { * @since 10 */ /** - * Color of the shadow. Default value: **Black** + * Define the color or the color strategy of shadow * * @type { ?(Color | string | Resource| ColoringStrategy) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ color?: Color | string | Resource | ColoringStrategy; /** - * Offset of the shadow along the x-axis. Unit is px. Default value is 0. + * Define the horizontal offset size of shadow * * @type { ?(number | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Offset of the shadow along the x-axis. Unit is px. Default value is 0. + * Define the horizontal offset size of shadow * * @type { ?(number | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9865,7 +10523,7 @@ declare interface ShadowOptions { * @since 9 */ /** - * Offset of the shadow along the x-axis. Unit is px. Default value is 0. + * Define the horizontal offset size of shadow * * @type { ?(number | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9874,26 +10532,27 @@ declare interface ShadowOptions { * @since 10 */ /** - * Offset of the shadow along the x-axis. Unit is px. Default value is 0. + * Define the horizontal offset size of shadow * * @type { ?(number | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offsetX?: number | Resource; /** - * Offset of the shadow along the y-axis. Unit is px. Default value is 0. + * Define the vertical offset size of shadow * * @type { ?(number | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Offset of the shadow along the y-axis. Unit is px. Default value is 0. + * Define the vertical offset size of shadow * * @type { ?(number | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9901,7 +10560,7 @@ declare interface ShadowOptions { * @since 9 */ /** - * Offset of the shadow along the y-axis. Unit is px. Default value is 0. + * Define the vertical offset size of shadow * * @type { ?(number | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9910,23 +10569,20 @@ declare interface ShadowOptions { * @since 10 */ /** - * Offset of the shadow along the y-axis. Unit is px. Default value is 0. + * Define the vertical offset size of shadow * * @type { ?(number | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offsetY?: number | Resource; /** - * Whether to fill the inside of the component with shadow. **true**: Fill - * the inside of the component with shadow. - *
**false**: Do not fill the inside of the component with shadow. - *
The default value is **false**. - *
**NOTE**
This attribute does not take effect in textShadow. + * Define whether the shadow should fill the area * * @type { ?boolean } * @default false @@ -9935,18 +10591,15 @@ declare interface ShadowOptions { * @since 11 */ /** - * Whether to fill the inside of the component with shadow. **true**: Fill - * the inside of the component with shadow. - *
**false**: Do not fill the inside of the component with shadow. - *
The default value is **false**. - *
**NOTE**
This attribute does not take effect in textShadow. + * Define whether the shadow should fill the area * * @type { ?boolean } * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fill?: boolean; } @@ -9966,7 +10619,8 @@ declare interface ShadowOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ShadowStyle { /** @@ -9982,7 +10636,8 @@ declare enum ShadowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ OUTER_DEFAULT_XS, @@ -9999,58 +10654,62 @@ declare enum ShadowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ OUTER_DEFAULT_SM, /** - * Medium shadow. + * Defines the medium default shadow style. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Medium shadow. + * Defines the medium default shadow style. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ OUTER_DEFAULT_MD, /** - * Large shadow. + * Defines the large default shadow style. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Large shadow. + * Defines the large default shadow style. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ OUTER_DEFAULT_LG, /** - * Floating medium shadow. + * Defines the small floating shadow style. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Floating medium shadow. + * Defines the small floating shadow style. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ OUTER_FLOATING_SM, @@ -10062,12 +10721,13 @@ declare enum ShadowStyle { * @since 10 */ /** - * Floating medium shadow. + * Defines the medium floating shadow style. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ OUTER_FLOATING_MD, } @@ -10087,16 +10747,13 @@ declare enum ShadowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface MultiShadowOptions { /** - * Shadow blur radius. - * Unit: vp. - *

**NOTE**: - *
A value less than or equal to 0 is handled as the default value. - *

- * + * Current shadow radius. + * * @type { ?(number | Resource) } * @default 5 * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -10104,25 +10761,21 @@ declare interface MultiShadowOptions { * @since 10 */ /** - * Shadow blur radius. - * Unit: vp. - *

**NOTE**: - *
A value less than or equal to 0 is handled as the default value. - *

- * + * Current shadow radius. + * * @type { ?(number | Resource) } * @default 20 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ radius?: number | Resource; /** - * Offset on the x-axis. - * Unit: vp. - * + * Current shadow offsetX. + * * @type { ?(number | Resource) } * @default 5 * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -10130,21 +10783,20 @@ declare interface MultiShadowOptions { * @since 10 */ /** - * Offset on the x-axis. - * Unit: vp. - * + * Current shadow offsetX. + * * @type { ?(number | Resource) } * @default 5 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offsetX?: number | Resource; /** - * Offset on the y-axis. - * Unit: vp. + * Current shadow offsetY * * @type { ?(number | Resource) } * @default 5 @@ -10153,15 +10805,15 @@ declare interface MultiShadowOptions { * @since 10 */ /** - * Offset on the y-axis. - * Unit: vp. + * Current shadow offsetY * * @type { ?(number | Resource) } * @default 5 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offsetY?: number | Resource; } @@ -10174,13 +10826,14 @@ declare interface MultiShadowOptions { * @since 10 */ /** - * The types of expanded safe areas. + * Enumerates the safe area types. * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SafeAreaType { /** @@ -10190,12 +10843,13 @@ declare enum SafeAreaType { * @since 10 */ /** - * Default non-safe area of the system, including the status bar and navigation bar. + * Default area of the system, including the status bar and navigation bar. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SYSTEM, @@ -10206,12 +10860,13 @@ declare enum SafeAreaType { * @since 10 */ /** - * Non-safe area of the device like Notch or punch hole. + * Notch or punch hole. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CUTOUT, @@ -10227,7 +10882,8 @@ declare enum SafeAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ KEYBOARD } @@ -10246,7 +10902,8 @@ declare enum SafeAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SafeAreaEdge { /** @@ -10256,12 +10913,13 @@ declare enum SafeAreaEdge { * @since 10 */ /** - * Top edge. + * Top edge of the safe area. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ TOP, @@ -10272,12 +10930,13 @@ declare enum SafeAreaEdge { * @since 10 */ /** - * Bottom edge. + * Bottom edge of the safe area. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BOTTOM, @@ -10288,12 +10947,13 @@ declare enum SafeAreaEdge { * @since 10 */ /** - * Start edge. + * Start edge of the safe area. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ START, @@ -10304,64 +10964,70 @@ declare enum SafeAreaEdge { * @since 10 */ /** - * End edge. + * End edge of the safe area. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ END } /** - * Describe the types for expanding the safe area in layout. + * Enumerates the safe area types can be ignored. * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum LayoutSafeAreaType { /** - * Default non-safe area of the system, including the status bar and navigation bar. + * Default area of the system, including the status bar and navigation bar. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SYSTEM = 0, } /** - * Define the edges for expanding the safe area in layout. + * Enumerates the safe area edges can be ignored. * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum LayoutSafeAreaEdge { /** - * Top edge. + * Top edge of the safe area. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TOP = 0, /** - * Bottom edge. + * Bottom edge of the safe area. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BOTTOM = 1, @@ -10431,61 +11097,79 @@ declare enum LayoutSafeAreaEdge { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SheetSize { /** - * The sheet height is half of the screen height. + * Defines the sheet size medium height type. The height is half the screen height * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * The sheet height is half of the screen height. + * Defines the sheet size medium height type. The height is half the screen height * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ MEDIUM, /** - * The sheet height is almost the screen height. + * Defines the sheet size large height type. The height is almost screen height. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * The sheet height is almost the screen height. + * Defines the sheet size large height type. The height is almost screen height. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LARGE, /** - * The sheet height automatically adapts to the content. + * Defines the sheet size fit content height type. The height fit content. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** - * The sheet height automatically adapts to the content. + * Defines the sheet size fit content height type. The height fit content. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FIT_CONTENT = 2, } +/** + * The modifier key state query function block. + * + * @typedef { function } ModifierKeyStateGetter + * @param { Array } keys - Indicate the modifier keys to query. + * @returns { boolean } - the query result + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type ModifierKeyStateGetter = (keys: Array) => boolean; + /** * Defines the base event. * @@ -10518,7 +11202,8 @@ declare enum SheetSize { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface BaseEvent { /** @@ -10546,14 +11231,15 @@ declare interface BaseEvent { * @since 10 */ /** - * Display area of the element that triggers the gesture event. + * Defines the current target which fires this event. * * @type { EventTarget } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ target: EventTarget; @@ -10582,14 +11268,15 @@ declare interface BaseEvent { * @since 10 */ /** - * Timestamp of the event. + * Event timestamp. * * @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 */ timestamp: number; @@ -10618,14 +11305,15 @@ declare interface BaseEvent { * @since 10 */ /** - * Event input device. + * the event source info. * * @type { SourceType } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ source: SourceType; @@ -10637,7 +11325,8 @@ declare interface BaseEvent { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ axisHorizontal?: number; @@ -10649,7 +11338,8 @@ declare interface BaseEvent { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ axisVertical?: number; @@ -10671,14 +11361,15 @@ declare interface BaseEvent { * @since 10 */ /** - * Press pressure. + * Touch pressure. * * @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 */ pressure: number; @@ -10700,14 +11391,15 @@ declare interface BaseEvent { * @since 10 */ /** - * Angle between the projection of the stylus on the device plane and the x-axis. + * The angle between pencil projection on plane-X-Y and axis-Z. * * @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 */ tiltX: number; @@ -10729,14 +11421,15 @@ declare interface BaseEvent { * @since 10 */ /** - * Angle between the projection of the stylus on the device plane and the y-axis. + * The angle between pencil projection on plane-Y-Z and axis-Z. * * @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 */ tiltY: number; @@ -10748,7 +11441,8 @@ declare interface BaseEvent { * @crossplatform * @form * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ rollAngle?: number; @@ -10770,19 +11464,20 @@ declare interface BaseEvent { * @since 10 */ /** - * Event input source. + * The event tool type info. * * @type { SourceTool } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ sourceTool: SourceTool; /** - * Obtains the pressed status of modifier keys. The following modifier keys are supported: 'Ctrl'|'Alt'|'Shift'. + * Query the ModifierKey press state, support 'ctrl'|'alt'|'shift'|'fn' * * @param { Array } keys - indicate the keys of the ModifierKey. * @returns { boolean } @@ -10794,6 +11489,18 @@ declare interface BaseEvent { */ getModifierKeyState?(keys: Array): boolean; + /** + * Query the modifier key press state, support 'ctrl'|'alt'|'shift' + * + * @type { ?ModifierKeyStateGetter } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + getModifierKeyState?: ModifierKeyStateGetter; + /** * Indicates the ID of the input device that triggers the current event. * @@ -10801,7 +11508,8 @@ declare interface BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ deviceId?: number; @@ -10812,7 +11520,8 @@ declare interface BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ targetDisplayId?: number; } @@ -10842,7 +11551,8 @@ declare interface BaseEvent { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface BorderImageOption { /** @@ -10873,16 +11583,15 @@ declare interface BorderImageOption { * @since 11 */ /** - * Slice width of the upper left corner, upper right corner, lower left corner, - * and lower right corner of the border image. + * Border image slice * * @type { ?(Length | EdgeWidths | LocalizedEdgeWidths) } - * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ slice?: Length | EdgeWidths | LocalizedEdgeWidths, @@ -10904,15 +11613,15 @@ declare interface BorderImageOption { * @since 10 */ /** - * Repeat mode of the source image's slices on the border. + * Border image repeat * * @type { ?RepeatMode } - * @default RepeatMode.Stretch * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ repeat?: RepeatMode, @@ -10934,13 +11643,7 @@ declare interface BorderImageOption { * @since 10 */ /** - * Source or gradient color of the border image. - * When the type is string, this parameter sets the border image source. - * For details about how to reference image resources, see Loading Image Resources. - * - *

NOTE: - *
The border image source applies only to container components, such as Row, Column, and Flex. - *

+ * Border image source * * @type { ?(string | Resource | LinearGradient) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -10951,6 +11654,19 @@ declare interface BorderImageOption { */ source?: string | Resource | LinearGradient, + /** + * Border image source + * + * @type { ?(string | Resource | LinearGradientOptions) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + source?: string | Resource | LinearGradientOptions, + /** * Border image width * @@ -10979,15 +11695,15 @@ declare interface BorderImageOption { * @since 11 */ /** - * Width of the border image. + * Border image width * * @type { ?(Length | EdgeWidths | LocalizedEdgeWidths) } - * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width?: Length | EdgeWidths | LocalizedEdgeWidths, @@ -11019,15 +11735,15 @@ declare interface BorderImageOption { * @since 11 */ /** - * Amount by which the border image is extended beyond the border box. + * Border image outset * * @type { ?(Length | EdgeWidths | LocalizedEdgeWidths) } - * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ outset?: Length | EdgeWidths | LocalizedEdgeWidths, @@ -11049,17 +11765,15 @@ declare interface BorderImageOption { * @since 10 */ /** - * Whether to fill the center of the border image. - * true: Fill the center of the border image. - * false: Do not fill the center of the border image. + * Border image center fill * * @type { ?boolean } - * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fill?: boolean } @@ -11071,7 +11785,8 @@ declare interface BorderImageOption { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare class LayoutPolicy { /** @@ -11083,8 +11798,9 @@ declare class LayoutPolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form - * @atomicservice - * @since 15 + * @atomicservice + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ static readonly matchParent: LayoutPolicy; /** @@ -11151,7 +11867,8 @@ declare class LayoutPolicy { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ClickEvent extends BaseEvent { /** @@ -11185,13 +11902,14 @@ declare interface ClickEvent extends BaseEvent { * @since 10 */ /** - * X coordinate of the click relative to the upper left corner of the application screen. + * X coordinate of the click point relative to the left edge of the device screen. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ displayX: number; @@ -11204,13 +11922,14 @@ declare interface ClickEvent extends BaseEvent { * @since 10 */ /** - * Y coordinate of the click relative to the upper left corner of the application screen. + * Y coordinate of the click point relative to the upper edge of the device screen. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ displayY: number; @@ -11223,13 +11942,14 @@ declare interface ClickEvent extends BaseEvent { * @since 10 */ /** - * X coordinate of the click relative to the upper left corner of the application window. + * X coordinate of the click point relative to the left edge of the current window. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ windowX: number; @@ -11242,18 +11962,19 @@ declare interface ClickEvent extends BaseEvent { * @since 10 */ /** - * Y coordinate of the click relative to the upper left corner of the application window. + * Y coordinate of the click point relative to the upper edge of the current window. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ windowY: number; /** - * X coordinate of the click relative to the upper left corner of the application window. + * X coordinate of the click point relative to the left edge of the current window. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -11264,7 +11985,7 @@ declare interface ClickEvent extends BaseEvent { screenX: number; /** - * Y coordinate of the click relative to the upper left corner of the application window. + * Y coordinate of the click point relative to the upper edge of the current window. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -11306,7 +12027,8 @@ declare interface ClickEvent extends BaseEvent { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ x: number; @@ -11342,18 +12064,20 @@ declare interface ClickEvent extends BaseEvent { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ y: number; /** - * Whether the event is triggered by a left-hand or right-hand tap. + * Type of the touch hand. * * @type { InteractionHand } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ hand?: InteractionHand; @@ -11365,7 +12089,8 @@ declare interface ClickEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ preventDefault: () => void; } @@ -11385,7 +12110,8 @@ declare interface ClickEvent extends BaseEvent { * @interface HoverEvent * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface HoverEvent extends BaseEvent { /** @@ -11394,7 +12120,8 @@ declare interface HoverEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ x?: number; @@ -11404,7 +12131,8 @@ declare interface HoverEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ y?: number; @@ -11414,7 +12142,8 @@ declare interface HoverEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ windowX?: number; @@ -11424,7 +12153,8 @@ declare interface HoverEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ windowY?: number; @@ -11434,7 +12164,8 @@ declare interface HoverEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ displayX?: number; @@ -11444,7 +12175,8 @@ declare interface HoverEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ displayY?: number; @@ -11481,7 +12213,8 @@ declare interface HoverEvent extends BaseEvent { * @type { function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ stopPropagation: () => void; } @@ -11501,7 +12234,8 @@ declare interface HoverEvent extends BaseEvent { * @interface MouseEvent * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface MouseEvent extends BaseEvent { /** @@ -11517,7 +12251,8 @@ declare interface MouseEvent extends BaseEvent { * @type { MouseButton } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ button: MouseButton; @@ -11534,7 +12269,8 @@ declare interface MouseEvent extends BaseEvent { * @type { MouseAction } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ action: MouseAction; @@ -11566,12 +12302,13 @@ declare interface MouseEvent extends BaseEvent { * @since 10 */ /** - * X coordinate of the mouse pointer relative to the upper left corner of the application screen. + * X coordinate of the mouse point relative to the left edge of the device screen. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ displayX: number; @@ -11583,12 +12320,13 @@ declare interface MouseEvent extends BaseEvent { * @since 10 */ /** - * Y coordinate of the mouse pointer relative to the upper left corner of the application screen. + * Y coordinate of the mouse point relative to the upper edge of the device screen. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ displayY: number; @@ -11600,12 +12338,13 @@ declare interface MouseEvent extends BaseEvent { * @since 10 */ /** - * X coordinate of the mouse pointer relative to the upper left corner of the application window. + * X coordinate of the mouse point relative to the left edge of the current window. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ windowX: number; @@ -11617,17 +12356,18 @@ declare interface MouseEvent extends BaseEvent { * @since 10 */ /** - * Y coordinate of the mouse pointer relative to the upper left corner of the application window. + * Y coordinate of the mouse point relative to the upper edge of the current window. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ windowY: number; /** - * X coordinate of the mouse pointer relative to the upper left corner of the application window. + * X coordinate of the mouse point relative to the left edge of the current window. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -11638,7 +12378,7 @@ declare interface MouseEvent extends BaseEvent { screenX: number; /** - * Y coordinate of the mouse pointer relative to the upper left corner of the application window. + * Y coordinate of the mouse point relative to the upper edge of the current window. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -11656,12 +12396,13 @@ declare interface MouseEvent extends BaseEvent { * @since 8 */ /** - * X coordinate of the mouse pointer relative to the upper left corner of the component being clicked. + * X coordinate of the mouse point relative to the left edge of the mouse hit element. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ x: number; @@ -11673,12 +12414,13 @@ declare interface MouseEvent extends BaseEvent { * @since 8 */ /** - * Y coordinate of the mouse pointer relative to the upper left corner of the component being clicked. + * Y coordinate of the mouse point relative to the upper edge of the mouse hit element. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ y: number; @@ -11690,12 +12432,13 @@ declare interface MouseEvent extends BaseEvent { * @since 8 */ /** - * Stops the event from bubbling upwards or downwards. + * The blocking event pops up. * * @type { function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ stopPropagation: () => void; @@ -11706,7 +12449,8 @@ declare interface MouseEvent extends BaseEvent { * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ rawDeltaX?: number; @@ -11717,17 +12461,19 @@ declare interface MouseEvent extends BaseEvent { * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ rawDeltaY?: number; - + /** - * Array of all mouse buttons that are currently pressed. + * The pressed buttons of the mouse event. * * @type { ?MouseButton[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ pressedButtons?: MouseButton[]; } @@ -11739,7 +12485,8 @@ declare interface MouseEvent extends BaseEvent { * @typedef AccessibilityHoverEvent * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface AccessibilityHoverEvent extends BaseEvent { /** @@ -11748,7 +12495,8 @@ declare interface AccessibilityHoverEvent extends BaseEvent { * @type { AccessibilityHoverType } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type: AccessibilityHoverType; @@ -11758,7 +12506,8 @@ declare interface AccessibilityHoverEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ x: number; @@ -11768,7 +12517,8 @@ declare interface AccessibilityHoverEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ y: number; @@ -11778,7 +12528,8 @@ declare interface AccessibilityHoverEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ displayX: number; @@ -11788,7 +12539,8 @@ declare interface AccessibilityHoverEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ displayY: number; @@ -11798,7 +12550,8 @@ declare interface AccessibilityHoverEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ windowX: number; @@ -11808,7 +12561,8 @@ declare interface AccessibilityHoverEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ windowY: number; @@ -11855,7 +12609,8 @@ declare interface AccessibilityHoverEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TouchObject { /** @@ -11880,7 +12635,8 @@ declare interface TouchObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ type: TouchType; @@ -11900,16 +12656,18 @@ declare interface TouchObject { * @since 10 */ /** - * Unique identifier of a finger. + * Finger unique identifier. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ id: number; + /** * X coordinate of the point relative to the global display. * @@ -11941,13 +12699,14 @@ declare interface TouchObject { * @since 10 */ /** - * X coordinate of the touch point relative to the upper left corner of the application screen. + * X coordinate of the touch point relative to the left edge of the device screen. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ displayX: number; @@ -11960,13 +12719,14 @@ declare interface TouchObject { * @since 10 */ /** - * Y coordinate of the touch point relative to the upper left corner of the application screen. + * Y coordinate of the touch point relative to the upper edge of the device screen. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ displayY: number; @@ -11979,13 +12739,14 @@ declare interface TouchObject { * @since 10 */ /** - * X coordinate of the touch point relative to the upper left corner of the application window. + * X coordinate of the touch point relative to the left edge of the current window. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ windowX: number; @@ -11998,18 +12759,19 @@ declare interface TouchObject { * @since 10 */ /** - * Y coordinate of the touch point relative to the upper left corner of the application window. + * Y coordinate of the touch point relative to the upper edge of the current window. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ windowY: number; /** - * X coordinate of the touch point relative to the upper left corner of the application window. + * X coordinate of the touch point relative to the left edge of the current window. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -12020,7 +12782,7 @@ declare interface TouchObject { screenX: number; /** - * Y coordinate of the touch point relative to the upper left corner of the application window. + * Y coordinate of the touch point relative to the upper edge of the current window. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -12046,13 +12808,14 @@ declare interface TouchObject { * @since 10 */ /** - * X coordinate of the touch point relative to the upper left corner of the event responding component. + * X coordinate of the touch point relative to the left edge of the touched element. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ x: number; @@ -12072,67 +12835,73 @@ declare interface TouchObject { * @since 10 */ /** - * Y coordinate of the touch point relative to the upper left corner of the event responding component. + * Y coordinate of the touch point relative to the upper edge of the touched element. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ y: number; /** - * Whether the event is triggered by a left-hand or right-hand tap. + * Type of the touch hand. * * @type { InteractionHand } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ hand?: InteractionHand; /** - * Time when the finger is pressed. + * Time stamp when the touch point is pressed. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ pressedTime?: number; /** - * Pressure value of the finger press. + * Pressure of a specific touch point. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ pressure?: number; /** - * Width of the area pressed by the finger. + * Width of the contact area when touch is pressed of a specific touch point. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ width?: number; /** - * Height of the area pressed by the finger. + * Height of the contact area when touch is pressed of a specific touch point. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ height?: number; } @@ -12152,7 +12921,8 @@ declare interface TouchObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface HistoricalPoint { /** @@ -12170,7 +12940,8 @@ declare interface HistoricalPoint { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ touchObject: TouchObject; @@ -12189,7 +12960,8 @@ declare interface HistoricalPoint { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ size: number; @@ -12208,7 +12980,8 @@ declare interface HistoricalPoint { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ force: number; @@ -12227,7 +13000,8 @@ declare interface HistoricalPoint { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ timestamp: number; } @@ -12257,7 +13031,8 @@ declare interface HistoricalPoint { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TouchEvent extends BaseEvent { /** @@ -12282,7 +13057,8 @@ declare interface TouchEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ type: TouchType; @@ -12308,7 +13084,8 @@ declare interface TouchEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ touches: TouchObject[]; @@ -12328,13 +13105,14 @@ declare interface TouchEvent extends BaseEvent { * @since 10 */ /** - * Finger information changed. + * Indicates the current changed finger information. * * @type { TouchObject[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ changedTouches: TouchObject[]; @@ -12354,13 +13132,14 @@ declare interface TouchEvent extends BaseEvent { * @since 10 */ /** - * Stops the event from bubbling upwards or downwards. + * The blocking event pops up. * * @type { function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ stopPropagation: () => void; @@ -12373,25 +13152,27 @@ declare interface TouchEvent extends BaseEvent { * @since 10 */ /** - * Obtains all historical points of the current frame. + * Get the historical points. * * @returns { Array } - return all historical points. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getHistoricalPoints(): Array; /** - * Blocks the default event. + * Prevent the default function. * * @type { function } * @throws { BusinessError } 100017 - Component does not support prevent function. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ preventDefault: () => void; } @@ -12403,7 +13184,8 @@ declare interface TouchEvent extends BaseEvent { * @interface AxisEvent * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface AxisEvent extends BaseEvent { /** @@ -12412,7 +13194,8 @@ declare interface AxisEvent extends BaseEvent { * @type { AxisAction } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ action: AxisAction; @@ -12442,7 +13225,8 @@ declare interface AxisEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ displayX: number; @@ -12452,7 +13236,8 @@ declare interface AxisEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ displayY: number; @@ -12462,7 +13247,8 @@ declare interface AxisEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ windowX: number; @@ -12472,7 +13258,8 @@ declare interface AxisEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ windowY: number; @@ -12482,7 +13269,8 @@ declare interface AxisEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ x: number; @@ -12492,7 +13280,8 @@ declare interface AxisEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ y: number; @@ -12502,7 +13291,8 @@ declare interface AxisEvent extends BaseEvent { * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ scrollStep?: number; @@ -12512,7 +13302,8 @@ declare interface AxisEvent extends BaseEvent { * @type { Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ propagation: Callback; @@ -12522,7 +13313,8 @@ declare interface AxisEvent extends BaseEvent { * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getHorizontalAxisValue(): number; @@ -12532,22 +13324,24 @@ declare interface AxisEvent extends BaseEvent { * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getVerticalAxisValue(): number; } /** * Defines the callback type used in onSizeChange. - *
oldValue - the width and height of the component before the change. - *
newValue - the width and height of the component after the change. + * The value of oldValue is last size of the component. + * The value of newValue is new size of the component. * * @typedef { function } SizeChangeCallback * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type SizeChangeCallback = (oldValue: SizeOptions, newValue: SizeOptions) => void; @@ -12577,6 +13371,7 @@ declare type SizeChangeCallback = (oldValue: SizeOptions, newValue: SizeOptions) * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ declare type GestureRecognizerJudgeBeginCallback = (event: BaseGestureEvent, current: GestureRecognizer, recognizers: Array, touchRecognizers?: Array) => GestureJudgeResult; @@ -12590,20 +13385,22 @@ declare type GestureRecognizerJudgeBeginCallback = (event: BaseGestureEvent, cur * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type ShouldBuiltInRecognizerParallelWithCallback = (current: GestureRecognizer, others: Array) => GestureRecognizer; /** * Defines the finish callback type used in transition. - * + * * @typedef { function } TransitionFinishCallback * @param { boolean } transitionIn - a boolean value indicates whether it is the callback of transitionIn or transitionOut. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type TransitionFinishCallback = (transitionIn: boolean) => void; @@ -12647,13 +13444,26 @@ declare type TouchTestDoneCallback = (event: BaseGestureEvent, recognizers: Arra */ declare type PixelMap = import('../api/@ohos.multimedia.image').default.PixelMap; +/** + * Defines the PixelMap type object for ui component. + * + * @typedef { image.PixelMap } PixelMap + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type PixelMap = image.PixelMap; + /** * pixelmap object with release function. * * @interface PixelMapMock * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PixelMapMock { /** @@ -12661,7 +13471,8 @@ declare interface PixelMapMock { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ release(): void; } @@ -12683,16 +13494,13 @@ declare interface PixelMapMock { */ /** * Enum for Drag Behavior. - * - * NOTE:
- * DragBehavior serves to inform you about the intended method of data handling, - * whether it's a copy or a move, but it does not actually dictate the real processing of the data. * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum DragBehavior { /** @@ -12714,7 +13522,8 @@ declare enum DragBehavior { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ COPY, /** @@ -12736,7 +13545,8 @@ declare enum DragBehavior { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ MOVE } @@ -12760,6 +13570,18 @@ declare enum DragBehavior { */ declare type UnifiedData = import('../api/@ohos.data.unifiedDataChannel').default.UnifiedData; +/** + * Import the UnifiedData type object for ui component. + * + * @typedef { unifiedDataChannel.UnifiedData } UnifiedData + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type UnifiedData = unifiedDataChannel.UnifiedData; + /** * Import the Summary type object for ui component. * @@ -12777,6 +13599,17 @@ declare type UnifiedData = import('../api/@ohos.data.unifiedDataChannel').defaul */ declare type Summary = import('../api/@ohos.data.unifiedDataChannel').default.Summary; +/** + * Import the Summary type object for ui component. + * + * @typedef { unifiedDataChannel.Summary } Summary + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type Summary = unifiedDataChannel.Summary; + /** * Import the UniformDataType type object for ui component. * @@ -12826,15 +13659,15 @@ declare type SpringLoadingContext = import('../api/@ohos.arkui.dragController'). declare type DragSpringLoadingConfiguration = import('../api/@ohos.arkui.dragController').default.DragSpringLoadingConfiguration; /** - * Import the DataLoadParams type object for ui component. + * Import the UniformDataType type object for ui component. * - * @typedef { import('../api/@ohos.data.unifiedDataChannel').default.DataLoadParams } DataLoadParams + * @typedef { uniformTypeDescriptor.UniformDataType } UniformDataType * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @atomicservice * @since 20 + * @arkts 1.2 */ -declare type DataLoadParams = import('../api/@ohos.data.unifiedDataChannel').default.DataLoadParams; +declare type UniformDataType = uniformTypeDescriptor.UniformDataType; /** * Enum for Drag Result. @@ -12858,9 +13691,20 @@ declare type DataLoadParams = import('../api/@ohos.data.unifiedDataChannel').def * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum DragResult { + /** + * If the drag is not finished and the result is not set by receiver, return DragResult.UNKNOWN. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + UNKNOWN = -1, /** * If the drag is successful, return DragResult.DRAG_SUCCESSFUL. * @@ -12880,7 +13724,8 @@ declare enum DragResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ DRAG_SUCCESSFUL = 0, /** @@ -12902,7 +13747,8 @@ declare enum DragResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ DRAG_FAILED = 1, /** @@ -12916,7 +13762,8 @@ declare enum DragResult { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ DRAG_CANCELED = 2, /** @@ -12930,7 +13777,8 @@ declare enum DragResult { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ DROP_ENABLED = 3, /** @@ -12944,14 +13792,15 @@ declare enum DragResult { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ DROP_DISABLED = 4 } /** * Enum for BlendMode. - * Blend modes for compositing current component + * Blend modes for compositing current component * with overlapping content. Use overlapping content * as dst, current component as src. * @@ -12972,11 +13821,12 @@ declare enum DragResult { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum BlendMode { /** - * The top image is superimposed on the bottom image without any blending. + * Hybrid mode does not take effect * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -12984,17 +13834,18 @@ declare enum BlendMode { * @since 11 */ /** - * The top image is superimposed on the bottom image without any blending. + * Hybrid mode does not take effect * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, /** - * The target pixels covered by the source pixels are erased by being turned to completely transparent. + * Clear destination color covered by the source to 0. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -13002,17 +13853,18 @@ declare enum BlendMode { * @since 11 */ /** - * The target pixels covered by the source pixels are erased by being turned to completely transparent. + * Clear destination color covered by the source to 0. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CLEAR = 1, /** - * r = s: Only the source pixels are displayed. + * r = s * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -13020,13 +13872,14 @@ declare enum BlendMode { * @since 11 */ /** - * r = s: Only the source pixels are displayed. + * r = s * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SRC = 2, /** @@ -13044,11 +13897,12 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DST = 3, /** - * r = s + (1 - sa) * d: The source pixels are blended based on opacity and cover the target pixels. + * r = s + (1 - sa) * d * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -13056,17 +13910,18 @@ declare enum BlendMode { * @since 11 */ /** - * r = s + (1 - sa) * d: The source pixels are blended based on opacity and cover the target pixels. + * r = s + (1 - sa) * d * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SRC_OVER = 4, /** - * r = d + (1 - da) * s: The target pixels are blended based on opacity and cover on the source pixels. + * r = d + (1 - da) * s * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -13074,17 +13929,18 @@ declare enum BlendMode { * @since 11 */ /** - * r = d + (1 - da) * s: The target pixels are blended based on opacity and cover on the source pixels. + * r = d + (1 - da) * s * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DST_OVER = 5, /** - * r = s * da: Only the part of the source pixels that overlap with the target pixels is displayed. + * r = s * da * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -13092,17 +13948,18 @@ declare enum BlendMode { * @since 11 */ /** - * r = s * da: Only the part of the source pixels that overlap with the target pixels is displayed. + * r = s * da * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SRC_IN = 6, /** - * r = d * sa: Only the part of the target pixels that overlap with the source pixels is displayed. + * r = d * sa * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -13110,13 +13967,14 @@ declare enum BlendMode { * @since 11 */ /** - * r = d * sa: Only the part of the target pixels that overlap with the source pixels is displayed. + * r = d * sa * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DST_IN = 7, /** @@ -13134,7 +13992,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SRC_OUT = 8, /** @@ -13146,18 +14005,18 @@ declare enum BlendMode { * @since 11 */ /** - * r = d * (1 - sa), retains the parts of the destination pixels that do not overlap with the source. + * r = d * (1 - sa) * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DST_OUT = 9, /** - * r = s * da + d * (1 - sa): The part of the source pixels that overlap with the target pixels is displayed - * and the part of the target pixels that do not overlap with the source pixels are displayed. + * r = s * da + d * (1 - sa) * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -13165,14 +14024,14 @@ declare enum BlendMode { * @since 11 */ /** - * r = s * da + d * (1 - sa): The part of the source pixels that overlap with the target pixels is displayed - * and the part of the target pixels that do not overlap with the source pixels are displayed. + * r = s * da + d * (1 - sa) * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SRC_ATOP = 10, /** @@ -13184,14 +14043,14 @@ declare enum BlendMode { * @since 11 */ /** - * r = d * sa + s * (1 - da): The part of the target pixels that overlap with the source pixels - * and the part of the source pixels that do not overlap with the target pixels are displayed. + * r = d * sa + s * (1 - da) * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DST_ATOP = 11, /** @@ -13209,7 +14068,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ XOR = 12, /** @@ -13221,14 +14081,14 @@ declare enum BlendMode { * @since 11 */ /** - * r = min(s + d, 1): - * New pixels resulting from adding the source pixels to the target pixels are displayed. + * r = min(s + d, 1) * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PLUS = 13, /** @@ -13246,7 +14106,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MODULATE = 14, /** @@ -13264,7 +14125,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCREEN = 15, /** @@ -13282,7 +14144,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ OVERLAY = 16, /** @@ -13300,7 +14163,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DARKEN = 17, /** @@ -13318,7 +14182,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LIGHTEN = 18, /** @@ -13336,7 +14201,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ COLOR_DODGE = 19, /** @@ -13354,7 +14220,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ COLOR_BURN = 20, /** @@ -13372,11 +14239,12 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HARD_LIGHT = 21, /** - * The LIGHTEN or DARKEN mode is used, depending on the source pixels. + * lighten or darken, depending on source * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -13384,13 +14252,14 @@ declare enum BlendMode { * @since 11 */ /** - * The LIGHTEN or DARKEN mode is used, depending on the source pixels. + * lighten or darken, depending on source * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SOFT_LIGHT = 22, /** @@ -13402,14 +14271,14 @@ declare enum BlendMode { * @since 11 */ /** - * rc = s + d - 2 * (min(s * da, d * sa)), ra = kSrcOver: The final pixel is the result of subtracting - * the darker of the two pixels (source and target) from the lighter one. + * rc = s + d - 2 * (min(s * da, d * sa)), ra = kSrcOver * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DIFFERENCE = 23, /** @@ -13427,12 +14296,12 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EXCLUSION = 24, /** - * r = s * (1 - da) + d * (1 - sa) + s * d: - * The final pixel is the result of multiplying the source pixel by the target pixel. + * r = s * (1 - da) + d * (1 - sa) + s * d * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -13440,14 +14309,14 @@ declare enum BlendMode { * @since 11 */ /** - * r = s * (1 - da) + d * (1 - sa) + s * d: - * The final pixel is the result of multiplying the source pixel by the target pixel. + * r = s * (1 - da) + d * (1 - sa) + s * d * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MULTIPLY = 25, /** @@ -13465,7 +14334,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HUE = 26, /** @@ -13483,7 +14353,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SATURATION = 27, /** @@ -13501,7 +14372,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ COLOR = 28, /** @@ -13519,7 +14391,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LUMINOSITY = 29 } @@ -13545,11 +14418,12 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum BlendApplyType { /** - * The content of the view is blended in sequence on the target image. + * Blend view's content in sequence over dst * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -13557,19 +14431,20 @@ declare enum BlendApplyType { * @since 11 */ /** - * The content of the view is blended in sequence on the target image. + * Blend view's content in sequence over dst * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FAST = 0, /** - * The content of the component and its child components are drawn on the - * offscreen canvas, and then blended with the existing content on the canvas. + * Composite this views's contents into an + * offscreen image and then blend over dst * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -13577,14 +14452,15 @@ declare enum BlendApplyType { * @since 11 */ /** - * The content of the component and its child components are drawn on the - * offscreen canvas, and then blended with the existing content on the canvas. + * Composite this views's contents into an + * offscreen image and then blend over dst * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ OFFSCREEN = 1, } @@ -13611,7 +14487,8 @@ declare enum BlendApplyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DragEvent { /** @@ -13656,7 +14533,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getDisplayX(): number; @@ -13682,7 +14560,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getDisplayY(): number; @@ -13708,7 +14587,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getWindowX(): number; @@ -13734,7 +14614,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getWindowY(): number; @@ -13782,7 +14663,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ dragBehavior: DragBehavior; @@ -13799,7 +14681,8 @@ declare interface DragEvent { * @type { boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ useCustomDropAnimation: boolean; @@ -13818,7 +14701,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ setData(unifiedData: UnifiedData): void; @@ -13841,7 +14725,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getData(): UnifiedData; @@ -13860,7 +14745,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getSummary(): Summary; @@ -13886,7 +14772,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ setResult(dragResult: DragResult): void; @@ -13912,7 +14799,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getResult(): DragResult; @@ -13938,7 +14826,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getPreviewRect(): Rectangle; @@ -13957,7 +14846,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getVelocityX(): number; @@ -13976,7 +14866,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getVelocityY(): number; @@ -13995,12 +14886,13 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getVelocity(): number; /** - * Query the ModifierKey press state, support 'ctrl'|'alt'|'shift' + * Query the ModifierKey press state, support 'ctrl'|'alt'|'shift'|'fn' * * @param { Array } keys - indicate the keys of the ModifierKey. * @returns { boolean } @@ -14010,7 +14902,7 @@ declare interface DragEvent { * @since 12 */ /** - * Query the ModifierKey press state, support 'ctrl'|'alt'|'shift' + * Query the ModifierKey press state, support 'ctrl'|'alt'|'shift'|'fn' * * @param { Array } keys - indicate the keys of the ModifierKey. * @returns { boolean } @@ -14022,6 +14914,18 @@ declare interface DragEvent { */ getModifierKeyState?(keys: Array): boolean; + /** + * Query the modifier key press state, support 'ctrl'|'alt'|'shift' + * + * @type { ?ModifierKeyStateGetter } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + getModifierKeyState?: ModifierKeyStateGetter; + /** * Setup one drop animation execution callback, which will be triggered by system when user drops. * Use this way to implement the custom drop animation instead of doing it in onDrop, as the system @@ -14034,7 +14938,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ executeDropAnimation(customDropAnimation: Callback): void; @@ -14045,13 +14950,12 @@ declare interface DragEvent { * @param { DataSyncOptions } options - the data sync options. * @returns { string } The data key returned by system, which can be used as the identify of the request. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 190003 - Operation not allowed for current pharse. + * @throws { BusinessError } 190003 - Operation no allowed for current pharse. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 15 */ startDataLoading(options: DataSyncOptions): string; - /** * Retrieve the bundle information of the drag source application. * @@ -14124,7 +15028,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnDragEventCallback = (event: DragEvent, extraParams?: string) => void; @@ -14135,7 +15040,8 @@ declare type OnDragEventCallback = (event: DragEvent, extraParams?: string) => v * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DropOptions { @@ -14153,7 +15059,8 @@ declare interface DropOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ disableDataPrefetch?: boolean; } @@ -14197,7 +15104,8 @@ declare type IntentionCode = import('../api/@ohos.multimodalInput.intentionCode' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface KeyEvent { /** @@ -14222,7 +15130,8 @@ declare interface KeyEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ type: KeyType; @@ -14248,7 +15157,8 @@ declare interface KeyEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ keyCode: number; @@ -14274,7 +15184,8 @@ declare interface KeyEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ keyText: string; @@ -14300,7 +15211,8 @@ declare interface KeyEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ keySource: KeySource; @@ -14326,7 +15238,8 @@ declare interface KeyEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ deviceId: number; @@ -14355,7 +15268,8 @@ declare interface KeyEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ metaKey: number; @@ -14381,7 +15295,8 @@ declare interface KeyEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ timestamp: number; @@ -14407,7 +15322,8 @@ declare interface KeyEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ stopPropagation: () => void; @@ -14426,12 +15342,13 @@ declare interface KeyEvent { * @default IntentionCode.INTENTION_UNKNOWN * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ intentionCode: IntentionCode; /** - * Get the modifier keys press state, support 'ctrl'|'alt'|'shift' + * Get the modifier keys press state, support 'ctrl'|'alt'|'shift'|'fn' * * @param { Array } keys - indicate the modifier keys. * @returns { boolean } @@ -14441,27 +15358,17 @@ declare interface KeyEvent { * @since 12 */ /** - * Get the modifier keys press state, support 'ctrl'|'alt'|'shift' - * - * @param { Array } keys - indicate the modifier keys. - * @returns { boolean } - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types. 2. Parameter verification failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 13 - */ - getModifierKeyState?(keys: Array): boolean; - - /** - * Unicode of a key + * Get the modifier keys press state, support 'ctrl'|'alt'|'shift'|'fn' * - * @type { ?number } + * @param { Array } keys - indicate the modifier keys. + * @returns { boolean } + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types. 2. Parameter verification failed. * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform * @atomicservice - * @since 14 + * @since 13 */ - unicode?: number; + getModifierKeyState?(keys: Array): boolean; /** * Whether Num Lock is on @@ -14492,6 +15399,29 @@ declare interface KeyEvent { * @since 19 */ isScrollLockOn?: boolean; + + /** + * Query the modifier key press state, support 'ctrl'|'alt'|'shift' + * + * @type { ?ModifierKeyStateGetter } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + getModifierKeyState?: ModifierKeyStateGetter; + + /** + * Unicode of a key + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 + */ + unicode?: number; } /** @@ -14501,7 +15431,8 @@ declare interface KeyEvent { * @interface FocusAxisEvent * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface FocusAxisEvent extends BaseEvent { /** @@ -14510,7 +15441,8 @@ declare interface FocusAxisEvent extends BaseEvent { * @type { Map } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ axisMap: Map; @@ -14520,7 +15452,8 @@ declare interface FocusAxisEvent extends BaseEvent { * @type { Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ stopPropagation: Callback; } @@ -14531,7 +15464,8 @@ declare interface FocusAxisEvent extends BaseEvent { * @interface CrownEvent * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CrownEvent { /** @@ -14540,7 +15474,8 @@ declare interface CrownEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ timestamp: number; @@ -14550,7 +15485,8 @@ declare interface CrownEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ angularVelocity: number; @@ -14560,7 +15496,8 @@ declare interface CrownEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ degree: number; @@ -14570,7 +15507,8 @@ declare interface CrownEvent { * @type { CrownAction } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ action: CrownAction; @@ -14580,7 +15518,8 @@ declare interface CrownEvent { * @type { Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ stopPropagation: Callback; } @@ -14600,12 +15539,12 @@ declare interface CrownEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface BindOptions { /** - * Background color of the sheet. - *
Default value: **Color.White**. + * Defines the background color * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -14613,14 +15552,14 @@ declare interface BindOptions { * @since 10 */ /** - * Background color of the sheet. - *
Default value: **Color.White**. + * Defines the background color * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor?: ResourceColor; @@ -14664,18 +15603,19 @@ declare interface BindOptions { * @since 10 */ /** - * Callback for when the sheet is displayed (after the animation ends). + * Callback function when overlay interface appears * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onAppear?: () => void; /** - * Callback for when the sheet disappears (after the animation ends). + * Callback function when overlay interface exits * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -14683,24 +15623,26 @@ declare interface BindOptions { * @since 10 */ /** - * Callback for when the sheet disappears (after the animation ends). + * Callback function when overlay interface exits * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onDisappear?: () => void; /** - * Callback for when the sheet is about to be displayed (before the animation starts). + * Callback function before overlay animation starts. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillAppear?: () => void; @@ -14711,7 +15653,8 @@ declare interface BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDisappear?: () => void; } @@ -14749,6 +15692,42 @@ declare interface DismissContentCoverAction { reason: DismissReason; } +/** + * Component content cover dismiss + * + * @interface DismissContentCoverAction + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @arkts 1.2 + * @since 20 + */ +declare interface DismissContentCoverAction { + /** + * Defines content cover dismiss function + * + * @type { VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @arkts 1.2 + * @since 20 + */ + dismiss: VoidCallback; + + /** + * Defines content cover dismiss reason + * + * @type { DismissReason } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @arkts 1.2 + * @since 20 + */ + reason: DismissReason; +} + /** * Component content cover options * @@ -14766,17 +15745,44 @@ declare interface DismissContentCoverAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ContentCoverOptions extends BindOptions { /** +<<<<<<< HEAD +======= + * Defines transition type + * + * @type { ?ModalTransition } + * @default ModalTransition.Default + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Defines transition type + * + * @type { ?ModalTransition } + * @default ModalTransition.Default + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + modalTransition?: ModalTransition, + + /** +>>>>>>> 5f176ff4d (fix) * Callback function when the content cover interactive dismiss * * @type { ?Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDismiss?: Callback; @@ -14787,7 +15793,8 @@ declare interface ContentCoverOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ transition?: TransitionEffect; @@ -14819,7 +15826,8 @@ declare interface ContentCoverOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SheetTitleOptions { /** @@ -14837,7 +15845,8 @@ declare interface SheetTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ title: ResourceStr; @@ -14856,7 +15865,8 @@ declare interface SheetTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ subtitle?: ResourceStr; } @@ -14876,57 +15886,61 @@ declare interface SheetTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SheetType { /** - * Bottom sheet. + * Defines bottom sheet type. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** - * Bottom sheet. + * Defines bottom sheet type. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 - */ + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ BOTTOM = 0, /** - * Center sheet. + * Defines center sheet type. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** - * Center sheet. + * Defines center sheet type. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CENTER = 1, /** - * Popup sheet. The popup sheet cannot be dismissed with a pull-down gesture. + * Defines popup sheet type. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** - * Popup sheet. The popup sheet cannot be dismissed with a pull-down gesture. + * Defines popup sheet type. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ POPUP = 2, @@ -14937,6 +15951,7 @@ declare enum SheetType { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ SIDE = 3, @@ -14958,36 +15973,29 @@ declare enum SheetType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SheetMode { /** - * The sheet is displayed at the top of the window corresponding to the current **UIContext** instance, - * above all pages. It is displayed at the same level as dialog boxes. + * Sheet displays above all page levels. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ OVERLAY = 0, /** - * The sheet is displayed at the top of the current page. - *
**NOTE**
Currently, the sheet can only be mounted on a **Page** - * or **NavDestination** node, with priority given to the **NavDestination** - * node if it is present. This means that, the sheet can only be displayed at - * the top of these two types of pages.
In this mode, new pages can overlay - * the sheet, and when the user returns to the previous page, the sheet remains - * present without losing its content.
In this mode, you must ensure that - * the target page node, such as the **Page** node, has been attached to the tree - * before bringing up the sheet; otherwise, the sheet will not be able to be - * attached to the corresponding page node. + * Sheet displays within the current page. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EMBEDDED = 1, } @@ -14999,7 +16007,8 @@ declare enum SheetMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ScrollSizeMode { /** @@ -15008,7 +16017,8 @@ declare enum ScrollSizeMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FOLLOW_DETENT = 0, @@ -15018,7 +16028,8 @@ declare enum ScrollSizeMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CONTINUOUS = 1, } @@ -15030,7 +16041,8 @@ declare enum ScrollSizeMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SheetKeyboardAvoidMode { /** @@ -15039,7 +16051,8 @@ declare enum SheetKeyboardAvoidMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -15050,7 +16063,8 @@ declare enum SheetKeyboardAvoidMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ TRANSLATE_AND_RESIZE = 1, @@ -15060,7 +16074,8 @@ declare enum SheetKeyboardAvoidMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ RESIZE_ONLY = 2, @@ -15071,7 +16086,8 @@ declare enum SheetKeyboardAvoidMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ TRANSLATE_AND_SCROLL = 3, @@ -15082,6 +16098,7 @@ declare enum SheetKeyboardAvoidMode { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ POPUP_SHEET = 4, } @@ -15124,6 +16141,30 @@ declare interface SheetDismiss { dismiss: () => void; } +/** + * Component sheet dismiss + * + * @interface SheetDismiss + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare interface SheetDismiss { + /** + * Defines sheet dismiss function + * + * @type { VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + dismiss: VoidCallback; +} + /** * Component sheet dismiss * @@ -15159,7 +16200,44 @@ declare interface DismissSheetAction { } /** - * Defines sheet spring back action + * Component sheet dismiss + * + * @interface DismissSheetAction + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare interface DismissSheetAction { + + /** + * Defines sheet dismiss function + * + * @type { VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + dismiss: VoidCallback; + + /** + * Dismiss reason type. + * + * @type { DismissReason } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + reason: DismissReason; +} + +/** + * Defines sheet spring back action * * @interface SpringBackAction * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -15180,6 +16258,67 @@ declare interface SpringBackAction { springBack: Callback; } +/** + * Defines sheet spring back action + * + * @interface SpringBackAction + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare interface SpringBackAction { + /** + * Defines spring back function + * + * @type { VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + springBack: VoidCallback; +} + + +/** + * Defines the detent array of a single length. + * + * @typedef { [SheetSize | Length] } SingleLengthDetent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type SingleLengthDetent = [SheetSize | Length]; + +/** + * Defines the detent array of a two-length. + * + * @typedef { [(SheetSize | Length), SheetSize | Length | undefined] } DoubleLengthDetents + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type DoubleLengthDetents = [(SheetSize | Length), SheetSize | Length | undefined]; + +/** + * Defines the detent array of a three-length. + * + * @typedef { [(SheetSize | Length), SheetSize | Length | undefined, SheetSize | Length | undefined] } TripleLengthDetents + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type TripleLengthDetents = [(SheetSize | Length), SheetSize | Length | undefined, SheetSize | Length | undefined]; + /** * Component sheet options * @@ -15197,7 +16336,8 @@ declare interface SpringBackAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SheetOptions extends BindOptions { /** @@ -15217,14 +16357,13 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ height?: SheetSize | Length; /** - * Whether to display the drag bar. - *
**NOTE**
By default, the drag bar is displayed only when the sheet's - * **detents** attribute is set to multiple heights and the settings take effect. + * Defines whether the control bar is displayed. * * @type { ?boolean } * @default true @@ -15233,74 +16372,48 @@ declare interface SheetOptions extends BindOptions { * @since 10 */ /** - * Whether to display the drag bar. - *
**NOTE**
By default, the drag bar is displayed only when the sheet's - * **detents** attribute is set to multiple heights and the settings take effect. + * Defines whether the control bar is displayed. * * @type { ?boolean } * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ dragBar?: boolean; /** - * Defines whether the sheet dragbar is floating, when it's displayed. + * Defines sheet maskColor * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - enableFloatingDragBar?: boolean; - - /** - * Mask color of the sheet. - * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Mask color of the sheet. - * + * Defines sheet maskColor + * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maskColor?: ResourceColor; /** * Defines sheet detents + * * @type { ?[(SheetSize | Length), (SheetSize | Length)?, (SheetSize | Length)?] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** - * Array of heights where the sheet can rest. - *

**NOTE**: - *
Since API version 12, this attribute takes effect for a bottom sheet in landscape mode. - *
In earlier versions, this attribute takes effect only for the bottom sheet in portrait mode. - *
The first height in the tuple is the initial height. - *
The sheet can switch between heights by dragging. - *
After the sheet is dragged and released, it switches to the target height or remains at the current height, - * depending on the velocity and distance. - *
If the velocity exceeds the threshold, the sheet switches to the target height in the same direction as the - * velocity. - *
If the velocity is less than the threshold, the displacement distance is used for judgement. - *
If the displacement distance is greater than 1/2 of the distance between the current and target positions, - * the sheet switches to the target height in the same direction as the velocity; otherwise, the sheet remains at the - * current height. - *
Velocity threshold: 1000; Distance threshold: 50%. - *

+ * Defines sheet detents * * @type { ?[(SheetSize | Length), (SheetSize | Length)?, (SheetSize | Length)?] } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -15311,8 +16424,20 @@ declare interface SheetOptions extends BindOptions { detents?: [(SheetSize | Length), (SheetSize | Length)?, (SheetSize | Length)?]; /** - * Background blur of the sheet. By default, there is no background blur. - * + * Defines sheet detents + * + * @type { ?(SingleLengthDetent | DoubleLengthDetents | TripleLengthDetents) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + detents?: SingleLengthDetent | DoubleLengthDetents | TripleLengthDetents; + + /** + * Defines sheet background blur Style + * * @type { ?BlurStyle } * @default BlurStyle.NONE * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -15320,14 +16445,15 @@ declare interface SheetOptions extends BindOptions { * @since 11 */ /** - * Background blur of the sheet. By default, there is no background blur. - * + * Defines sheet background blur Style + * * @type { ?BlurStyle } * @default BlurStyle.NONE * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ blurStyle?: BlurStyle; @@ -15348,16 +16474,13 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ showClose?: boolean | Resource; /** - * Type of the sheet. - *
**NOTE**
The types supported by the sheet vary by window. - *
1. Width < 600 vp: bottom. - *
2. 600 vp <= Width: bottom, center, and popup (default). - *
3. Width >= 840 vp: bottom, center, and popup (default). + * Defines the sheet prefer type * * @type { ?(SheetType.CENTER | SheetType.POPUP) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -15365,22 +16488,19 @@ declare interface SheetOptions extends BindOptions { * @since 11 */ /** - * Type of the sheet. - *
**NOTE**
The types supported by the sheet vary by window. - *
1. Width < 600 vp: bottom. - *
2. 600 vp <= Width: bottom, center, and popup (default). - *
3. Width >= 840 vp: bottom, center, and popup (default). + * Defines the sheet prefer type * * @type { ?SheetType } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ preferType?: SheetType; /** - * Title of the sheet. + * Defines the sheet title * * @type { ?(SheetTitleOptions | CustomBuilder) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -15388,23 +16508,19 @@ declare interface SheetOptions extends BindOptions { * @since 11 */ /** - * Title of the sheet. + * Defines the sheet title * * @type { ?(SheetTitleOptions | CustomBuilder) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ title?: SheetTitleOptions | CustomBuilder; /** - * Callback invoked when the user performs an interactive dismiss operation: pulling down or clicking - * the back button, the mask, or the close icon.
**NOTE**
If this callback is registered, the - * sheet is not dismissed immediately when the user performs the above operations. To dismiss the sheet, - * you must call **shouldDismiss.dismiss()** in the callback.
If this callback is not registered, the - * sheet is dismissed immediately when the user performs the above operations, without any additional - * behavior.
It is recommended that this API be used in scenarios where a secondary confirmation is required. + * Callback function when the sheet interactive dismiss * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -15412,69 +16528,43 @@ declare interface SheetOptions extends BindOptions { * @since 11 */ /** - * Callback invoked when the user performs an interactive dismiss operation: pulling down or clicking - * the back button, the mask, or the close icon.
**NOTE**
If this callback is registered, the - * sheet is not dismissed immediately when the user performs the above operations. To dismiss the sheet, - * you must call **shouldDismiss.dismiss()** in the callback.
If this callback is not registered, the - * sheet is dismissed immediately when the user performs the above operations, without any additional - * behavior.
It is recommended that this API be used in scenarios where a secondary confirmation is required. + * Callback function when the sheet interactive dismiss * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shouldDismiss?: (sheetDismiss: SheetDismiss) => void; /** - * Callback invoked when the user performs an interactive dismiss operation: - * pulling down or clicking the back button, the mask, or the close icon, - * to obtain the type of dismiss operation and decide whether to dismiss the sheet. - *

**NOTE**: - *
If this callback is registered, the sheet is not dismissed immediately when the user performs the above - * operations. - *
Instead, you can use the DismissSheetAction parameter in the callback to determine the type of - * dismiss operation and decide whether to dismiss the sheet. - *
If this callback is not registered, the sheet is dismissed immediately when the user performs the above - * operations, without any additional behavior. - *
No further interception with onWillDismiss is allowed in an onWillDismiss callback. - *

+ * Callback function when the sheet will dismiss * * @type { ?Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDismiss?: Callback; /** - * Callback invoked when the user performs a pull-down-to-dismiss gesture, to control the bounce effect. - *

**NOTE**: - *
If this callback is registered along with **shouldDismiss** or **onWillDismiss** you can control whether the - * sheet bounces back during the pull-down-to-dismiss operation by calling **springBack** in the callback. - *
If this callback is not registered but **shouldDismiss** or **onWillDismiss** is registered, the sheet will - * bounce back before remaining open or being dismissed based on the callback behavior. - *
If neither this callback nor **shouldDismiss** or **onWillDismiss** is registered, the sheet is dismissed by - * default during the pull-down-to-dismiss operation. - *

- * + * Sheet springs back callback when dismiss + * * @type { ?Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillSpringBackWhenDismiss?: Callback; /** - * Whether to allow users to interact with the page pertaining to the sheet. - *
**NOTE**
The value **true** means that interactions are allowed, in which - * case no mask is not displayed. The value **false** means that interactions are not - * allowed, in which case a mask is displayed. If this parameter is not set, interactions - * are allowed for the popup sheet, but not for bottom and center sheets. If this parameter - * is set to **true**, the setting of **maskColor** does not take effect. + * Set whether interaction is allowed outside the sheet * * @type { ?boolean } * @default false @@ -15483,67 +16573,51 @@ declare interface SheetOptions extends BindOptions { * @since 11 */ /** - * Whether to allow users to interact with the page pertaining to the sheet. - *
**NOTE**
The value **true** means that interactions are allowed, in which - * case no mask is not displayed. The value **false** means that interactions are not - * allowed, in which case a mask is displayed. If this parameter is not set, interactions - * are allowed for the popup sheet, but not for bottom and center sheets. If this parameter - * is set to **true**, the setting of **maskColor** does not take effect. + * Set whether interaction is allowed outside the sheet * * @type { ?boolean } * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableOutsideInteractive?: boolean; /** - * Width of the sheet. - * Percentage parameter method: Set the width of the sheet as a percentage of the width of the parent element. + * Defines the sheet's width. * * @type { ?Dimension } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width?: Dimension; /** - * Border width of the sheet. - * You can set the width for all four sides or set separate widths for individual sides. - * Default value: **0**. - * Percentage parameter method: - * Set the border width of the sheet as a percentage of the width of the parent element. - * If the left and right border widths of the sheet are greater than the width of the sheet, and the top - * and bottom border widths are greater than the height of the sheet, the display may not appear as expected. - *

**Note**: - *
For bottom sheets, the bottom border width setting is ineffective. - *

+ * Defines the sheet's border width. * * @type { ?(Dimension | EdgeWidths | LocalizedEdgeWidths) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderWidth?: Dimension | EdgeWidths | LocalizedEdgeWidths; /** - * Border color of the sheet. - * **borderColor** must be used with **borderWidth** in pairs. - *

**NOTE**: - *
For bottom sheets, the bottom border color setting is ineffective. - *

- * + * Defines the sheet's border color. + * * @type { ?(ResourceColor | EdgeColors | LocalizedEdgeColors) } - * @default Color.Black * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderColor?: ResourceColor | EdgeColors | LocalizedEdgeColors; @@ -15554,76 +16628,71 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderStyle?: BorderStyle | EdgeStyles; /** - * Shadow of the sheet. - * Default value for 2-in-1 devices: **ShadowStyle.OUTER_FLOATING_SM**. + * Defines the sheet's shadow. * * @type { ?(ShadowOptions | ShadowStyle) } * @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; /** - * Callback for changes in the height of the sheet. - *

**Note**: - *
For a bottom sheet, the height of each frame is only returned when there are changes in detents or during drag - * actions. - *
When the sheet is pulled up or making space for the soft keyboard, only the final height is returned. - *
For other types of sheets, the final height is only returned when the sheet is pulled up. - *
The return value is in px. - *

+ * Called when height of the sheet is changed * * @type { ?Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onHeightDidChange?: Callback; /** - * Determine the level sheet shows, whether sheet should be displayed within the page. + * Determine the level sheet shows, whether sheet should be displayed within the page * * @type { ?SheetMode } * @default SheetMode.OVERLAY * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ mode?: SheetMode; /** - * Content update mode of the sheet when it is scrolled. + * Determine sheet scroll size mode. * * @type { ?ScrollSizeMode } * @default ScrollSizeMode.FELLOW_DETEND * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ scrollSizeMode?: ScrollSizeMode; /** - * Callback for changes in the detents of the sheet. - *

**NOTE**: - *
For a bottom sheet, the final height is returned when there are changes in detents. - *
The return value is in px. - *

+ * Called when detents of the sheet changed + * * @type { ?Callback } * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onDetentsDidChange?: Callback; @@ -15634,7 +16703,8 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWidthDidChange?: Callback; @@ -15645,7 +16715,8 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onTypeDidChange?: Callback; @@ -15656,7 +16727,8 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ uiContext?: UIContext; @@ -15668,7 +16740,8 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ keyboardAvoidMode?: SheetKeyboardAvoidMode; @@ -15680,7 +16753,8 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enableHoverMode?: boolean; @@ -15692,7 +16766,8 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ hoverModeArea?: HoverModeAreaType; @@ -15702,7 +16777,8 @@ declare interface SheetOptions extends BindOptions { * @type { ?Position } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: Position @@ -15714,18 +16790,20 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ effectEdge?: number /** * Defines sheet radius - * + * * @type { ?(LengthMetrics | BorderRadiuses | LocalizedBorderRadiuses) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ radius?: LengthMetrics | BorderRadiuses | LocalizedBorderRadiuses; @@ -15737,19 +16815,21 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ detentSelection?: SheetSize | Length; /** - * Whether to display in the sub window + * Whether to display in the sub window * - * @type { ?boolean } + * @type { ?boolean } * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ showInSubWindow?: boolean; @@ -15762,23 +16842,38 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ placement?: Placement; /** * placement On target node * - * @type { ?boolean } + * @type { ?boolean } * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ placementOnTarget?: boolean; } +/** + * The custom styles function block. + * + * @typedef { function } CustomStyles + * @param { CommonMethod } instance - The component instance which can be used to set common attributes. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type CustomStyles = (instance: CommonMethod) => void; + /** * Component State Styles. * @@ -15811,7 +16906,8 @@ declare interface SheetOptions extends BindOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface StateStyles { /** @@ -15850,6 +16946,20 @@ declare interface StateStyles { */ normal?: any; + + /** + * Defines normal state styles. + * + * @type { ?CustomStyles } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + normal?: CustomStyles; + /** * Defines pressed state styles. * @@ -15886,6 +16996,19 @@ declare interface StateStyles { */ pressed?: any; + /** + * Defines pressed state styles. + * + * @type { ?CustomStyles } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + pressed?: CustomStyles; + /** * Defines disabled state styles. * @@ -15922,6 +17045,19 @@ declare interface StateStyles { */ disabled?: any; + /** + * Defines disabled state styles. + * + * @type { ?CustomStyles } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + disabled?: CustomStyles; + /** * Defines focused state styles. * @@ -15958,6 +17094,19 @@ declare interface StateStyles { */ focused?: any; + /** + * Defines focused state styles. + * + * @type { ?CustomStyles } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + focused?: CustomStyles; + /** * Defines clicked state styles. * @@ -15994,6 +17143,19 @@ declare interface StateStyles { */ clicked?: any; + /** + * Defines clicked state styles. + * + * @type { ?CustomStyles } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + clicked?: CustomStyles; + /** * Defines selected state styles. * @@ -16014,6 +17176,20 @@ declare interface StateStyles { * @since 11 */ selected?: object; + + /** + * Defines selected state styles. + * + * @type { ?CustomStyles } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + selected?: CustomStyles; + } /** @@ -16031,7 +17207,8 @@ declare interface StateStyles { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PopupMessageOptions { /** @@ -16049,7 +17226,8 @@ declare interface PopupMessageOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ textColor?: ResourceColor; @@ -16068,7 +17246,8 @@ declare interface PopupMessageOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ font?: Font; } @@ -16080,51 +17259,53 @@ declare interface PopupMessageOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ -declare enum DismissReason { +declare enum DismissReason { /** - * Touching the Back button, swiping left or right on the screen, or pressing the Esc key. + * Press back * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PRESS_BACK = 0, /** - * Touching the mask. + * Touch component outside * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TOUCH_OUTSIDE = 1, /** - * Touching the Close button. + * Close button * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CLOSE_BUTTON = 2, /** * Slide down - *

NOTE: - *
This API is effective only in sheet transition. - *

* * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - SLIDE_DOWN = 3, + SLIDE_DOWN = 3 /** * Slide, not slide down. @@ -16135,6 +17316,7 @@ declare enum DismissReason { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ SLIDE = 4, } @@ -16146,7 +17328,8 @@ declare enum DismissReason { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DismissPopupAction { /** @@ -16156,7 +17339,8 @@ declare interface DismissPopupAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dismiss: Callback; @@ -16167,7 +17351,8 @@ declare interface DismissPopupAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ reason: DismissReason; } @@ -16179,7 +17364,8 @@ declare interface DismissPopupAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PopupStateChangeParam { /** @@ -16190,7 +17376,8 @@ declare interface PopupStateChangeParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ isVisible: boolean; } @@ -16203,7 +17390,8 @@ declare interface PopupStateChangeParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type PopupStateChangeCallback = (event: PopupStateChangeParam) => void; @@ -16214,18 +17402,19 @@ declare type PopupStateChangeCallback = (event: PopupStateChangeParam) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PopupMaskType { /** * Color. - * Anonymous Object Rectification. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ color: ResourceColor; } @@ -16271,7 +17460,8 @@ declare interface PopupBorderLinearGradient { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PopupCommonOptions { /** @@ -16282,7 +17472,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ placement?: Placement; @@ -16293,7 +17484,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ popupColor?: ResourceColor; @@ -16305,7 +17497,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableArrow?: boolean; @@ -16317,18 +17510,20 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ autoCancel?: boolean; /** * on State Change * - * @type { ?function } + * @type { ?PopupStateChangeCallback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onStateChange?: PopupStateChangeCallback; @@ -16339,7 +17534,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ arrowOffset?: Length; @@ -16350,7 +17546,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ showInSubWindow?: boolean; @@ -16363,7 +17560,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ mask?: boolean | PopupMaskType; @@ -16374,7 +17572,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ targetSpace?: Length; @@ -16385,7 +17584,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: Position; @@ -16396,7 +17596,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ width?: Dimension; @@ -16407,7 +17608,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ arrowPointPosition?: ArrowPointPosition; @@ -16419,7 +17621,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ arrowWidth?: Dimension; @@ -16431,7 +17634,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ arrowHeight?: Dimension; @@ -16443,7 +17647,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ radius?: Dimension; @@ -16455,7 +17660,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ shadow?: ShadowOptions | ShadowStyle; @@ -16467,7 +17673,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyle?: BlurStyle; @@ -16479,7 +17686,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ focusable?: boolean; @@ -16490,7 +17698,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ transition?: TransitionEffect; @@ -16502,7 +17711,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDismiss?: boolean | Callback; @@ -16514,7 +17724,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableHoverMode?: boolean; @@ -16526,9 +17737,11 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ followTransformOfTarget?: boolean; +} /** * Determine if popup can avoid the target when the display space is insufficient. @@ -16594,7 +17807,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TipsOptions { @@ -16605,7 +17819,8 @@ declare interface TipsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ appearingTime?: number; @@ -16616,7 +17831,8 @@ declare interface TipsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ disappearingTime?: number; @@ -16627,7 +17843,8 @@ declare interface TipsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ appearingTimeWithContinuousOperation?: number; @@ -16638,7 +17855,8 @@ declare interface TipsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ disappearingTimeWithContinuousOperation?: number; @@ -16650,7 +17868,8 @@ declare interface TipsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableArrow?: boolean; @@ -16661,7 +17880,8 @@ declare interface TipsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ arrowPointPosition?: ArrowPointPosition; @@ -16673,7 +17893,8 @@ declare interface TipsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ arrowWidth?: Dimension; @@ -16685,20 +17906,47 @@ declare interface TipsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ arrowHeight?: Dimension; +} + +/** + * Defines the popup button. + * + * @interface PopupButton + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare interface PopupButton { + + /** + * Button text value + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + value: string; /** - * The position of the tips. + * action * - * @type { ?TipsAnchorType } + * @type { Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 + * @arkts 1.2 */ - showAtAnchor?: TipsAnchorType; + action: Callback; } /** @@ -16723,7 +17971,8 @@ declare interface TipsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PopupOptions { /** @@ -16742,13 +17991,14 @@ declare interface PopupOptions { * @since 10 */ /** - * Content of the popup message. + * Information in the pop-up window. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ message: string; @@ -16782,7 +18032,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ placement?: Placement; @@ -16864,6 +18115,17 @@ declare interface PopupOptions { action: () => void; }; + /** + * The first button. + * + * @type { ?PopupButton } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + primaryButton?: PopupButton; /** * The second button. * @@ -16942,6 +18204,18 @@ declare interface PopupOptions { action: () => void; }; + /** + * The second button. + * + * @type { ?PopupButton } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + secondaryButton?:PopupButton + /** * on State Change * @@ -16987,6 +18261,18 @@ declare interface PopupOptions { isVisible: boolean }) => void; + /** + * on State Change + * + * @type { ?PopupStateChangeCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onStateChange?: PopupStateChangeCallback; + /** * The offset of the sharp corner of popup. * @@ -17009,7 +18295,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ arrowOffset?: Length; @@ -17035,7 +18322,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ showInSubWindow?: boolean; @@ -17062,6 +18350,20 @@ declare interface PopupOptions { */ mask?: boolean | { color: ResourceColor }; + /** + * The mask to block gesture events of popup. + * When mask is set false, gesture events are not blocked. + * When mask is set true, gesture events are blocked and mask color is transparent. + * + * @type { ?(boolean | PopupMaskType) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + mask?: boolean | PopupMaskType; + /** * Sets the options of popup message. * @@ -17071,13 +18373,14 @@ declare interface PopupOptions { * @since 10 */ /** - * Parameters of the popup message. + * Sets the options of popup message. * * @type { ?PopupMessageOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ messageOptions?: PopupMessageOptions @@ -17096,7 +18399,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ targetSpace?: Length @@ -17116,7 +18420,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enableArrow?: boolean; /** @@ -17134,7 +18439,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: Position @@ -17153,7 +18459,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ popupColor?: Color | string | Resource | number; @@ -17174,7 +18481,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ autoCancel?: boolean; @@ -17193,7 +18501,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width?: Dimension; @@ -17212,7 +18521,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ arrowPointPosition?: ArrowPointPosition; @@ -17233,7 +18543,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ arrowWidth?: Dimension; @@ -17254,7 +18565,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ arrowHeight?: Dimension; @@ -17275,7 +18587,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radius?: Dimension; @@ -17296,7 +18609,8 @@ declare interface PopupOptions { * @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; @@ -17317,7 +18631,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyle?: BlurStyle; @@ -17328,7 +18643,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ transition?: TransitionEffect; @@ -17339,10 +18655,11 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDismiss?: boolean | Callback; - + /** * Determine if it is compatible popup's half folded. * @@ -17351,7 +18668,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableHoverMode?: boolean; @@ -17363,7 +18681,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ followTransformOfTarget?: boolean; @@ -17375,7 +18694,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ keyboardAvoidMode?: KeyboardAvoidMode; @@ -17458,7 +18778,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CustomPopupOptions { /** @@ -17477,21 +18798,14 @@ declare interface CustomPopupOptions { * @since 10 */ /** - * Popup builder. - *

NOTE: - *
The popup attribute is a universal attribute. A custom popup does not support display of another popup. - *
The position attribute cannot be used for the first-layer container in the builder. - *
If the position attribute is used, the popup will not be displayed. - *
If a custom component is used in the builder, the aboutToAppear and aboutToDisappear lifecycle callbacks - * of the custom component are irrelevant to the visibility of the popup. As such, the lifecycle of the - * custom component cannot be used to determine whether the popup is displayed or not. - *

+ * builder of popup * * @type { CustomBuilder } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ builder: CustomBuilder; @@ -17511,15 +18825,14 @@ declare interface CustomPopupOptions { * @since 10 */ /** - * Preferred position of the popup. If the set position is insufficient for holding the popup, - * it will be automatically adjusted. + * placement of popup * * @type { ?Placement } - * @default Placement.Bottom * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ placement?: Placement; @@ -17545,20 +18858,19 @@ declare interface CustomPopupOptions { * background color of popup * * @type { ?(Color | string | Resource | number) } - * @default '#4d4d4d' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Color of the popup. To remove the background blur, set backgroundBlurStyle to BlurStyle.NONE. + * background color of popup * * @type { ?(Color | string | Resource | number) } - * @default TRANSPARENT plus COMPONENT_ULTRA_THICK * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ popupColor?: Color | string | Resource | number; @@ -17581,11 +18893,11 @@ declare interface CustomPopupOptions { * whether show arrow * * @type { ?boolean } - * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enableArrow?: boolean; @@ -17605,19 +18917,14 @@ declare interface CustomPopupOptions { * @since 10 */ /** - * Whether to automatically dismiss the popup when an operation is performed on the page. - *

NOTE: - *
To enable the popup to disappear upon a click on it, place a layout component in the builder place the - * component in the layout component, and modify the value of the bindPopup variable (show: boolean) - * in the onClick event of the layout component. - *

+ * whether hide popup when click mask * * @type { ?boolean } - * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ autoCancel?: boolean; @@ -17637,7 +18944,7 @@ declare interface CustomPopupOptions { * @since 10 */ /** - * Callback for the popup status change event. + * on State Change * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -17666,6 +18973,18 @@ declare interface CustomPopupOptions { isVisible: boolean }) => void; + /** + * on State Change + * + * @type { ?PopupStateChangeCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onStateChange?: PopupStateChangeCallback; + /** * The offset of the sharp corner of popup. * @@ -17684,18 +19003,12 @@ declare interface CustomPopupOptions { /** * The offset of the sharp corner of popup. * - * Offset of the popup arrow relative to the popup. When the arrow is at the top or bottom of the popup: - *
The value 0 indicates that the arrow is located on the leftmost, and any other value indicates the distance - * from the arrow to the leftmost; the arrow is centered by default. When the arrow is on the left or right - * side of the popup: The value indicates the distance from the arrow to the top; the arrow is centered by - * default. When the popup is displayed on either edge of the screen, it will automatically deviate leftward - * or rightward to stay within the safe area. When the value is 0, the arrow always points to the bound component. - * * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ arrowOffset?: Length; @@ -17718,11 +19031,11 @@ declare interface CustomPopupOptions { * Whether to display in the sub window. * * @type { ?boolean } - * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ showInSubWindow?: boolean; @@ -17737,9 +19050,9 @@ declare interface CustomPopupOptions { * @since 10 */ /** - * Whether to apply a mask to the popup. - *
The value true means to apply a transparent mask to the popup, false means not to apply a mask to the popup, - * and a color value means to apply a mask in the corresponding color to the popup. + * The mask to block gesture events of popup. + * When mask is set false, gesture events are not blocked. + * When mask is set true, gesture events are blocked and mask color is transparent. * * @type { ?(boolean | { color: ResourceColor }) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -17749,6 +19062,20 @@ declare interface CustomPopupOptions { */ mask?: boolean | { color: ResourceColor }; + /** + * The mask to block gesture events of popup. + * When mask is set false, gesture events are not blocked. + * When mask is set true, gesture events are blocked and mask color is transparent. + * + * @type { ?(boolean | PopupMaskType) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + mask?: boolean | PopupMaskType; + /** * Sets the space of between the popup and target. * @@ -17764,7 +19091,8 @@ declare interface CustomPopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ targetSpace?: Length @@ -17783,7 +19111,8 @@ declare interface CustomPopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: Position @@ -17796,13 +19125,14 @@ declare interface CustomPopupOptions { * @since 11 */ /** - * Width of the popup. + * Set the width of the popup. * * @type { ?Dimension } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width?: Dimension; @@ -17815,14 +19145,14 @@ declare interface CustomPopupOptions { * @since 11 */ /** - * Position of the popup arrow relative to its parent component. Available positions are Start, Center, and End, - * in both vertical and horizontal directions. All these positions are within the parent component area. + * The position of the sharp corner of popup. * * @type { ?ArrowPointPosition } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ arrowPointPosition?: ArrowPointPosition; @@ -17836,19 +19166,15 @@ declare interface CustomPopupOptions { * @since 11 */ /** - * Arrow thickness. If the arrow thickness exceeds the length of the edge minus twice the size of the popup - * rounded corner, the arrow is not drawn. + * The width of the arrow. * * @type { ?Dimension } * @default 16.0_vp. - *

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

- * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ arrowWidth?: Dimension; @@ -17866,14 +19192,11 @@ declare interface CustomPopupOptions { * * @type { ?Dimension } * @default 8.0_vp. - *

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

- * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ arrowHeight?: Dimension; @@ -17887,14 +19210,15 @@ declare interface CustomPopupOptions { * @since 11 */ /** - * Rounded corner radius of the popup. + * The round corners of the popup. * * @type { ?Dimension } * @default 20.0_vp. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radius?: Dimension; @@ -17908,14 +19232,15 @@ declare interface CustomPopupOptions { * @since 11 */ /** - * Popup shadow. + * The style of popup Shadow. * * @type { ?(ShadowOptions | ShadowStyle) } * @default ShadowStyle.OUTER_DEFAULT_MD. * @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; @@ -17929,14 +19254,15 @@ declare interface CustomPopupOptions { * @since 11 */ /** - * Background blur style of the popup. + * Defines popup background blur Style * * @type { ?BlurStyle } * @default BlurStyle.COMPONENT_ULTRA_THICK * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyle?: BlurStyle; @@ -17957,7 +19283,8 @@ declare interface CustomPopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ focusable?: boolean; @@ -17968,28 +19295,20 @@ declare interface CustomPopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ transition?: TransitionEffect; /** - * Whether to perform dismissal event interception and interception callback. - * 1. If this parameter is set to false, the system does not respond to the dismissal event initiated by - * touching the Back button, swiping left or right on the screen, or pressing the Esc key; and the system - * dismisses the popup only when show is set to false. If this parameter is set to true, the system responds - * to the dismissal event as expected. - * 2. If this parameter is set to a function, the dismissal event is intercepted and the callback function - * is executed. - *

NOTE: - *
No more onWillDismiss callback is allowed in an onWillDismiss callback. - *

+ * Callback function when the popup interactive dismiss * * @type { ?(boolean | Callback) } - * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDismiss?: boolean | Callback; @@ -18001,7 +19320,8 @@ declare interface CustomPopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableHoverMode?: boolean; @@ -18013,7 +19333,8 @@ declare interface CustomPopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ followTransformOfTarget?: boolean; @@ -18025,7 +19346,8 @@ declare interface CustomPopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ keyboardAvoidMode?: KeyboardAvoidMode; @@ -18101,7 +19423,8 @@ declare interface CustomPopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum MenuPreviewMode { /** @@ -18117,8 +19440,9 @@ declare enum MenuPreviewMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 - */ + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ NONE = 0, /** * Defines image type preview content. @@ -18128,12 +19452,13 @@ declare enum MenuPreviewMode { * @since 11 */ /** - * The preview is a screenshot of the component on which a long-press triggers the context menu. + * Defines image type preview content. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE = 1 } @@ -18157,6 +19482,18 @@ declare enum MenuPreviewMode { */ declare type AnimationRange = [from: T, to: T]; +/** + * Defines the animator range of start and end property. + * + * @typedef { [number, number] } AnimationNumberRange + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type AnimationNumberRange = [number, number]; + /** * Defines the ContextMenu's preview animator options. * @@ -18172,7 +19509,8 @@ declare type AnimationRange = [from: T, to: T]; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface ContextMenuAnimationOptions { /** @@ -18195,6 +19533,19 @@ interface ContextMenuAnimationOptions { * @since 12 */ scale?: AnimationRange; + + /** + * Sets the start animator scale and end animator scale. + * + * @type { ?AnimationNumberRange } + * @default - + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + scale?: AnimationNumberRange; /** * Defines the transition effect of menu preview opening and closing. * @@ -18202,7 +19553,8 @@ interface ContextMenuAnimationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ transition?: TransitionEffect; @@ -18218,16 +19570,16 @@ interface ContextMenuAnimationOptions { hoverScale?: AnimationRange; /** - * Sets whether support to interrupt the process of hover scale. + * Sets the scale start and end animator of the image displayed before the custom builder preview is displayed. * - * @type { ?boolean } - * @default false + * @type { ?AnimationNumberRange } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 + * @arkts 1.2 */ - hoverScaleInterruption?: boolean; + hoverScale?: AnimationNumberRange; } /** @@ -18237,7 +19589,8 @@ interface ContextMenuAnimationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ type BorderRadiusType = Length | BorderRadiuses | LocalizedBorderRadiuses; @@ -18248,7 +19601,8 @@ type BorderRadiusType = Length | BorderRadiuses | LocalizedBorderRadiuses; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum HapticFeedbackMode { /** @@ -18257,8 +19611,9 @@ declare enum HapticFeedbackMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 - */ + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ DISABLED = 0, /** * Defines menu always haptic feedback. @@ -18266,7 +19621,8 @@ declare enum HapticFeedbackMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ENABLED = 1, /** @@ -18275,7 +19631,8 @@ declare enum HapticFeedbackMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ AUTO = 2 } @@ -18430,7 +19787,8 @@ declare enum AvailableLayoutArea { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ContextMenuOptions { /** @@ -18443,30 +19801,15 @@ declare interface ContextMenuOptions { * @since 10 */ /** - * Offset for showing the context menu, which should not cause the menu to extend beyond the screen. - *

NOTE: - *
When the menu is displayed relative to the parent component area, the width or height of the area is - * automatically counted into the offset based on the placement attribute of the menu. When the menu is - * displayed above the parent component (that is, placement is set to Placement.TopLeft, Placement.Top, or - * Placement.TopRight), a positive value of x indicates rightward movement relative to the parent component, - * and a positive value of y indicates upward movement. When the menu is displayed below the parent component - * (that is, placement is set to Placement.BottomLeft, Placement.Bottom, or Placement.BottomRight), a positive - * value of x indicates rightward movement relative to the parent component, and a positive value of y indicates - * downward movement. When the menu is displayed on the left of the parent component (that is, placement is set - * to Placement.LeftTop, Placement.Left, or Placement.LeftBottom), a positive value of x indicates leftward - * movement relative to the parent component, and a positive value of y indicates downward movement. When the - * menu is displayed on the right of the parent component (that is, placement is set to Placement.RightTop, - * Placement.Right, or Placement.RightBottom), a positive value of x indicates rightward movement relative to - * the parent component, and a positive value of y indicates downward movement. If the display position of the - * menu is adjusted (different from the main direction of the initial placement value), the offset value is invalid. - *

+ * Sets the position offset of the context menu window. * * @type { ?Position } - * @default {x:0,y:0} - Percentage values are not supported. + * @default - * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: Position; @@ -18480,24 +19823,20 @@ declare interface ContextMenuOptions { * @since 10 */ /** - * Preferred position of the context menu. If the set position is insufficient for holding the component, it will be - * automatically adjusted. - *

NOTE: - *
If a menu is displayed by pressing and holding or right-clicking, the menu is displayed at the clicked - * position. - *

+ * Sets the placement of the context menu window. * * @type { ?Placement } - * @default Placement.BottomLeft + * @default - * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ placement?: Placement; /** - * whether show arrow belong to the menu. + * whether show arrow belong to the menu, default: false, not show arrow * * @type { ?boolean } * @default false @@ -18505,21 +19844,15 @@ declare interface ContextMenuOptions { * @since 10 */ /** - * whether show arrow belong to the menu. - *

NOTE: - *
When enableArrow is true, an arrow is displayed in the position specified by placement. - *
If placement is not set or its value is invalid, the arrow is displayed above the target. - *
If the position is insufficient for holding the arrow, it is automatically adjusted. - *
When enableArrow is undefined, no arrow is displayed. - *
This API is supported in bindContextMenu since API version 10 and bindMenu since API version 12. - *

+ * whether show arrow belong to the menu, default: false, not show arrow * * @type { ?boolean } * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enableArrow?: boolean; @@ -18527,46 +19860,26 @@ declare interface ContextMenuOptions { * The horizontal offset to the left of menu or vertical offset to the top of menu * * @type { ?Length } - * @default 0vp - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Offset of the arrow relative to the context menu. The offset settings take effect only when the value is valid, - * can be converted to a number greater than 0, and does not cause the arrow to extend beyond the safe area of - * the context menu. - *

NOTE: - *
The safe distance of the arrow from the four sides of the menu is the sum of the menu's corner radius and - * half the width of the arrow. The value of placement determines whether the offset is horizontal or vertical. - * When the arrow is in the horizontal direction of the menu, the offset is the distance from the arrow to the - * leftmost arrow's safe distance. When the arrow is in the vertical direction of the menu, the offset is the - * distance from the arrow to the topmost arrow's safe distance. The default position where the arrow is - * displayed varies with the value of placement: Without any avoidance by the menu, when placement is set to - * Placement.Top or Placement.Bottom, the arrow is displayed horizontally and is centered by default; when - * placement is set to Placement.Left or Placement.Right, the arrow is displayed vertically and is centered by - * default; when placement is set to Placement.TopLeft or Placement.BottomLeft, the arrow is displayed - * horizontally by default, and the distance from the arrow to the left edge of the menu is the arrow's safe - * distance; when placement is set to Placement.TopRight or Placement.BottomRight, the arrow is displayed - * horizontally by default, and the distance from the arrow to the right edge of the menu is the arrow's safe - * distance; when placement is set to Placement.LeftTop or Placement.RightTop, the arrow is displayed vertically - * by default, and the distance from the arrow to the top edge of the menu is the arrow's safe distance; when - * placement is set to Placement.LeftBottom or Placement.RightBottom, the arrow is displayed vertically by - * default, and the distance from the arrow to the bottom edge of the menu is the arrow's safe distance. - *
This API is supported in bindContextMenu since API version 10 and bindMenu since API version 12. - *

+ * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * The horizontal offset to the left of menu or vertical offset to the top of menu * * @type { ?Length } - * @default 0vp + * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ arrowOffset?: Length; - + /** * The preview content of context menu. - * + * * @type { ?(MenuPreviewMode | CustomBuilder) } * @default MenuPreviewMode.NONE * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -18574,21 +19887,15 @@ declare interface ContextMenuOptions { * @since 11 */ /** - * Preview displayed when the context menu is triggered by a long-press or use the isShown variable of - * bindContextMenu to display the preview content style of the menu. - *

NOTE: - *
This parameter has no effect when responseType is set to ResponseType.RightClick. - *
If preview is set to MenuPreviewMode.NONE or is not set, the enableArrow parameter is effective. - *
If preview is set to MenuPreviewMode.IMAGE or CustomBuilder, no arrow will be displayed even when - * enableArrow is true. - *

+ * The preview content of context menu. * * @type { ?(MenuPreviewMode | CustomBuilder) } * @default MenuPreviewMode.NONE * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ preview?: MenuPreviewMode | CustomBuilder; @@ -18599,25 +19906,20 @@ declare interface ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ previewBorderRadius?: BorderRadiusType; /** - * Border radius of the menu. - *

NOTE: - *
The value can be in percentage. - *
If the sum of the two maximum corner radii in the horizontal direction exceeds the menu's width, or if the sum - * of the two maximum corner radii in the vertical direction exceeds the menu's height, the default corner radius of - * the menu will be used. - *

+ * Defines the border radius of menu. * * @type { ?(Length | BorderRadiuses | LocalizedBorderRadiuses) } - * @default 8vp for 2-in-1 devices and 20vp for other devices * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderRadius?: Length | BorderRadiuses | LocalizedBorderRadiuses; @@ -18630,18 +19932,19 @@ declare interface ContextMenuOptions { * @since 10 */ /** - * Callback triggered when the menu is displayed. + * Callback function when the context menu appears. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onAppear?: () => void; /** - * Callback triggered when the menu is hidden. + * Callback function when the context menu disappear. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -18655,7 +19958,8 @@ declare interface ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onDisappear?: () => void; @@ -18668,13 +19972,14 @@ declare interface ContextMenuOptions { * @since 11 */ /** - * Callback triggered when the menu is about to appear. + * Callback function before the context menu animation starts. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ aboutToAppear?: () => void; @@ -18687,16 +19992,17 @@ declare interface ContextMenuOptions { * @since 11 */ /** - * Callback triggered when the menu is about to disappear. + * Callback function before the context menu popAnimation starts. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ aboutToDisappear?: () => void; - + /** * The margin of menu's layoutRegion. * @@ -18704,10 +20010,11 @@ declare interface ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ layoutRegionMargin?: Margin; - + /** * The preview animator options. * @@ -18723,7 +20030,8 @@ declare interface ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ previewAnimationOptions?: ContextMenuAnimationOptions; @@ -18737,14 +20045,15 @@ declare interface ContextMenuOptions { * @since 11 */ /** - * Background color of the menu. + * Defines the menu's background color * * @type { ?ResourceColor } * @default Color.Transparent * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor?: ResourceColor; @@ -18758,14 +20067,15 @@ declare interface ContextMenuOptions { * @since 11 */ /** - * Background blur style of the menu. + * Defines menu background blur Style * * @type { ?BlurStyle } * @default BlurStyle.COMPONENT_ULTRA_THICK * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyle?: BlurStyle; @@ -18776,7 +20086,8 @@ declare interface ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; @@ -18787,7 +20098,8 @@ declare interface ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundEffect?: BackgroundEffectOptions; @@ -18798,7 +20110,8 @@ declare interface ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ transition?: TransitionEffect; @@ -18810,7 +20123,8 @@ declare interface ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableHoverMode?: boolean; @@ -18821,7 +20135,8 @@ declare interface ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ outlineColor?: ResourceColor | EdgeColors; @@ -18832,7 +20147,8 @@ declare interface ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ outlineWidth?: Dimension | EdgeOutlineWidths; @@ -18844,7 +20160,8 @@ declare interface ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ hapticFeedbackMode?: HapticFeedbackMode; @@ -18967,7 +20284,8 @@ declare interface ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface MenuOptions extends ContextMenuOptions { /** @@ -18985,7 +20303,8 @@ declare interface MenuOptions extends ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ title?: ResourceStr; @@ -19001,11 +20320,11 @@ declare interface MenuOptions extends ContextMenuOptions { * Whether to display in the sub window. * * @type { ?boolean } - * @default true for 2-in-1 devices and false for other devices * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ showInSubWindow?: boolean; } @@ -19018,12 +20337,13 @@ declare interface MenuOptions extends ContextMenuOptions { * @since 10 */ /** - * Implements a ProgressMask object to set the progress, maximum value, and color of the mask. + * Defines the ProgressMask class. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ProgressMask { /** @@ -19039,13 +20359,14 @@ declare class ProgressMask { /** * constructor. * - * @param { number } value - Current value of the progress mask. Value range: [0.0, +∞). - * @param { number } total - Maximum value of the progress mask. Value range: [0.0, +∞). - * @param { ResourceColor } color - Color of the progress mask. + * @param { number } value - indicates the current value of the progress. + * @param { number } total - indicates the total value of the progress. + * @param { ResourceColor } color - indicates the color of the mask. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(value: number, total: number, color: ResourceColor); @@ -19058,13 +20379,14 @@ declare class ProgressMask { * @since 10 */ /** - * Updates the progress value of the progress mask. + * Update the current value of the progress. * - * @param { number } value - Current value of the progress mask. + * @param { number } value - indicates the current value of the progress. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ updateProgress(value: number): void; @@ -19079,14 +20401,15 @@ declare class ProgressMask { /** * Update the color of the mask. * - * @param { ResourceColor } value - Color of the progress mask. + * @param { ResourceColor } value - indicates the color of the mask. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ updateColor(value: ResourceColor): void; - + /** * Enable the breathe animation of mask. * @@ -19094,7 +20417,8 @@ declare class ProgressMask { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableBreathingAnimation(value: boolean): void; } @@ -19112,7 +20436,8 @@ declare class ProgressMask { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TouchTestInfo { /** @@ -19130,7 +20455,8 @@ declare class TouchTestInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ windowX: number; @@ -19149,7 +20475,8 @@ declare class TouchTestInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ windowY: number; @@ -19168,7 +20495,8 @@ declare class TouchTestInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ parentX: number; @@ -19187,7 +20515,8 @@ declare class TouchTestInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ parentY: number; @@ -19206,7 +20535,8 @@ declare class TouchTestInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ x: number; @@ -19225,7 +20555,8 @@ declare class TouchTestInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ y: number; @@ -19244,7 +20575,8 @@ declare class TouchTestInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ rect: RectResult; @@ -19263,7 +20595,8 @@ declare class TouchTestInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ id: string; } @@ -19281,7 +20614,8 @@ declare class TouchTestInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TouchResult { /** @@ -19299,7 +20633,8 @@ declare class TouchResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ strategy: TouchTestStrategy; @@ -19318,7 +20653,8 @@ declare class TouchResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ id?: string; } @@ -19340,7 +20676,8 @@ declare class TouchResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PixelStretchEffectOptions { /** @@ -19362,7 +20699,8 @@ declare interface PixelStretchEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ top?: Length; @@ -19385,7 +20723,8 @@ declare interface PixelStretchEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bottom?: Length; @@ -19408,7 +20747,8 @@ declare interface PixelStretchEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ left?: Length; @@ -19431,7 +20771,8 @@ declare interface PixelStretchEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ right?: Length; } @@ -19451,7 +20792,8 @@ declare interface PixelStretchEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ClickEffect { /** @@ -19469,7 +20811,8 @@ declare interface ClickEffect { * @default ClickEffectLevel.Light * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ level: ClickEffectLevel; @@ -19484,18 +20827,12 @@ declare interface ClickEffect { /** * Set scale number. * This default scale is same as the scale of click effect level. - * - *

NOTE: - *
This parameter works based on the setting of ClickEffectLevel. - *
If level is set to ClickEffectLevel.LIGHT, the default value is 0.90. - *
If level is set to ClickEffectLevel.MIDDLE or ClickEffectLevel.HEAVY, the default value is 0.95. - *
If level is set to undefined or null (both of which evaluate to ClickEffectLevel.LIGHT), the default value is 0.90. - *
If scale is set to undefined or null, the default zoom ratio for the set level will be used. - *

+ * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scale?: number; } @@ -19507,7 +20844,8 @@ declare interface ClickEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface FadingEdgeOptions { /** @@ -19518,7 +20856,8 @@ declare interface FadingEdgeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ fadingEdgeLength?: LengthMetrics; } @@ -19536,7 +20875,8 @@ declare interface FadingEdgeOptions { * @interface NestedScrollOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NestedScrollOptions { /** @@ -19553,7 +20893,8 @@ declare interface NestedScrollOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scrollForward: NestedScrollMode; @@ -19571,7 +20912,8 @@ declare interface NestedScrollOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scrollBackward: NestedScrollMode; } @@ -19598,7 +20940,8 @@ declare interface NestedScrollOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface MenuElement { /** @@ -19623,7 +20966,8 @@ declare interface MenuElement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ value: ResourceStr; @@ -19642,7 +20986,8 @@ declare interface MenuElement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ icon?: ResourceStr; @@ -19662,6 +21007,7 @@ declare interface MenuElement { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ symbolIcon?: SymbolGlyphModifier; @@ -19684,7 +21030,8 @@ declare interface MenuElement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enabled?: boolean; @@ -19710,14 +21057,15 @@ declare interface MenuElement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ action: () => void; } /** * Defines the attribute modifier. - * + * * @interface AttributeModifier * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19725,7 +21073,7 @@ declare interface MenuElement { */ /** * Defines the attribute modifier. - * + * * @interface AttributeModifier * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19736,7 +21084,7 @@ declare interface AttributeModifier { /** * Defines the normal update attribute function. - * + * * @param { T } instance * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19744,7 +21092,7 @@ declare interface AttributeModifier { */ /** * Defines the normal update attribute function. - * + * * @param { T } instance * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19755,7 +21103,7 @@ declare interface AttributeModifier { /** * Defines the pressed update attribute function. - * + * * @param { T } instance * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19763,7 +21111,7 @@ declare interface AttributeModifier { */ /** * Defines the pressed update attribute function. - * + * * @param { T } instance * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19774,7 +21122,7 @@ declare interface AttributeModifier { /** * Defines the focused update attribute function. - * + * * @param { T } instance * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19782,91 +21130,174 @@ declare interface AttributeModifier { */ /** * Defines the focused update attribute function. - * + * + * @param { T } instance + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + applyFocusedAttribute?(instance: T) : void; + + /** + * Defines the disabled update attribute function. + * + * @param { T } instance + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Defines the disabled update attribute function. + * + * @param { T } instance + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + applyDisabledAttribute?(instance: T) : void; + + /** + * Defines the selected update attribute function. + * + * @param { T } instance + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Defines the selected update attribute function. + * * @param { T } instance * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since 12 + */ + applySelectedAttribute?(instance: T) : void; +} + + +/** + * Defines the attribute modifier. + * + * @interface AttributeModifier + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare interface AttributeModifier { + + + /** + * Defines the normal update attribute function. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + applyNormalAttribute?:(instance: T) => void; + + + /** + * Defines the pressed update attribute function. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 */ - applyFocusedAttribute?(instance: T) : void; + applyPressedAttribute?:(instance: T) => void; /** - * Defines the disabled update attribute function. - * - * @param { T } instance + * Defines the focused update attribute function. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @atomicservice + * @since 20 + * @arkts 1.2 */ + applyFocusedAttribute?:(instance: T) => void; + + /** * Defines the disabled update attribute function. - * - * @param { T } instance + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since 20 + * @arkts 1.2 */ - applyDisabledAttribute?(instance: T) : void; + applyDisabledAttribute?:(instance: T) => void; + /** * Defines the selected update attribute function. - * - * @param { T } instance - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Defines the selected update attribute function. - * - * @param { T } instance + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since 20 + * @arkts 1.2 */ - applySelectedAttribute?(instance: T) : void; + applySelectedAttribute?:(instance: T) => void; } - /** * Defines the content modifier. - * + * * @interface ContentModifier * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ContentModifier { /** * Defining applyContent function. - * + * * @returns { WrappedBuilder<[T]> } - * Component attribute class, which is used to distinguish different information required by different components - * after content areas are customized, for example, ButtonConfiguration for the Button component and - * CheckBoxConfiguration of the Checkbox component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ applyContent(): WrappedBuilder<[T]> + + /** + * Defining applyContent function. + * + * @returns { WrappedBuilder<[T]> } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + applyContent(): WrappedBuilder> } /** * Defines the common configuration. - * + * * @interface CommonConfiguration * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CommonConfiguration { - + /** * If the value is true, the contentModifier is available and can respond to operations such as triggerChange. * If it is set to false, triggerChange operations are not responded. @@ -19875,18 +21306,20 @@ declare interface CommonConfiguration { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enabled: boolean, /** * Obtains the contentModifier instance object - * + * * @type { ContentModifier } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentModifier: ContentModifier } @@ -19908,11 +21341,12 @@ declare interface CommonConfiguration { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum OutlineStyle { /** - * Solid border. + * Shows as a solid line. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19920,18 +21354,19 @@ declare enum OutlineStyle { * @since 11 */ /** - * Solid border. + * Shows as a solid line. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SOLID = 0, /** - * Dashed border. + * Shows as a series of short square dashed lines. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19939,13 +21374,14 @@ declare enum OutlineStyle { * @since 11 */ /** - * Dashed border. + * Shows as a series of short square dashed lines. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DASHED = 1, @@ -19958,13 +21394,14 @@ declare enum OutlineStyle { * @since 11 */ /** - * Dotted border. The radius of a dot is half of **outlineWidth**. + * Displays as a series of dots with a radius of half the borderWidth. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DOTTED = 2, } @@ -19991,7 +21428,8 @@ declare enum OutlineStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum DragPreviewMode { /** @@ -20013,7 +21451,8 @@ declare enum DragPreviewMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ AUTO = 1, /** @@ -20035,7 +21474,8 @@ declare enum DragPreviewMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ DISABLE_SCALE = 2, /** @@ -20051,7 +21491,8 @@ declare enum DragPreviewMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ENABLE_DEFAULT_SHADOW = 3, /** @@ -20067,7 +21508,8 @@ declare enum DragPreviewMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ENABLE_DEFAULT_RADIUS = 4, /** @@ -20075,7 +21517,8 @@ declare enum DragPreviewMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ENABLE_DRAG_ITEM_GRAY_EFFECT = 5, /** @@ -20083,7 +21526,8 @@ declare enum DragPreviewMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ENABLE_MULTI_TILE_EFFECT = 6, /** @@ -20091,7 +21535,8 @@ declare enum DragPreviewMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ENABLE_TOUCH_POINT_CALCULATION_BASED_ON_FINAL_PREVIEW = 7, } @@ -20102,7 +21547,8 @@ declare enum DragPreviewMode { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum DraggingSizeChangeEffect { /** @@ -20110,7 +21556,8 @@ declare enum DraggingSizeChangeEffect { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 0, @@ -20119,7 +21566,8 @@ declare enum DraggingSizeChangeEffect { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SIZE_TRANSITION = 1, @@ -20128,7 +21576,8 @@ declare enum DraggingSizeChangeEffect { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SIZE_CONTENT_TRANSITION = 2, } @@ -20140,7 +21589,8 @@ declare enum DraggingSizeChangeEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum MenuPolicy { /** @@ -20149,27 +21599,30 @@ declare enum MenuPolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 0, /** - * The menu is always hidden. + * Hide pop up menu. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HIDE = 1, /** - * The menu is always displayed. + * Show pop up menu. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SHOW = 2, } @@ -20226,7 +21679,8 @@ declare type SymbolGlyphModifier = import('../api/arkui/SymbolGlyphModifier').Sy * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DragPreviewOptions { /** @@ -20248,11 +21702,11 @@ declare interface DragPreviewOptions { * Drag preview mode. * * @type { ?(DragPreviewMode | Array) } - * @default DragPreviewMode.AUTO * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ mode?: DragPreviewMode | Array; @@ -20287,11 +21741,11 @@ declare interface DragPreviewOptions { * The flag for number showing. * * @type { ?(boolean | number) } - * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ numberBadge?: boolean | number; @@ -20299,10 +21753,10 @@ declare interface DragPreviewOptions { * Drag start animation effect from drag preview to the handle drag image. * * @type { ?DraggingSizeChangeEffect } - * @default DraggingSizeChangeEffect.DEFAULT * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ sizeChangeEffect?: DraggingSizeChangeEffect; } @@ -20313,28 +21767,29 @@ declare interface DragPreviewOptions { * @interface DragInteractionOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DragInteractionOptions { /** * Define whether to gather selected nodes in grid or list. * * @type { ?boolean } - * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isMultiSelectionEnabled?: boolean; - + /** * Define whether to execute animation before preview floating. * * @type { ?boolean } - * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ defaultAnimationBeforeLifting?: boolean; @@ -20342,10 +21797,10 @@ declare interface DragInteractionOptions { * Config if auto scrolling should be triggered when the drag hovered on a scrollable controller's edge. * * @type { ?boolean } - * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableEdgeAutoScroll?: boolean; @@ -20353,10 +21808,10 @@ declare interface DragInteractionOptions { * Define whether to enable the haptic feedback when dragging, the default value is false. * * @type { ?boolean } - * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableHapticFeedback?: boolean; @@ -20367,7 +21822,8 @@ declare interface DragInteractionOptions { * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ isLiftingDisabled?: boolean; } @@ -20378,7 +21834,8 @@ declare interface DragInteractionOptions { * @interface PreviewConfiguration * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PreviewConfiguration { /** @@ -20388,7 +21845,8 @@ declare interface PreviewConfiguration { * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ onlyForLifting?: boolean; @@ -20399,7 +21857,8 @@ declare interface PreviewConfiguration { * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ delayCreating?: boolean; } @@ -20417,13 +21876,14 @@ declare interface PreviewConfiguration { * @interface InvertOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface InvertOptions { /** * Defines the low value of threshold - * + * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -20431,18 +21891,19 @@ declare interface InvertOptions { */ /** * Defines the low value of threshold - * + * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ low: number; /** * Defines the high value of threshold - * + * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -20450,18 +21911,19 @@ declare interface InvertOptions { */ /** * Defines the high value of threshold - * + * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ high: number; /** * Defines the threshold - * + * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -20469,18 +21931,19 @@ declare interface InvertOptions { */ /** * Defines the threshold - * + * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ threshold: number; - + /** *Defines the threshold range - * + * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -20488,19 +21951,20 @@ declare interface InvertOptions { */ /** *Defines the threshold range - * + * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ thresholdRange: number; } /** * Import the CircleShape type object for common method. - * + * * @typedef { import('../api/@ohos.arkui.shape').CircleShape } CircleShape * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -20512,7 +21976,7 @@ declare type CircleShape = import('../api/@ohos.arkui.shape').CircleShape; /** * Import the EllipseShape type object for common method. - * + * * @typedef { import('../api/@ohos.arkui.shape').EllipseShape } EllipseShape * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -20524,7 +21988,7 @@ declare type EllipseShape = import('../api/@ohos.arkui.shape').EllipseShape; /** * Import the PathShape type object for common method. - * + * * @typedef { import('../api/@ohos.arkui.shape').PathShape } PathShape * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -20536,7 +22000,7 @@ declare type PathShape = import('../api/@ohos.arkui.shape').PathShape; /** * Import the RectShape type object for common method. - * + * * @typedef { import('../api/@ohos.arkui.shape').RectShape } RectShape * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -20554,7 +22018,8 @@ declare type RectShape = import('../api/@ohos.arkui.shape').RectShape; * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type Optional = T | undefined; @@ -20565,7 +22030,8 @@ declare type Optional = T | undefined; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type TipsMessageType = ResourceStr | StyledString; @@ -20588,7 +22054,8 @@ declare type Matrix4Transit = import('../api/@ohos.matrix4').default.Matrix4Tran * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface BackgroundImageOptions { /** @@ -20601,7 +22068,8 @@ interface BackgroundImageOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ syncLoad?: boolean; /** @@ -20613,19 +22081,21 @@ interface BackgroundImageOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ repeat?: ImageRepeat; } /** - * Defines background options. + * Define the options of background * * @interface BackgroundOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 + * @arkts 1.2 */ declare interface BackgroundOptions { /** @@ -20655,6 +22125,7 @@ declare interface BackgroundOptions { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ align?: Alignment; /** @@ -20664,6 +22135,7 @@ declare interface BackgroundOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ ignoresLayoutSafeAreaEdges?: Array; } @@ -20696,7 +22168,8 @@ declare interface BackgroundOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CommonMethod { /** @@ -20712,7 +22185,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -20744,9 +22218,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the width of the component. By default, the width required to fully hold the - * component content is used.If the width of the component is greater than that of - * the parent container, the component will be drawn beyond the parent container scope. + * Sets the width of the current component. * * @param { Length } value * @returns { T } @@ -20754,14 +22226,12 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ width(value: Length): T; /** - * Sets the width of the component or its horizontal layout policy. By default, the - * component uses the width required for its content. If the width of the component is - * greater than that of the parent container, the component will be drawn beyond the - * parent container scope. + * Sets the width of the current component. * * @param { Length | LayoutPolicy } widthValue * @returns { T } @@ -20769,7 +22239,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ width(widthValue: Length | LayoutPolicy): T; @@ -20801,9 +22272,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the height of the component. By default, the height required to fully hold the - * component content is used. If the height of the component is greater than that of - * the parent container, the component will be drawn beyond the parent container scope. + * Sets the height of the current component. * * @param { Length } value * @returns { T } @@ -20811,14 +22280,12 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ height(value: Length): T; /** - * Sets the height of the component or its vertical layout policy. By default, the - * component uses the height required for its content. If the height of the component - * is greater than that of the parent container, the component will be drawn beyond - * the parent container scope. + * Sets the height of the current component. * * @param { Length | LayoutPolicy } heightValue * @returns { T } @@ -20826,27 +22293,26 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ height(heightValue: Length | LayoutPolicy): T; - + /** * Sets the drawModifier of the current component. * * @param { DrawModifier | undefined } modifier - drawModifier used to draw, or undefined if it is not available. - * Default value: undefined - * A custom modifier applies only to the FrameNode of the currently bound component, not to its subnodes. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ drawModifier(modifier: DrawModifier | undefined): T; /** * Sets the custom property of the current component. - * This API does not work for custom components. * * @param { string } name - the name of the custom property. * @param { Optional } value - the value of the custom property. @@ -20854,7 +22320,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ customProperty(name: string, value: Optional): T; @@ -20869,9 +22336,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the safe area to be expanded to. - *
default:{types: [SafeAreaType.SYSTEM, SafeAreaType.CUTOUT, SafeAreaType.KEYBOARD], - * edges: [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM, SafeAreaEdge.START, SafeAreaEdge.END]} + * Expands the safe area. * * @param { Array } types - Indicates the types of the safe area. * @param { Array } edges - Indicates the edges of the safe area. @@ -20879,7 +22344,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ expandSafeArea(types?: Array, edges?: Array): T; @@ -20932,7 +22398,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ responseRegion(value: Array | Rectangle): T; @@ -20953,7 +22420,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ mouseResponseRegion(value: Array | Rectangle): T; @@ -20985,7 +22453,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the size of the component. + * The size of the current component. * * @param { SizeOptions } value * @returns { T } @@ -20993,7 +22461,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ size(value: SizeOptions): T; @@ -21028,8 +22497,8 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the constraint size of the component, which is used to limit the size range during component layout. - * Default value: **{minWidth: 0, maxWidth: Infinity, minHeight: 0, maxHeight: Infinity}**. + * constraint Size: + * minWidth: minimum Width, maxWidth: maximum Width, minHeight: minimum Height, maxHeight: maximum Height. * * @param { ConstraintSizeOptions } value * @returns { T } @@ -21037,7 +22506,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constraintSize(value: ConstraintSizeOptions): T; @@ -21071,16 +22541,15 @@ declare class CommonMethod { * @since 10 */ /** - * Sets how the component behaves during hit testing. + * Defines the component's hit test behavior in touch events. * * @param { HitTestMode } value - the hit test mode. - * @default HitTestMode.default - Both the node and its child nodes respond to the hit test of a touch event, - * but its sibling nodes are blocked from the hit test. The hit test for ancestor nodes is not affected. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ hitTestBehavior(value: HitTestMode): T; @@ -21094,14 +22563,15 @@ declare class CommonMethod { * @since 11 */ /** - * Called to specify how to perform the touch test on the children of this component. + * Defines the pre-touch test of sub component in touch events. * * @param { function } event * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onChildTouchTest(event: (value: Array) => TouchResult): T; @@ -21133,9 +22603,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the weight of the component during layout. A component with this attribute is allocated space - * along the main axis of its parent container (Row, Column, or Flex) based on its specified weight. - * Default value: **0**. + * Defines the weight of the component, according to which the remain part of main-axis is allocated self-adaptively * * @param { number | string } value * @returns { T } @@ -21143,20 +22611,21 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ layoutWeight(value: number | string): T; /** - * Sets the weight of the component in a chain, which is used to re-lay out components that form the chain. - *
This API has effect only when the parent container is RelativeContainer. + * chain Weight * * @param { ChainWeightOptions } chainWeight * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ chainWeight(chainWeight: ChainWeightOptions): T; @@ -21199,8 +22668,7 @@ declare class CommonMethod { * @since 11 */ /** - * Sets the padding of the component. - * Default value: **0**. + * Inner margin. * * @param { Padding | Length | LocalizedPadding } value * @returns { T } @@ -21208,14 +22676,13 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ padding(value: Padding | Length | LocalizedPadding): T; /** - * Sets the safe area padding. It enables a container to add a component-level - * safe area for child components to expand into. - * Default value: **LengthMetrics.vp(0)** + * Inner safeArea padding. * * @param { Padding | LengthMetrics | LocalizedPadding } paddingValue - Indicates safeArea padding values * @returns { T } @@ -21223,10 +22690,11 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ safeAreaPadding(paddingValue: Padding | LengthMetrics | LocalizedPadding): T; - + /** * Outer Margin. * @@ -21266,8 +22734,7 @@ declare class CommonMethod { * @since 11 */ /** - * Sets the margin of the component. - * Default value: **0**. + * Outer Margin. * * @param { Margin | Length | LocalizedMargin } value * @returns { T } @@ -21275,29 +22742,26 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ margin(value: Margin | Length | LocalizedMargin): T; /** - * Sets the background color of the component. + * Background. * - * @param { CustomBuilder } builder - Custom background. - * @param { object } options - Alignment mode between the custom background and the component. - *
If **background**, **backgroundColor**, and **backgroundImage** are set at the same time - *
They will all take effect, with **background** at the top layer. + * @param { CustomBuilder } builder + * @param { object } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Sets the background color of the component. + * Background. * - * @param { CustomBuilder } builder - Custom background. - * @param { object } options - Alignment mode between the custom background and the component. - *
If **background**, **backgroundColor**, and **backgroundImage** are set at the same time - *
They will all take effect, with **background** at the top layer. + * @param { CustomBuilder } builder + * @param { object } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -21307,19 +22771,18 @@ declare class CommonMethod { background(builder: CustomBuilder, options?: { align?: Alignment }): T; /** - * Add a background for the component. + * Background. * - * Anonymous Object Rectification. - * @param { CustomBuilder | ResourceColor } content + * @param { CustomBuilder } builder * @param { BackgroundOptions } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 + * @arkts 1.2 */ - background(content: CustomBuilder | ResourceColor, options?: BackgroundOptions): T; - + background(builder: CustomBuilder, options?: BackgroundOptions): T; /** * Background color * @@ -21356,7 +22819,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor(value: ResourceColor): T; @@ -21369,7 +22833,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor(color: Optional): T; @@ -21383,20 +22848,21 @@ declare class CommonMethod { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ backgroundColor(color: Optional): T; /** - * Sets the pixel rounding policy for the current component in the specified direction. - *
If a direction is not set, the pixels are rounded to the nearest whole number in that direction. + * PixelRound * - * @param { PixelRoundPolicy } value - indicates the rounding policy for the bounds of the component. + * @param { PixelRoundPolicy } value - indicates the pixel round policy. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ pixelRound(value: PixelRoundPolicy): T; @@ -21457,7 +22923,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundImage(src: ResourceStr | PixelMap, repeat?: ImageRepeat): T; @@ -21471,10 +22938,11 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundImage(src: ResourceStr | PixelMap, options?: BackgroundImageOptions): T; - + /** * Background image size * @@ -21505,13 +22973,14 @@ declare class CommonMethod { /** * Background image size * - * @param { SizeOptions | ImageSize } value - The width and height of the background image. + * @param { SizeOptions | ImageSize } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundImageSize(value: SizeOptions | ImageSize): T; @@ -21555,31 +23024,28 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundImagePosition(value: Position | Alignment): T; /** - * Defines the blur style to apply between the background and content of a component. - * It encapsulates various blur radius, mask color, mask opacity, saturation. - * And brightness values through enum values. + * Background blur style. + * blurStyle:Blur style type. * - * @param { BlurStyle } value - Settings of the background blur style - *
including the blur radius, mask color, mask opacity, saturation, and brightness. - * @param { BackgroundBlurStyleOptions } options - Background blur options. + * @param { BlurStyle } value + * @param { BackgroundBlurStyleOptions } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Defines the blur style to apply between the background and content of a component. - * It encapsulates various blur radius, mask color, mask opacity, saturation. - * And brightness values through enum values. + * Background blur style. + * blurStyle:Blur style type. * - * @param { BlurStyle } value - Settings of the background blur style - *
including the blur radius, mask color, mask opacity, saturation, and brightness. - * @param { BackgroundBlurStyleOptions } options - Background blur options. + * @param { BlurStyle } value + * @param { BackgroundBlurStyleOptions } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -21587,22 +23053,22 @@ declare class CommonMethod { * @since 10 */ /** - * Defines the blur style to apply between the background and content of a component. - * It encapsulates various blur radius, mask color, mask opacity, saturation. - * And brightness values through enum values. + * Background blur style. + * blurStyle:Blur style type. * - * @param { BlurStyle } value - Settings of the background blur style - *
including the blur radius, mask color, mask opacity, saturation, and brightness. - * @param { BackgroundBlurStyleOptions } options - Background blur options. + * @param { BlurStyle } value + * @param { BackgroundBlurStyleOptions } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyle(value: BlurStyle, options?: BackgroundBlurStyleOptions): T; + /** * Background blur style. * blurStyle:Blur style type. @@ -21614,45 +23080,29 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since 16 */ backgroundBlurStyle(style: Optional, options?: BackgroundBlurStyleOptions): T; /** - * Background blur style. - * blurStyle:Blur style type. - * sysOptions: system adaptive options. - * - * @param { Optional } style - * @param { BackgroundBlurStyleOptions } [options] - * @param { SystemAdaptiveOptions } [sysOptions] - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 19 - */ - backgroundBlurStyle(style: Optional, options?: BackgroundBlurStyleOptions, sysOptions?: SystemAdaptiveOptions): T; - - /** - * Sets the background effect of the component, including the blur radius, brightness, saturation, and color. + * options:background effect options. * - * @param { BackgroundEffectOptions } options - Background effect, including saturation, brightness, and color. + * @param { BackgroundEffectOptions } options - options indicates the effect options. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** - * Sets the background effect of the component, including the blur radius, brightness, saturation, and color. + * options:background effect options. * - * @param { BackgroundEffectOptions } options - Background effect, including saturation, brightness, and color. + * @param { BackgroundEffectOptions } options - options indicates the effect options. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundEffect(options: BackgroundEffectOptions): T; @@ -21684,7 +23134,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundEffect(options: Optional, sysOptions?: SystemAdaptiveOptions): T; @@ -21697,7 +23148,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundImageResizable(value: ResizableOptions): T; @@ -21709,58 +23161,64 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ foregroundEffect(options: ForegroundEffectOptions): T; /** - * Sets a visual effect that is not a filter effect. + * Unified visual effect interface. * * @param { VisualEffect } effect - Visual effect parameters. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ visualEffect(effect: VisualEffect): T; /** - * Sets the visual effect of the background filter. + * Filter applied to the background layer of the component. * * @param { Filter } filter - Filter effect parameters. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundFilter(filter: Filter): T; /** - * Sets the visual effect of the foreground (content) filter. + * Filter applied to the foreground layer of the component. * * @param { Filter } filter - Filter effect parameters. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ foregroundFilter(filter: Filter): T; /** - * Sets the visual effect of the compositing filter. + * Filter applied to the compositing layer of the component. * * @param { Filter } filter - Filter effect parameters. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compositingFilter(filter: Filter): T; + /** * Applies a foreground blur style to the component. * @@ -21810,31 +23268,32 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ foregroundBlurStyle(style: Optional, options?: ForegroundBlurStyleOptions, sysOptions?: SystemAdaptiveOptions): T; /** - * Sets the opacity of the component. + * Opacity * - * @param { number | Resource } value - Opacity of the component. The value ranges from 0 to 1. + * @param { number | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Sets the opacity of the component. + * Opacity * - * @param { number | Resource } value - Opacity of the component. The value ranges from 0 to 1. + * @param { number | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Sets the opacity of the component. + * Opacity * - * @param { number | Resource } value - Opacity of the component. The value ranges from 0 to 1. + * @param { number | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -21842,28 +23301,30 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the opacity of the component. + * Opacity * - * @param { number | Resource } value - Opacity of the component. The value ranges from 0 to 1. + * @param { number | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ opacity(value: number | Resource): T; /** - * Sets the opacity of the component. + * Opacity * - * @param { Optional } opacity - Opacity of the component. The value ranges from 0 to 1. + * @param { Optional } opacity * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ opacity(opacity: Optional): T; @@ -21898,7 +23359,8 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the border. + * Border + * width:Border width;color:Border color;radius:Border radius; * * @param { BorderOptions } value * @returns { T } @@ -21906,7 +23368,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ border(value: BorderOptions): T; @@ -21938,8 +23401,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the border style. - * Default value: **BorderStyle.Solid**. + * Border style * * @param { BorderStyle | EdgeStyles } value * @returns { T } @@ -21947,7 +23409,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ borderStyle(value: BorderStyle | EdgeStyles): T; @@ -21990,8 +23453,7 @@ declare class CommonMethod { * @since 11 */ /** - * Sets the border width. - * Percentage values are not supported. + * Border width * * @param { Length | EdgeWidths | LocalizedEdgeWidths } value * @returns { T } @@ -21999,7 +23461,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderWidth(value: Length | EdgeWidths | LocalizedEdgeWidths): T; @@ -22042,15 +23505,16 @@ declare class CommonMethod { * @since 11 */ /** - * Sets the border color. - * Default value: **Color.Black**. + * Border color + * * @param { ResourceColor | EdgeColors | LocalizedEdgeColors } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderColor(value: ResourceColor | EdgeColors | LocalizedEdgeColors): T; @@ -22093,8 +23557,7 @@ declare class CommonMethod { * @since 11 */ /** - * Sets the radius of the border rounded corners. - *
The radius is restricted by the component size. The maximum value is half of the component width or height. + * Border radius * * @param { Length | BorderRadiuses | LocalizedBorderRadiuses } value * @returns { T } @@ -22102,7 +23565,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderRadius(value: Length | BorderRadiuses | LocalizedBorderRadiuses): T; @@ -22126,22 +23590,24 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the border image of the component. + * Border image * - * @param { BorderImageOption } value - Border image or border gradient. + * @param { BorderImageOption } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ borderImage(value: BorderImageOption): T; /** - * Sets the outline attributes in one declaration. + * Outline + * width:Outline width;color:Outline color;radius:Outline radius;style:Outline style; * - * @param { OutlineOptions } value - Outline attributes. + * @param { OutlineOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22149,38 +23615,40 @@ declare class CommonMethod { * @since 11 */ /** - * Sets the outline attributes in one declaration. + * Outline + * width:Outline width;color:Outline color;radius:Outline radius;style:Outline style; * - * @param { OutlineOptions } value - Outline attributes. + * @param { OutlineOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ outline(value: OutlineOptions): T; /** - * Sets the outline attributes in one declaration. Compared to outline, - * this API supports the **undefined** type for the **options** parameter. + * Outline + * width:Outline width;color:Outline color;radius:Outline radius;style:Outline style; * - * @param { Optional } options - Outline attributes.
If **options** is **undefined**, - * the component reverts to its original style with no outline. + * @param { Optional } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ outline(options: Optional): T; /** - * Sets the style of the outline. + * Outline style + * The input parameter default value is OutlineStyle.SOLID * - * @param { OutlineStyle | EdgeOutlineStyles } value - Outline style. - *
Default value: **OutlineStyle.SOLID**. + * @param { OutlineStyle | EdgeOutlineStyles } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22188,42 +23656,38 @@ declare class CommonMethod { * @since 11 */ /** - * Sets the style of the outline. + * Outline style * - * @param { OutlineStyle | EdgeOutlineStyles } value - Outline style. - *
Default value: **OutlineStyle.SOLID**. + * @param { OutlineStyle | EdgeOutlineStyles } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ outlineStyle(value: OutlineStyle | EdgeOutlineStyles): T; /** - * Sets the style of the outline. Compared to outlineStyle, - * this API supports the **undefined** type for the **style** parameter. + * Outline style * - * @param { Optional } style - Outline style. - *
Default value: **OutlineStyle.SOLID**. - *
If **style** is **undefined**, the component reverts to its original - * style with no outline. + * @param { Optional } style * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ outlineStyle(style: Optional): T; /** - * Sets the thickness of the outline. + * Outline width + * The input parameter default value is 0 * - * @param { Dimension | EdgeOutlineWidths } value - Outline thickness. Percentage values are not supported. - *
Default value: **0**Outline thickness. Percentage values are not supported. - *
Default value: **0**. + * @param { Dimension | EdgeOutlineWidths } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22231,41 +23695,38 @@ declare class CommonMethod { * @since 11 */ /** - * Sets the thickness of the outline. + * Outline width * - * @param { Dimension | EdgeOutlineWidths } value - Outline thickness. Percentage values are not supported. - *
Default value: **0**Outline thickness. Percentage values are not supported. - *
Default value: **0**. + * @param { Dimension | EdgeOutlineWidths } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ outlineWidth(value: Dimension | EdgeOutlineWidths): T; /** - * Sets the thickness of the outline. Compared to outlineWidth, - * this API supports the **undefined** type for the **width** parameter. + * Outline width * - * @param { Optional } width - Outline thickness. Percentage values are not supported. - *
Default value: **0**. - *
If **width** is **undefined**, the component reverts to its original style with no outline width. + * @param { Optional } width * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ outlineWidth(width: Optional): T; /** - * Sets the color of the outline. + * Outline color + * The input parameter default value is Color.Black * - * @param { ResourceColor | EdgeColors } value - Outline color. - *
Default value: **Color.Black**. + * @param { ResourceColor | EdgeColors } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22273,43 +23734,38 @@ declare class CommonMethod { * @since 11 */ /** - * Sets the color of the outline. + * Outline color * - * @param { ResourceColor | EdgeColors | LocalizedEdgeColors } value - Outline color. - *
Default value: **Color.Black**. + * @param { ResourceColor | EdgeColors | LocalizedEdgeColors } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ outlineColor(value: ResourceColor | EdgeColors | LocalizedEdgeColors): T; /** - * Sets the color of the outline. Compared to outlineColor, - * this API supports the **undefined** type for the **color** parameter. + * Outline color * - * @param { Optional } color - Outline color. - *
Default value: **Color.Black**. - *
If **color** is **undefined**, the component reverts to its original style with the - * outline color of **Color.Black**. + * @param { Optional } color * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ outlineColor(color: Optional): T; /** - * Sets the radius of the outline corners. + * Outline radius + * The input parameter default value is 0 * - * @param { Dimension | OutlineRadiuses } value - adius of the outline corners. Percentage - * values are not supported. - *
Default value: **0**. - *
Maximum effective value: Component width/2 + outlineWidth or component height/2 + outlineWidth. + * @param { Dimension | OutlineRadiuses } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22317,78 +23773,68 @@ declare class CommonMethod { * @since 11 */ /** - * Sets the radius of the outline corners. + * Outline radius * - * @param { Dimension | OutlineRadiuses } value - adius of the outline corners. Percentage - * values are not supported. - *
Default value: **0**. - *
Maximum effective value: Component width/2 + outlineWidth or component height/2 + outlineWidth. + * @param { Dimension | OutlineRadiuses } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ outlineRadius(value: Dimension | OutlineRadiuses): T; /** - * Sets the radius of the outline corners. Compared to outlineRadius, this API - * supports the **undefined** type for the **radius** parameter. + * Outline radius * - * @param { Optional } radius - Radius of the outline corners. Percentage - * values are not supported. - *
Default value: **0**. - *
Maximum effective value: Component width/2 + outlineWidth or component height/2 + outlineWidth. - *
If **radius** is **undefined**, the component reverts to its original style with the - * outline corner radius of 0. + * @param { Optional } radius * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ outlineRadius(radius: Optional): T; /** - * Sets the foreground color of the component. - * If the component does not have a foreground color set, it inherits the color from its parent component by default. + * Provides the general foreground color capability of UI components, and assigns color values + * according to the characteristics of components. * - * @param { ResourceColor | ColoringStrategy } value - Foreground color. - *
The value can be a specific color or a coloring strategy. Property animations are supported. + * @param { ResourceColor | ColoringStrategy } value - indicates the color or color selection strategy * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Sets the foreground color of the component. - * If the component does not have a foreground color set, it inherits the color from its parent component by default. + * Provides the general foreground color capability of UI components, and assigns color values + * according to the characteristics of components. * - * @param { ResourceColor | ColoringStrategy } value - Foreground color. - *
The value can be a specific color or a coloring strategy. Property animations are supported. + * @param { ResourceColor | ColoringStrategy } value - indicates the color or color selection strategy * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ foregroundColor(value: ResourceColor | ColoringStrategy): T; /** - * Sets the foreground color of the component. - * If the component does not have a foreground color set, it inherits the color from its parent component by default. - * Compared to {@link foregroundColor}, this API supports the **undefined** type for the **color** parameter. + * Provides the general foreground color capability of UI components, and assigns color values + * according to the characteristics of components. * - * @param { Optional } color -Foreground color. - *
The value can be a specific color or a coloring strategy. Property animations are supported. - *
If **color** is set to **undefined**, the previous value is retained. + * @param { Optional } color - indicates the color or color selection strategy * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ foregroundColor(color: Optional): T; @@ -22420,41 +23866,31 @@ declare class CommonMethod { * @since 10 */ /** - * Called when a click event occurs. + * Trigger a click event when a click is clicked. * - *

NOTE: - *
Since API version 9, the following constraints apply when this API is used in service widgets: - *
Click events cannot be triggered if the finger is pressed for more than 800 ms. - *
Click events cannot be triggered if the finger moves more than 20 px after pressing down. - *

* @param { function } event * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onClick(event: (event: ClickEvent) => void): T; /** - * Trigger a click event when a click is clicked, move distance should smaller than distanceThreshold. + * Trigger a click event when a click is clicked, move distance should smaller than distanceThreshold. * - *

NOTE: - *
If the distanceThreshold value specified is less than or equal to 0 vp, it will be converted to the default value. - *
Since API version 9, the following constraints apply when this API is used in service widgets: - *
Click events cannot be triggered if the finger is pressed for more than 800 ms. - *
Click events cannot be triggered if the finger moves more than 20 px after pressing down. - *

* @param { function } event - this function callback executed when the click action is recognized * @param { number } distanceThreshold - the distance threshold of finger's movement when detecting a click action - * @default (2^31-1)vp * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onClick(event: Callback, distanceThreshold: number): T; @@ -22474,7 +23910,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onHover(event: (isHover: boolean, event: HoverEvent) => void): T; @@ -22486,7 +23923,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ onHoverMove(event: Callback): T; @@ -22498,23 +23936,11 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 - */ - onAccessibilityHover(callback: AccessibilityCallback): T; - - /** - * prompt for current component and descendants unable to handle accessibility hover event - * - * @param { AccessibilityTransparentCallback } callback - A callback instance used when current component and - * descendants not handled accessibility hover event - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - onAccessibilityHoverTransparent(callback: AccessibilityTransparentCallback): T; - + onAccessibilityHover(callback: AccessibilityCallback): T; + /** * Set hover effect. * @@ -22535,12 +23961,13 @@ declare class CommonMethod { /** * Set hover effect. * - * @param { HoverEffect } value - Hover effect of the component in hover state. + * @param { HoverEffect } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ hoverEffect(value: HoverEffect): T; @@ -22553,13 +23980,14 @@ declare class CommonMethod { * @since 8 */ /** - * Triggered when the component is clicked by a mouse button or the mouse pointer moves on the component. + * Trigger a mouse event. * * @param { function } event * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onMouse(event: (event: MouseEvent) => void): T; @@ -22581,14 +24009,15 @@ declare class CommonMethod { * @since 10 */ /** - * Invoked when a touch event is triggered. + * Trigger a touch event when touched. * * @param { function } event * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onTouch(event: (event: TouchEvent) => void): T; @@ -22617,19 +24046,21 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onKeyEvent(event: (event: KeyEvent) => void): T; /** * Keyboard input * - * @param { Callback } event - Callback for handling the key event. + * @param { Callback } event * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ onKeyEvent(event: Callback): T; @@ -22640,19 +24071,21 @@ declare class CommonMethod { * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onDigitalCrown(handler: Optional>): T; /** * Handle keyboard events before input method events. * - * @param { Callback } event - Callback for handling the key event. + * @param { Callback } event * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onKeyPreIme(event: Callback): T; @@ -22664,7 +24097,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ onKeyEventDispatch(event: Callback): T; @@ -22675,7 +24109,8 @@ declare class CommonMethod { * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ onFocusAxisEvent(event: Callback): T; @@ -22686,7 +24121,8 @@ declare class CommonMethod { * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onAxisEvent(event: Callback): T; @@ -22709,16 +24145,14 @@ declare class CommonMethod { */ /** * Set focusable. - * Components that have default interaction logic, such as Button and TextInput, are focusable by default. Other - * components, such as Text and Image, are not focusable by default. Only focusable components can trigger a focus - * event. - * + * * @param { boolean } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ focusable(value: boolean): T; @@ -22730,7 +24164,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ nextFocus(nextStep: Optional): T; @@ -22742,10 +24177,11 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ tabStop(isTabStop: boolean): T; - + /** * Trigger a event when got focus. * @@ -22771,12 +24207,13 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onFocus(event: () => void): T; /** - * Triggered when the current component loses focus. + * Trigger a event when lose focus. * * @param { function } event * @returns { T } @@ -22784,7 +24221,7 @@ declare class CommonMethod { * @since 8 */ /** - * Triggered when the current component loses focus. + * Trigger a event when lose focus. * * @param { function } event * @returns { T } @@ -22793,14 +24230,15 @@ declare class CommonMethod { * @since 10 */ /** - * Triggered when the current component loses focus. + * Trigger a event when lose focus. * * @param { function } event * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onBlur(event: () => void): T; @@ -22823,13 +24261,14 @@ declare class CommonMethod { */ /** * Set focus index by key tab. - * The tabIndex and focusScopeId cannot be used together. + * * @param { number } index * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ tabIndex(index: number): T; @@ -22853,12 +24292,13 @@ declare class CommonMethod { /** * Set default focused component when a page create. * - * @param { boolean } value - True means to set the component as the default focus, and the value false has no effect. + * @param { boolean } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ defaultFocus(value: boolean): T; @@ -22882,13 +24322,13 @@ declare class CommonMethod { /** * Set default focused component when focus on a focus group. * - * @param { boolean } value - True means the component is the default focus of the parent container, and - * false means the component is not the default focus of the parent container. + * @param { boolean } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ groupDefaultFocus(value: boolean): T; @@ -22912,24 +24352,26 @@ declare class CommonMethod { /** * Set a component focused when the component be touched. * - * @param { boolean } value - True means the component is focusable on touch, false means the component is not focusable on touch. + * @param { boolean } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ focusOnTouch(value: boolean): T; /** * Set the component's focusBox style. * - * @param { FocusBoxStyle } style - Component's focusBox style. + * @param { FocusBoxStyle } style * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ focusBox(style: FocusBoxStyle): T; @@ -22942,7 +24384,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ focusScopeId(id: string, isGroup?: boolean): T; /** @@ -22956,7 +24399,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ focusScopeId(id: string, isGroup?: boolean, arrowStepOut?: boolean): T; @@ -22969,7 +24413,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ focusScopePriority(scopeId: string, priority?: FocusPriority): T; @@ -23009,32 +24454,30 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ animation(value: AnimateParam): T; /** - * Transition effects for when the component is inserted to show and removed to hide - * as well as the callback for the end of the transition animation. + * Transition parameter * - * @param { TransitionOptions | TransitionEffect } value - transition options or transition effect + * @param { TransitionOptions | TransitionEffect } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Transition effects for when the component is inserted to show and removed to hide - * as well as the callback for the end of the transition animation. + * Transition parameter * - * @param { TransitionOptions | TransitionEffect } value - transition options or transition effect + * @param { TransitionOptions | TransitionEffect } value - transition options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Transition effects for when the component is inserted to show and removed to hide - * as well as the callback for the end of the transition animation. + * Transition parameter * * @param { TransitionOptions | TransitionEffect } value - transition options or transition effect * @returns { T } @@ -23044,8 +24487,7 @@ declare class CommonMethod { * @since 10 */ /** - * Transition effects for when the component is inserted to show and removed to hide - * as well as the callback for the end of the transition animation. + * Transition parameter * * @param { TransitionOptions | TransitionEffect } value - transition options or transition effect * @returns { T } @@ -23057,6 +24499,20 @@ declare class CommonMethod { */ transition(value: TransitionOptions | TransitionEffect): T; + /** + * Set the transition effect of component when it appears and disappears. + * + * @param { TransitionEffect } value - transition effect + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + transition(value: TransitionEffect): T; + /** * Set the transition effect of component when it appears and disappears. * @@ -23067,7 +24523,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ transition(effect: TransitionEffect, onFinish: Optional): T; @@ -23102,7 +24559,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ gesture(gesture: GestureType, mask?: GestureMask): T; @@ -23137,7 +24595,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ priorityGesture(gesture: GestureType, mask?: GestureMask): T; @@ -23172,7 +24631,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ parallelGesture(gesture: GestureType, mask?: GestureMask): T; @@ -23191,7 +24651,7 @@ declare class CommonMethod { * The larger the blurring radius, the more blurring the content. * If the value is 0, the content blurring effect is not blurring. * - * @param { number } value - value indicates radius of backdrop blur. + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form @@ -23202,7 +24662,7 @@ declare class CommonMethod { * The larger the blurring radius, the more blurring the content. * If the value is 0, the content blurring effect is not blurring. * - * @param { number } value - value indicates radius of backdrop blur. + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23221,7 +24681,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ blur(value: number, options?: BlurOptions): T; @@ -23254,12 +24715,13 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ blur(blurRadius: Optional, options?: BlurOptions, sysOptions?: SystemAdaptiveOptions): T; /** - * Applies a linear gradient foreground blur effect to the component. + * Adds the content linear gradient blurring effect for the current component. The input parameter is the blurring radius. * * @param { number } value - the blurring radius. * The larger the blurring radius, the more blurring the content, and if the value is 0, the content blurring effect is not blurring. @@ -23267,12 +24729,13 @@ declare class CommonMethod { * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ linearGradientBlur(value: number, options: LinearGradientBlurOptions): T; /** - * Applies a linear gradient foreground blur effect to the component. + * Adds the content linear gradient blurring effect for the current component. The input parameter is the blurring radius. * * @param { Optional } blurRadius - the blurring radius. * The larger the blurring radius, the more blurring the content, and if the value is 0, the content blurring effect is not blurring. @@ -23280,31 +24743,21 @@ declare class CommonMethod { * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ linearGradientBlur(blurRadius: Optional, options: Optional): T; /** - * Apply a motion blur effect to the component being scaled or moved. - * 1.Do not use this API in intra-component transitions, shared element transitions, - * implicit element transitions, or particle animations. Doing so may cause unexpected results. - * 2.The **radius** parameter of **motionBlur** must be set to **0** for the initial state. - * Otherwise, there may be unexpected results during a cold start. - * 3.This API must be used together with the **onFinish** parameter of **AnimateParam**. - * Its **radius** parameter must be set to **0** when the animation ends; otherwise, there may be unexpected results. - * 4.When using this API, do not frequently change the blur radius of the same component; - * otherwise, there may be unexpected results. - * For example, if you frequently click the image in the example, the blur effect may not work sometimes. - * 5.To avoid unexpected results, make sure the coordinates of - * the motion blur anchor point are the same as those of the animation scaling anchor point. - * 6.To avoid unexpected results, set the blur radius to a value less than 1. - * - * @param { MotionBlurOptions } value - Motion blur options. + * Component motion blur interface. + * + * @param { MotionBlurOptions } value - the attributes of motion blur. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ motionBlur(value: MotionBlurOptions):T; @@ -23316,52 +24769,38 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ motionBlur(motionBlur: Optional):T; /** - * Applies a brightness effect to the component. + * Adds a highlight effect to the current component. + * The input parameter is the highlight proportion. 0 indicates no highlight effect, and 1 indicates the maximum highlight proportion. + * The component is displayed as all white (percentage). * - * @param { number } value - Brightness of the component. The value **1** indicates no effects. - * The value **0** indicates the complete darkness. If the value is less than **1**, the brightness - * decreases. If the value is greater than **1**, the brightness increases. A larger value indicates - * a higher brightness. A brightness of 2 turns the component completely white. - *
Default value: **1.0**
Recommended value range: [0, 2]. - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. - *
**Widget capability**: This API can be used in ArkTS widgets since API version 9. + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Applies a brightness effect to the component. + * Adds a highlight effect to the current component. + * The input parameter is the highlight proportion. 0 indicates no highlight effect, and 1 indicates the maximum highlight proportion. + * The component is displayed as all white (percentage). * - * @param { number } value - Brightness of the component. The value **1** indicates no effects. - * The value **0** indicates the complete darkness. If the value is less than **1**, the brightness - * decreases. If the value is greater than **1**, the brightness increases. A larger value indicates - * a higher brightness. A brightness of 2 turns the component completely white. - *
Default value: **1.0**
Recommended value range: [0, 2]. - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. - *
**Widget capability**: This API can be used in ArkTS widgets since API version 9. + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Applies a brightness effect to the component. + * Adds a highlight effect to the current component. + * The input parameter is the highlight proportion. 0 indicates no highlight effect, and 1 indicates the maximum highlight proportion. + * The component is displayed as all white (percentage). * - * @param { number } value - Brightness of the component. The value **1** indicates no effects. - * The value **0** indicates the complete darkness. If the value is less than **1**, the brightness - * decreases. If the value is greater than **1**, the brightness increases. A larger value indicates - * a higher brightness. A brightness of 2 turns the component completely white. - *
Default value: **1.0**
Recommended value range: [0, 2]. - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. - *
**Widget capability**: This API can be used in ArkTS widgets since API version 9. + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23369,93 +24808,61 @@ declare class CommonMethod { * @since 10 */ /** - * Applies a brightness effect to the component. + * Adds a highlight effect to the current component. + * The input parameter is the highlight proportion. 0 indicates no highlight effect, and 1 indicates the maximum highlight proportion. + * The component is displayed as all white (percentage). * - * @param { number } value - Brightness of the component. The value **1** indicates no effects. - * The value **0** indicates the complete darkness. If the value is less than **1**, the brightness - * decreases. If the value is greater than **1**, the brightness increases. A larger value indicates - * a higher brightness. A brightness of 2 turns the component completely white. - *
Default value: **1.0**
Recommended value range: [0, 2]. - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. - *
**Widget capability**: This API can be used in ArkTS widgets since API version 9. + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ brightness(value: number): T; /** - * Applies a brightness effect to the component. Compared to brightness, this - * API supports the **undefined** type for the **brightness** parameter. + * Adds a highlight effect to the current component. + * The input parameter is the highlight proportion. 0 indicates no highlight effect, and 1 indicates the maximum highlight proportion. + * The component is displayed as all white (percentage). * - * @param { Optional } brightness - Brightness of the component. The value **1** indicates - * no effects. The value **0** indicates the complete darkness. If the value is less than **1**, - * the brightness decreases. If the value is greater than **1**, the brightness increases. A larger - * value indicates a higher brightness. A brightness of 2 turns the component completely white. - *
Default value: **1.0**. - *
Recommended value range: [0, 2]. - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. - *
**Widget capability**: This API can be used in ArkTS widgets since API version 16. - *
If **brightness** is **undefined**, the brightness level is reset to **0**. + * @param { Optional } brightness * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ brightness(brightness: Optional): T; /** - * Applies a contrast effect to the component. + * Adds a contrast effect to the current component. The input parameter is the contrast value. + * A larger contrast value indicates a sharper image. When the contrast value is 0, the image becomes gray. (%) * - * @param { number } value - Contrast of the component. The input parameter is a - * contrast value. If the value is **1**, the source image is displayed. If the - * value is greater than 1, a larger value indicates a higher contrast and a clearer - * image. If the value is less than 1, a smaller value indicates a lower contrast is. - * If the value is **0**, the image becomes all gray. The unit is percentage. - *
Default value: **1.0**. - *
Recommended value range: [0, 10). - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Applies a contrast effect to the component. + * Adds a contrast effect to the current component. The input parameter is the contrast value. + * A larger contrast value indicates a sharper image. When the contrast value is 0, the image becomes gray. (%) * - * @param { number } value - Contrast of the component. The input parameter is a - * contrast value. If the value is **1**, the source image is displayed. If the - * value is greater than 1, a larger value indicates a higher contrast and a clearer - * image. If the value is less than 1, a smaller value indicates a lower contrast is. - * If the value is **0**, the image becomes all gray. The unit is percentage. - *
Default value: **1.0**. - *
Recommended value range: [0, 10). - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Applies a contrast effect to the component. + * Adds a contrast effect to the current component. The input parameter is the contrast value. + * A larger contrast value indicates a sharper image. When the contrast value is 0, the image becomes gray. (%) * - * @param { number } value - Contrast of the component. The input parameter is a - * contrast value. If the value is **1**, the source image is displayed. If the - * value is greater than 1, a larger value indicates a higher contrast and a clearer - * image. If the value is less than 1, a smaller value indicates a lower contrast is. - * If the value is **0**, the image becomes all gray. The unit is percentage. - *
Default value: **1.0**. - *
Recommended value range: [0, 10). - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23463,97 +24870,62 @@ declare class CommonMethod { * @since 10 */ /** - * Applies a contrast effect to the component. + * Adds a contrast effect to the current component. The input parameter is the contrast value. + * A larger contrast value indicates a sharper image. When the contrast value is 0, the image becomes gray. (%) * - * @param { number } value - Contrast of the component. The input parameter is a - * contrast value. If the value is **1**, the source image is displayed. If the - * value is greater than 1, a larger value indicates a higher contrast and a clearer - * image. If the value is less than 1, a smaller value indicates a lower contrast is. - * If the value is **0**, the image becomes all gray. The unit is percentage. - *
Default value: **1.0**. - *
Recommended value range: [0, 10). - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ contrast(value: number): T; /** - * Applies a contrast effect to the component. Compared to contrast, - * this API supports the **undefined** type for the **contrast** parameter. + * Adds a contrast effect to the current component. The input parameter is the contrast value. + * A larger contrast value indicates a sharper image. When the contrast value is 0, the image becomes gray. (%) * - * @param { Optional } contrast - Contrast of the component. The input parameter - * is a contrast value. If the value is **1**, the source image is displayed. If the value - * is greater than 1, a larger value indicates a higher contrast and a clearer image. If the - * value is less than 1, a smaller value indicates a lower contrast is. If the value is **0**, - * the image becomes all gray. The unit is percentage. - *
Default value: **1.0**. - *
Recommended value range: [0, 10). - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. - *
If **contrast** is **undefined**, the contrast effect is reset to **1.0**. + * @param { Optional } contrast * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ contrast(contrast: Optional): T; /** - * Applies a grayscale effect to the component. - * - * @param { number } value - Grayscale conversion ratio of the component. - *
If the value is **1.0**, the component is completely converted to grayscale. - *
If the value is **0.0**, the component remains unchanged. Between **0** and **1**, - * the value applies a linear multiplier on the grayscale effect. The unit is percentage. - *
Default value: **0.0**. - *
Value range: [0.0, 1.0]. - *

**NOTE**: - *
A value less than **0.0** evaluates to the value **0.0**. - *
A value greater than **1.0** evaluates to the value **1.0**. - *

+ * Adds a grayscale effect to the current component. + * The value is the gray scale conversion ratio. If the input parameter is 1.0, the gray scale image is completely converted to the gray scale image. If the input parameter is 0.0, the image does not change. + * If the input parameter is between 0.0 and 1.0, the effect changes. (Percentage) + * + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Applies a grayscale effect to the component. - * - * @param { number } value - Grayscale conversion ratio of the component. - *
If the value is **1.0**, the component is completely converted to grayscale. - *
If the value is **0.0**, the component remains unchanged. Between **0** and **1**, - * the value applies a linear multiplier on the grayscale effect. The unit is percentage. - *
Default value: **0.0**. - *
Value range: [0.0, 1.0]. - *

**NOTE**: - *
A value less than **0.0** evaluates to the value **0.0**. - *
A value greater than **1.0** evaluates to the value **1.0**. - *

+ * Adds a grayscale effect to the current component. + * The value is the gray scale conversion ratio. If the input parameter is 1.0, the gray scale image is completely converted to the gray scale image. If the input parameter is 0.0, the image does not change. + * If the input parameter is between 0.0 and 1.0, the effect changes. (Percentage) + * + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Applies a grayscale effect to the component. - * - * @param { number } value - Grayscale conversion ratio of the component. - *
If the value is **1.0**, the component is completely converted to grayscale. - *
If the value is **0.0**, the component remains unchanged. Between **0** and **1**, - * the value applies a linear multiplier on the grayscale effect. The unit is percentage. - *
Default value: **0.0**. - *
Value range: [0.0, 1.0]. - *

**NOTE**: - *
A value less than **0.0** evaluates to the value **0.0**. - *
A value greater than **1.0** evaluates to the value **1.0**. - *

+ * Adds a grayscale effect to the current component. + * The value is the gray scale conversion ratio. If the input parameter is 1.0, the gray scale image is completely converted to the gray scale image. If the input parameter is 0.0, the image does not change. + * If the input parameter is between 0.0 and 1.0, the effect changes. (Percentage) + * + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23561,71 +24933,58 @@ declare class CommonMethod { * @since 10 */ /** - * Applies a grayscale effect to the component. - * - * @param { number } value - Grayscale conversion ratio of the component. - *
If the value is **1.0**, the component is completely converted to grayscale. - *
If the value is **0.0**, the component remains unchanged. Between **0** and **1**, - *
the value applies a linear multiplier on the grayscale effect. The unit is percentage. - *
Default value: **0.0**. - *
Value range: [0.0, 1.0]. - *

**NOTE**: - *
A value less than **0.0** evaluates to the value **0.0**. - *
A value greater than **1.0** evaluates to the value **1.0**. - *

+ * Adds a grayscale effect to the current component. + * The value is the gray scale conversion ratio. If the input parameter is 1.0, the gray scale image is completely converted to the gray scale image. If the input parameter is 0.0, the image does not change. + * If the input parameter is between 0.0 and 1.0, the effect changes. (Percentage) + * + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ grayscale(value: number): T; /** - * Applies a grayscale effect to the component. - * Compared to grayscale, this API supports the **undefined** type for the **grayscale** parameter. + * Adds a grayscale effect to the current component. + * The value is the gray scale conversion ratio. If the input parameter is 1.0, the gray scale image is completely converted to the gray scale image. If the input parameter is 0.0, the image does not change. + * If the input parameter is between 0.0 and 1.0, the effect changes. (Percentage) * - * @param { Optional } grayscale - Grayscale conversion ratio of the component. - *
If the value is **1.0**, the component is completely converted to grayscale. - *
If the value is **0.0**, the component remains unchanged. Between **0** and **1**, - *
the value applies a linear multiplier on the grayscale effect. The unit is percentage. - *
Default value: **0.0**. - *
Value range: [0.0, 1.0]. - *

**NOTE** - *
A value less than **0.0** evaluates to the value **0.0**. - *
A value greater than **1.0** evaluates to the value **1.0**. - *

+ * @param { Optional } grayscale * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ grayscale(grayscale: Optional): T; /** - * Applies a color blend effect to the component. + * Adds a color overlay effect for the current component. The input parameter is the superimposed color. * - * @param { Color | string | Resource } value - Color to blend with the component. + * @param { Color | string | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Applies a color blend effect to the component. + * Adds a color overlay effect for the current component. The input parameter is the superimposed color. * - * @param { Color | string | Resource } value - Color to blend with the component. + * @param { Color | string | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Applies a color blend effect to the component. + * Adds a color overlay effect for the current component. The input parameter is the superimposed color. * - * @param { Color | string | Resource } value - Color to blend with the component. + * @param { Color | string | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23633,78 +24992,63 @@ declare class CommonMethod { * @since 10 */ /** - * Applies a color blend effect to the component. + * Adds a color overlay effect for the current component. The input parameter is the superimposed color. * - * @param { Color | string | Resource } value - Color to blend with the component. + * @param { Color | string | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ colorBlend(value: Color | string | Resource): T; /** - * Applies a color blend effect to the component. - * Compared to {@link colorBlend}, this API supports the **undefined** type for the **color** parameter. + * Adds a color overlay effect for the current component. The input parameter is the superimposed color. * - * @param { Optional } color - Color to blend with the component. - *
If **color** is **undefined**, the component reverts to its original effect with no color blending. + * @param { Optional } color * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ colorBlend(color: Optional): T; /** - * Applies a saturation effect to the component. + * Adds a saturation effect to the current component. + * The saturation is the ratio of the color-containing component to the achromatic component (gray). + * The larger the color-containing component, the greater the saturation. + * The larger the achromatic component, the smaller the saturation. (Percentage) * - * @param { number } value - Saturation of the component. The saturation is the ratio of the - * chromatic component to the achromatic component (gray) in a color. If the value is **1**, - * the original image is displayed. If the value is greater than **1**, a higher percentage of - * the chromatic component indicates a higher saturation. If the value is less than **1**, a higher - * percentage of the achromatic component indicates a lower saturation. The unit is percentage. - *
Default value: **1.0**. - *
Recommended value range: [0, 50). - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Applies a saturation effect to the component. + * Adds a saturation effect to the current component. + * The saturation is the ratio of the color-containing component to the achromatic component (gray). + * The larger the color-containing component, the greater the saturation. + * The larger the achromatic component, the smaller the saturation. (Percentage) * - * @param { number } value - Saturation of the component. The saturation is the ratio of the - * chromatic component to the achromatic component (gray) in a color. If the value is **1**, - * the original image is displayed. If the value is greater than **1**, a higher percentage of - * the chromatic component indicates a higher saturation. If the value is less than **1**, a higher - * percentage of the achromatic component indicates a lower saturation. The unit is percentage. - *
Default value: **1.0**. - *
Recommended value range: [0, 50). - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Applies a saturation effect to the component. + * Adds a saturation effect to the current component. + * The saturation is the ratio of the color-containing component to the achromatic component (gray). + * The larger the color-containing component, the greater the saturation. + * The larger the achromatic component, the smaller the saturation. (Percentage) * - * @param { number } value - Saturation of the component. The saturation is the ratio of the - * chromatic component to the achromatic component (gray) in a color. If the value is **1**, - * the original image is displayed. If the value is greater than **1**, a higher percentage of - * the chromatic component indicates a higher saturation. If the value is less than **1**, a higher - * percentage of the achromatic component indicates a lower saturation. The unit is percentage. - *
Default value: **1.0**. - *
Recommended value range: [0, 50). - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23712,76 +25056,63 @@ declare class CommonMethod { * @since 10 */ /** - * Applies a saturation effect to the component. + * Adds a saturation effect to the current component. + * The saturation is the ratio of the color-containing component to the achromatic component (gray). + * The larger the color-containing component, the greater the saturation. + * The larger the achromatic component, the smaller the saturation. (Percentage) * - * @param { number } value - Saturation of the component. The saturation is the ratio of the - * chromatic component to the achromatic component (gray) in a color. If the value is **1**, - * the original image is displayed. If the value is greater than **1**, a higher percentage of - * the chromatic component indicates a higher saturation. If the value is less than **1**, a higher - * percentage of the achromatic component indicates a lower saturation. The unit is percentage. - *
Default value: **1.0**. - *
Recommended value range: [0, 50). - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ saturate(value: number): T; /** - * Applies a saturation effect to the component. Compared to saturate, this API supports - * the **undefined** type for the **saturate** parameter. + * Adds a saturation effect to the current component. + * The saturation is the ratio of the color-containing component to the achromatic component (gray). + * The larger the color-containing component, the greater the saturation. + * The larger the achromatic component, the smaller the saturation. (Percentage) * - * @param { Optional } saturate - Saturation of the component. The saturation is the ratio of - * the chromatic component to the achromatic component (gray) in a color. If the value is **1**, the - * original image is displayed. If the value is greater than **1**, a higher percentage of the chromatic - * component indicates a higher saturation. If the value is less than **1**, a higher percentage of the - * achromatic component indicates a lower saturation. The unit is percentage. - *
Default value: **1.0**. - *
Recommended value range: [0, 50). - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. - *
If **saturate** is **undefined**, the saturation effect is reset to **1.0**. + * @param { Optional } saturate * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ saturate(saturate: Optional): T; /** - * Sepia conversion ratio of the component. + * Converts the image to sepia. Value defines the scale of the conversion. + * A value of 1 is completely sepia, and a value of 0 does not change the image. (Percentage) * - * @param { number } value - Sepia conversion ratio of the component. If the value is **1**, the image - * is completely sepia. If the value is **0**, the component remains unchanged. The unit is percentage. - *
Value range: [0, +∞). + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Sepia conversion ratio of the component. + * Converts the image to sepia. Value defines the scale of the conversion. + * A value of 1 is completely sepia, and a value of 0 does not change the image. (Percentage) * - * @param { number } value - Sepia conversion ratio of the component. If the value is **1**, the image - * is completely sepia. If the value is **0**, the component remains unchanged. The unit is percentage. - *
Value range: [0, +∞). + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Sepia conversion ratio of the component. + * Converts the image to sepia. Value defines the scale of the conversion. + * A value of 1 is completely sepia, and a value of 0 does not change the image. (Percentage) * - * @param { number } value - Sepia conversion ratio of the component. If the value is **1**, the image - * is completely sepia. If the value is **0**, the component remains unchanged. The unit is percentage. - *
Value range: [0, +∞). + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23789,34 +25120,32 @@ declare class CommonMethod { * @since 10 */ /** - * Sepia conversion ratio of the component. + * Converts the image to sepia. Value defines the scale of the conversion. + * A value of 1 is completely sepia, and a value of 0 does not change the image. (Percentage) * - * @param { number } value - Sepia conversion ratio of the component. If the value is **1**, the image - * is completely sepia. If the value is **0**, the component remains unchanged. The unit is percentage. - *
Value range: [0, +∞). + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ sepia(value: number): T; /** - * Sepia conversion ratio of the component. Compared to sepia, - * this API supports the **undefined** type for the **sepia** parameter. + * Converts the image to sepia. Value defines the scale of the conversion. + * A value of 1 is completely sepia, and a value of 0 does not change the image. (Percentage) * - * @param { Optional } sepia - Sepia conversion ratio of the component. If the value is **1**, the - * image is completely sepia. If the value is **0**, the component remains unchanged. The unit is percentage. - *
If **sepia** is **undefined**, the component reverts to its original effect. - *
Value range: [0, +∞). + * @param { Optional } sepia * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ sepia(sepia: Optional): T; @@ -23860,74 +25189,64 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ invert(value: number | InvertOptions): T; /** - * Inverts the image. Compared to invert, - * this API supports the **undefined** type for the **options** parameter. + * Invert the input image. Value defines the scale of the conversion. 100% of the value is a complete reversal. + * A value of 0% does not change the image. (Percentage) * - * @param { Optional } options - How the image is inverted. - *
If the value is of the number type, - *
it indicates the inversion ratio. If the value is **1**, - *
the image is completely inverted. If the value is **0**, the image remains unchanged. - *
The unit is percentage.
Value range: [0, 1]
A value less than 0 evaluates to the value **0**. - *
If the value is of the InvertOptions type, the grayscale value of the background color is compared - *
with the threshold range. If the grayscale value is greater than the upper bound of the threshold range, - *
the **high** value is used. If the grayscale value is less than the lower bound of the threshold range, - *
the **low** value is used. If the grayscale value is within the threshold range, - *
the background color changes linearly from high to low.
If **options** is **undefined**, - *
the component reverts to its original effect. + * @param { Optional } options - value indicates the scale of the conversion or the options of invert. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ invert(options: Optional): T; /** - * Applies a system bar effect to the component, which means to invert colors based on the background and add a blur. + * Sets system bar effect to the component. * * @returns { T } return the component attribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ systemBarEffect(): T; /** - * Rotates the hue of the component. + * Adds the hue rotation effect to the current component. + * The input parameter is the rotation angle. When the input parameter is 0deg, the image does not change (the default value is 0deg), and the input parameter does not have a maximum value. + * If the value exceeds 360deg, the image is circled again. * - * @param { number | string } value - Hue rotation angle of the component. - *
A rotation of 360 degrees leaves the color unchanged. - *
A rotation of 180 degrees and then -180 degrees also leaves the color unchanged. - *
When the data type is number, the value **90** is equivalent to **'90deg'**. + * @param { number | string } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Rotates the hue of the component. + * Adds the hue rotation effect to the current component. + * The input parameter is the rotation angle. When the input parameter is 0deg, the image does not change (the default value is 0deg), and the input parameter does not have a maximum value. + * If the value exceeds 360deg, the image is circled again. * - * @param { number | string } value - Hue rotation angle of the component. - *
A rotation of 360 degrees leaves the color unchanged. - *
A rotation of 180 degrees and then -180 degrees also leaves the color unchanged. - *
When the data type is number, the value **90** is equivalent to **'90deg'**. + * @param { number | string } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Rotates the hue of the component. + * Adds the hue rotation effect to the current component. + * The input parameter is the rotation angle. When the input parameter is 0deg, the image does not change (the default value is 0deg), and the input parameter does not have a maximum value. + * If the value exceeds 360deg, the image is circled again. * - * @param { number | string } value - Hue rotation angle of the component. - *
A rotation of 360 degrees leaves the color unchanged. - *
A rotation of 180 degrees and then -180 degrees also leaves the color unchanged. - *
When the data type is number, the value **90** is equivalent to **'90deg'**. + * @param { number | string } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23935,24 +25254,25 @@ declare class CommonMethod { * @since 10 */ /** - * Rotates the hue of the component. + * Adds the hue rotation effect to the current component. + * The input parameter is the rotation angle. When the input parameter is 0deg, the image does not change (the default value is 0deg), and the input parameter does not have a maximum value. + * If the value exceeds 360deg, the image is circled again. * - * @param { number | string } value - Hue rotation angle of the component. - *
A rotation of 360 degrees leaves the color unchanged. - *
A rotation of 180 degrees and then -180 degrees also leaves the color unchanged. - *
When the data type is number, the value **90** is equivalent to **'90deg'**. + * @param { number | string } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ hueRotate(value: number | string): T; /** - * Rotates the hue of the component. Compared to hueRotate, - * this API supports the **undefined** type for the **rotation** parameter. + * Adds the hue rotation effect to the current component. + * The input parameter is the rotation angle. When the input parameter is 0deg, the image does not change (the default value is 0deg), and the input parameter does not have a maximum value. + * If the value exceeds 360deg, the image is circled again. * * @param { Optional } rotation * @returns { T } @@ -23960,23 +25280,15 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ hueRotate(rotation: Optional): T; /** - * Sets whether to draw shadows of child nodes in the component at the same layer, - * so that the shadows of elements at the same layer overlap. + * Add an attribute to control whether the shadows of the child nodes overlap each other. * - * @param { boolean } value - Whether to draw shadows of child nodes in the component - * at the same layer, so that the shadows of elements at the same layer overlap. - *
Default value: **false**. - *
**NOTE** - *
1. When this feature is disabled (default), if the shadow radius of a child node - * is large, the shadows of the child nodes may overlap. This overlap issue does not occur - * when the feature is enabled. - *
2. Avoid nesting **useShadowBatching**. When used in nested mode, **useShadowBatching** - * takes effect for the current child node only and cannot be recursively used. + * @param { boolean } value - true means the shadows of the child nodes overlap each other effect and drawn in batches. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23984,104 +25296,74 @@ declare class CommonMethod { * @since 11 */ /** - * Sets whether to draw shadows of child nodes in the component at the same layer, - * so that the shadows of elements at the same layer overlap. + * Add an attribute to control whether the shadows of the child nodes overlap each other. * - * @param { boolean } value - Whether to draw shadows of child nodes in the component - * at the same layer, so that the shadows of elements at the same layer overlap. - *
Default value: **false**. - *
**NOTE** - *
1. When this feature is disabled (default), if the shadow radius of a child node - * is large, the shadows of the child nodes may overlap. This overlap issue does not occur - * when the feature is enabled. - *
2. Avoid nesting **useShadowBatching**. When used in nested mode, **useShadowBatching** - * takes effect for the current child node only and cannot be recursively used. + * @param { boolean } value - true means the shadows of the child nodes overlap each other effect and drawn in batches. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ useShadowBatching(value: boolean): T; /** - * Sets whether to draw shadows of child nodes in the component at the same layer, - * so that the shadows of elements at the same layer overlap. Compared to - * useShadowBatching11+, this API supports the - * **undefined** type for the **use** parameter. + * Add an attribute to control whether the shadows of the child nodes overlap each other. * - * @param { Optional } use - Whether to draw shadows of child nodes in the - * component at the same layer, so that the shadows of elements at the same layer overlap. - *
Default value: **false**. - *
**NOTE** - *
1. When this feature is disabled (default), if the shadow radius of a child node is large, - * the shadows of the child nodes may overlap. This overlap issue does not occur when the feature - * is enabled.
2. Avoid nesting **useShadowBatching**. When used in nested mode, - * **useShadowBatching** takes effect for the current child node only and cannot be recursively used. - *
If **use** is **undefined**, the component reverts to its original effect of not using - * shadow overlapping. + * @param { Optional } use - true means the shadows of the child nodes overlap each other effect and drawn in batches. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ useShadowBatching(use: Optional): T; /** - * Specifies whether to apply the effect defined by the parent - * [EffectComponent](ts-container-effectcomponent-sys.md) or the window. - * - * @param { Optional } useEffect - Whether to apply the effect defined by the parent - * **EffectComponent** or the window. - *
The value **true** means to apply the effect defined by the parent **EffectComponent** - * or the window. - *
Default value: **false**. - * @param { EffectType } [effectType] - Type of effect to apply to the component, which is defined by - * the parent **EffectComponent** or the window. - *
Default value: **EffectType.DEFAULT**. + * Sets whether the component should apply the effects template defined by the parent effectComponent or window. + * If multiple parent effectComponents are found, the nearest one will be used. + * If no parent effectComponent is found, this method has no effect. + * + * @param { boolean } useEffect - true means the component should apply the effects template defined by the parent effectComponent or window. + * @param { EffectType } effectType - the effect type of the effects template, defined by the parent effectComponent or window. * @returns { T } return the component attribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ useEffect(useEffect: boolean, effectType: EffectType): T; /** - * Specifies whether to apply the effect defined by the parent - * EffectComponent or - * the window. Compared to useEffect14+, - * this API supports the **undefined** type for the **useEffect** parameter. - * - * @param { Optional } useEffect - Whether to apply the effect defined by - * the parent **EffectComponent** or the window. - *
The value **true** means to apply the effect defined by the parent - * **EffectComponent** or the window. - *
Default value: **false**. - *
If **useEffect** is set to **undefined**, the previous value is retained. - * @param { EffectType } [effectType] - Type of effect to apply to the component, which - * is defined by the parent **EffectComponent** or the window. - *
Default value: **EffectType.DEFAULT**. + * Sets whether the component should apply the effects template defined by the parent effectComponent or window. + * If multiple parent effectComponents are found, the nearest one will be used. + * If no parent effectComponent is found, this method has no effect. + * + * @param { Optional } useEffect - true means the component should apply the effects template defined by the parent effectComponent or window. + * @param { EffectType } [effectType] - the effect type of the effects template, defined by the parent effectComponent or window. * @returns { T } return the component attribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ useEffect(useEffect: Optional, effectType?: EffectType): T; /** - * Specifies whether to combine the drawing of special effects, such as background blur. + * Sets whether the component should apply the effects template defined by the parent effectComponent. + * If multiple parent effectComponents are found, the nearest one will be used. + * If no parent effectComponent is found, this method has no effect. * - * @param { boolean } value - Whether the component inherits the special effect settings of the - * **EffectComponent** component.
The value **true** means that the component inherits the - * special effect settings of the **EffectComponent** component, and **false** means the opposite. - *
Default value: **false**. + * @param { boolean } value - true means the component should apply the effects template. * @returns { T } return the component attribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ useEffect(value: boolean): T; @@ -24149,6 +25431,7 @@ declare class CommonMethod { */ backdropBlur(radius: Optional, options?: BlurOptions): T; + /** * Adds the background blur effect for the current component. The input parameter is the blur radius. * The larger the blur radius, the more blurred the background. If the value is 0, the background blur is not blurred. @@ -24161,35 +25444,24 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backdropBlur(radius: Optional, options?: BlurOptions, sysOptions?: SystemAdaptiveOptions): T; /** - * Sets whether the component and its child components are rendered off - * the screen as a whole before being blended with its parent. + * Composite the contents of this view and its children into an offscreen cache before display in the screen. * - * @param { boolean } value - Whether the component and its child components are rendered - * off the screen as a whole before being blended with its parent. If the opacity of the - * component is not 1, the drawing effect may vary depending on the value. - *
Default value: **false**. - *
The value **true** means the component and its child components are rendered off - * the screen as a whole, and **false** means the opposite. + * @param { boolean } value - if this view and its children need to composite into an offscreen cache. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Sets whether the component and its child components are rendered off - * the screen as a whole before being blended with its parent. + * Composite the contents of this view and its children into an offscreen cache before display in the screen. * - * @param { boolean } value - Whether the component and its child components are rendered - * off the screen as a whole before being blended with its parent. If the opacity of the - * component is not 1, the drawing effect may vary depending on the value. - *
Default value: **false**. - *
The value **true** means the component and its child components are rendered off - * the screen as a whole, and **false** means the opposite. + * @param { boolean } value - if this view and its children need to composite into an offscreen cache. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -24197,104 +25469,86 @@ declare class CommonMethod { * @since 11 */ /** - * Sets whether the component and its child components are rendered off - * the screen as a whole before being blended with its parent. + * Composite the contents of this view and its children into an offscreen cache before display in the screen. * - * @param { boolean } value - Whether the component and its child components are rendered - * off the screen as a whole before being blended with its parent. If the opacity of the - * component is not 1, the drawing effect may vary depending on the value. - *
Default value: **false**. - *
The value **true** means the component and its child components are rendered off - * the screen as a whole, and **false** means the opposite. + * @param { boolean } value - if this view and its children need to composite into an offscreen cache. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ renderGroup(value: boolean): T; /** - * Sets whether the component and its child components are rendered off the screen as a whole - * before being blended with its parent. Compared to renderGroup10+, - * this API supports the **undefined** type for the **isGroup** parameter. + * Composite the contents of this view and its children into an offscreen cache before display in the screen. * - * @param { Optional } isGroup - Whether the component and its child components are rendered - * off the screen as a whole before being blended with its parent. If the opacity of the component is - * not 1, the drawing effect may vary depending on the value. - *
Default value: **false**. - *
If **isGroup** is **undefined**, the component reverts to its original effect of not enabling - * offscreen rendering as a whole before blending with the parent component. + * @param { Optional } isGroup - if this view and its children need to composite into an offscreen cache. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ renderGroup(isGroup: Optional): T; /** - * Sets whether to freeze the component. When frozen, the component and its children are cached for - * repeated drawing after offscreen rendering, without updating internal attributes. + * Sets whether the component should remain stationary, reusing the results of the current frame's off-screen rendering. + * If the input parameter is true, the component and subcomponent changes do not affect the display. * - * @param { boolean } value - Whether to freeze the component. When frozen, the component and its children - * are cached for repeated drawing after offscreen rendering, without updating internal attributes. If the - * opacity of the component is not 1, the drawing effect may vary depending on the value. - *
Default value: **false**. - *
**true**: Freeze the component. - *
**false**: Do not freeze the component. + * @param { boolean } value - true means the component should remain stationary. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ freeze(value: boolean): T; /** - * Sets whether to freeze the component. When frozen, the component and its children are cached for repeated - * drawing after offscreen rendering, without updating internal attributes. Compared to freeze, - * this API supports the **undefined** type for the **freeze** parameter. + * Sets whether the component should remain stationary, reusing the results of the current frame's off-screen rendering. + * If the input parameter is true, the component and subcomponent changes do not affect the display. * - * @param { Optional } freeze - Whether to freeze the component. When frozen, the component and its - * children are cached for repeated drawing after offscreen rendering, without updating internal attributes. - * If the opacity of the component is not 1, the drawing effect may vary depending on the value. - *
Default value: **false**. - *
**true**: Freeze the component. - *
**false**: Do not freeze the component. - *
If **freeze** is set to **undefined**, the previous value is retained. + * @param { Optional } freeze - true means the component should remain stationary. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ freeze(freeze: Optional): T; /** - * Sets the translation effect for page transitions. + * Sets the translation effect during page transition. + * The value is the start point of entry and end point of exit. + * When this parameter is set together with slide, slide takes effect by default. * - * @param { TranslateOptions } value - Translation effect for page transitions - *
specifying the start value for entrance and the end value for exit. default:{x:0,y:0,z:0} + * @param { TranslateOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Sets the translation effect for page transitions. + * Sets the translation effect during page transition. + * The value is the start point of entry and end point of exit. + * When this parameter is set together with slide, slide takes effect by default. * - * @param { TranslateOptions } value - Translation effect for page transitions - *
specifying the start value for entrance and the end value for exit. default:{x:0,y:0,z:0} + * @param { TranslateOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Sets the translation effect for page transitions. + * Sets the translation effect during page transition. + * The value is the start point of entry and end point of exit. + * When this parameter is set together with slide, slide takes effect by default. * - * @param { TranslateOptions } value - Translation effect for page transitions - *
specifying the start value for entrance and the end value for exit. default:{x:0,y:0,z:0} + * @param { TranslateOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -24302,43 +25556,37 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the translation effect for page transitions. + * Set component translation. * - * @param { TranslateOptions } value - Translation effect for page transitions - *
specifying the start value for entrance and the end value for exit. default:{x:0,y:0,z:0} + * @param { TranslateOptions } value default:{x:0,y:0,z:0} * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ translate(value: TranslateOptions): T; /** - * Translates the component. - * Compared to {@link translate}, this API supports the **undefined** type for the **translate** parameter. - + * Set component translation. * - * @param { Optional } translate - How the component is translated in the coordinate - *
system (as shown below) with the upper left corner of the component as the coordinate origin. - *
Values of **x**, **y**, and **z** indicate the translation distance along the respective axis. - *
default:{x:0,y:0,z:0} + * @param { Optional } translate default:{x:0,y:0,z:0} * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ translate(translate: Optional): T; /** * Sets the zoom effect during page transition. The value is the start point of entry and end point of exit. * - * @param { ScaleOptions } value - Scale ratio along the x-, y-, and z-axis. The default value is **1**. - *
**centerX** and **centerY** are used to set the scale center point. - *
default:{x:1,y:1,z:1,centerX:'50%',centerY:'50%'} + * @param { ScaleOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 @@ -24346,9 +25594,7 @@ declare class CommonMethod { /** * Sets the zoom effect during page transition. The value is the start point of entry and end point of exit. * - * @param { ScaleOptions } value - Scale ratio along the x-, y-, and z-axis. The default value is **1**. - *
**centerX** and **centerY** are used to set the scale center point. - *
default:{x:1,y:1,z:1,centerX:'50%',centerY:'50%'} + * @param { ScaleOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form @@ -24357,9 +25603,7 @@ declare class CommonMethod { /** * Sets the zoom effect during page transition. The value is the start point of entry and end point of exit. * - * @param { ScaleOptions } value - Scale ratio along the x-, y-, and z-axis. The default value is **1**. - *
**centerX** and **centerY** are used to set the scale center point. - *
default:{x:1,y:1,z:1,centerX:'50%',centerY:'50%'} + * @param { ScaleOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -24367,34 +25611,30 @@ declare class CommonMethod { * @since 10 */ /** - * Scales the component. + * Set component scaling. * - * @param { ScaleOptions } value - Scale ratio along the x-, y-, and z-axis. The default value is **1**. - *
**centerX** and **centerY** are used to set the scale center point. - *
default:{x:1,y:1,z:1,centerX:'50%',centerY:'50%'} + * @param { ScaleOptions } value default:{x:1,y:1,z:1,centerX:'50%',centerY:'50%'} * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scale(value: ScaleOptions): T; /** - * Scales the component. - * Compared to {@link scale} , this API supports the **undefined** type for the **options** parameter. + * Set component scaling. * - * @param { Optional } options - Scale ratio along the x-, y-, and z-axis. - *
The default value is **1**. **centerX** and **centerY** are used to set the scale center point. - *
default:{x:1,y:1,z:1,centerX:'50%',centerY:'50%'} - *
If **options** is **undefined**, the component reverts to its original state with no scaling. + * @param { Optional } options default:{x:1,y:1,z:1,centerX:'50%',centerY:'50%'} * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ scale(options: Optional): T; @@ -24502,12 +25742,13 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ rotate(value: RotateOptions): T; /** - * Rotates the component. This API supports the **undefined** type for the **options** parameter. + * Set component rotation. * * @param { Optional } options default:{x:0,y:0,z:0,centerX:'50%',centerY:'50%',centerZ:0,perspective:0} * @returns { T } @@ -24515,7 +25756,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ rotate(options: Optional): T; @@ -24532,32 +25774,34 @@ declare class CommonMethod { */ rotate(options: Optional): T; + /** - * Sets the transformation matrix of the component. + * Sets the transformation matrix for the current component. * - * @param { object } value - Transformation matrix of the component. + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Sets the transformation matrix of the component. + * Sets the transformation matrix for the current component. * - * @param { object } value - Transformation matrix of the component. + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Sets the transformation matrix of the component. + * Sets the transformation matrix for the current component. * - * @param { object } value - Transformation matrix of the component. + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ transform(value: object): T; @@ -24577,16 +25821,16 @@ declare class CommonMethod { /** * Sets the transformation matrix for the current component. - * The interface can display the effect of three-dimensional matrix transformation. * - * @param { Optional } transform - transform3D matrix + * @param { Optional } transform * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - transform3D(transform: Optional): T; + transform(transform: Optional): T; /** * This callback is triggered when a component mounts a display. @@ -24624,7 +25868,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onAppear(event: () => void): T; @@ -24664,7 +25909,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onDisAppear(event: () => void): T; @@ -24680,6 +25926,19 @@ declare class CommonMethod { */ onAttach(callback: Callback): T; + /** + * This callback is triggered when a component mounts to view tree. + * + * @param { VoidCallback } callback + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onAttach(callback: VoidCallback): T; + /** * This callback is triggered when a component is detached from view tree. * @@ -24692,6 +25951,19 @@ declare class CommonMethod { */ onDetach(callback: Callback): T; + /** + * This callback is triggered when a component is detached from view tree. + * + * @param { VoidCallback } callback + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onDetach(callback: VoidCallback): T; + /** * This callback is triggered when the size or position of this component change finished. * @@ -24717,7 +25989,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onAreaChange(event: (oldValue: Area, newValue: Area) => void): T; @@ -24751,13 +26024,14 @@ declare class CommonMethod { /** * Controls the display or hide of the current component. * - * @param { Visibility } value - Whether the component is visible. + * @param { Visibility } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ visibility(value: Visibility): T; @@ -24789,8 +26063,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the percentage of the parent container's remaining space that is allocated to the component. - * Default value: **0**. + * The percentage of the remaining space of the Flex container allocated to the component on which this property resides. * * @param { number } value * @returns { T } @@ -24798,7 +26071,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ flexGrow(value: number): T; @@ -24830,8 +26104,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the percentage of the parent container's shrink size that is allocated to the component. - * Default value: 0 when the parent container is Column or Row, 1 when the parent container is Flex.. + * The proportion of the Flex container compression size assigned to the component on which this attribute resides. * * @param { number } value * @returns { T } @@ -24839,7 +26112,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ flexShrink(value: number): T; @@ -24871,8 +26145,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the base size of the component in the main axis of the parent container. - * Default value: **'auto'**. + * The base dimension of the assembly on which this attribute is located in the direction of the principal axis in the Flex container. * * @param { number | string } value * @returns { T } @@ -24880,7 +26153,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ flexBasis(value: number | string): T; @@ -24912,8 +26186,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the alignment mode of the child components along the cross axis of the parent container. - * Default value: **ItemAlign.Auto**. + * Overrides the default configuration of alignItems in the Flex Layout container. * * @param { ItemAlign } value * @returns { T } @@ -24921,7 +26194,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ alignSelf(value: ItemAlign): T; @@ -24966,8 +26240,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the display priority for the component in the layout container. - *
This parameter is only effective in Row, Column, and Flex (single-line) container components. + * Sets the current component and displays the priority in the layout container. This parameter is valid only in Row, Column, and Flex single-row layouts. * * @param { number } value * @returns { T } @@ -24975,7 +26248,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ displayPriority(value: number): T; @@ -25015,57 +26289,41 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ zIndex(value: number): T; /** - * If the components of the two pages are configured with the same ID. - * The shared element transition is performed during transition. - * If the parameter is set to an empty string, the shared element transition does not occur. - * For details about the options parameter, see the options parameter description. + * If the components of the two pages are configured with the same ID, the shared element transition is performed during transition. If the parameter is set to an empty string, the shared element transition does not occur. For details about the options parameter, see the options parameter description. * - * @param { string } id - Transition of the shared element. - *
If the same **id** value is configured for a component on the two pages, - *
this component is considered as a shared element of the pages. - *
If the **id** value is an empty string, no transition will be applied to the component. - * @param { sharedTransitionOptions } options - Parameters of the shared element transition animation. + * @param { string } id + * @param { sharedTransitionOptions } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * If the components of the two pages are configured with the same ID. - * The shared element transition is performed during transition. - * If the parameter is set to an empty string, the shared element transition does not occur. - * For details about the options parameter, see the options parameter description. + * If the components of the two pages are configured with the same ID, the shared element transition is performed during transition. If the parameter is set to an empty string, the shared element transition does not occur. For details about the options parameter, see the options parameter description. * - * @param { string } id - Transition of the shared element. - *
If the same **id** value is configured for a component on the two pages, - *
this component is considered as a shared element of the pages. - *
If the **id** value is an empty string, no transition will be applied to the component. - * @param { sharedTransitionOptions } options - Parameters of the shared element transition animation. + * @param { string } id + * @param { sharedTransitionOptions } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * If the components of the two pages are configured with the same ID. - * The shared element transition is performed during transition. - * If the parameter is set to an empty string, the shared element transition does not occur. - * For details about the options parameter, see the options parameter description. + * If the components of the two pages are configured with the same ID, the shared element transition is performed during transition. If the parameter is set to an empty string, the shared element transition does not occur. For details about the options parameter, see the options parameter description. * - * @param { string } id - Transition of the shared element. - *
If the same **id** value is configured for a component on the two pages, - *
this component is considered as a shared element of the pages. - *
If the **id** value is an empty string, no transition will be applied to the component. - * @param { sharedTransitionOptions } options - Parameters of the shared element transition animation. + * @param { string } id + * @param { sharedTransitionOptions } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ sharedTransition(id: string, options?: sharedTransitionOptions): T; @@ -25097,8 +26355,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets how elements are laid out along the main axis of the container. - * Default value: **Direction.Auto**. + * Sets the sliding direction. The enumerated value supports logical AND (&) and logical OR (|). * * @param { Direction } value * @returns { T } @@ -25106,7 +26363,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ direction(value: Direction): T; @@ -25138,8 +26396,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the alignment mode of the component content in the drawing area. - * Default value: **Alignment.Center**. + * align * * @param { Alignment } value * @returns { T } @@ -25147,7 +26404,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ align(value: Alignment): T; @@ -25177,6 +26435,7 @@ declare class CommonMethod { */ layoutGravity(alignment: LocalizedAlignment): T; + /** * position * @@ -25216,8 +26475,7 @@ declare class CommonMethod { * @since 11 */ /** - * Sets the absolute position of the component relative to the position of the parent component. - *
The attribute is not available for a layout container whose width and height are zero. + * position * * @param { Position | Edges | LocalizedEdges } value * @returns { T } @@ -25225,7 +26483,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ position(value: Position | Edges | LocalizedEdges): T; @@ -25268,8 +26527,7 @@ declare class CommonMethod { * @since 11 */ /** - * Sets the anchor for locating the component, which is used to move the component - * further away from the position specified by position or offset. + * Sets the anchor point of the element when it is positioned. The base point is offset from the top start point of the element. * * @param { Position | LocalizedPosition} value * @returns { T } @@ -25277,7 +26535,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ markAnchor(value: Position | LocalizedPosition): T; @@ -25324,9 +26583,8 @@ declare class CommonMethod { * @since 11 */ /** - * Sets the offset of the component relative to its original position. - *
The offset attribute does not affect the layout of the parent container. - * It adjusts the component position only during drawing. + * Coordinate offset relative to the layout completion position. + * Setting this attribute does not affect the layout of the parent container. The position is adjusted only during drawing. * * @param { Position | Edges | LocalizedEdges } value * @returns { T } @@ -25334,13 +26592,14 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ offset(value: Position | Edges | LocalizedEdges): T; /** * If the value is true, the component is available and can respond to operations such as clicking. - * If it is set to false, click operations are not responded. + * If it is set to false, click operations are not responded. * * @param { boolean } value * @returns { T } @@ -25349,7 +26608,7 @@ declare class CommonMethod { */ /** * If the value is true, the component is available and can respond to operations such as clicking. - * If it is set to false, click operations are not responded. + * If it is set to false, click operations are not responded. * * @param { boolean } value * @returns { T } @@ -25359,7 +26618,7 @@ declare class CommonMethod { */ /** * If the value is true, the component is available and can respond to operations such as clicking. - * If it is set to false, click operations are not responded. + * If it is set to false, click operations are not responded. * * @param { boolean } value * @returns { T } @@ -25370,7 +26629,7 @@ declare class CommonMethod { */ /** * If the value is true, the component is available and can respond to operations such as clicking. - * If it is set to false, click operations are not responded. + * If it is set to false, click operations are not responded. * * @param { boolean } value * @returns { T } @@ -25378,7 +26637,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enabled(value: boolean): T; @@ -25419,8 +26679,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the alignment rules in the relative container. - * This API is valid only when the container is RelativeContainer. + * Specifies the alignRules of relative container * * @param { AlignRuleOption } value * @returns { T } @@ -25428,16 +26687,13 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ alignRules(value: AlignRuleOption): T; /** - * Sets the alignment rules in the relative container. - *
This API is valid only when the container is RelativeContainer. - *
This API takes the right-to-left scripts into account, using start and end instead of - * left and right for alignment in the horizontal direction. Prioritize this API in aligning - * child components in the relative container. + * Specifies the localized alignRules of relative container * * @param { LocalizedAlignRuleOptions } alignRule * @returns { T } @@ -25445,16 +26701,13 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ alignRules(alignRule: LocalizedAlignRuleOptions): T; /** - * Sets the parameters of the chain in which the component is the head. - *
This parameter has effect only when the parent container is RelativeContainer. - *
The chain head is the first component in the chain that satisfies the chain formation rules. - * In a horizontal layout, it starts from the left (or from the right in a mirrored language - * layout). In a vertical layout, it starts from the top. + * Specifies the direction and style of chain in relative container * * @param { Axis } direction - indicates direction of the chain * @param { ChainStyle } style - indicates style of the chain @@ -25462,7 +26715,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ chainMode(direction: Axis, style: ChainStyle): T; @@ -25494,12 +26748,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the aspect ratio of the component, which can be obtained using the following formula: width/height. - *
If only width and aspectRatio are set, the height is calculated using the following formula: width/aspectRatio. - *
If only height and aspectRatio are set, the width is calculated using the following formula: height x aspectRatio. - *
If width, height, and aspectRatio are all set, the explicitly set height is ignored, and the effective height is - * calculated using the following formula: width/aspectRatio. - *
This parameter takes effect only when a valid value greater than 0 is specified. + * Specifies the aspect ratio of the current component. * * @param { number } value * @returns { T } @@ -25507,7 +26756,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ aspectRatio(value: number): T; @@ -25528,7 +26778,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ clickEffect(value: ClickEffect | null): T; @@ -25540,7 +26791,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ clickEffect(effect: Optional): T; @@ -25566,16 +26818,14 @@ declare class CommonMethod { /** * After a listener is bound, the component can be dragged. After the drag occurs, a callback is triggered. * (To be triggered, press and hold for 170 milliseconds (ms)) - * - * NOTE:
- * The global builder is not supported. * * @param { function } event * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ onDragStart(event: (event: DragEvent, extraParams?: string) => CustomBuilder | DragItemInfo): T; @@ -25604,7 +26854,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ onDragEnter(event: (event: DragEvent, extraParams?: string) => void): T; @@ -25633,7 +26884,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ onDragMove(event: (event: DragEvent, extraParams?: string) => void): T; @@ -25662,7 +26914,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ onDragLeave(event: (event: DragEvent, extraParams?: string) => void): T; @@ -25694,7 +26947,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ onDrop(event: (event: DragEvent, extraParams?: string) => void): T; @@ -25708,7 +26962,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ onDrop(eventCallback: OnDragEventCallback, dropOptions?: DropOptions): T; @@ -25737,7 +26992,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ onDragEnd(event: (event: DragEvent, extraParams?: string) => void): T; @@ -25798,7 +27054,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ allowDrop(value: Array | null): T; @@ -25814,12 +27071,12 @@ declare class CommonMethod { * Enable the selectable area can be dragged. * * @param { boolean } value - true means the area can be dragged, false means the area can't be dragged. - * The default value is false. * @returns { T } property value of type T. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ draggable(value: boolean): T; @@ -25838,7 +27095,8 @@ declare class CommonMethod { * @returns { T } property value of type T. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dragPreview(value: CustomBuilder | DragItemInfo | string): T; @@ -25850,7 +27108,8 @@ declare class CommonMethod { * @returns { T } property value of type T. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ dragPreview(preview: CustomBuilder | DragItemInfo | string, config?: PreviewConfiguration): T; @@ -25870,7 +27129,8 @@ declare class CommonMethod { * @returns { T } property value of type T. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dragPreviewOptions(value: DragPreviewOptions, options?: DragInteractionOptions): T; @@ -25881,7 +27141,8 @@ declare class CommonMethod { * @returns { T } property value of type T. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onPreDrag(callback: Callback): T; @@ -25937,7 +27198,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ overlay(value: string | CustomBuilder | ComponentContent, options?: OverlayOptions): T; @@ -25959,7 +27221,7 @@ declare class CommonMethod { * colors: Color description for gradients. * repeating: repeating. The default value is false * - * @param { object } value - Linear gradient. + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 @@ -25971,7 +27233,7 @@ declare class CommonMethod { * colors: Color description for gradients. * repeating: repeating. The default value is false * - * @param { object } value - Linear gradient. + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form @@ -25984,7 +27246,7 @@ declare class CommonMethod { * colors: Color description for gradients. * repeating: repeating. The default value is false * - * @param { object } value - Linear gradient. + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -25998,7 +27260,7 @@ declare class CommonMethod { * colors: Color description for gradients. * repeating: repeating. The default value is false * - * @param { object } value - Linear gradient. + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26013,7 +27275,7 @@ declare class CommonMethod { * colors: Color description for gradients. * repeating: repeating. The default value is false * - * @param { object } value - Linear gradient. + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26028,14 +27290,15 @@ declare class CommonMethod { * colors: Color description for gradients. * repeating: repeating. The default value is false * - * @param { object } value - Linear gradient. - *
If **options** is **undefined**, the linear gradient is disabled. + * Anonymous Object Rectification. + * @param { LinearGradientOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ linearGradient(value: LinearGradientOptions): T; @@ -26046,92 +27309,59 @@ declare class CommonMethod { * colors: Color description for gradients. * repeating: repeating. The default value is false * - * @param { Optional } options - Linear gradient. - *
If **options** is **undefined**, the linear gradient is disabled. + * @param { Optional } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ linearGradient(options: Optional): T; /** - * Creates a sweep gradient. - * - * @param { SweepGradientOptions } value - Sweep gradient, which can sweep around the specified - * center point in the 0–360 degree range. If the rotation angle exceeds the range, a monochrome - * color instead of a gradient will be drawn.
- **center**: center of the sweep gradient, that - * is, the coordinates relative to the upper left corner of the current component. - *
- **start**: start angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- **end**: end angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- **rotation**: rotation angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- colors: array of color stops, - * each of which consists of a color and its stop position. Invalid colors are automatically skipped. - *
- **repeating**: whether the colors are repeated. - *
Default value: **false**. - *
**NOTE** - *
A value less than 0 is treated as **0**. A value greater than 360 is treated as **360**. - *
When **start**, **end**, or **rotation** is specified with a string, the string must be a number - * or a number followed by one of the following units: deg, rad, grad, and turn. Valid value examples - * are "90", "90deg", and "1.57rad". + * Angle Gradient + * center:is the center point of the angle gradient + * start:Start point of angle gradient. The default value is 0 + * end:End point of angle gradient. The default value is 0 + * number:number + * rotating:rotating. The default value is 0 + * colors:Color description for gradients + * repeating:repeating. The default value is false + * + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Creates a sweep gradient. + * Angle Gradient + * center:is the center point of the angle gradient + * start:Start point of angle gradient. The default value is 0 + * end:End point of angle gradient. The default value is 0 + * number:number + * rotating:rotating. The default value is 0 + * colors:Color description for gradients + * repeating:repeating. The default value is false * - * @param { SweepGradientOptions } value - Sweep gradient, which can sweep around the specified - * center point in the 0–360 degree range. If the rotation angle exceeds the range, a monochrome - * color instead of a gradient will be drawn.
- **center**: center of the sweep gradient, that - * is, the coordinates relative to the upper left corner of the current component. - *
- **start**: start angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- **end**: end angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- **rotation**: rotation angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- colors: array of color stops, - * each of which consists of a color and its stop position. Invalid colors are automatically skipped. - *
- **repeating**: whether the colors are repeated. - *
Default value: **false**. - *
**NOTE** - *
A value less than 0 is treated as **0**. A value greater than 360 is treated as **360**. - *
When **start**, **end**, or **rotation** is specified with a string, the string must be a number - * or a number followed by one of the following units: deg, rad, grad, and turn. Valid value examples - * are "90", "90deg", and "1.57rad". + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Creates a sweep gradient. + * Angle Gradient + * center:is the center point of the angle gradient + * start:Start point of angle gradient. The default value is 0 + * end:End point of angle gradient. The default value is 0 + * number:number + * rotating:rotating. The default value is 0 + * colors:Color description for gradients + * repeating:repeating. The default value is false * - * @param { SweepGradientOptions } value - Sweep gradient, which can sweep around the specified - * center point in the 0–360 degree range. If the rotation angle exceeds the range, a monochrome - * color instead of a gradient will be drawn.
- **center**: center of the sweep gradient, that - * is, the coordinates relative to the upper left corner of the current component. - *
- **start**: start angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- **end**: end angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- **rotation**: rotation angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- colors: array of color stops, - * each of which consists of a color and its stop position. Invalid colors are automatically skipped. - *
- **repeating**: whether the colors are repeated. - *
Default value: **false**. - *
**NOTE** - *
A value less than 0 is treated as **0**. A value greater than 360 is treated as **360**. - *
When **start**, **end**, or **rotation** is specified with a string, the string must be a number - * or a number followed by one of the following units: deg, rad, grad, and turn. Valid value examples - * are "90", "90deg", and "1.57rad". + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26139,27 +27369,16 @@ declare class CommonMethod { * @since 10 */ /** - * Creates a sweep gradient. + * Angle Gradient + * center:is the center point of the angle gradient + * start:Start point of angle gradient. The default value is 0 + * end:End point of angle gradient. The default value is 0 + * number:number + * rotating:rotating. The default value is 0 + * colors:Color description for gradients + * repeating:repeating. The default value is false * - * @param { SweepGradientOptions } value - Sweep gradient, which can sweep around the specified - * center point in the 0–360 degree range. If the rotation angle exceeds the range, a monochrome - * color instead of a gradient will be drawn.
- **center**: center of the sweep gradient, that - * is, the coordinates relative to the upper left corner of the current component. - *
- **start**: start angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- **end**: end angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- **rotation**: rotation angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- colors: array of color stops, - * each of which consists of a color and its stop position. Invalid colors are automatically skipped. - *
- **repeating**: whether the colors are repeated. - *
Default value: **false**. - *
**NOTE** - *
A value less than 0 is treated as **0**. A value greater than 360 is treated as **360**. - *
When **start**, **end**, or **rotation** is specified with a string, the string must be a number - * or a number followed by one of the following units: deg, rad, grad, and turn. Valid value examples - * are "90", "90deg", and "1.57rad". + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26168,27 +27387,16 @@ declare class CommonMethod { * @since 11 */ /** - * Creates a sweep gradient. + * Angle Gradient + * center:is the center point of the angle gradient + * start:Start point of angle gradient. The default value is 0 + * end:End point of angle gradient. The default value is 0 + * number:number + * rotating:rotating. The default value is 0 + * colors:Color description for gradients + * repeating:repeating. The default value is false * - * @param { SweepGradientOptions } value - Sweep gradient, which can sweep around the specified - * center point in the 0–360 degree range. If the rotation angle exceeds the range, a monochrome - * color instead of a gradient will be drawn.
- **center**: center of the sweep gradient, that - * is, the coordinates relative to the upper left corner of the current component. - *
- **start**: start angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- **end**: end angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- **rotation**: rotation angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- colors: array of color stops, - * each of which consists of a color and its stop position. Invalid colors are automatically skipped. - *
- **repeating**: whether the colors are repeated. - *
Default value: **false**. - *
**NOTE** - *
A value less than 0 is treated as **0**. A value greater than 360 is treated as **360**. - *
When **start**, **end**, or **rotation** is specified with a string, the string must be a number - * or a number followed by one of the following units: deg, rad, grad, and turn. Valid value examples - * are "90", "90deg", and "1.57rad". + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26197,102 +27405,79 @@ declare class CommonMethod { * @since 12 */ /** - * Creates a sweep gradient. + * Angle Gradient + * center:is the center point of the angle gradient + * start:Start point of angle gradient. The default value is 0 + * end:End point of angle gradient. The default value is 0 + * rotating:rotating. The default value is 0 + * colors:Color description for gradients + * repeating:repeating. The default value is false * - * @param { SweepGradientOptions } value - Sweep gradient, which can sweep around the specified - * center point in the 0–360 degree range. If the rotation angle exceeds the range, a monochrome - * color instead of a gradient will be drawn.
- **center**: center of the sweep gradient, that - * is, the coordinates relative to the upper left corner of the current component. - *
- **start**: start angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- **end**: end angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- **rotation**: rotation angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- colors: array of color stops, - * each of which consists of a color and its stop position. Invalid colors are automatically skipped. - *
- **repeating**: whether the colors are repeated. - *
Default value: **false**. - *
**NOTE** - *
A value less than 0 is treated as **0**. A value greater than 360 is treated as **360**. - *
When **start**, **end**, or **rotation** is specified with a string, the string must be a number - * or a number followed by one of the following units: deg, rad, grad, and turn. Valid value examples - * are "90", "90deg", and "1.57rad". + * Anonymous Object Rectification. + * @param { SweepGradientOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ sweepGradient(value: SweepGradientOptions): T; /** - * Creates a sweep gradient. Compared to sweepGradient, - * this API supports the **undefined** type for the **options** parameter. + * Angle Gradient + * center:is the center point of the angle gradient + * start:Start point of angle gradient. The default value is 0 + * end:End point of angle gradient. The default value is 0 + * rotating:rotating. The default value is 0 + * colors:Color description for gradients + * repeating:repeating. The default value is false * - * @param { Optional } options - Sweep gradient. - *
If **options** is **undefined**, the sweep gradient is disabled. + * @param { Optional } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ sweepGradient(options: Optional): T; /** - * Creates a radial gradient. + * Radial Gradient + * center:Center point of radial gradient + * radius:Radius of Radial Gradient. value range [0, +∞) + * colors:Color description for gradients + * repeating: Refill. The default value is false * - * @param { object } value - Radial gradient. - *
- **center**: center of the radial gradient, that is, the coordinates relative - * to the upper left corner of the current component. - *
- **radius**: radius of the radial gradient. - *
Value range: [0, +∞). - *
**NOTE** - *
A value less than 0 is treated as **0**. - *
- colors: array of color stops, each of which consists - * of a color and its stop position. Invalid colors are automatically skipped. - *
- **repeating**: whether the colors are repeated. - *
Default value: **false**. + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Creates a radial gradient. + * Radial Gradient + * center:Center point of radial gradient + * radius:Radius of Radial Gradient. value range [0, +∞) + * colors:Color description for gradients + * repeating: Refill. The default value is false * - * @param { object } value - Radial gradient. - *
- **center**: center of the radial gradient, that is, the coordinates relative - * to the upper left corner of the current component. - *
- **radius**: radius of the radial gradient. - *
Value range: [0, +∞). - *
**NOTE** - *
A value less than 0 is treated as **0**. - *
- colors: array of color stops, each of which consists - * of a color and its stop position. Invalid colors are automatically skipped. - *
- **repeating**: whether the colors are repeated. - *
Default value: **false**. + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Creates a radial gradient. + * Radial Gradient + * center:Center point of radial gradient + * radius:Radius of Radial Gradient. value range [0, +∞) + * colors:Color description for gradients + * repeating: Refill. The default value is false * - * @param { object } value - Radial gradient. - *
- **center**: center of the radial gradient, that is, the coordinates relative - * to the upper left corner of the current component. - *
- **radius**: radius of the radial gradient. - *
Value range: [0, +∞). - *
**NOTE** - *
A value less than 0 is treated as **0**. - *
- colors: array of color stops, each of which consists - * of a color and its stop position. Invalid colors are automatically skipped. - *
- **repeating**: whether the colors are repeated. - *
Default value: **false**. + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26300,19 +27485,13 @@ declare class CommonMethod { * @since 10 */ /** - * Creates a radial gradient. + * Radial Gradient + * center:Center point of radial gradient + * radius:Radius of Radial Gradient. value range [0, +∞) + * colors:Color description for gradients + * repeating: Refill. The default value is false * - * @param { object } value - Radial gradient. - *
- **center**: center of the radial gradient, that is, the coordinates relative - * to the upper left corner of the current component. - *
- **radius**: radius of the radial gradient. - *
Value range: [0, +∞). - *
**NOTE** - *
A value less than 0 is treated as **0**. - *
- colors: array of color stops, each of which consists - * of a color and its stop position. Invalid colors are automatically skipped. - *
- **repeating**: whether the colors are repeated. - *
Default value: **false**. + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26321,19 +27500,13 @@ declare class CommonMethod { * @since 11 */ /** - * Creates a radial gradient. + * Radial Gradient + * center:Center point of radial gradient + * radius:Radius of Radial Gradient. value range [0, +∞) + * colors:Color description for gradients + * repeating: Refill. The default value is false * - * @param { object } value - Radial gradient. - *
- **center**: center of the radial gradient, that is, the coordinates relative - * to the upper left corner of the current component. - *
- **radius**: radius of the radial gradient. - *
Value range: [0, +∞). - *
**NOTE** - *
A value less than 0 is treated as **0**. - *
- colors: array of color stops, each of which consists - * of a color and its stop position. Invalid colors are automatically skipped. - *
- **repeating**: whether the colors are repeated. - *
Default value: **false**. + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26342,101 +27515,105 @@ declare class CommonMethod { * @since 12 */ /** - * Creates a radial gradient. + * Radial Gradient + * center:Center point of radial gradient + * radius:Radius of Radial Gradient. value range [0, +∞) + * colors:Color description for gradients + * repeating: Refill. The default value is false * * Anonymous Object Rectification. - * @param { RadialGradientOptions } value - Radial gradient. - *
- **center**: center of the radial gradient, that is, the coordinates relative - * to the upper left corner of the current component. - *
- **radius**: radius of the radial gradient. - *
Value range: [0, +∞). - *
**NOTE** - *
A value less than 0 is treated as **0**. - *
- colors: array of color stops, each of which consists - * of a color and its stop position. Invalid colors are automatically skipped. - *
- **repeating**: whether the colors are repeated. - *
Default value: **false**. + * @param { RadialGradientOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ radialGradient(value: RadialGradientOptions): T; /** - * Creates a radial gradient. Compared to radialGradient, - * this API supports the **undefined** type for the **options** parameter. + * Radial Gradient + * center:Center point of radial gradient + * radius:Radius of Radial Gradient. value range [0, +∞) + * colors:Color description for gradients + * repeating: Refill. The default value is false * - * @param { Optional } options - Radial gradient. - *
If **options** is **undefined**, the radial gradient is disabled. + * @param { Optional } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ radialGradient(options: Optional): T; /** - * Set the motion path of the component. + * Set the motion path of the component + * path:Motion path for displacement animation, using the svg path string. + * from:Start point of the motion path. The default value is 0.0. + * to:End point of the motion path. The default value is 1.0. + * rotatable:Whether to follow the path for rotation. * - * @param { MotionPathOptions } value - Motion path of the component. + * @param { MotionPathOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Set the motion path of the component. + * Set the motion path of the component + * path:Motion path for displacement animation, using the svg path string. + * from:Start point of the motion path. The default value is 0.0. + * to:End point of the motion path. The default value is 1.0. + * rotatable:Whether to follow the path for rotation. * - * @param { MotionPathOptions } value - Motion path of the component. + * @param { MotionPathOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Set the motion path of the component. + * Set the motion path of the component + * path:Motion path for displacement animation, using the svg path string. + * from:Start point of the motion path. The default value is 0.0. + * to:End point of the motion path. The default value is 1.0. + * rotatable:Whether to follow the path for rotation. * - * @param { MotionPathOptions } value - Motion path of the component. + * @param { MotionPathOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ motionPath(value: MotionPathOptions): T; /** - * Applies a shadow effect to the component. + * Add a shadow effect to the current component * - * @param { ShadowOptions } value - Shadow of the component. - *
When the value type is **ShadowOptions**, the blur radius, shadow color, - * and offset along the x-axis and y-axis can be specified. + * @param { ShadowOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Applies a shadow effect to the component. + * Add a shadow effect to the current component * - * @param { ShadowOptions } value - Shadow of the component. - *
When the value type is **ShadowOptions**, the blur radius, shadow color, - * and offset along the x-axis and y-axis can be specified. + * @param { ShadowOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Applies a shadow effect to the component. + * Add a shadow effect to the current component * - * @param { ShadowOptions | ShadowStyle } value - Shadow of the component. - *
When the value type is **ShadowOptions**, the blur radius, shadow color, - * and offset along the x-axis and y-axis can be specified. - *
When the value type is **ShadowStyle**, the shadow style can be specified. + * @param { ShadowOptions | ShadowStyle } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26444,57 +27621,38 @@ declare class CommonMethod { * @since 10 */ /** - * Applies a shadow effect to the component. + * Add a shadow effect to the current component * - * @param { ShadowOptions | ShadowStyle } value - Shadow of the component. - *
When the value type is **ShadowOptions**, the blur radius, shadow color, - * and offset along the x-axis and y-axis can be specified. - *
When the value type is **ShadowStyle**, the shadow style can be specified. + * @param { ShadowOptions | ShadowStyle } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ shadow(value: ShadowOptions | ShadowStyle): T; /** - * Applies a shadow effect to the component. - * Compared to {@link shadow}, this API supports the **undefined** type for the **options** parameter. + * Add a shadow effect to the current component * - * @param { Optional } options - Shadow of the component. - *
When the value type is **ShadowOptions**, the blur radius, shadow color, - * and offset along the x-axis and y-axis can be specified. - *
When the value type is **ShadowStyle**, the shadow style can be specified. - *
If **options** is **undefined**, the component reverts to its original effect with no shadow. + * @param { Optional } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ shadow(options: Optional): T; /** - * Defines how the component's content (including the content of it child components) - * is blended with the existing content on the canvas (possibly offscreen canvas) below. + * Add a blendMode effect to the current component * - * @param { BlendMode } value - Blend mode. - *
Default value: **BlendMode.NONE**. - *
**NOTE** - *
When **BlendMode.NONE** is used, the blend effect is **BlendMode.SRC_OVER** - * by default, and **BlendApplyType** does not take effect. - * @param { BlendApplyType } [type] - Whether the blend mode is implemented offscreen. - *
Default value: **BlendApplyType.FAST**. - *
**NOTE** - *
1. **BlendApplyType.FAST**: The blend mode is not implemented offscreen. - *
2. **BlendApplyType.OFFSCREEN**: An offscreen canvas of the size of the current component - * is created. The content of the current component (including child components) is then drawn - * onto the offscreen canvas, and blended with the existing content on the canvas below using - * the specified blend mode. This approach may cause issues with screen capture for APIs such - * as linearGradientBlur12+, backgroundEffect, and brightness. + * @param { BlendMode } value - Different hybrid modes + * @param { BlendApplyType } [type] - Different blend apply type * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26502,66 +27660,38 @@ declare class CommonMethod { * @since 11 */ /** - * Defines how the component's content (including the content of it child components) - * is blended with the existing content on the canvas (possibly offscreen canvas) below. + * Add a blendMode effect to the current component * - * @param { BlendMode } value - Blend mode. - *
Default value: **BlendMode.NONE**. - *
**NOTE** - *
When **BlendMode.NONE** is used, the blend effect is **BlendMode.SRC_OVER** - * by default, and **BlendApplyType** does not take effect. - * @param { BlendApplyType } [type] - Whether the blend mode is implemented offscreen. - *
Default value: **BlendApplyType.FAST**. - *
**NOTE** - *
1. **BlendApplyType.FAST**: The blend mode is not implemented offscreen. - *
2. **BlendApplyType.OFFSCREEN**: An offscreen canvas of the size of the current component - * is created. The content of the current component (including child components) is then drawn - * onto the offscreen canvas, and blended with the existing content on the canvas below using - * the specified blend mode. This approach may cause issues with screen capture for APIs such - * as linearGradientBlur12+, backgroundEffect, and brightness. + * @param { BlendMode } value - Different hybrid modes + * @param { BlendApplyType } [type] - Different blend apply type * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ blendMode(value: BlendMode, type?: BlendApplyType): T; /** - * Defines how the component's content (including the content of it child components) is - * blended with the existing content on the canvas (possibly offscreen canvas) below. - * Compared to blendMode11+, this API supports the **undefined** - * type for the **mode** parameter. + * Add a blendMode effect to the current component * - * @param { Optional } mode - Blend mode. - *
Default value: **BlendMode.NONE**. - *
If **mode** is **undefined**, the component reverts to its original effect of not - * enabling offscreen rendering as a whole before blending with the parent component. - *
**NOTE** - *
When **BlendMode.NONE** is used, the blend effect is **BlendMode.SRC_OVER** - * by default, and **BlendApplyType** does not take effect. - * @param { BlendApplyType } [type] - Whether the blend mode is implemented offscreen. - *
Default value: **BlendApplyType.FAST**. - *
**NOTE** - *
1. **BlendApplyType.FAST**: The blend mode is not implemented offscreen. - *
2. **BlendApplyType.OFFSCREEN**: An offscreen canvas of the size of the current component - * is created. The content of the current component (including child components) is then drawn - * onto the offscreen canvas, and blended with the existing content on the canvas below using - * the specified blend mode. This approach may cause issues with screen capture for APIs such - * as linearGradientBlur12+, backgroundEffect, and brightness. + * @param { Optional } mode - Different hybrid modes + * @param { BlendApplyType } [type] - Different blend apply type * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ blendMode(mode: Optional, type?: BlendApplyType): T; /** * Add a blendMode effect to the current component.Cannot be used together with the blendMode interface. - * + * * @param { BlendMode | Blender } effect - When the effect type is BlendMode type, define Different hybrid modes. * When the effect type is Blender type, Define the corresponding blending effect. * @param { BlendApplyType } [type] - Different blend apply type @@ -26569,44 +27699,36 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ advancedBlendMode(effect: BlendMode | Blender, type?: BlendApplyType): T; /** - * Sets whether to clip the areas of child components that extend beyond this component's boundaries, - * That is, whether to perform clipping based on the edge contour of the parent container. + * Whether to crop the sub components beyond the current component range. * - * @param { boolean } value - Whether to perform clipping based on the edge contour of the parent container. - *
Default value: **false**. - *
**true**: Perform clipping. **false**: Do not perform clipping. - *
If this parameter is set to **true**. - *
child components exceeding the current component's bounds will not respond to bound gesture events. + * @param { boolean } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ clip(value: boolean): T; /** - * Sets whether to clip the areas of child components that extend beyond this component's boundaries, - * That is, whether to perform clipping based on the edge contour of the parent container. - * This API supports the **undefined** type for the **clip** parameter. + * Whether to crop the sub components beyond the current component range. * - * @param { Optional } clip - Whether to perform clipping based on the edge contour of the parent container. - *
Default value: **false**. - *
If this parameter is set to **true**, - * child components exceeding the current component's bounds will not respond to bound gesture events. - *
If **clip** is set to **undefined**, clipping is disabled, and child components are not clipped. + * @param { Optional } clip * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ clip(clip: Optional): T; @@ -26614,13 +27736,7 @@ declare class CommonMethod { * When the parameter is of the Shape type, the current component is cropped according to the specified shape. * When the parameter is of the boolean type, this parameter specifies whether to crop based on the edge contour. * - * @param { boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute } value - Clip mode. - *
If the value is a shape attribute, the component is clipped based on the specified shape. - *
If the value is of the Boolean type, - * it specifies whether to clip the component based on the boundaries of the parent container. - *
Default value: **false**. - *
If the value is a shape attribute, the clipped area can still respond to bound gesture events. - *
If the value is of the Boolean type, the clipped area will not respond to bound gesture events. + * @param { boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 @@ -26629,13 +27745,7 @@ declare class CommonMethod { * When the parameter is of the Shape type, the current component is cropped according to the specified shape. * When the parameter is of the boolean type, this parameter specifies whether to crop based on the edge contour. * - * @param { boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute } value - Clip mode. - *
If the value is a shape attribute, the component is clipped based on the specified shape. - *
If the value is of the Boolean type, - * it specifies whether to clip the component based on the boundaries of the parent container. - *
Default value: **false**. - *
If the value is a shape attribute, the clipped area can still respond to bound gesture events. - *
If the value is of the Boolean type, the clipped area will not respond to bound gesture events. + * @param { boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form @@ -26645,13 +27755,7 @@ declare class CommonMethod { * When the parameter is of the Shape type, the current component is cropped according to the specified shape. * When the parameter is of the boolean type, this parameter specifies whether to crop based on the edge contour. * - * @param { boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute } value - Clip mode. - *
If the value is a shape attribute, the component is clipped based on the specified shape. - *
If the value is of the Boolean type, - * it specifies whether to clip the component based on the boundaries of the parent container. - *
Default value: **false**. - *
If the value is a shape attribute, the clipped area can still respond to bound gesture events. - *
If the value is of the Boolean type, the clipped area will not respond to bound gesture events. + * @param { boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26662,13 +27766,7 @@ declare class CommonMethod { * When the parameter is of the Shape type, the current component is cropped according to the specified shape. * When the parameter is of the boolean type, this parameter specifies whether to crop based on the edge contour. * - * @param { boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute } value - Clip mode. - *
If the value is a shape attribute, the component is clipped based on the specified shape. - *
If the value is of the Boolean type, - * it specifies whether to clip the component based on the boundaries of the parent container. - *
Default value: **false**. - *
If the value is a shape attribute, the clipped area can still respond to bound gesture events. - *
If the value is of the Boolean type, the clipped area will not respond to bound gesture events. + * @param { boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26681,61 +27779,56 @@ declare class CommonMethod { clip(value: boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute): T; /** - * Clips this component based on the given shape. + * The current component is cropped according to the specified shape. * - * @param { CircleShape | EllipseShape | PathShape | RectShape } value - Shape that the component to be clipped into. - *
The clipped area remains responsive to bound gesture events. + * @param { CircleShape | EllipseShape | PathShape | RectShape } value - indicates the shape of the clip. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ clipShape(value: CircleShape | EllipseShape | PathShape | RectShape): T; /** - * Sets whether to clip this component based on the given shape. - * Compared to {@link clipShape}, this API supports the **undefined** type for the **shape** parameter. + * The current component is cropped according to the specified shape. * - * @param { Optional } shape - Shape that the component to - *
be clipped into. - *
The clipped area remains responsive to bound gesture events. - *
If **shape** is set to **undefined**, the previous value is retained. + * @param { Optional } shape - indicates the shape of the clip. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ clipShape(shape: Optional): T; /** - * Adds a mask to the component to indicate the progress. + * Sets the mask of the current component. * - * @param { ProgressMask } value - Mask to add to the component, which allows for dynamic - * adjustment of progress, maximum value, and color settings. + * @param { ProgressMask } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ mask(value: ProgressMask): T; /** - * Adds a mask to the component to indicate the progress. Compared to mask12+, - * this API supports the **undefined** type for the **mask** parameter. + * Sets the mask of the current component. * - * @param { Optional } mask - Mask to add to the component, which allows for dynamic - * adjustment of progress, maximum value, and color settings.
If **mask** is set to **undefined**, - * the component to revert to its original effect without the mask to indicate the progress. + * @param { Optional } mask * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ mask(mask: Optional): T; @@ -26782,31 +27875,30 @@ declare class CommonMethod { mask(value: CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute | ProgressMask): T; /** - * Adds a mask of the specified shape to the component. + * Applies a mask of the specified shape to the current assembly. * - * @param { CircleShape | EllipseShape | PathShape | RectShape } value - Mask of the specified - * shape to add to the component. + * @param { CircleShape | EllipseShape | PathShape | RectShape } value - indicates the shape of the mask. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ maskShape(value: CircleShape | EllipseShape | PathShape | RectShape): T; /** - * Adds a mask of the specified shape to the component. Compared to maskShape12+, - * this API supports the **undefined** type for the **shape** parameter. + * Applies a mask of the specified shape to the current assembly. * - * @param { Optional } shape - Mask of the specified shape to - * add to the component.
If **shape** is set to **undefined**, the previous value is retained. + * @param { Optional } shape - indicates the shape of the mask. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ maskShape(shape: Optional): T; @@ -26817,8 +27909,9 @@ declare class CommonMethod { * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @test + * @arkts 1.1&1.2 */ key(value: string): T; @@ -26858,7 +27951,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ id(value: string): T; @@ -26887,7 +27981,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ geometryTransition(id: string): T; /** @@ -26909,7 +28004,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ geometryTransition(id: string, options?: GeometryTransitionOptions): T; @@ -26922,7 +28018,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ bindTips(message: TipsMessageType, options?: TipsOptions): T; @@ -26946,18 +28043,15 @@ declare class CommonMethod { */ /** * Popup control - *

NOTE: - *
The popup can be displayed only after the entire page is fully constructed. Therefore, to avoid incorrect - * display positions and shapes, do not set this parameter to true while the page is still being constructed. - *

* - * @param { boolean } show - Whether to show the popup, default is false. + * @param { boolean } show * @param { PopupOptions | CustomPopupOptions } popup * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bindPopup(show: boolean, popup: PopupOptions | CustomPopupOptions): T; @@ -26991,7 +28085,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bindMenu(content: Array | CustomBuilder, options?: MenuOptions): T; @@ -27009,14 +28104,15 @@ declare class CommonMethod { /** * Menu control * - * @param { boolean } isShow true means display menu, false means hide menu, default is false. + * @param { boolean } isShow true means display menu, false means hide menu. * @param { Array | CustomBuilder } content - Indicates the content of menu. * @param { MenuOptions } options - Indicates the options of menu. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bindMenu(isShow: boolean, content: Array | CustomBuilder, options?: MenuOptions): T; @@ -27042,43 +28138,37 @@ declare class CommonMethod { * @since 10 */ /** - * Binds a context menu to this component, which is displayed when the user long-presses or right-clicks the - * component. Only custom menu items are supported. + * ContextMenu control * * @param { CustomBuilder } content - Indicates the content of context menu. - * @param { ResponseType } responseType - Indicates response type of context menu, Long pressing with a mouse device - * is not supported. + * @param { ResponseType } responseType - Indicates response type of context menu. * @param { ContextMenuOptions } options - Indicates the options of context menu. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bindContextMenu(content: CustomBuilder, responseType: ResponseType, options?: ContextMenuOptions): T; /** - * Binds a context menu to the component, whose visibility is subject to the isShown settings. - * - * @param { boolean } isShown - true means display content, false means hide content, default is false. - *

NOTE: - *
The menu can be displayed properly only when the related page has been constructed. If this parameter is set - * to true before the construction is complete, display issues, such as misplacement, distortion, or failure to pop - * up, may occur. To trigger dragging by long presses is not supported. - *

+ * ContextMenu control * + * @param { boolean } isShown - true means display content, false means hide content. * @param { CustomBuilder } content - Indicates the content of context menu. * @param { ContextMenuOptions } [options] - Indicates the options of context menu. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bindContextMenu(isShown: boolean, content: CustomBuilder, options?: ContextMenuOptions): T; /** - * Binds a modal page to the component, whose visibility is subject to the isShow settings. + * Bind content cover * * @param { boolean } isShow - true means display content, false means hide content. * @param { CustomBuilder } builder - the content to be displayed. @@ -27089,7 +28179,7 @@ declare class CommonMethod { * @since 10 */ /** - * Binds a modal page to the component, whose visibility is subject to the isShow settings. + * Bind content cover * * @param { boolean } isShow - true means display content, false means hide content. * @param { CustomBuilder } builder - the content to be displayed. @@ -27098,12 +28188,13 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bindContentCover(isShow: boolean, builder: CustomBuilder, type?: ModalTransition): T; /** - * Binds a modal page to the component, whose visibility is subject to the isShow settings. + * Bind content cover * * @param { boolean } isShow - true means display content, false means hide content. * @param { CustomBuilder } builder - the content to be displayed. @@ -27114,7 +28205,7 @@ declare class CommonMethod { * @since 10 */ /** - * Binds a modal page to the component, whose visibility is subject to the isShow settings. + * Bind content cover * * @param { boolean } isShow - true means display content, false means hide content. * @param { CustomBuilder } builder - the content to be displayed. @@ -27123,12 +28214,13 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bindContentCover(isShow: boolean, builder: CustomBuilder, options?: ContentCoverOptions): T; /** - * Binds a sheet page to the component, whose visibility is subject to the isShow settings. + * Bind sheet * * @param { boolean } isShow - true means display sheet, false means hide sheet. * @param { CustomBuilder } builder - the sheet to be displayed. @@ -27139,7 +28231,7 @@ declare class CommonMethod { * @since 10 */ /** - * Binds a sheet page to the component, whose visibility is subject to the isShow settings. + * Bind sheet * * @param { boolean } isShow - true means display sheet, false means hide sheet. * @param { CustomBuilder } builder - the sheet to be displayed. @@ -27148,7 +28240,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bindSheet(isShow: boolean, builder: CustomBuilder, options?: SheetOptions): T; @@ -27188,7 +28281,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ stateStyles(value: StateStyles): T; @@ -27208,7 +28302,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ restoreId(value: number): T; @@ -27245,14 +28340,14 @@ declare class CommonMethod { /** * Trigger a visible area change event. * - * @param { Array } ratios - Threshold array. Each threshold represents a ratio of the component's visible area to the component's total area. - * The value range of the threshold is [0.0, 1.0]. - * @param { VisibleAreaChangeCallback } event - Callback for visible area changes of the component. + * @param { Array } ratios + * @param { VisibleAreaChangeCallback } event * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ onVisibleAreaChange(ratios: Array, event: VisibleAreaChangeCallback): T; @@ -27267,146 +28362,90 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onVisibleAreaApproximateChange(options: VisibleAreaEventOptions, event: VisibleAreaChangeCallback | undefined): void; /** - * Applies a spherical effect to the component. + * Set the spherical effect of the component. * - * @param { number } value - Spherical degree of the component. - *
The value ranges from 0 to 1. - *

**NOTE**: - *
1. If the value is **0**, the component remains unchanged. If the value is 1, the component is completely - * spherical. Between **0** and **1**, a larger value indicates a higher spherical degree. A value less than 0 is - * handled as the value **0**. A value greater than 1 is handled as the value **1**. - *
2. The component's shadow and outer stroke do not support spherical effects. - *
3. If the value is greater than 0, the component is frozen and not updated, and its content is drawn to the - * transparent offscreen buffer. To update the component attributes, set the value to **0**. - *

- * + * @param { number } value - set the degree of spherical effect, value range [0, 1]. + * If the value is 0, the component keep same, else the value is 1, component are fully spherical. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ sphericalEffect(value: number): T; /** * Set the spherical effect of the component. * - * @param { Optional } effect - The value ranges from 0 to 1. - *

**NOTE**: - *
1. If the value is **0**, the component remains unchanged. If the value is 1, the component is completely - * spherical. Between **0** and **1**, a larger value indicates a higher spherical degree.A value less than 0 is - * handled as the value **0**. A value greater than 1 is handled as the value **1**. - *
2. The component's shadow and outer stroke do not support spherical effects. - *
3. If the value is greater than 0, the component is frozen and not updated, and its content is drawn to the - * transparent offscreen buffer. To update the component attributes, set the value to **0**. If **effect** is - * **undefined**, the spherical degree reverts to **0**. - *

- * + * @param { Optional } effect - set the degree of spherical effect, value range [0, 1]. + * If the value is 0, the component keep same, else the value is 1, component are fully spherical. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ sphericalEffect(effect: Optional): T; /** - * Applies a light up effect to the component. + * Set the light up effect of the component * - * @param { number } value - Light up degree of the component. - *
The value ranges from 0 to 1. - *
If the value is **0**, the component is dark. If the value is **1**, the component is fully illuminated. - *
Between **0** and **1**, a larger value indicates higher luminance. - *
A value less than 0 is handled as the value **0**. - *
A value greater than 1 is handled as the value **1**. + * @param { number } value - set the degree to which the component lights up, value range [0, 1]. + * The color brightness in the component rendering content area is greater than the value and can be displayed, otherwise it will not be displayed. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lightUpEffect(value: number): T; /** - * Applies a light up effect to the component. Compared to lightUpEffect, - * this API supports the **undefined** type for the **degree** parameter. + * Set the light up effect of the component * - * @param { Optional } degree - Light up degree of the component. - *
The value ranges from 0 to 1. - *
If the value is **0**, the component is dark. If the value is **1**, the component is fully illuminated. - *
Between **0** and **1**, a larger value indicates higher luminance. - *
A value less than 0 is handled as the value **0**. - *
A value greater than 1 is handled as the value **1**. - *
If **degree** is **undefined**, the light up degree reverts to **1**. + * @param { Optional } degree - set the degree to which the component lights up, value range [0, 1]. + * The color brightness in the component rendering content area is greater than the value and can be displayed, otherwise it will not be displayed. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ lightUpEffect(degree: Optional): T; /** - * Applies a pixel stretch effect to the component. + * Set the edge pixel stretch effect of the Component. * - * @param { PixelStretchEffectOptions } options - Pixel stretch effect options. - *
The value includes the length by which a pixel is stretched toward the four edges. - *

**NOTE**: - *
1. If the length is a positive value, the original image is stretched, and the image size increases. The edge - * pixels grow by the set length toward the top, bottom, left, and right edges. - *
2. If the length is a negative value, the original image shrinks as follows, but the image size remains - * unchanged: - *
Shrinking mode: - *
(1) The image shrinks from the four edges by the absolute value of length set through **options**. - *
(2) The image is stretched back to the original size with edge pixels. - *
3. Constraints on **options**: - *
(1) The length values for the four edges must be all positive or all negative. That is, the four edges are - * stretched or shrink at the same time in the same direction. - *
(2) The length values must all be a percentage or a specific value. Combined use of the percentage and - * specific value is not allowed. - *
(3) If the input value is invalid, the image is displayed as {0, 0, 0, 0}, that is, the image is the same as - * the original image. - *

+ * @param { PixelStretchEffectOptions } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pixelStretchEffect(options: PixelStretchEffectOptions): T; /** - * Applies a pixel stretch effect to the component. Compared to pixelStretchEffect, - * this API supports the **undefined** type for the **options** parameter. + * Set the edge pixel stretch effect of the Component. * - * @param { Optional } options - Pixel stretch effect options. - *
The value includes the length by which a pixel is stretched toward the four edges. - *

**NOTE**: - *
1. If the length is a positive value, the original image is stretched, and the image size increases. The edge - * pixels grow by the set length toward the top, bottom, left, and right edges. - *
2. If the length is a negative value, the original image shrinks as follows, but the image size remains - * unchanged: - *
Shrinking mode: - *
(1) The image shrinks from the four edges by the absolute value of length set through **options**. - *
(2) The image is stretched back to the original size with edge pixels. - *
3. Constraints on **options**: - *
(1) The length values for the four edges must be all positive or all negative. That is, the four edges are - * stretched or shrink at the same time in the same direction. - *
(2) The length values must all be a percentage or a specific value. Combined use of the percentage and - * specific value is not allowed. - *
(3) If the input value is invalid, the image is displayed as {0, 0, 0, 0}, that is, the image is the same as - * the original image. - *

+ * @param { Optional } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ pixelStretchEffect(options: Optional): T; @@ -27431,23 +28470,24 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ keyboardShortcut(value: string | FunctionKey, keys: Array, action?: () => void): T; /** - * Sets whether to enable accessibility grouping. + * Sets accessibilityGroup * - * @param { boolean } value - set group with accessibility, default value is false. + * @param { boolean } value - set group with accessibility * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Sets whether to enable accessibility grouping. + * Sets accessibilityGroup * - * @param { boolean } value - set group with accessibility, default value is false. + * @param { boolean } value - set group with accessibility * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -27455,61 +28495,47 @@ declare class CommonMethod { * @since 11 */ /** - * Sets whether to enable accessibility grouping. - * - *

NOTE - *
Whether to enable accessibility grouping. When accessibility grouping is enabled, - *
the component and all its children are treated as a single selectable unit, and the accessibility - *
service will no longer focus on the individual child components.

+ * Sets accessibilityGroup * - * @param { boolean } value - set group with accessibility, default value is false. + * @param { boolean } value - set group with accessibility * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityGroup(value: boolean): T; /** - * Sets whether to enable accessibility grouping. - * - *

NOTE - *
If accessibility grouping is enabled and the component does not contain a universal text attribute - *
or an accessibility text attribute, the system will concatenate the universal text attributes of - *
its child components to form a merged text for the component. If a child component lacks a universal - *
text attribute, it will be ignored in the concatenation process. - * - *
When accessibilityPreferred is set to true, the system will prioritize concatenating the accessibility - *
text attributes of the child components to form the merged text. If a child component lacks an - *
accessibility text attribute, the system will continue to concatenate its universal text attribute. - *
If a child component lacks both, it will be ignored.

+ * Sets accessibilityGroup * - * @param { boolean } isGroup - set group with accessibility, default value is false. - * @param { AccessibilityOptions } accessibilityOptions - accessibilityOptions for accessibility, default value is false. + * @param { boolean } isGroup - set group with accessibility + * @param { AccessibilityOptions } accessibilityOptions - accessibilityOptions for accessibility * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityGroup(isGroup: boolean, accessibilityOptions: AccessibilityOptions): T; /** - * Sets the accessibility text. + * Sets accessibilityText * - * @param { string } value - set accessibility text, default value is "". + * @param { string } value - set accessibility text * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Sets the accessibility text. + * Sets accessibilityText * - * @param { string } value - set accessibility text, default value is "". + * @param { string } value - set accessibility text * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -27517,20 +28543,19 @@ declare class CommonMethod { * @since 11 */ /** - * Sets the accessibility text. - * When a component does not contain a text attribute, you can use this API to set an accessibility - * text attribute, so that accessibility services can announce the specified content for the component. - * - * @param { string } value - set accessibility text, default value is "". + * Sets accessibilityText + * + * @param { string } value - set accessibility text * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityText(value: string): T; - + /** * Sets accessibility next focus id * @param { string } nextId - set component next accessibility focus id @@ -27539,10 +28564,11 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityNextFocusId(nextId: string): T; - + /** * Sets the accessibility default foucs flag * @param { boolean } focus - if the component is accessibility default focus,focus set true @@ -27551,10 +28577,11 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityDefaultFocus(focus: boolean): T; - + /** * Sets accessibility same page mode * @param { AccessibilitySamePageMode } pageMode - accessibility same page mode @@ -27563,7 +28590,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityUseSamePage(pageMode: AccessibilitySamePageMode): T; @@ -27575,28 +28603,25 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityScrollTriggerable(isTriggerable: boolean): T; /** - * Sets the accessibility text. - *

NOTE - * If a component has both text content and accessibility text, only the accessibility text is announced. - *
If a component is grouped for accessibility purposes but lacks both text content and accessibility - *
text, the screen reader will concatenate text from its child components (depth-first traversal). - *
To prioritize accessibility text concatenation, set accessibilityPreferred in accessibilityGroup. - *

+ * Sets accessibilityText + * * @param { Resource } text - set accessibility text * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityText(text: Resource): T; - + /** * Sets accessibility role,role indicates the custom type of the component * @param { AccessibilityRoleType } role - set accessibility component type @@ -27605,7 +28630,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityRole(role: AccessibilityRoleType): T; @@ -27617,7 +28643,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onAccessibilityFocus(callback: AccessibilityFocusCallback): T; @@ -27643,14 +28670,15 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityTextHint(value: string): T; /** * Sets accessibilityDescription * - * @param { string } value - set description of accessibility, default value is "". + * @param { string } value - set description of accessibility * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -27659,7 +28687,7 @@ declare class CommonMethod { /** * Sets accessibilityDescription * - * @param { string } value - set description of accessibility, default value is "". + * @param { string } value - set description of accessibility * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -27669,53 +28697,44 @@ declare class CommonMethod { /** * Sets accessibilityDescription * - * @param { string } value - set description of accessibility, default value is "". + * @param { string } value - set description of accessibility * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityDescription(value: string): T; /** * Sets accessibilityDescription - * - * with support for resource references using Resource. - * This property provides additional context or explanation for the component, - * helping users understand the action or function it performs. - *

NOTE: - *
Reference resource of the accessibility description. You can specify further explanation - *
of the current component, for example, possible operation consequences, especially those that - *
cannot be learned from component attributes and accessibility text. If a component contains - *
both text information and the accessibility description, the text is read first and then the - *
accessibility description, when the component is selected.

+ * * @param { Resource } description - set description of accessibility * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityDescription(description: Resource): T; /** - * Sets the accessibility level. - * This property determines whether the component can be recognized by accessibility services. + * Sets accessibilityLevel * - * @param { string } value - set accessibility level, default value is auto. + * @param { string } value - set accessibility level * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Sets the accessibility level. - * This property determines whether the component can be recognized by accessibility services. + * Sets accessibilityLevel * - * @param { string } value - set accessibility level, default value is auto. + * @param { string } value - set accessibility level * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -27723,29 +28742,16 @@ declare class CommonMethod { * @since 11 */ /** - * Sets the accessibility level. - * This property determines whether the component can be recognized by accessibility services. - *

- * Accessibility level, which is used to decide whether a component can be identified by the accessibility service. - *
The options are as follows: - *
"auto": The component's recognizability is determined by the accessibility grouping service and ArkUI. - *
"yes": The component can be recognized by accessibility services. - *
"no": The component cannot be recognized by accessibility services. - *
"no-hide-descendants": Neither the component nor its child components can be recognized by accessibility services. - * NOTE - *
When accessibilityLevel is set to "auto", the component's recognizability depends on the following factors: - *
1. The accessibility service internally determines whether the component can be recognized. - *
2. If the parent component's accessibilityGroup property has isGroup set to true, the accessibility service will - *
not focus on its child components, making them unrecognizable. - *
3. If the parent component's accessibilityLevel is set to "no-hide-descendants", the component will not be - *
recognized by accessibility services.

- * @param { string } value - set accessibility level, default value is auto. + * Sets accessibilityLevel + * + * @param { string } value - set accessibility level * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityLevel(value: string): T; @@ -27768,7 +28774,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityVirtualNode(builder: CustomBuilder): T; @@ -27781,7 +28788,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityChecked(isCheck: boolean): T; @@ -27794,7 +28802,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilitySelected(isSelect: boolean): T; @@ -27815,7 +28824,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ obscured(reasons: Array): T; @@ -27836,7 +28846,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ reuseId(id: string): T; @@ -27848,27 +28859,24 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ reuse(options: ReuseOptions): T; /** - * How the final state of the component's content is rendered during its width and height animation process. + * Sets how content is drawn within nodes duration animation * - * @param { RenderFit } fitMode - How the final state of the component's content is rendered during. - *
its width and height animation process. - *
If **renderFit** is not set, the default value **RenderFit.TOP_LEFT** is used. + * @param { RenderFit } fitMode - The render fit mode of content. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * How the final state of the component's content is rendered during its width and height animation process. + * Sets how content is drawn within nodes duration animation * - * @param { RenderFit } fitMode - How the final state of the component's content is rendered during. - *
its width and height animation process. - *
If **renderFit** is not set, the default value **RenderFit.TOP_LEFT** is used. + * @param { RenderFit } fitMode - The render fit mode of content. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -27876,34 +28884,30 @@ declare class CommonMethod { * @since 11 */ /** - * How the final state of the component's content is rendered during its width and height animation process. + * Sets how content is drawn within nodes duration animation * - * @param { RenderFit } fitMode - How the final state of the component's content is rendered during. - *
its width and height animation process. - *
If **renderFit** is not set, the default value **RenderFit.TOP_LEFT** is used. + * @param { RenderFit } fitMode - The render fit mode of content. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ renderFit(fitMode: RenderFit): T; /** - * How the final state of the component's content is rendered during its width and height animation process. - * Compared to {@link renderFit}, this API supports the **undefined** type for the **fitMode** parameter. + * Sets how content is drawn within nodes during animation * - * @param { Optional } fitMode - How the final state of the component's content is rendered during. - *
its width and height animation process. - *
If **fitMode** is set to **undefined**, the default value is used, - * which is equivalent to **RenderFit.TOP_LEFT**. + * @param { Optional } fitMode - The render fit mode of content. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ renderFit(fitMode: Optional): T; @@ -27920,8 +28924,6 @@ declare class CommonMethod { * Sets the attribute modifier. * * @param { AttributeModifier } modifier - * The if/else syntax is supported. - * You need a custom class to implement the AttributeModifier API. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -27938,31 +28940,32 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ gestureModifier(modifier: GestureModifier): T; /** - * Sets the background brightness of the component. + * Adds a background dynamic light up effect to the current component. * - * @param { BackgroundBrightnessOptions } params - Parameters for setting the background brightness. + * @param { BackgroundBrightnessOptions } params - params indicates BackgroundBrightnessOptions * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBrightness(params: BackgroundBrightnessOptions): T; /** - * Sets the background brightness of the component. Compared to backgroundBrightness12+, - * this API supports the **undefined** type for the **options** parameter. + * Adds a background dynamic light up effect to the current component. * - * @param { Optional } options - Parameters for setting the background brightness. - *
If **options** is **undefined**, the background reverts to its default state with no brightness effect. + * @param { Optional } options - params indicates BackgroundBrightnessOptions * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBrightness(options: Optional): T; @@ -27983,53 +28986,48 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onGestureJudgeBegin(callback: (gestureInfo: GestureInfo, event: BaseGestureEvent) => GestureJudgeResult): T; /** - * Binds a custom gesture recognizer judgment callback to the component. + * When a gesture bound to this component will be accepted, a user-defined callback is triggered to get the result * * @param { GestureRecognizerJudgeBeginCallback } callback - A callback instance used when a gesture bound to this component will be accepted. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onGestureRecognizerJudgeBegin(callback: GestureRecognizerJudgeBeginCallback): T; /** - * Binds a custom gesture recognizer judgment callback to the component. - * - *

NOTE: - *
For a composite component, setting exposeInnerGesture to true exposes the internal gesture recognizer of the - *
composite component in the current parameter callback. Currently, only the Tabs component is supported. - * - *
Do not set exposeInnerGesture for other components. When exposeInnerGesture is set to false, this API provides the same functionality - *
as the onGestureRecognizerJudgeBegin API. - *

+ * When a gesture bound to this component will be accepted, a user-defined callback is triggered to get the result + * * @param { GestureRecognizerJudgeBeginCallback } callback - A callback instance used when a gesture bound to this component will be accepted. * @param { boolean } exposeInnerGesture - This parameter is a flag. This flag determines whether to expose internal gestures. - * @default false * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ onGestureRecognizerJudgeBegin(callback: GestureRecognizerJudgeBeginCallback, exposeInnerGesture: boolean): T; /** - * Provides a callback to set the parallel relationship between built-in gestures and gestures of other components in the response chain. + * In the touch test phase, the recognizer is selected to form a parallel relationship with other recognizers on the response chain. * * @param { ShouldBuiltInRecognizerParallelWithCallback } callback - A callback instance used when a component is doing touch test. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shouldBuiltInRecognizerParallelWith(callback: ShouldBuiltInRecognizerParallelWithCallback): T; @@ -28043,16 +29041,15 @@ declare class CommonMethod { * @since 11 */ /** - * Sets whether the component exclusively handles events. - * true: The component exclusively handles events. false: The component does not exclusively handle events. + * Events are monopolized by components. * * @param { boolean } monopolize - indicate the monopoly of events - * @default false * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ monopolizeEvents(monopolize: boolean): T; @@ -28064,13 +29061,13 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onTouchIntercept(callback: Callback): T; /** - * This callback is triggered when the component size changes due to layout updates. - * This event is not triggered for render attribute changes caused by re-rendering. + * This callback is triggered when the size of this component change finished. * * @param { SizeChangeCallback } event - event callback. * @returns { T } @@ -28078,7 +29075,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onSizeChange(event: SizeChangeCallback): T; @@ -28091,7 +29089,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityFocusDrawLevel(drawLevel: FocusDrawLevel): T; @@ -28147,6 +29146,18 @@ declare class CommonMethod { */ declare class CommonAttribute extends CommonMethod {} +/** + * CommonAttribute for ide. + * + * @typedef { CommonMethod } CommonAttribute + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type CommonAttribute = CommonMethod /** * CommonInterface for ide. * @@ -28191,7 +29202,7 @@ interface CommonInterface { */ /** * Constructor - * + * * @returns { CommonAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form @@ -28208,7 +29219,7 @@ interface CommonInterface { */ /** * Constructor - * + * * @returns { CommonAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -28321,17 +29332,14 @@ declare type CustomBuilder = (() => any) | void; /** * Defines the OverlayOptions interface. - * - * NOTE:
- * When both align and offset are set, the effects are combined. - * The overlay is first aligned relative to the component and then offset from its current upper left corner. * * @typedef OverlayOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OverlayOptions { /** @@ -28362,15 +29370,15 @@ declare interface OverlayOptions { * Defines align type. * * @type { ?Alignment } - * @default TopStart * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ align?: Alignment; - + /** * Defines offset type. * @@ -28399,12 +29407,12 @@ declare interface OverlayOptions { * Defines offset type. * * @type { ?OverlayOffset } - * @default - the overlay is in the upper left corner of the component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: OverlayOffset; } @@ -28417,7 +29425,8 @@ declare interface OverlayOptions { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OverlayOffset { /** @@ -28452,7 +29461,8 @@ declare interface OverlayOffset { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ x?: number; /** @@ -28487,7 +29497,8 @@ declare interface OverlayOffset { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ y?: number; } @@ -28502,7 +29513,8 @@ declare interface OverlayOffset { * @typedef { [ number, number ] } FractionStop * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type FractionStop = [ number, number ]; @@ -28538,7 +29550,8 @@ declare type FractionStop = [ number, number ]; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CommonShapeMethod extends CommonMethod { /** @@ -28554,37 +29567,32 @@ declare class CommonShapeMethod extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); /** - * Sets the stroke color. - * If this attribute is not set, the component does not have any stroke. - * If the value is invalid, no stroke will be drawn. + * border Color * - * @param { ResourceColor } value - Stroke color. + * @param { ResourceColor } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Sets the stroke color. - * If this attribute is not set, the component does not have any stroke. - * If the value is invalid, no stroke will be drawn. + * border Color * - * @param { ResourceColor } value - Stroke color. + * @param { ResourceColor } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Sets the stroke color. - * If this attribute is not set, the component does not have any stroke. - * If the value is invalid, no stroke will be drawn. + * border Color * - * @param { ResourceColor } value - Stroke color. + * @param { ResourceColor } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -28592,47 +29600,40 @@ declare class CommonShapeMethod extends CommonMethod { * @since 10 */ /** - * Sets the stroke color. - * If this attribute is not set, the component does not have any stroke. - * If the value is invalid, no stroke will be drawn. + * border Color * - * @param { ResourceColor } value - Stroke color. + * @param { ResourceColor } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ stroke(value: ResourceColor): T; /** - * Sets the color of the fill area. - * An invalid value is handled as the default value. - * If this attribute and the universal attribute foregroundColor are both set, whichever is set later takes effect. + * Fill color. * - * @param { ResourceColor } value - Color of the fill area. Default value: Color.Black. + * @param { ResourceColor } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Sets the color of the fill area. - * An invalid value is handled as the default value. - * If this attribute and the universal attribute foregroundColor are both set, whichever is set later takes effect. + * Fill color. * - * @param { ResourceColor } value - Color of the fill area. Default value: Color.Black. + * @param { ResourceColor } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Sets the color of the fill area. - * An invalid value is handled as the default value. - * If this attribute and the universal attribute foregroundColor are both set, whichever is set later takes effect. + * Fill color. * - * @param { ResourceColor } value - Color of the fill area. Default value: Color.Black. + * @param { ResourceColor } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -28640,50 +29641,40 @@ declare class CommonShapeMethod extends CommonMethod { * @since 10 */ /** - * Sets the color of the fill area. - * An invalid value is handled as the default value. - * If this attribute and the universal attribute foregroundColor are both set, whichever is set later takes effect. + * Fill color. * - * @param { ResourceColor } value - Color of the fill area. Default value: Color.Black. + * @param { ResourceColor } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fill(value: ResourceColor): T; /** - * Sets the offset of the start point for drawing the stroke. - * An invalid value is handled as the default value. + * Offset from the start point of the border drawing. * - * @param { number | string } value - Offset of the start point for drawing the stroke. - * Default value: 0 - * Default unit: vp + * @param { number | string } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Sets the offset of the start point for drawing the stroke. - * An invalid value is handled as the default value. + * Offset from the start point of the border drawing. * - * @param { number | string } value - Offset of the start point for drawing the stroke. - * Default value: 0 - * Default unit: vp + * @param { number | string } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Sets the offset of the start point for drawing the stroke. - * An invalid value is handled as the default value. + * Offset from the start point of the border drawing. * - * @param { number | string } value - Offset of the start point for drawing the stroke. - * Default value: 0 - * Default unit: vp + * @param { number | string } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -28691,42 +29682,40 @@ declare class CommonShapeMethod extends CommonMethod { * @since 10 */ /** - * Sets the offset of the start point for drawing the stroke. - * An invalid value is handled as the default value. + * Offset from the start point of the border drawing. * - * @param { number | string } value - Offset of the start point for drawing the stroke. - * Default value: 0 - * Default unit: vp + * @param { number | string } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeDashOffset(value: number | string): T; /** - * Sets the cap style of the stroke. + * Path endpoint drawing style. * - * @param { LineCapStyle } value - Cap style of the stroke. Default value: LineCapStyle.Butt + * @param { LineCapStyle } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Sets the cap style of the stroke. + * Path endpoint drawing style. * - * @param { LineCapStyle } value - Cap style of the stroke. Default value: LineCapStyle.Butt + * @param { LineCapStyle } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Sets the cap style of the stroke. + * Path endpoint drawing style. * - * @param { LineCapStyle } value - Cap style of the stroke. Default value: LineCapStyle.Butt + * @param { LineCapStyle } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -28734,42 +29723,40 @@ declare class CommonShapeMethod extends CommonMethod { * @since 10 */ /** - * Sets the cap style of the stroke. + * Path endpoint drawing style. * - * @param { LineCapStyle } value - Cap style of the stroke. Default value: LineCapStyle.Butt + * @param { LineCapStyle } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeLineCap(value: LineCapStyle): T; /** - * Sets the join style of the stroke. - * This attribute does not work for the Circle component, which does not have corners. + * Border corner drawing style. * - * @param { LineJoinStyle } value - Join style of the stroke. Default value: LineJoinStyle.Miter + * @param { LineJoinStyle } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Sets the join style of the stroke. - * This attribute does not work for the Circle component, which does not have corners. + * Border corner drawing style. * - * @param { LineJoinStyle } value - Join style of the stroke. Default value: LineJoinStyle.Miter + * @param { LineJoinStyle } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Sets the join style of the stroke. - * This attribute does not work for the Circle component, which does not have corners. + * Border corner drawing style. * - * @param { LineJoinStyle } value - Join style of the stroke. Default value: LineJoinStyle.Miter + * @param { LineJoinStyle } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -28777,16 +29764,16 @@ declare class CommonShapeMethod extends CommonMethod { * @since 10 */ /** - * Sets the join style of the stroke. - * This attribute does not work for the Circle component, which does not have corners. + * Border corner drawing style. * - * @param { LineJoinStyle } value - Join style of the stroke. Default value: LineJoinStyle.Miter + * @param { LineJoinStyle } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeLineJoin(value: LineJoinStyle): T; @@ -28826,40 +29813,32 @@ declare class CommonShapeMethod extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeMiterLimit(value: number | string): T; /** - * Sets the stroke opacity. - * The value range is [0.0, 1.0]. - * A value less than 0.0 evaluates to the value 0.0. A value greater than 1.0 evaluates to the value 1.0. - * Any other value evaluates to the value 1.0. + * Sets the opacity of the border. * - * @param { number | string | Resource } value - Stroke opacity. Default value: 1 + * @param { number | string | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Sets the stroke opacity. - * The value range is [0.0, 1.0]. - * A value less than 0.0 evaluates to the value 0.0. A value greater than 1.0 evaluates to the value 1.0. - * Any other value evaluates to the value 1.0. + * Sets the opacity of the border. * - * @param { number | string | Resource } value - Stroke opacity. Default value: 1 + * @param { number | string | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Sets the stroke opacity. - * The value range is [0.0, 1.0]. - * A value less than 0.0 evaluates to the value 0.0. A value greater than 1.0 evaluates to the value 1.0. - * Any other value evaluates to the value 1.0. + * Sets the opacity of the border. * - * @param { number | string | Resource } value - Stroke opacity. Default value: 1 + * @param { number | string | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -28867,51 +29846,40 @@ declare class CommonShapeMethod extends CommonMethod { * @since 10 */ /** - * Sets the stroke opacity. - * The value range is [0.0, 1.0]. - * A value less than 0.0 evaluates to the value 0.0. A value greater than 1.0 evaluates to the value 1.0. - * Any other value evaluates to the value 1.0. + * Sets the opacity of the border. * - * @param { number | string | Resource } value - Stroke opacity. Default value: 1 + * @param { number | string | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeOpacity(value: number | string | Resource): T; /** - * Sets the opacity of the fill area. - * The value range is [0.0, 1.0]. - * A value less than 0.0 evaluates to the value 0.0. A value greater than 1.0 evaluates to the value 1.0. - * Any other value evaluates to the value 1.0. + * fill Opacity * - * @param { number | string | Resource } value - Opacity of the fill area. Default value: 1 + * @param { number | string | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Sets the opacity of the fill area. - * The value range is [0.0, 1.0]. - * A value less than 0.0 evaluates to the value 0.0. A value greater than 1.0 evaluates to the value 1.0. - * Any other value evaluates to the value 1.0. + * fill Opacity * - * @param { number | string | Resource } value - Opacity of the fill area. Default value: 1 + * @param { number | string | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Sets the opacity of the fill area. - * The value range is [0.0, 1.0]. - * A value less than 0.0 evaluates to the value 0.0. A value greater than 1.0 evaluates to the value 1.0. - * Any other value evaluates to the value 1.0. + * fill Opacity * - * @param { number | string | Resource } value - Opacity of the fill area. Default value: 1 + * @param { number | string | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -28919,57 +29887,40 @@ declare class CommonShapeMethod extends CommonMethod { * @since 10 */ /** - * Sets the opacity of the fill area. - * The value range is [0.0, 1.0]. - * A value less than 0.0 evaluates to the value 0.0. A value greater than 1.0 evaluates to the value 1.0. - * Any other value evaluates to the value 1.0. + * fill Opacity * - * @param { number | string | Resource } value - Opacity of the fill area. Default value: 1 + * @param { number | string | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fillOpacity(value: number | string | Resource): T; /** - * Sets the stroke width. - * If this attribute is of the string type, percentage values are not supported and will be treated as 1 px. + * Sets the width of the dividing line. * - * @param { Length } value - Stroke width. - * The value must be greater than or equal to 0. - * Default value: 1. - * Default unit: vp. - * An invalid value is handled as the default value. + * @param { Length } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Sets the stroke width. - * If this attribute is of the string type, percentage values are not supported and will be treated as 1 px. + * Sets the width of the dividing line. * - * @param { Length } value - Stroke width. - * The value must be greater than or equal to 0. - * Default value: 1. - * Default unit: vp. - * An invalid value is handled as the default value. + * @param { Length } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Sets the stroke width. - * If this attribute is of the string type, percentage values are not supported and will be treated as 1 px. + * Sets the width of the dividing line. * - * @param { Length } value - Stroke width. - * The value must be greater than or equal to 0. - * Default value: 1. - * Default unit: vp. - * An invalid value is handled as the default value. + * @param { Length } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -28977,53 +29928,40 @@ declare class CommonShapeMethod extends CommonMethod { * @since 10 */ /** - * Sets the stroke width. - * If this attribute is of the string type, percentage values are not supported and will be treated as 1 px. + * Sets the width of the dividing line. * - * @param { Length } value - Stroke width. - * The value must be greater than or equal to 0. - * Default value: 1. - * Default unit: vp. - * An invalid value is handled as the default value. + * @param { Length } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeWidth(value: Length): T; /** - * Specifies whether anti-aliasing is enabled. + * Indicates whether to enable anti-aliasing * - * @param { boolean } value - Whether anti-aliasing is enabled. - * true: Anti-aliasing is enabled. - * false: Anti-aliasing is disabled. - * Default value: true + * @param { boolean } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Specifies whether anti-aliasing is enabled. + * Indicates whether to enable anti-aliasing * - * @param { boolean } value - Whether anti-aliasing is enabled. - * true: Anti-aliasing is enabled. - * false: Anti-aliasing is disabled. - * Default value: true + * @param { boolean } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Specifies whether anti-aliasing is enabled. + * Indicates whether to enable anti-aliasing * - * @param { boolean } value - Whether anti-aliasing is enabled. - * true: Anti-aliasing is enabled. - * false: Anti-aliasing is disabled. - * Default value: true + * @param { boolean } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -29031,51 +29969,40 @@ declare class CommonShapeMethod extends CommonMethod { * @since 10 */ /** - * Specifies whether anti-aliasing is enabled. + * Indicates whether to enable anti-aliasing * - * @param { boolean } value - Whether anti-aliasing is enabled. - * true: Anti-aliasing is enabled. - * false: Anti-aliasing is disabled. - * Default value: true + * @param { boolean } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ antiAlias(value: boolean): T; /** - * Sets stroke dashes. - * The value must be greater than or equal to 0. Invalid values are treated as the default value. + * Sets the gap for the border. * - * @param { Array } value - Stroke dashes. - * Default value: [] - * Default unit: vp + * @param { Array } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Sets stroke dashes. - * The value must be greater than or equal to 0. Invalid values are treated as the default value. + * Sets the gap for the border. * - * @param { Array } value - Stroke dashes. - * Default value: [] - * Default unit: vp + * @param { Array } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Sets stroke dashes. - * The value must be greater than or equal to 0. Invalid values are treated as the default value. + * Sets the gap for the border. * - * @param { Array } value - Stroke dashes. - * Default value: [] - * Default unit: vp + * @param { Array } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -29083,12 +30010,9 @@ declare class CommonShapeMethod extends CommonMethod { * @since 10 */ /** - * Sets stroke dashes. - * The value must be greater than or equal to 0. Invalid values are treated as the default value. + * Sets the gap for the border. * - * @param { Array } value - Stroke dashes. - * Default value: [] - * Default unit: vp + * @param { Array } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -29097,6 +30021,20 @@ declare class CommonShapeMethod extends CommonMethod { * @since 11 */ strokeDashArray(value: Array): T; + + /** + * Sets the gap for the border. + * + * @param { Array } value + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + strokeDashArray(value: Array): T; } /** @@ -29236,18 +30174,19 @@ declare interface LinearGradient { } /** - * Defines the direction of pixel rounding at the component level. + * Defines the pixel round property. * * @interface PixelRoundPolicy * @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 PixelRoundPolicy { /** - * Rounding for alignment with the start edge. + * start property. * * @type { ?PixelRoundCalcPolicy } * @default PixelRoundCalcPolicy.NO_FORCE_ROUND @@ -29255,12 +30194,13 @@ declare interface PixelRoundPolicy { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ start?: PixelRoundCalcPolicy; /** - * Rounding for alignment with the top edge. + * top property. * * @type { ?PixelRoundCalcPolicy } * @default PixelRoundCalcPolicy.NO_FORCE_ROUND @@ -29268,12 +30208,13 @@ declare interface PixelRoundPolicy { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ top?: PixelRoundCalcPolicy; /** - * Rounding for alignment with the end edge. + * end property. * * @type { ?PixelRoundCalcPolicy } * @default PixelRoundCalcPolicy.NO_FORCE_ROUND @@ -29281,12 +30222,13 @@ declare interface PixelRoundPolicy { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ end?: PixelRoundCalcPolicy; /** - * Rounding for alignment with the bottom edge. + * bottom property. * * @type { ?PixelRoundCalcPolicy } * @default PixelRoundCalcPolicy.NO_FORCE_ROUND @@ -29294,7 +30236,8 @@ declare interface PixelRoundPolicy { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bottom?: PixelRoundCalcPolicy; } @@ -29305,7 +30248,8 @@ declare interface PixelRoundPolicy { * @interface LinearGradientBlurOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LinearGradientBlurOptions { /** @@ -29314,7 +30258,8 @@ declare interface LinearGradientBlurOptions { * @type { FractionStop[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fractionStops: FractionStop[]; /** @@ -29323,19 +30268,21 @@ declare interface LinearGradientBlurOptions { * @type { GradientDirection } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ direction: GradientDirection; } /** * Define motion blur anchor coordinates. - * + * * @interface MotionBlurAnchor * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface MotionBlurAnchor { /** @@ -29344,7 +30291,8 @@ declare interface MotionBlurAnchor { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ x: number; /** @@ -29353,19 +30301,21 @@ declare interface MotionBlurAnchor { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ y: number; } /** * Define motion blur options. - * + * * @interface MotionBlurOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface MotionBlurOptions { /** @@ -29374,16 +30324,18 @@ declare interface MotionBlurOptions { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radius: number; /** * Define motion blur anchor coordinates. - * + * * @type { MotionBlurAnchor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ anchor: MotionBlurAnchor; } @@ -29570,7 +30522,8 @@ declare interface LayoutChild { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GeometryInfo extends SizeResult { /** @@ -29588,7 +30541,8 @@ declare interface GeometryInfo extends SizeResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ borderWidth: EdgeWidth; @@ -29607,7 +30561,8 @@ declare interface GeometryInfo extends SizeResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ margin: Margin, @@ -29626,7 +30581,8 @@ declare interface GeometryInfo extends SizeResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ padding: Padding, } @@ -29640,13 +30596,14 @@ declare interface GeometryInfo extends SizeResult { * @since 10 */ /** - * Provides the child component layout information. + * Sub component info passed from framework when layout happens. * * @interface Layoutable * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface Layoutable { /** @@ -29664,7 +30621,8 @@ declare interface Layoutable { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ measureResult: MeasureResult, @@ -29675,7 +30633,8 @@ declare interface Layoutable { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ uniqueId?: number; @@ -29688,46 +30647,50 @@ declare interface Layoutable { * @since 10 */ /** - * Applies the specified position information to the child component. + * Call this layout method in onLayout callback to assign layout info to sub component. * * @param { Position } position * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ layout(position: Position): void, /** - * Obtains the margin of the child component. + * Call this method to get the margin of sub component. * * @returns { DirectionalEdgesT } the margin of sub component, unit is vp * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getMargin() : DirectionalEdgesT, /** * Call this method to get the padding of sub component. * - * @returns { DirectionalEdgesT } Padding of the child component, unit is vp. + * @returns { DirectionalEdgesT } the padding of sub component, unit is vp * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getPadding() : DirectionalEdgesT, - + /** - * Obtains the border width of the child component. + * Call this method to get the borderWidth of sub component. * * @returns { DirectionalEdgesT } the borderWidth of sub component, unit is vp * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getBorderWidth() : DirectionalEdgesT, } @@ -29747,17 +30710,19 @@ declare interface Layoutable { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface Measurable { /** - * Unique ID that the system assigns to the child component. + * Unique ID of the child component. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ uniqueId?: number; @@ -29771,47 +30736,51 @@ declare interface Measurable { * @since 10 */ /** - * Applies the size constraint to the child component. + * Call this measure method in onMeasure callback to supply sub component size. * * @param { ConstraintSizeOptions } constraint - * @returns { MeasureResult } Provides the measurement result of the component. + * @returns { MeasureResult } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ measure(constraint: ConstraintSizeOptions) : MeasureResult, /** - * Obtains the margin of the child component. + * Call this method to get the margin of sub component. * - * @returns { DirectionalEdgesT } Margin of the child component, unit is vp. + * @returns { DirectionalEdgesT } the margin of sub component, unit is vp * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getMargin() : DirectionalEdgesT, /** - * Obtains the padding of the child component. + * Call this method to get the padding of sub component. * * @returns { DirectionalEdgesT } the padding of sub component, unit is vp * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getPadding() : DirectionalEdgesT, /** - * Obtains the border width of the child component. + * Call this method to get the borderWidth of sub component. * - * @returns { DirectionalEdgesT } Border width of the child component, unit is vp. + * @returns { DirectionalEdgesT } the borderWidth of sub component, unit is vp * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getBorderWidth() : DirectionalEdgesT, } @@ -29825,13 +30794,14 @@ declare interface Measurable { * @since 10 */ /** - * Provides the component size information. + * Sub component SizeResult info. * * @interface SizeResult * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SizeResult { /** @@ -29843,13 +30813,14 @@ declare interface SizeResult { * @since 10 */ /** - * Width obtained from the measurement result. Unit: vp. + * Width obtained from the measurement result. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ width: number, @@ -29862,13 +30833,14 @@ declare interface SizeResult { * @since 10 */ /** - * Height obtained from the measurement result. Unit: vp. + * Height obtained from the measurement result. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ height: number, } @@ -29883,17 +30855,18 @@ declare interface SizeResult { * @since 10 */ /** - * Provides the measurement result of the component. + * Sub component MeasureResult info. * * @extends SizeResult * @interface MeasureResult * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface MeasureResult extends SizeResult { - + } /** @@ -29914,6 +30887,30 @@ declare interface MeasureResult extends SizeResult { */ declare type NavDestinationInfo = import('../api/@ohos.arkui.observer').default.NavDestinationInfo; + +/** + * The navigation destination information. + * + * @typedef {uiObserver.NavDestinationInfo} NavDestinationInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type NavDestinationInfo = uiObserver.NavDestinationInfo; +/** + * The navigation information. + * + * @typedef { uiObserver.NavigationInfo } NavigationInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type NavigationInfo = uiObserver.NavigationInfo; + /** * The navigation information. * @@ -29936,6 +30933,18 @@ declare type NavigationInfo = import('../api/@ohos.arkui.observer').default.Navi */ declare type RouterPageInfo = import('../api/@ohos.arkui.observer').default.RouterPageInfo; +/** + * The router page information. + * + * @typedef {uiObserver.RouterPageInfo} RouterPageInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type RouterPageInfo = uiObserver.RouterPageInfo; + /** * UIContext * @@ -29976,6 +30985,18 @@ declare type DrawContext = import('../api/arkui/Graphics').DrawContext; */ declare type VisualEffect = import('../api/@ohos.graphics.uiEffect').default.VisualEffect; +/** + * VisualEffect + * + * @typedef { import('../api/@ohos.graphics.uiEffect').default.VisualEffect } VisualEffect + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type VisualEffect = uiEffect.VisualEffect; + /** * Filter @@ -29988,6 +31009,18 @@ declare type VisualEffect = import('../api/@ohos.graphics.uiEffect').default.Vis */ declare type Filter = import('../api/@ohos.graphics.uiEffect').default.Filter; +/** + * Filter + * + * @typedef { import('../api/@ohos.graphics.uiEffect').default.Filter } Filter + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type Filter = uiEffect.Filter; + /** * Blender * @@ -29999,6 +31032,18 @@ declare type Filter = import('../api/@ohos.graphics.uiEffect').default.Filter; */ declare type Blender = import('../api/@ohos.graphics.uiEffect').default.Blender; +/** + * Blender + * + * @typedef { import('../api/@ohos.graphics.uiEffect').default.Blender } Blender + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @form + * @since 20 + * @arkts 1.2 + */ +declare type Blender = uiEffect.Blender; + /** * ComponentContent. * @@ -30031,6 +31076,17 @@ declare type Theme = import('../api/@ohos.arkui.theme').Theme; */ declare type PromptActionDialogController = import('../api/@ohos.promptAction').promptAction.DialogController; +/** + * Import the DialogController type from promptAction. + * + * @typedef { promptAction.DialogController } PromptActionDialogController + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type PromptActionDialogController = promptAction.DialogController; + /** * Custom Component * @@ -30077,8 +31133,7 @@ declare type PromptActionDialogController = import('../api/@ohos.promptAction'). */ declare class CustomComponent extends BaseCustomComponent { /** - * Invoked when a reusable custom component is re-added to the node tree - * from the reuse cache to receive construction parameters of the component. + * aboutToReuse Method * * @param { object } params - Custom component init params. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -30086,8 +31141,7 @@ declare class CustomComponent extends BaseCustomComponent { * @since 10 */ /** - * Invoked when a reusable custom component is re-added to the node tree - * from the reuse cache to receive construction parameters of the component. + * aboutToReuse Method * * @param { object } params - Custom component init params. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -30146,9 +31200,9 @@ declare class CustomComponent extends BaseCustomComponent { */ declare class CustomComponentV2 extends BaseCustomComponent { /** - * Invoked when a reusable custom component managed by state management V2 - * is taken from the reuse pool and reinserted into the node tree. - * + * aboutToReuse Method for @ComponentV2, it is executed when fetching instance of custom component from RecyclePool. + * It is different from the @Reusable in CustomComponent, there is no param parameter in this callback. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -30210,41 +31264,37 @@ declare class BaseCustomComponent extends CommonAttribute { build(): void; /** - * Invoked after a new instance of the custom component is created - * and before its build() function is executed. You can change state variables in aboutToAppear. - * The change will take effect when you execute the build() function next time. - * The aboutToAppear lifecycle callback of a custom component with a custom layout - * is invoked during the layout process. + * aboutToAppear Method + * + * The aboutToAppear function is executed after a new instance of the custom component is created, before its build() function is executed. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Invoked after a new instance of the custom component is created - * and before its build() function is executed. You can change state variables in aboutToAppear. - * The change will take effect when you execute the build() function next time. - * The aboutToAppear lifecycle callback of a custom component with a custom layout - * is invoked during the layout process. + * aboutToAppear Method + * + * The aboutToAppear function is executed after a new instance of the custom component is created, before its build() function is executed. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Invoked after a new instance of the custom component is created - * and before its build() function is executed. You can change state variables in aboutToAppear. - * The change will take effect when you execute the build() function next time. - * The aboutToAppear lifecycle callback of a custom component with a custom layout - * is invoked during the layout process. + * aboutToAppear Method + * + * The aboutToAppear function is executed after a new instance of the custom component is created, before its build() function is executed. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Invoked after a new instance of the custom component is created - * and before its build() function is executed. You can change state variables in aboutToAppear. - * The change will take effect when you execute the build() function next time. - * The aboutToAppear lifecycle callback of a custom component with a custom layout - * is invoked during the layout process. + * aboutToAppear Method + * + * The aboutToAppear function is executed after a new instance of the custom component is created, before its build() function is executed. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -30252,11 +31302,10 @@ declare class BaseCustomComponent extends CommonAttribute { * @since 11 */ /** - * Invoked after a new instance of the custom component is created - * and before its build() function is executed. You can change state variables in aboutToAppear. - * The change will take effect when you execute the build() function next time. - * The aboutToAppear lifecycle callback of a custom component with a custom layout - * is invoked during the layout process. + * aboutToAppear Method and it is migrated from class CustomComponent. + * + * The aboutToAppear function is executed after a new instance of the custom component is created, before its build() function is executed. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -30266,33 +31315,37 @@ declare class BaseCustomComponent extends CommonAttribute { aboutToAppear?(): void; /** - * Invoked when this component is about to disappear. - * Do not change state variables in the aboutToDisappear function as doing this can cause unexpected errors. - * For example, the modification of the @Link decorated variable may cause unstable application running. + * aboutToDisappear Method + * + * The aboutToDisappear function executes before a custom component is destroyed. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Invoked when this component is about to disappear. - * Do not change state variables in the aboutToDisappear function as doing this can cause unexpected errors. - * For example, the modification of the @Link decorated variable may cause unstable application running. + * aboutToDisappear Method + * + * The aboutToDisappear function executes before a custom component is destroyed. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Invoked when this component is about to disappear. - * Do not change state variables in the aboutToDisappear function as doing this can cause unexpected errors. - * For example, the modification of the @Link decorated variable may cause unstable application running. + * aboutToDisappear Method + * + * The aboutToDisappear function executes before a custom component is destroyed. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Invoked when this component is about to disappear. - * Do not change state variables in the aboutToDisappear function as doing this can cause unexpected errors. - * For example, the modification of the @Link decorated variable may cause unstable application running. + * aboutToDisappear Method + * + * The aboutToDisappear function executes before a custom component is destroyed. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -30300,9 +31353,10 @@ declare class BaseCustomComponent extends CommonAttribute { * @since 11 */ /** - * Invoked when this component is about to disappear. - * Do not change state variables in the aboutToDisappear function as doing this can cause unexpected errors. - * For example, the modification of the @Link decorated variable may cause unstable application running. + * aboutToDisappear Method and it is migrated from class CustomComponent. + * + * The aboutToDisappear function executes before a custom component is destroyed. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -30311,6 +31365,7 @@ declare class BaseCustomComponent extends CommonAttribute { */ aboutToDisappear?(): void; + /** * aboutToRecycle Method * @@ -30336,9 +31391,10 @@ declare class BaseCustomComponent extends CommonAttribute { */ aboutToRecycle?(): void; + /** * The onWillApplyTheme function is a custom hook to get active theme object from the context - * + * * @param { Theme } theme - Custom theme init params. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -30347,7 +31403,7 @@ declare class BaseCustomComponent extends CommonAttribute { */ /** * The onWillApplyTheme function is a custom hook to get active theme object from the context, it is migrated from class CustomComponent. - * + * * @param { Theme } theme - Custom theme init params. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -30356,6 +31412,8 @@ declare class BaseCustomComponent extends CommonAttribute { */ onWillApplyTheme?(theme: Theme): void; + + /** * Custom component override this method to layout each of its sub components. * @@ -30390,6 +31448,7 @@ declare class BaseCustomComponent extends CommonAttribute { */ onPlaceChildren?(selfLayoutInfo: GeometryInfo, children: Array, constraint: ConstraintSizeOptions): void; + /** * Custom component override this method to measure each of its sub components. * @param { GeometryInfo } selfLayoutInfo @@ -30424,38 +31483,39 @@ declare class BaseCustomComponent extends CommonAttribute { */ onMeasureSize?(selfLayoutInfo: GeometryInfo, children: Array, constraint: ConstraintSizeOptions): SizeResult; + /** - * Invoked each time the page is displayed, for example, during page redirection. - * When the application is switched to the foreground. - * It works only for the custom components decorated by **@Entry**. - * + * onPageShow Method + * + * The page is triggered once each time it is displayed, including scenarios such as the routing process and the application entering the foreground + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Invoked each time the page is displayed, for example, during page redirection. - * When the application is switched to the foreground. - * It works only for the custom components decorated by **@Entry**. - * + * onPageShow Method + * + * The page is triggered once each time it is displayed, including scenarios such as the routing process and the application entering the foreground + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Invoked each time the page is displayed, for example, during page redirection. - * When the application is switched to the foreground. - * It works only for the custom components decorated by **@Entry**. - * + * onPageShow Method + * + * The page is triggered once each time it is displayed, including scenarios such as the routing process and the application entering the foreground + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ /** - * Invoked each time the page is displayed, for example, during page redirection. - * When the application is switched to the foreground. - * It works only for the custom components decorated by **@Entry**. - * + * onPageShow Method and it is migrated from class CustomComponent. + * + * The page is triggered once each time it is displayed, including scenarios such as the routing process and the application entering the foreground + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -30463,38 +31523,39 @@ declare class BaseCustomComponent extends CommonAttribute { */ onPageShow?(): void; + /** - * Invoked each time the page is hidden, for example, during page redirection. - * When the application is switched to the background. - * It works only for the custom components decorated by **@Entry**. - * + * onPageHide Method + * + * It is triggered once each time the page is hidden, including scenarios such as the routing process and the application entering the background + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Invoked each time the page is hidden, for example, during page redirection. - * When the application is switched to the background. - * It works only for the custom components decorated by **@Entry**. - * + * onPageHide Method + * + * It is triggered once each time the page is hidden, including scenarios such as the routing process and the application entering the background + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Invoked each time the page is hidden, for example, during page redirection. - * When the application is switched to the background. - * It works only for the custom components decorated by **@Entry**. - * + * onPageHide Method + * + * It is triggered once each time the page is hidden, including scenarios such as the routing process and the application entering the background + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ /** - * Invoked each time the page is hidden, for example, during page redirection. - * When the application is switched to the background. - * It works only for the custom components decorated by **@Entry**. - * + * onPageHide Method and it is migrated from class CustomComponent. + * + * It is triggered once each time the page is hidden, including scenarios such as the routing process and the application entering the background + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -30539,6 +31600,7 @@ declare class BaseCustomComponent extends CommonAttribute { */ onFormRecycle?(): string; + /** * onFormRecover Method, this is only for ArkTS form * @@ -30556,7 +31618,8 @@ declare class BaseCustomComponent extends CommonAttribute { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ /** * onFormRecover Method, this is only for ArkTS form, it is migrated from class CustomComponent. @@ -30570,14 +31633,12 @@ declare class BaseCustomComponent extends CommonAttribute { */ onFormRecover?(statusData: string): void; + /** * onBackPress Method * - * Invoked when the user clicks the Back button. - * It works only for the custom components decorated by @Entry. - * The value **true** means that the page executes its own return logic. - * And **false** (default) means that the default return logic is used. - * + * Triggered when the user clicks the back button + * * @returns { void | boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 @@ -30585,11 +31646,8 @@ declare class BaseCustomComponent extends CommonAttribute { /** * onBackPress Method * - * Invoked when the user clicks the Back button. - * It works only for the custom components decorated by @Entry. - * The value **true** means that the page executes its own return logic. - * And **false** (default) means that the default return logic is used. - * + * Triggered when the user clicks the back button + * * @returns { void | boolean } true means that the page itself processes the return logic. * false means that the default return logic is used. * If no value is returned, the default return logic is used. @@ -30600,11 +31658,8 @@ declare class BaseCustomComponent extends CommonAttribute { /** * onBackPress Method * - * Invoked when the user clicks the Back button. - * It works only for the custom components decorated by @Entry. - * The value **true** means that the page executes its own return logic. - * And **false** (default) means that the default return logic is used. - * + * Triggered when the user clicks the back button + * * @returns { void | boolean } true means that the page itself processes the return logic. * false means that the default return logic is used. * If no value is returned, the default return logic is used. @@ -30614,11 +31669,10 @@ declare class BaseCustomComponent extends CommonAttribute { * @since 11 */ /** - * Invoked when the user clicks the Back button. - * It works only for the custom components decorated by @Entry. - * The value **true** means that the page executes its own return logic. - * And **false** (default) means that the default return logic is used. - * + * onBackPress Method and it is migrated from class CustomComponent. + * + * Triggered when the user clicks the back button + * * @returns { void | boolean } true means that the page itself processes the return logic. * false means that the default return logic is used. * If no value is returned, the default return logic is used. @@ -30629,6 +31683,7 @@ declare class BaseCustomComponent extends CommonAttribute { */ onBackPress?(): void | boolean; + /** * PageTransition Method. * Implement Animation when enter this page or move to other pages. @@ -30651,7 +31706,8 @@ declare class BaseCustomComponent extends CommonAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * PageTransition Method and it is migrated from class CustomComponent. @@ -30664,6 +31720,7 @@ declare class BaseCustomComponent extends CommonAttribute { */ pageTransition?(): void; + /** * Get current UIContext * @@ -30694,9 +31751,6 @@ declare class BaseCustomComponent extends CommonAttribute { /** * Get uniqueId of the custom component. - * This unique ID is assigned by the system to each component. - * If this API is called before the component's corresponding node is created or after it has been destroyed, an - * invalid unique ID, which is -1, will be returned. * * @returns { number } - The uniqueId of the custom component. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -30706,9 +31760,6 @@ declare class BaseCustomComponent extends CommonAttribute { */ /** * Get uniqueId of the custom component and it is migrated from class CustomComponent. - * This unique ID is assigned by the system to each component. - * If this API is called before the component's corresponding node is created or after it has been destroyed, an - * invalid unique ID, which is -1, will be returned. * * @returns { number } - The uniqueId of the custom component. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -30719,7 +31770,7 @@ declare class BaseCustomComponent extends CommonAttribute { getUniqueId(): number; /** - * Queries the **NavDestination** information of this custom component. + * Queries the navigation destination information. * * @returns { NavDestinationInfo | undefined } The navigation destination information, or undefined if it is not available. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -30727,7 +31778,7 @@ declare class BaseCustomComponent extends CommonAttribute { * @since 11 */ /** - * Queries the **NavDestination** information of this custom component. + * Queries the navigation destination information. * * @returns { NavDestinationInfo | undefined } The navigation destination information, or undefined if it is not available. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -30736,7 +31787,7 @@ declare class BaseCustomComponent extends CommonAttribute { * @since 12 */ /** - * Queries the **NavDestination** information of this custom component. + * Queries the navigation destination information and it is migrated from class CustomComponent. * * @returns { NavDestinationInfo | undefined } The navigation destination information, or undefined if it is not available. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -30745,10 +31796,9 @@ declare class BaseCustomComponent extends CommonAttribute { * @since 18 */ queryNavDestinationInfo(): NavDestinationInfo | undefined; - + /** - * Queries the information about the nearest **NavDestination** component - * in the navigation stack for a custom component. + * Queries the navigation destination information. * * @param { Optional } [isInner] * @returns { NavDestinationInfo | undefined } The navigation destination information, or undefined if it is not available. @@ -30760,8 +31810,8 @@ declare class BaseCustomComponent extends CommonAttribute { queryNavDestinationInfo(isInner: Optional): NavDestinationInfo | undefined; /** - * Queries the **Navigation** information of this custom component. - * + * Query the navigation information of the current custom component. + * * @returns { NavigationInfo | undefined } The navigation information, or undefined if it is not available * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -30769,8 +31819,8 @@ declare class BaseCustomComponent extends CommonAttribute { * @since 12 */ /** - * Queries the **Navigation** information of this custom component. - * + * Query the navigation information of the current custom component and it is migrated from class CustomComponent. + * * @returns { NavigationInfo | undefined } The navigation information, or undefined if it is not available * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -30780,7 +31830,7 @@ declare class BaseCustomComponent extends CommonAttribute { queryNavigationInfo(): NavigationInfo | undefined; /** - * Obtains a **RouterPageInfo** instance. + * Query the router page information of the current custom component. * * @returns { RouterPageInfo | undefined } The router page information, or undefined if it is not available. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -30789,7 +31839,7 @@ declare class BaseCustomComponent extends CommonAttribute { * @since 12 */ /** - * Obtains a **RouterPageInfo** instance. + * Query the router page information of the current custom component and it is migrated from class CustomComponent. * * @returns { RouterPageInfo | undefined } The router page information, or undefined if it is not available. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -30839,9 +31889,10 @@ declare class BaseCustomComponent extends CommonAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since 18 */ onNewParam?(param: ESObject): void; + } /** * View @@ -30890,13 +31941,14 @@ declare class View { * @since 10 */ /** - * Describe the position, width, and height of a component. + * Rect info. * * @interface RectResult * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RectResult { /** @@ -30907,13 +31959,14 @@ declare interface RectResult { * @since 10 */ /** - * Horizontal coordinate. + * x:Horizontal coordinate relative to the component. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ x: number; @@ -30925,13 +31978,14 @@ declare interface RectResult { * @since 10 */ /** - * Vertical coordinate. + * y:Vertical axis coordinate relative to the component. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ y: number; @@ -30943,13 +31997,14 @@ declare interface RectResult { * @since 10 */ /** - * Content width. + * Get the width of the current textRect. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ width: number; @@ -30961,13 +32016,14 @@ declare interface RectResult { * @since 10 */ /** - * Content height. + * Get the height of the current textRect. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ height: number; } @@ -30987,7 +32043,8 @@ declare interface RectResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CaretOffset { /** @@ -31003,7 +32060,8 @@ declare interface CaretOffset { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ index: number; @@ -31020,10 +32078,11 @@ declare interface CaretOffset { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ x: number; - + /** * Get the y of the relative position. * @@ -31037,7 +32096,8 @@ declare interface CaretOffset { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ y: number; } @@ -31049,7 +32109,8 @@ declare interface CaretOffset { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextContentControllerOptions { /** @@ -31059,7 +32120,8 @@ declare interface TextContentControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: number; } @@ -31077,7 +32139,8 @@ declare interface TextContentControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare abstract class TextContentControllerBase { /** @@ -31091,20 +32154,12 @@ declare abstract class TextContentControllerBase { /** * Get the index and relative position of the CaretOffset. * - *

NOTE: - *
If this API is called when the caret position is updated in the current frame, it will not take effect. - *
For the Search component, the returned position information is the offset of the first character - * relative to the search icon in the component. - *
If no text is entered in the Search component, - * the return value contains the position information relative to the component. - *
The location information in the return value is the location of the caret relative to the editable component. - *

- * * @returns { CaretOffset } index and relative position of the CaretOffset. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCaretOffset() : CaretOffset; @@ -31119,19 +32174,12 @@ declare abstract class TextContentControllerBase { /** * Get the start and end positions of the text content. * - *

NOTE: - *
If no text is entered, the return value contains the position information, but the size is 0. - *
The position information is the offset of the first character relative to the editable area. - *
For the Search component, the returned position information is the offset of the first character - * relative to the search icon in the component. - *
If there is input, the width in the return value is the fixed width of the editable area. - *

- * - * @returns { RectResult } Text content rect.The unit of the return value is pixel. + * @returns { RectResult } Text content rect. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getTextContentRect() : RectResult; @@ -31145,13 +32193,13 @@ declare abstract class TextContentControllerBase { */ /** * Get the lines number of the text content. - * The getTextContentLineCount type is used to obtain the number of lines of the edited text. - * + * * @returns { number } Text content line count * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getTextContentLineCount() : number; @@ -31164,7 +32212,8 @@ declare abstract class TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ addText(text: string, textOperationOptions?: TextContentControllerOptions): number; @@ -31175,7 +32224,8 @@ declare abstract class TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ deleteText(range?: TextRange): void; @@ -31186,7 +32236,8 @@ declare abstract class TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ getSelection(): TextRange; @@ -31195,7 +32246,8 @@ declare abstract class TextContentControllerBase { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ clearPreviewText(): void; @@ -31207,7 +32259,8 @@ declare abstract class TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getText(range?: TextRange): string; } @@ -31219,7 +32272,8 @@ declare abstract class TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ContentClipMode { /** @@ -31228,7 +32282,8 @@ declare enum ContentClipMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ CONTENT_ONLY = 0, @@ -31238,7 +32293,8 @@ declare enum ContentClipMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ BOUNDARY = 1, @@ -31248,7 +32304,8 @@ declare enum ContentClipMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ SAFE_AREA = 2, } @@ -31270,77 +32327,60 @@ declare enum ContentClipMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ScrollableCommonMethod extends CommonMethod { /** - * Sets the scrollbar state. + * Scrollbar status. * - * @param { BarState } barState - Scrollbar state.
Default value: BarState.Auto for the List, Grid, - * and Scroll components and BarState.Off for the WaterFlow component + * @param { BarState } barState - Scrollbar status. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scrollBar(barState: BarState): T; /** - * Sets the scrollbar color. + * Color of the scrollbar. * - * @param { Color | number | string } color - Scrollbar color.
Default value: '\#182431' (40% opacity) - *
A number value indicates a HEX color in RGB or ARGB format, - * for example, 0xffffff. A string value indicates a color in RGB or ARGB format, for example, '#ffffff'. + * @param { Color | number | string } color - Color of the scrollbar. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scrollBarColor(color: Color | number | string): T; /** - * Sets the scrollbar width. + * Width of the scrollbar. * - * @param { number | string } value - Scrollbar width.
Default value: 4 - *
Unit: vp - *
If this parameter is set to a value less than or equal to 0, the default value is used. - * The value 0 means not to show the scrollbar. + * @param { number | string } value - Width of the scrollbar. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scrollBarWidth(value: number | string): T; /** - * Margin of the scrollbar. - * - * @param { ScrollBarMargin } margin - Margin of the scrollbar. - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - scrollBarMargin(margin: ScrollBarMargin): T; - - /** - * Sets the effect used when the scroll boundary is reached. + * Edge scrolling effect. * - * @param { EdgeEffect } edgeEffect - Effect used when the scroll boundary is reached. The spring and shadow effects are supported. - *
Default value: EdgeEffect.None for the Grid, Scroll, and WaterFlow components and EdgeEffect.Spring for the List component - * @param { EdgeEffectOptions } options - Whether to enable the scroll effect when the component content is smaller than the component itself. - * The value { alwaysEnabled: true } means to enable the scroll effect, and { alwaysEnabled: false } means the opposite. - *
Default value:
{ alwaysEnabled: false } for the List, Grid, and WaterFlow components, - * and { alwaysEnabled: true } for the Scroll component + * @param { EdgeEffect } edgeEffect - edge scrolling effect. + * @param { EdgeEffectOptions } options - edge scrolling effect options. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ edgeEffect(edgeEffect: EdgeEffect, options?: EdgeEffectOptions): T; @@ -31353,48 +32393,52 @@ declare class ScrollableCommonMethod extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ fadingEdge(enabled: Optional, options?: FadingEdgeOptions): T; /** - * Sets the nested scrolling options. + * Nested scrolling options. * - * @param { NestedScrollOptions } value - Nested scrolling options. - * @returns { T } + * @param { NestedScrollOptions } value - options for nested scrolling. + * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ nestedScroll(value: NestedScrollOptions): T; /** - * Sets whether to support scroll gestures. + * Whether to support scroll gestures by finger or mouse. * - * @param { boolean } value - Whether to support scroll gestures.
Default value: true - * @returns { T } + * @param { boolean } value - Whether to support scroll gestures by finger or mouse. + * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enableScrollInteraction(value: boolean): T; /** - * Sets the friction coefficient. + * Friction coefficient. * - * @param { number | Resource } value - Friction coefficient. - * @returns { T } + * @param { number | Resource } value - friction coefficient. + * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ friction(value: number | Resource): T; /** - * Triggered when the scrollable component scrolls. + * Called when the scrollable scrolls. * * @param { function } event - callback of scrollable, * scrollOffset is offset per frame scrolling, ScrollState is current scroll state. @@ -31421,9 +32465,10 @@ declare class ScrollableCommonMethod extends CommonMethod { onWillScroll(handler: Optional): T; /** - * Triggered when the scrollable component scrolls. + * Called when the scrollable did scroll. * - * @param { OnScrollCallback } handler - Callback triggered when the scrollable component scrolls. + * @param { OnScrollCallback } handler - callback of scrollable, + * scrollOffset is offset this frame did scroll, scrollState is current scroll state. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -31447,77 +32492,81 @@ declare class ScrollableCommonMethod extends CommonMethod { onWillStopDragging(handler: OnWillStopDraggingCallback): T; /** - * Triggered when the scrollable component reaches the start position. + * Called when the scrollable reaches the start position. * * @param { function } event - Callback function, triggered when the scrollable reaches the start position. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onReachStart(event: () => void): T; /** - * Triggered when the scrollable component reaches the end position. + * Called when the scrollable reaches the end position. * * @param { function } event - Callback function, triggered when the scrollable reaches the end position. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onReachEnd(event: () => void): T; /** - * Triggered when the scrollable component starts scrolling initiated by the user's finger dragging the component or its scrollbar. + * Called when the scrollable starts scrolling. * * @param { function } event - Callback function, triggered when the scrollable starts scrolling. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onScrollStart(event: () => void): T; /** - * Triggered when scrolling stops after the user's finger leaves the screen. + * Called when the scrollable stops scrolling. * * @param { function } event - Callback function, triggered when the scrollable stops scrolling. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onScrollStop(event: () => void): T; /** - * Sets the maximum initial velocity at the start of the fling animation that occurs after gesture-driven scrolling ends. + * Limit the max speed when fling. * - * @param { number } speedLimit - Maximum initial velocity at the start of the fling animation. - *
Default value: 9000 - *
Unit: vp/s - *
Value range: (0, +∞). If this parameter is set to a value less than or equal to 0, the default value is used. + * @param { number } speedLimit - Max fling speed, the minimum value is 0, the maximum value is not limited. + * The unit is vp/s. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ flingSpeedLimit(speedLimit: number): T; /** - * Sets the content clipping area for this scrollable component. - * + * Clip the content of the scrollable container, excluding background. + * * @param { ContentClipMode | RectShape } clip - A value from enum ContentClipMode or a customized clip rect. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ clipContent(clip: ContentClipMode | RectShape): T; @@ -31529,20 +32578,22 @@ declare class ScrollableCommonMethod extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ digitalCrownSensitivity(sensitivity: Optional): T; - + /** - * Sets whether to enable the back-to-top feature for a scrollable component when the status bar is touched. - * - * @param { boolean } backToTop - Whether to enable the back-to-top feature for a scrollable component when the status bar is touched. - *
Default value: false + * Controls whether the scrollable scrolls back to top when status bar is clicked. + * + * @param { boolean } backToTop - whether the scrollable scrolls back to top when status bar is clicked. + * The default value is false. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ backToTop(backToTop: boolean): T; } @@ -31552,7 +32603,8 @@ declare class ScrollableCommonMethod extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ScrollResult { /** @@ -31561,7 +32613,8 @@ declare class ScrollResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ offsetRemain: number; } @@ -31573,16 +32626,34 @@ declare class ScrollResult { * @param { number } scrollOffset - offset this frame will scroll, which may or may not be reached. * @param { ScrollState } scrollState - current scroll state. * @param { ScrollSource } scrollSource - source of current scroll. - * @returns { void | ScrollResult } the remain offset for the scrollable, + * @returns { void | ScrollResult } the remain offset for the scrollable, * same as scrollOffset when no ScrollResult is returned. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ -declare type OnWillScrollCallback = +declare type OnWillScrollCallback = (scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => void | ScrollResult; +/** + * Called before scroll to allow developer to control real offset the Scrollable can scroll. + * + * @typedef { function } OnWillScrollCallback + * @param { number } scrollOffset - offset this frame will scroll, which may or may not be reached. + * @param { ScrollState } scrollState - current scroll state. + * @param { ScrollSource } scrollSource - source of current scroll. + * @returns { void | ScrollResult } the remain offset for the scrollable, + * same as scrollOffset when no ScrollResult is returned. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type OnWillScrollCallback = +(scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => undefined | ScrollResult; + /** * On scroll callback using in scrollable onDidScroll. * @@ -31593,22 +32664,24 @@ declare type OnWillScrollCallback = * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnScrollCallback = (scrollOffset: number, scrollState: ScrollState) => void; /** - * On scroll callback using in scrollable onWillStopDragging. + * Defines the callback type used in onItemDragStart. * - * @typedef { function } OnWillStopDraggingCallback - * @param { number } velocity - The velocity of the scroll view at the moment the touch was released. + * @typedef { function } OnItemDragStartCallback + * @param { ItemDragInfo } event - Information about the dragged item. + * @param { number } itemIndex - The index number of the dragged item. + * @returns {CustomBuilder | undefined} * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form * @atomicservice * @since 20 + * @arkts 1.2 */ -declare type OnWillStopDraggingCallback = (velocity: number) => void; +declare type OnItemDragStartCallback = (event: ItemDragInfo, itemIndex: number) => CustomBuilder | undefined; /** * Defines the onMove callback. @@ -31619,7 +32692,8 @@ declare type OnWillStopDraggingCallback = (velocity: number) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnMoveHandler = (from: number, to: number) => void; @@ -31630,7 +32704,8 @@ declare type OnMoveHandler = (from: number, to: number) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ItemDragEventHandler { /** @@ -31640,7 +32715,8 @@ declare interface ItemDragEventHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onLongPress?: Callback; @@ -31651,7 +32727,8 @@ declare interface ItemDragEventHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onDragStart?: Callback; @@ -31662,7 +32739,8 @@ declare interface ItemDragEventHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onMoveThrough?: OnMoveHandler; @@ -31673,7 +32751,8 @@ declare interface ItemDragEventHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onDrop?: Callback; } @@ -31688,10 +32767,7 @@ declare interface ItemDragEventHandler { */ declare class DynamicNode { /** - * Invoked when data is moved during drag and drop sorting. - * This callback is only applicable in a List component. - * where each ForEach iteration generates a ListItem component. - * It allows you to define custom drag actions and handle various drag events. + * Set the move action. * * @param { Optional } handler * @returns { T } @@ -31703,10 +32779,7 @@ declare class DynamicNode { onMove(handler: Optional): T; /** - * Invoked when data is moved during drag and drop sorting. - * This callback is only applicable in a List component. - * where each ForEach iteration generates a ListItem component. - * It allows you to define custom drag actions and handle various drag events. + * Set the move action. * * @param { Optional } handler * @param { ItemDragEventHandler } eventHandler @@ -31714,11 +32787,49 @@ declare class DynamicNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since 18 */ onMove(handler: Optional, eventHandler: ItemDragEventHandler): T; } +/** + * Define DynamicNode. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare interface DynamicNode { + /** + * Set the move action. + * + * @param { Optional } handler + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onMove(handler: Optional): this; + + /** + * Set the move action. + * + * @param { Optional } handler + * @param { ItemDragEventHandler } eventHandler + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onMove(handler: Optional, eventHandler: ItemDragEventHandler): this; +} + /** * Define EdgeEffect Options. * @@ -31734,7 +32845,8 @@ declare class DynamicNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface EdgeEffectOptions { /** @@ -31752,7 +32864,8 @@ declare interface EdgeEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ alwaysEnabled: boolean; @@ -31763,7 +32876,8 @@ declare interface EdgeEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ effectEdge?: number; } @@ -31775,7 +32889,8 @@ declare interface EdgeEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum EffectEdge { @@ -31785,7 +32900,8 @@ declare enum EffectEdge { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ START = 1, @@ -31795,7 +32911,8 @@ declare enum EffectEdge { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ END = 2, } @@ -31806,7 +32923,8 @@ declare enum EffectEdge { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ChildrenMainSize { /** @@ -31814,14 +32932,15 @@ declare class ChildrenMainSize { * * @param { number } childDefaultSize - default main size, in vp. If the main axis is vertical, it indicates height. * If the main axis is horizontal, it indicates width. - * @throws { BusinessError } 401 - Parameter error. Possible causes: + * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(childDefaultSize: number); @@ -31830,14 +32949,15 @@ declare class ChildrenMainSize { * * @param { number } value - default main size, in vp. If the main axis is vertical, it indicates height. * If the main axis is horizontal, it indicates width. - * @throws { BusinessError } 401 - Parameter error. Possible causes: + * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ set childDefaultSize(value: number); @@ -31849,7 +32969,8 @@ declare class ChildrenMainSize { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get childDefaultSize(): number; @@ -31859,17 +32980,18 @@ declare class ChildrenMainSize { * @param { number } start - Zero-based index at which to start changing the children main size. * @param { number } [deleteCount] - Indicating the number of children main size to remove from start. * @param { Array } [childrenSize] - Add the new children main size, beginning from start. - * @throws { BusinessError } 401 - Parameter error. Possible causes: + * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @example splice(1, 0, [100]), Insert a child after first child, the child's main size is 100vp. * splice(1, 1), Delete the second child. * splice(1, 2, [100, 100]), Change the main size of the second and third children to 100vp. + * @arkts 1.1&1.2 */ splice(start: number, deleteCount?: number, childrenSize?: Array): void; @@ -31878,14 +33000,15 @@ declare class ChildrenMainSize { * * @param { number } index - index of child to be updated. * @param { number } childSize - new section options. - * @throws { BusinessError } 401 - Parameter error. Possible causes: + * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ update(index: number, childSize: number): void; } @@ -31896,28 +33019,33 @@ declare class ChildrenMainSize { * @interface BackgroundBrightnessOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface BackgroundBrightnessOptions { /** - * Brightness change rate. A higher rate means that brightness decreases more quickly. - * If **rate** is set to **0**, **lightUpDegree** will not take effect, meaning no brightening effect will occur. + * Rate represents the rate at which lightUpDegree + * decreases with increasing pixel brightness. * - * @type { number } - The default value is 0.0, value range: (0.0, +∞). + * @type { number } -The default value is 0.0, value range: (0.0, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ rate: number; /** - * Light up degree. A greater degree indicates a greater increase in brightness. + * LightUpDegree represents the degree of brightness + * of the rgb value changes when its brightness + * is 0. * - * @type { number } - The default value is 0.0, value range: [-1.0, 1.0]. + * @type { number } -The default value is 0.0, value range: [-1.0, 1.0]. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lightUpDegree: number; } @@ -31928,7 +33056,8 @@ declare interface BackgroundBrightnessOptions { * @interface PointLightStyle * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PointLightStyle { /** @@ -31938,7 +33067,8 @@ declare interface PointLightStyle { * @default undefined * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ lightSource?: LightSource; /** @@ -31948,7 +33078,8 @@ declare interface PointLightStyle { * @default IlluminatedType.NONE * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ illuminated?: IlluminatedType; /** @@ -31958,7 +33089,8 @@ declare interface PointLightStyle { * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bloom?: number; } @@ -31969,7 +33101,8 @@ declare interface PointLightStyle { * @interface LightSource * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LightSource { /** @@ -31978,7 +33111,8 @@ declare interface LightSource { * @type { Dimension } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ positionX: Dimension; /** @@ -31987,7 +33121,8 @@ declare interface LightSource { * @type { Dimension } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ positionY: Dimension; /** @@ -31996,7 +33131,8 @@ declare interface LightSource { * @type { Dimension } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ positionZ: Dimension; /** @@ -32005,7 +33141,8 @@ declare interface LightSource { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ intensity: number; /** @@ -32014,15 +33151,14 @@ declare interface LightSource { * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ color?: ResourceColor; } /** - * wrapBuilder is a template function that returns a WrappedBuilder object. - * wrapBuilder only accepts a global @Builder decorated function as its argument. - * Of the WrappedBuilder object it returns, the builder attribute method can be used only inside the struct. + * Defining wrapBuilder function. * @param { function } builder * @returns { WrappedBuilder } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -32030,9 +33166,7 @@ declare interface LightSource { * @since 11 */ /** - * wrapBuilder is a template function that returns a WrappedBuilder object. - * wrapBuilder only accepts a global @Builder decorated function as its argument. - * Of the WrappedBuilder object it returns, the builder attribute method can be used only inside the struct. + * Defining wrapBuilder function. * @param { function } builder * @returns { WrappedBuilder } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -32041,15 +33175,26 @@ declare interface LightSource { * @since 12 */ declare function wrapBuilder(builder: (...args: Args) => void): WrappedBuilder; +/** + * Defining wrapBuilder function. + * @param { function } builder + * @returns { WrappedBuilder } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare function wrapBuilder>(builder: (args: Args) => void): WrappedBuilder; /** - * The WrappedBuilder object is also a template class. + * Defines the WrappedBuilder class. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** - * The WrappedBuilder object is also a template class. + * Defines the WrappedBuilder class. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -32057,14 +33202,12 @@ declare function wrapBuilder(builder: (...args: Args) => */ declare class WrappedBuilder { /** - * global @Builder decorated function. * @type { function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** - * global @Builder decorated function. * @type { function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -32090,6 +33233,39 @@ declare class WrappedBuilder { } + +/** + * Defines the WrappedBuilder class. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare class WrappedBuilder> { + + /** + * @type { function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + builder: (args: Args) => void; + + /** + * @param { function } builder + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(builder: (args: Args) => void); +} + + /** * Defines the overall animation parameters of the keyframe animation. * @@ -32105,7 +33281,8 @@ declare class WrappedBuilder { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface KeyframeAnimateParam { /** @@ -32125,7 +33302,8 @@ declare interface KeyframeAnimateParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ delay?: number; @@ -32146,7 +33324,8 @@ declare interface KeyframeAnimateParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ iterations?: number; @@ -32165,7 +33344,8 @@ declare interface KeyframeAnimateParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onFinish?: () => void; @@ -32176,7 +33356,8 @@ declare interface KeyframeAnimateParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ expectedFrameRateRange?: ExpectedFrameRateRange; } @@ -32196,7 +33377,8 @@ declare interface KeyframeAnimateParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface KeyframeState { /** @@ -32214,7 +33396,8 @@ declare interface KeyframeState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ duration: number; @@ -32233,7 +33416,8 @@ declare interface KeyframeState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ curve?: Curve | string | ICurve; @@ -32252,7 +33436,8 @@ declare interface KeyframeState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ event: () => void; } @@ -32281,6 +33466,20 @@ declare interface Callback { (data: T): V; } +/** + * Defines the callback + * + * @typedef { function } Callback + * @param { T } data + * @returns { V } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +export type Callback = (data: T) => V; + /** * Defines the callback type used in hover events. * The value of isHover indicates whether the mouse is hovering over the component. @@ -32292,9 +33491,10 @@ declare interface Callback { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ -declare type HoverCallback = (isHover: boolean, event: HoverEvent) => void +declare type HoverCallback = (isHover: boolean, event: HoverEvent) => void; /** * Defines the callback type used in accessibility hover events. @@ -32307,9 +33507,10 @@ declare type HoverCallback = (isHover: boolean, event: HoverEvent) => void * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ -declare type AccessibilityCallback = (isHover: boolean, event: AccessibilityHoverEvent) => void +declare type AccessibilityCallback = (isHover: boolean, event: AccessibilityHoverEvent) => void; /** * Defines the callback type used in accessibility hover transparent event. @@ -32330,7 +33531,8 @@ declare type AccessibilityTransparentCallback = (event: TouchEvent) => void * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface VisibleAreaEventOptions { /** @@ -32340,7 +33542,8 @@ declare interface VisibleAreaEventOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ratios: Array; @@ -32352,7 +33555,8 @@ declare interface VisibleAreaEventOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ expectedUpdateInterval?: number; } @@ -32379,7 +33583,8 @@ declare interface VisibleAreaEventOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ declare type VisibleAreaChangeCallback = (isExpanding: boolean, currentRatio: number) => void; @@ -32390,7 +33595,8 @@ declare type VisibleAreaChangeCallback = (isExpanding: boolean, currentRatio: nu * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface UICommonEvent { /** @@ -32400,7 +33606,8 @@ declare interface UICommonEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setOnClick(callback: Callback | undefined): void; @@ -32411,7 +33618,8 @@ declare interface UICommonEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setOnTouch(callback: Callback | undefined): void; @@ -32422,18 +33630,20 @@ declare interface UICommonEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setOnAppear(callback: Callback | undefined): void; /** * Set or reset the callback is triggered when component uninstallation disappears. - * + * * @param { Callback | undefined } callback - The callback will be triggered when component uninstallation disappears. If set undefined will reset the target callback. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setOnDisappear(callback: Callback | undefined): void; @@ -32445,7 +33655,8 @@ declare interface UICommonEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setOnKeyEvent(callback: Callback | undefined): void; @@ -32456,7 +33667,8 @@ declare interface UICommonEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setOnFocus(callback: Callback | undefined): void; @@ -32467,18 +33679,20 @@ declare interface UICommonEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setOnBlur(callback: Callback | undefined): void; /** * Set or reset the callback which is triggered when has a hover event. - * + * * @param { HoverCallback | undefined } callback - The callback will be triggered when has a hover event. If set undefined will reset the target callback. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setOnHover(callback: HoverCallback | undefined): void; @@ -32489,23 +33703,25 @@ declare interface UICommonEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setOnMouse(callback: Callback | undefined): void; /** - * Sets the callback for the onSizeChange event. + * Set or reset the callback which is triggered when the size of component changed. * * @param { SizeChangeCallback | undefined } callback - The callback will be triggered when the size of component changed. If set undefined will reset the target callback. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setOnSizeChange(callback: SizeChangeCallback | undefined): void; /** - * Sets the onVisibleAreaChange callback that limits the callback interval. + * Set or reset the callback which is triggered when the visibleArea of component changed. * * @param { VisibleAreaEventOptions } options - The options for the visibility event. * @param { VisibleAreaChangeCallback | undefined } event - The callback will be triggered when the visibleArea of component changed and get close to any number in ratios defined by options. @@ -32513,7 +33729,8 @@ declare interface UICommonEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setOnVisibleAreaApproximateChange(options: VisibleAreaEventOptions, event: VisibleAreaChangeCallback | undefined): void; } @@ -32595,7 +33812,8 @@ declare interface UIScrollableCommonEvent extends UICommonEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface UIGestureEvent { /** @@ -32612,7 +33830,21 @@ declare interface UIGestureEvent { addGesture(gesture: GestureHandler, priority?: GesturePriority, mask?: GestureMask): void; /** - * Adds a gesture that can be recognized at once by the component and its child component. + * Add a gesture bound to the component. + * + * @param { GestureHandler } gesture - gesture indicates the gesture bound to a component. + * @param { GesturePriority } priority - priority indicates the gesture's priority. + * @param { GestureMask } mask - mask indicates the gesture's GestureMask value. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + addGesture(gesture: GestureHandler, priority?: GesturePriority, mask?: GestureMask): void; + + /** + * Add a parallel gesture bound to the component. * * @param { GestureHandler } gesture - gesture indicates the gesture bound to a component. * @param { GestureMask } mask - mask indicates the gesture's GestureMask value. @@ -32622,15 +33854,29 @@ declare interface UIGestureEvent { * @since 12 */ addParallelGesture(gesture: GestureHandler, mask?: GestureMask): void; + /** + * Add a parallel gesture bound to the component. + * + * @param { GestureHandler } gesture - gesture indicates the gesture bound to a component. + * @param { GestureMask } mask - mask indicates the gesture's GestureMask value. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + addParallelGesture(gesture: GestureHandler, mask?: GestureMask): void; + /** - * Remove a gesture from a component that has been bound with a specific tag through a modifier. + * Remove the gesture that is bound to the component and marked as tag. * * @param { string } tag - tag indicates the gesture's tag. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ removeGestureByTag(tag: string): void; @@ -32640,29 +33886,32 @@ declare interface UIGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ clearGestures(): void; } /** * Defines the gesture modifier. - * + * * @interface GestureModifier * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GestureModifier { /** * Defines the gesture update function. - * + * * @param { UIGestureEvent } event * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ applyGesture(event: UIGestureEvent): void; } @@ -32674,7 +33923,8 @@ declare interface GestureModifier { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SelectionOptions { /** @@ -32684,7 +33934,8 @@ declare interface SelectionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ menuPolicy?: MenuPolicy; } @@ -32696,7 +33947,8 @@ declare interface SelectionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface FocusMovement { /** @@ -32706,7 +33958,8 @@ declare interface FocusMovement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ forward?: string; /** @@ -32716,7 +33969,8 @@ declare interface FocusMovement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backward?: string; /** @@ -32726,7 +33980,8 @@ declare interface FocusMovement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ up?: string; /** @@ -32736,7 +33991,8 @@ declare interface FocusMovement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ down?: string; /** @@ -32746,7 +34002,8 @@ declare interface FocusMovement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ left?: string; /** @@ -32756,7 +34013,8 @@ declare interface FocusMovement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ right?: string; } @@ -32768,26 +34026,29 @@ declare interface FocusMovement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum KeyboardAvoidMode { /** - * Automatically avoids the soft keyboard and compresses the height when reaching the maximum limit. + * Defines avoid keyboard when keyboard shows. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 0, /** - * Does not avoid the soft keyboard. + * Defines not avoid keyboard when keyboard shows. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 1, } @@ -32799,7 +34060,8 @@ declare enum KeyboardAvoidMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum HoverModeAreaType { @@ -32809,7 +34071,8 @@ declare enum HoverModeAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ TOP_SCREEN = 0, @@ -32819,19 +34082,21 @@ declare enum HoverModeAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ BOTTOM_SCREEN = 1, } /** * Defines a range of dates. - * + * * @interface DateRange * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DateRange { /** @@ -32841,7 +34106,8 @@ declare interface DateRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ start?: Date; @@ -32852,7 +34118,90 @@ declare interface DateRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ end?: Date; } + +/** + * Indicates the information when the provider of the embedded or uiextension Ability is terminated. + * + * @interface TerminationInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @arkts 1.2 + */ +declare interface TerminationInfo { + /** + * Defines the termination code. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @arkts 1.2 + */ + code: number; + + /** + * Defines the additional termination information. + * + * @type { ?Want } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @arkts 1.2 + */ + want?: Want; +} + +/** + * Defines the format for displaying dates and times. + * + * @typedef { intl.DateTimeOptions } DateTimeOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type DateTimeOptions = intl.DateTimeOptions; + +/** + * Defines a bindable property + * @interface Bindable + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @arkts 1.2 + */ +export declare interface Bindable { + /** + * Defines value of the bindable property. + * @type { T } + * @readonly + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @arkts 1.2 + */ + readonly value: T; + + /** + * Defines the callback of the bindable property which will be invork when the property is changed.. + * @type { Callback } + * @readonly + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @arkts 1.2 + */ + readonly onChange: Callback; +} + +/** + * Convert to a bindable property. + * + * @param { T } value - indicate the value of a state property. + * @returns { Bindable } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @arkts 1.2 + */ +export declare function $$(value: T): Bindable; diff --git a/api/@internal/component/ets/component3d.d.ts b/api/@internal/component/ets/component3d.d.ts index 86a17a686539a4eab6b12e213cee4d652183e761..bb6051b8e6615252a0fd61aeb5c717ea2c94e4f6 100644 --- a/api/@internal/component/ets/component3d.d.ts +++ b/api/@internal/component/ets/component3d.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Scene } from './../../../api/@ohos.graphics.scene'; +import { ResourceStr, Dimension } from './units'; +import { CommonMethod } from './common'; +/*** endif */ + /** * Provides methods for controlling the 3d scene * @@ -33,7 +39,8 @@ declare type Scene = import('../api/@ohos.graphics.scene').Scene; * @enum { number } * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ModelType { /** @@ -41,7 +48,8 @@ declare enum ModelType { * * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TEXTURE = 0, @@ -50,7 +58,8 @@ declare enum ModelType { * * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SURFACE = 1, } @@ -61,7 +70,8 @@ declare enum ModelType { * @interface SceneOptions * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SceneOptions { /** @@ -70,7 +80,8 @@ declare interface SceneOptions { * @type { ?(ResourceStr | Scene) } * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ scene?: ResourceStr | Scene; @@ -81,7 +92,8 @@ declare interface SceneOptions { * @default ModelType.SURFACE * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ modelType?: ModelType; } @@ -92,7 +104,9 @@ declare interface SceneOptions { * @interface Component3DInterface * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + * @component */ interface Component3DInterface { /** @@ -102,7 +116,8 @@ interface Component3DInterface { * @returns { Component3DAttribute } * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ (sceneOptions?: SceneOptions): Component3DAttribute; } @@ -111,7 +126,8 @@ interface Component3DInterface { * @extends CommonMethod * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class Component3DAttribute extends CommonMethod { /** @@ -121,7 +137,8 @@ declare class Component3DAttribute extends CommonMethod { * @returns { Component3DAttribute } The attribute of the component3D * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ environment(uri: ResourceStr): Component3DAttribute; @@ -133,7 +150,8 @@ declare class Component3DAttribute extends CommonMethod { * @returns { Component3DAttribute } The attribute of the component3D * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ customRender(uri: ResourceStr, selfRenderUpdate: boolean): Component3DAttribute; @@ -144,7 +162,8 @@ declare class Component3DAttribute extends CommonMethod { * @returns { Component3DAttribute } The attribute of the component3D * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shader(uri: ResourceStr): Component3DAttribute; @@ -155,7 +174,8 @@ declare class Component3DAttribute extends CommonMethod { * @returns { Component3DAttribute } The attribute of the component3D * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shaderImageTexture(uri: ResourceStr): Component3DAttribute; @@ -166,7 +186,8 @@ declare class Component3DAttribute extends CommonMethod { * @returns { Component3DAttribute } The attribute of the component3D * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shaderInputBuffer(buffer: Array): Component3DAttribute; @@ -177,7 +198,8 @@ declare class Component3DAttribute extends CommonMethod { * @returns { Component3DAttribute } The attribute of the component3D * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ renderWidth(value: Dimension): Component3DAttribute; @@ -188,7 +210,8 @@ declare class Component3DAttribute extends CommonMethod { * @returns { Component3DAttribute } The attribute of the component3D * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ renderHeight(value: Dimension): Component3DAttribute; } diff --git a/api/@internal/component/ets/container_span.d.ts b/api/@internal/component/ets/container_span.d.ts index aa555965ff5a376b23918f47ae722555a6d84828..93349f5594110fdd20fb8b40db8e0634d890e2ac 100644 --- a/api/@internal/component/ets/container_span.d.ts +++ b/api/@internal/component/ets/container_span.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { TextBackgroundStyle } from './span'; +import { AttributeModifier } from './common'; +/*** endif */ + /** * Span container interface. * @@ -33,7 +38,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface ContainerSpanInterface { /** @@ -51,7 +57,8 @@ interface ContainerSpanInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ (): ContainerSpanAttribute; } @@ -69,7 +76,8 @@ interface ContainerSpanInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ContainerSpanAttribute { /** @@ -89,7 +97,8 @@ declare class ContainerSpanAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textBackgroundStyle(style: TextBackgroundStyle): ContainerSpanAttribute; @@ -101,7 +110,8 @@ declare class ContainerSpanAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ attributeModifier(modifier: AttributeModifier): ContainerSpanAttribute; } diff --git a/api/@internal/component/ets/content_slot.d.ts b/api/@internal/component/ets/content_slot.d.ts index bd90fd20c45908b87e2a06683be939ab9d27fd1e..79d291376e5b609e3da7154bdc6f034118edba0f 100644 --- a/api/@internal/component/ets/content_slot.d.ts +++ b/api/@internal/component/ets/content_slot.d.ts @@ -18,6 +18,10 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Content } from '../../@ohos.arkui.node'; +/*** endif */ + /** * Define Content type * @@ -35,7 +39,8 @@ declare type Content = import('../api/@ohos.arkui.node').Content; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ContentSlotAttribute { } @@ -47,7 +52,8 @@ declare class ContentSlotAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface ContentSlotInterface { /** @@ -58,7 +64,8 @@ interface ContentSlotInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ (content: Content): ContentSlotAttribute; } diff --git a/api/@internal/component/ets/counter.d.ts b/api/@internal/component/ets/counter.d.ts index 9fb6cf9cc9fa2759b59f405ff41a7123d2f7594c..c71cb953d8895791c1addc4b88d4980afbae03a4 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,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface CounterInterface { /** @@ -85,7 +91,8 @@ interface CounterInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (): CounterAttribute; } @@ -122,7 +129,8 @@ interface CounterInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CounterAttribute extends CommonMethod { /** @@ -173,7 +181,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 +234,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 +256,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 +278,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; } diff --git a/api/@internal/component/ets/custom_dialog_controller.d.ts b/api/@internal/component/ets/custom_dialog_controller.d.ts index 8002913639470deb5b3d08ab8cd462b682851a63..f3387e3cd01a9e9ec6326e3461ca4d94f91c1932 100644 --- a/api/@internal/component/ets/custom_dialog_controller.d.ts +++ b/api/@internal/component/ets/custom_dialog_controller.d.ts @@ -18,6 +18,20 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { + Rectangle, AnimateParam, Callback, ShadowOptions, ShadowStyle, KeyboardAvoidMode, BlurStyle, HoverModeAreaType, + DismissReason, BackgroundBlurStyleOptions, BackgroundEffectOptions +} from './common'; +import { CustomBuilder } from './builder'; +import { DialogAlignment } from './alertDialog'; +import { Offset, ResourceColor, Dimension, BorderRadiuses, EdgeWidths, EdgeColors, EdgeStyles } from './units'; +import { BorderStyle } from './enums'; +import { LengthMetrics } from '../Graphics'; +import { LevelMode, LevelOrder, ImmersiveMode } from '../../@ohos.promptAction'; +import { CustomBuilder } from './builder'; +/*** endif */ + /** * Defines the options of CustomDialogController. * @@ -40,7 +54,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CustomDialogControllerOptions { /** @@ -69,6 +84,18 @@ declare interface CustomDialogControllerOptions { */ builder: any; + /** + * Custom builder function. + * + * @type { CustomBuilder } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + builder: CustomBuilder; + /** * Defines the cancel function. * @@ -91,7 +118,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ cancel?: () => void; @@ -117,7 +145,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ autoCancel?: boolean; @@ -143,7 +172,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ alignment?: DialogAlignment; @@ -169,7 +199,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: Offset; @@ -195,7 +226,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ customStyle?: boolean; @@ -221,7 +253,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ gridCount?: number; @@ -240,7 +273,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maskColor?: ResourceColor; @@ -259,7 +293,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maskRect?: Rectangle; @@ -278,7 +313,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ openAnimation?: AnimateParam; @@ -297,7 +333,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ closeAnimation?: AnimateParam; @@ -317,7 +354,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ showInSubWindow?: boolean; @@ -336,7 +374,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor?: ResourceColor; @@ -355,7 +394,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ cornerRadius?: Dimension | BorderRadiuses; @@ -374,7 +414,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isModal?: boolean; @@ -385,7 +426,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDismiss?: Callback; @@ -396,7 +438,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width?: Dimension; @@ -407,7 +450,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ height?: Dimension; @@ -418,7 +462,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderWidth?: Dimension | EdgeWidths; @@ -429,7 +474,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderColor?: ResourceColor | EdgeColors; @@ -440,7 +486,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderStyle?: BorderStyle | EdgeStyles; @@ -451,7 +498,8 @@ declare interface CustomDialogControllerOptions { * @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; @@ -463,7 +511,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyle?: BlurStyle; @@ -474,7 +523,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; @@ -485,7 +535,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundEffect?: BackgroundEffectOptions; @@ -497,7 +548,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ keyboardAvoidMode?: KeyboardAvoidMode; @@ -509,7 +561,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enableHoverMode?: boolean; @@ -521,7 +574,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ hoverModeArea?: HoverModeAreaType; @@ -532,7 +586,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onDidAppear?: Callback; @@ -543,7 +598,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onDidDisappear?: Callback; @@ -554,7 +610,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onWillAppear?: Callback; @@ -565,7 +622,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDisappear?: Callback; @@ -576,7 +634,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ keyboardAvoidDistance?: LengthMetrics; @@ -588,7 +647,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ levelMode?: LevelMode; @@ -599,7 +659,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ levelUniqueId?: number; @@ -611,7 +672,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ immersiveMode?: ImmersiveMode; @@ -623,7 +685,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ levelOrder?: LevelOrder; @@ -635,7 +698,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ focusable?: boolean; } @@ -647,7 +711,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DismissDialogAction { /** @@ -657,7 +722,8 @@ declare interface DismissDialogAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dismiss: Callback; @@ -668,7 +734,8 @@ declare interface DismissDialogAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ reason: DismissReason; } @@ -702,7 +769,8 @@ declare type PromptActionCommonState = import('../api/@ohos.promptAction').promp * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CustomDialogController { /** @@ -727,7 +795,8 @@ declare class CustomDialogController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(value: CustomDialogControllerOptions); @@ -754,6 +823,17 @@ declare class CustomDialogController { */ open(); + /** + * Display the content of the customized pop-up window. If the content has been displayed, it does not take effect. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + open(): void; + /** * Closes the custom pop-up window. If the window is closed, the window does not take effect. * @@ -778,13 +858,14 @@ declare class CustomDialogController { close(); /** - * Get the state of the custom pop-up window. + * Closes the custom pop-up window. If the window is closed, the window does not take effect. * * @returns { PromptActionCommonState } return the state of dialog. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 + * @arkts 1.2 */ - getState(): PromptActionCommonState; + close(): void; } diff --git a/api/@internal/component/ets/data_panel.d.ts b/api/@internal/component/ets/data_panel.d.ts index 02fa057c4e305c64e3a0987eadca2622188b0030..a68c0a2617af7956befb55d0df0f1db64a0fb264 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,8 @@ declare interface DataPanelOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface DataPanelInterface { /** @@ -461,7 +481,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 +495,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 +506,8 @@ declare interface DataPanelConfiguration extends CommonConfiguration { /** @@ -571,7 +596,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 +618,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 +640,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 +662,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 +684,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 +697,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; } diff --git a/api/@internal/component/ets/divider.d.ts b/api/@internal/component/ets/divider.d.ts index 2ee8f0971bbda0b25ebc343538ec63643465cef9..8bb25614340f5bb5c60584051d70b11885e1e0da 100644 --- a/api/@internal/component/ets/divider.d.ts +++ b/api/@internal/component/ets/divider.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ResourceColor } from './units'; +import { CommonMethod} from './common'; +import { LineCapStyle } from './enums'; +/*** endif */ + /** * Provides a divider component to separate different content blocks/content elements. * @@ -50,7 +56,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface DividerInterface { /** @@ -85,7 +92,8 @@ interface DividerInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (): DividerAttribute; } @@ -122,7 +130,8 @@ interface DividerInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class DividerAttribute extends CommonMethod { /** @@ -165,7 +174,8 @@ declare class DividerAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ vertical(value: boolean): DividerAttribute; @@ -205,7 +215,8 @@ declare class DividerAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ color(value: ResourceColor): DividerAttribute; @@ -245,7 +256,8 @@ declare class DividerAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeWidth(value: number | string): DividerAttribute; @@ -285,7 +297,8 @@ declare class DividerAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ lineCap(value: LineCapStyle): DividerAttribute; } diff --git a/api/@internal/component/ets/effect_component.d.ts b/api/@internal/component/ets/effect_component.d.ts index c09b5630fe460afc86cb7664c991a81a67f4f878..98d39ed6473b2f2a706e1e6512025f030a78db3a 100644 --- a/api/@internal/component/ets/effect_component.d.ts +++ b/api/@internal/component/ets/effect_component.d.ts @@ -17,7 +17,10 @@ * @file * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod} from './common'; +/*** endif */ /** * Provides an Effect Component, which is invisible, but setting properties on this component defines an effect template * that child components can apply by setting useEffect(true). @@ -25,7 +28,8 @@ * @interface EffectComponentInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ interface EffectComponentInterface { /** @@ -34,7 +38,8 @@ interface EffectComponentInterface { * @returns { EffectComponentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ (): EffectComponentAttribute; @@ -113,7 +118,8 @@ declare interface EffectComponentOptions { * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ declare class EffectComponentAttribute extends CommonMethod { /** diff --git a/api/@internal/component/ets/ellipse.d.ts b/api/@internal/component/ets/ellipse.d.ts index 678b4141462ef6629f151fd8d9d1f0530e336c32..6a24d05889243e0775678fd024a63f28dbba5a67 100644 --- a/api/@internal/component/ets/ellipse.d.ts +++ b/api/@internal/component/ets/ellipse.d.ts @@ -18,6 +18,10 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonShapeMethod } from './common'; +/*** endif */ + /** * Ellipse constructor options. * @@ -26,7 +30,8 @@ * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface EllipseOptions { /** @@ -83,6 +88,7 @@ interface EllipseOptions { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ width?: Length; @@ -140,6 +146,7 @@ interface EllipseOptions { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ height?: Length; } @@ -308,7 +315,8 @@ interface EllipseInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class EllipseAttribute extends CommonShapeMethod {} @@ -375,3 +383,30 @@ declare const Ellipse: EllipseInterface; * @since 11 */ declare const EllipseInstance: EllipseAttribute; + +/** + * Ellipse drawing. + * + * @interface EllipseInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface EllipseInterface { + /** + * Set the value. + * + * @param { EllipseOptions } [options] - ellipse options + * @returns { EllipseAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + (options?: EllipseOptions): EllipseAttribute; +} diff --git a/api/@internal/component/ets/embedded_component.d.ts b/api/@internal/component/ets/embedded_component.d.ts index 48a15bb05a5d230625ea2f63cf15ec9e075a4af1..192c8ff3257db3c2dc0af85af69405ff9e31e572 100644 --- a/api/@internal/component/ets/embedded_component.d.ts +++ b/api/@internal/component/ets/embedded_component.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import Want from '../../@ohos.app.ability.Want' +import { Callback, ErrorCallback ,BusinessError} from '../../@ohos.base' +import { CommonMethod, TerminationInfo } from './common' +import { EmbeddedType } from './enums' +/*** endif */ /** * Provide an interface for the EmbeddedComponent, which is used @@ -26,7 +32,8 @@ * @interface EmbeddedComponentInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface EmbeddedComponentInterface { /** @@ -44,6 +51,23 @@ interface EmbeddedComponentInterface { loader: import('../api/@ohos.app.ability.Want').default, type: EmbeddedType ): EmbeddedComponentAttribute; + + /** + * Construct the EmbeddedComponent.
+ * Called when the EmbeddedComponent is used. + * + * @param { Want } loader - indicates initialization parameter + * @param { EmbeddedType } type - indicates type of the EmbeddedComponent + * @returns { EmbeddedComponentAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + ( + loader: Want, + type: EmbeddedType + ): EmbeddedComponentAttribute; } /** @@ -82,7 +106,8 @@ declare interface TerminationInfo { * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class EmbeddedComponentAttribute extends CommonMethod { /** @@ -96,6 +121,18 @@ declare class EmbeddedComponentAttribute extends CommonMethod): EmbeddedComponentAttribute; + /** + * Called when the provider of the embedded UI is terminated. + * + * @param { Callback } callback + * @returns { EmbeddedComponentAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onTerminated(callback: Callback): EmbeddedComponentAttribute; + /** * Called when some error occurred. * @@ -106,6 +143,18 @@ declare class EmbeddedComponentAttribute extends CommonMethod } callback + * @returns { EmbeddedComponentAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onError(callback: ErrorCallback): EmbeddedComponentAttribute; } /** diff --git a/api/@internal/component/ets/enums.d.ts b/api/@internal/component/ets/enums.d.ts index 94b9a985344692b96121c7377fee9da41acc2d33..70a03e16122389b50e883ba6b75f4fc800aed092 100644 --- a/api/@internal/component/ets/enums.d.ts +++ b/api/@internal/component/ets/enums.d.ts @@ -35,8 +35,10 @@ * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ + declare enum CheckBoxShape { /** * Circle. @@ -53,7 +55,8 @@ declare enum CheckBoxShape { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CIRCLE = 0, @@ -72,7 +75,8 @@ declare enum CheckBoxShape { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ROUNDED_SQUARE = 1, } @@ -109,7 +113,8 @@ declare enum CheckBoxShape { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum Color { /** @@ -140,7 +145,8 @@ declare enum Color { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ White, @@ -172,7 +178,8 @@ declare enum Color { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Black, @@ -204,7 +211,8 @@ declare enum Color { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Blue, @@ -236,7 +244,8 @@ declare enum Color { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Brown, @@ -268,7 +277,8 @@ declare enum Color { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Gray, @@ -300,7 +310,8 @@ declare enum Color { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Green, @@ -332,7 +343,8 @@ declare enum Color { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Grey, @@ -364,7 +376,8 @@ declare enum Color { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Orange, @@ -396,7 +409,8 @@ declare enum Color { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Pink, @@ -428,7 +442,8 @@ declare enum Color { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Red, @@ -460,7 +475,8 @@ declare enum Color { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Yellow, @@ -486,7 +502,8 @@ declare enum Color { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Transparent, } @@ -506,7 +523,8 @@ declare enum Color { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ColoringStrategy { /** @@ -522,7 +540,8 @@ declare enum ColoringStrategy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ INVERT = 'invert', @@ -539,7 +558,8 @@ declare enum ColoringStrategy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AVERAGE = 'average', @@ -556,7 +576,8 @@ declare enum ColoringStrategy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PRIMARY = 'primary', } @@ -593,7 +614,8 @@ declare enum ColoringStrategy { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ImageFit { /** @@ -624,7 +646,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Contain, @@ -656,7 +679,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Cover, @@ -688,7 +712,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Auto, @@ -720,7 +745,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Fill, @@ -752,7 +778,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ScaleDown, @@ -784,7 +811,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, @@ -795,7 +823,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TOP_START = 7, @@ -806,7 +835,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TOP = 8, @@ -817,7 +847,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TOP_END = 9, @@ -828,7 +859,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ START = 10, @@ -839,7 +871,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CENTER = 11, @@ -850,7 +883,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ END = 12, @@ -861,7 +895,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BOTTOM_START = 13, @@ -872,7 +907,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BOTTOM = 14, @@ -883,7 +919,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BOTTOM_END = 15, @@ -893,7 +930,8 @@ declare enum ImageFit { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ MATRIX = 16, } @@ -930,7 +968,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum BorderStyle { /** @@ -961,7 +1000,8 @@ declare enum BorderStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Dotted, @@ -993,7 +1033,8 @@ declare enum BorderStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Dashed, @@ -1025,7 +1066,8 @@ declare enum BorderStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Solid, } @@ -1062,7 +1104,8 @@ declare enum BorderStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum LineJoinStyle { /** @@ -1093,7 +1136,8 @@ declare enum LineJoinStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Miter, @@ -1125,7 +1169,8 @@ declare enum LineJoinStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Round, @@ -1157,7 +1202,8 @@ declare enum LineJoinStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Bevel, } @@ -1184,7 +1230,8 @@ declare enum LineJoinStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TouchType { /** @@ -1206,7 +1253,8 @@ declare enum TouchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Down, @@ -1229,7 +1277,8 @@ declare enum TouchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Up, @@ -1252,7 +1301,8 @@ declare enum TouchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Move, @@ -1275,7 +1325,8 @@ declare enum TouchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Cancel, @@ -1286,6 +1337,7 @@ declare enum TouchType { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ HOVER_ENTER = 9, @@ -1296,6 +1348,7 @@ declare enum TouchType { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ HOVER_MOVE = 10, @@ -1306,6 +1359,7 @@ declare enum TouchType { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ HOVER_EXIT = 11, @@ -1316,6 +1370,7 @@ declare enum TouchType { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ HOVER_CANCEL = 12, } @@ -1327,7 +1382,8 @@ declare enum TouchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum InteractionHand { /** @@ -1336,7 +1392,8 @@ declare enum InteractionHand { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -1346,7 +1403,8 @@ declare enum InteractionHand { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ LEFT = 1, @@ -1356,7 +1414,8 @@ declare enum InteractionHand { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ RIGHT = 2, } @@ -1383,7 +1442,8 @@ declare enum InteractionHand { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum MouseButton { /** @@ -1405,7 +1465,8 @@ declare enum MouseButton { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Left, @@ -1428,7 +1489,8 @@ declare enum MouseButton { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Right, @@ -1451,7 +1513,8 @@ declare enum MouseButton { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Middle, @@ -1474,7 +1537,8 @@ declare enum MouseButton { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Back, @@ -1497,7 +1561,8 @@ declare enum MouseButton { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Forward, @@ -1520,7 +1585,8 @@ declare enum MouseButton { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, } @@ -1547,7 +1613,8 @@ declare enum MouseButton { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum MouseAction { /** @@ -1569,7 +1636,8 @@ declare enum MouseAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Press, @@ -1592,7 +1660,8 @@ declare enum MouseAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Release, @@ -1615,7 +1684,8 @@ declare enum MouseAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Move, @@ -1638,7 +1708,8 @@ declare enum MouseAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Hover, @@ -1647,7 +1718,8 @@ declare enum MouseAction { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CANCEL = 13 } @@ -1676,7 +1748,8 @@ declare enum MouseAction { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum AnimationStatus { /** @@ -1700,7 +1773,8 @@ declare enum AnimationStatus { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Initial, @@ -1725,7 +1799,8 @@ declare enum AnimationStatus { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Running, @@ -1750,7 +1825,8 @@ declare enum AnimationStatus { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Paused, @@ -1775,7 +1851,8 @@ declare enum AnimationStatus { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Stopped, } @@ -1812,7 +1889,8 @@ declare enum AnimationStatus { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum Curve { /** @@ -1843,7 +1921,8 @@ declare enum Curve { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Linear, @@ -1875,7 +1954,8 @@ declare enum Curve { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Ease, @@ -1907,7 +1987,8 @@ declare enum Curve { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ EaseIn, @@ -1939,7 +2020,8 @@ declare enum Curve { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ EaseOut, @@ -1971,7 +2053,8 @@ declare enum Curve { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ EaseInOut, @@ -2003,7 +2086,8 @@ declare enum Curve { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ FastOutSlowIn, @@ -2035,7 +2119,8 @@ declare enum Curve { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LinearOutSlowIn, @@ -2067,7 +2152,8 @@ declare enum Curve { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ FastOutLinearIn, @@ -2099,7 +2185,8 @@ declare enum Curve { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ExtremeDeceleration, @@ -2131,7 +2218,8 @@ declare enum Curve { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Sharp, @@ -2163,7 +2251,8 @@ declare enum Curve { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Rhythm, @@ -2195,7 +2284,8 @@ declare enum Curve { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Smooth, @@ -2227,7 +2317,8 @@ declare enum Curve { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Friction, } @@ -2256,7 +2347,8 @@ declare enum Curve { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FillMode { /** @@ -2280,7 +2372,8 @@ declare enum FillMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, @@ -2305,7 +2398,8 @@ declare enum FillMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Forwards, @@ -2330,7 +2424,8 @@ declare enum FillMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Backwards, @@ -2355,7 +2450,8 @@ declare enum FillMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Both, } @@ -2392,7 +2488,8 @@ declare enum FillMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum PlayMode { /** @@ -2423,7 +2520,8 @@ declare enum PlayMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Normal, @@ -2455,7 +2553,8 @@ declare enum PlayMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Reverse, @@ -2487,7 +2586,8 @@ declare enum PlayMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Alternate, @@ -2519,7 +2619,8 @@ declare enum PlayMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ AlternateReverse, } @@ -2546,7 +2647,8 @@ declare enum PlayMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum KeyType { /** @@ -2568,7 +2670,8 @@ declare enum KeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Down, @@ -2591,7 +2694,8 @@ declare enum KeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Up, } @@ -2618,7 +2722,8 @@ declare enum KeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum KeySource { /** @@ -2640,7 +2745,8 @@ declare enum KeySource { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Unknown, @@ -2663,7 +2769,8 @@ declare enum KeySource { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Keyboard, @@ -2673,7 +2780,8 @@ declare enum KeySource { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ JOYSTICK, } @@ -2700,7 +2808,8 @@ declare enum KeySource { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum Edge { /** @@ -2722,7 +2831,8 @@ declare enum Edge { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Top, @@ -2754,7 +2864,8 @@ declare enum Edge { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Bottom, @@ -2786,7 +2897,8 @@ declare enum Edge { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Start, @@ -2818,7 +2930,8 @@ declare enum Edge { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ End, } @@ -2845,7 +2958,8 @@ declare enum Edge { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum Week { /** @@ -2867,7 +2981,8 @@ declare enum Week { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Mon, @@ -2890,7 +3005,8 @@ declare enum Week { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Tue, @@ -2913,7 +3029,8 @@ declare enum Week { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Wed, @@ -2936,7 +3053,8 @@ declare enum Week { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Thur, @@ -2959,7 +3077,8 @@ declare enum Week { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Fri, @@ -2982,7 +3101,8 @@ declare enum Week { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Sat, @@ -3005,7 +3125,8 @@ declare enum Week { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Sun, } @@ -3042,7 +3163,8 @@ declare enum Week { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum Direction { /** @@ -3073,7 +3195,8 @@ declare enum Direction { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Ltr, @@ -3105,7 +3228,8 @@ declare enum Direction { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Rtl, @@ -3137,7 +3261,8 @@ declare enum Direction { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Auto, } @@ -3174,7 +3299,8 @@ declare enum Direction { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum BarState { /** @@ -3205,7 +3331,8 @@ declare enum BarState { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Off, @@ -3237,7 +3364,8 @@ declare enum BarState { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Auto, @@ -3269,7 +3397,8 @@ declare enum BarState { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ On, } @@ -3306,7 +3435,8 @@ declare enum BarState { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum EdgeEffect { /** @@ -3337,7 +3467,8 @@ declare enum EdgeEffect { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Spring, @@ -3369,7 +3500,8 @@ declare enum EdgeEffect { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Fade, @@ -3401,7 +3533,8 @@ declare enum EdgeEffect { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, } @@ -3438,7 +3571,8 @@ declare enum EdgeEffect { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum Alignment { /** @@ -3469,7 +3603,8 @@ declare enum Alignment { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ TopStart, @@ -3501,7 +3636,8 @@ declare enum Alignment { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Top, @@ -3533,7 +3669,8 @@ declare enum Alignment { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ TopEnd, @@ -3565,7 +3702,8 @@ declare enum Alignment { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Start, @@ -3597,7 +3735,8 @@ declare enum Alignment { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Center, @@ -3629,7 +3768,8 @@ declare enum Alignment { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ End, @@ -3661,7 +3801,8 @@ declare enum Alignment { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BottomStart, @@ -3693,7 +3834,8 @@ declare enum Alignment { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Bottom, @@ -3725,7 +3867,8 @@ declare enum Alignment { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BottomEnd, } @@ -3865,7 +4008,8 @@ declare enum LocalizedAlignment { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TransitionType { /** @@ -3896,7 +4040,8 @@ declare enum TransitionType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ All, @@ -3928,7 +4073,8 @@ declare enum TransitionType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Insert, @@ -3960,7 +4106,8 @@ declare enum TransitionType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Delete, } @@ -3987,7 +4134,8 @@ declare enum TransitionType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum RelateType { /** @@ -4009,7 +4157,8 @@ declare enum RelateType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ FILL, @@ -4032,7 +4181,8 @@ declare enum RelateType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ FIT, } @@ -4069,7 +4219,8 @@ declare enum RelateType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum Visibility { /** @@ -4100,7 +4251,8 @@ declare enum Visibility { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Visible, @@ -4132,7 +4284,8 @@ declare enum Visibility { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Hidden, @@ -4164,7 +4317,8 @@ declare enum Visibility { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, } @@ -4201,7 +4355,8 @@ declare enum Visibility { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum LineCapStyle { /** @@ -4232,7 +4387,8 @@ declare enum LineCapStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Butt, @@ -4264,7 +4420,8 @@ declare enum LineCapStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Round, @@ -4296,7 +4453,8 @@ declare enum LineCapStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Square, } @@ -4333,7 +4491,8 @@ declare enum LineCapStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum Axis { /** @@ -4364,7 +4523,8 @@ declare enum Axis { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Vertical, @@ -4396,7 +4556,8 @@ declare enum Axis { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Horizontal, } @@ -4433,7 +4594,8 @@ declare enum Axis { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum HorizontalAlign { /** @@ -4464,7 +4626,8 @@ declare enum HorizontalAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Start, @@ -4496,7 +4659,8 @@ declare enum HorizontalAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Center, @@ -4528,7 +4692,8 @@ declare enum HorizontalAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ End, } @@ -4565,7 +4730,8 @@ declare enum HorizontalAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FlexAlign { /** @@ -4600,7 +4766,8 @@ declare enum FlexAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Start, @@ -4636,7 +4803,8 @@ declare enum FlexAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Center, @@ -4672,7 +4840,8 @@ declare enum FlexAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ End, @@ -4712,7 +4881,8 @@ declare enum FlexAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SpaceBetween, @@ -4752,7 +4922,8 @@ declare enum FlexAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SpaceAround, @@ -4792,7 +4963,8 @@ declare enum FlexAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SpaceEvenly, } @@ -4829,7 +5001,8 @@ declare enum FlexAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ItemAlign { /** @@ -4860,7 +5033,8 @@ declare enum ItemAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Auto, @@ -4892,7 +5066,8 @@ declare enum ItemAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Start, @@ -4924,7 +5099,8 @@ declare enum ItemAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Center, @@ -4956,7 +5132,8 @@ declare enum ItemAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ End, @@ -4988,7 +5165,8 @@ declare enum ItemAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Baseline, @@ -5020,7 +5198,8 @@ declare enum ItemAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Stretch, } @@ -5057,7 +5236,8 @@ declare enum ItemAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FlexDirection { /** @@ -5088,7 +5268,8 @@ declare enum FlexDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Row, @@ -5120,7 +5301,8 @@ declare enum FlexDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Column, @@ -5152,7 +5334,8 @@ declare enum FlexDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RowReverse, @@ -5184,7 +5367,8 @@ declare enum FlexDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ColumnReverse, } @@ -5197,7 +5381,8 @@ declare enum FlexDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum PixelRoundCalcPolicy { /** @@ -5207,7 +5392,8 @@ declare enum PixelRoundCalcPolicy { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NO_FORCE_ROUND = 0, /** @@ -5217,7 +5403,8 @@ declare enum PixelRoundCalcPolicy { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ FORCE_CEIL = 1, /** @@ -5227,7 +5414,8 @@ declare enum PixelRoundCalcPolicy { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ FORCE_FLOOR = 2, } @@ -5240,7 +5428,8 @@ declare enum PixelRoundCalcPolicy { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum PixelRoundMode { /** @@ -5250,7 +5439,8 @@ declare enum PixelRoundMode { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ PIXEL_ROUND_ON_LAYOUT_FINISH = 0, /** @@ -5260,7 +5450,8 @@ declare enum PixelRoundMode { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ PIXEL_ROUND_AFTER_MEASURE = 1, } @@ -5297,7 +5488,8 @@ declare enum PixelRoundMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FlexWrap { /** @@ -5328,7 +5520,8 @@ declare enum FlexWrap { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NoWrap, @@ -5360,7 +5553,8 @@ declare enum FlexWrap { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Wrap, @@ -5392,7 +5586,8 @@ declare enum FlexWrap { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ WrapReverse, } @@ -5429,7 +5624,8 @@ declare enum FlexWrap { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum VerticalAlign { /** @@ -5460,7 +5656,8 @@ declare enum VerticalAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Top, @@ -5492,7 +5689,8 @@ declare enum VerticalAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Center, @@ -5524,7 +5722,8 @@ declare enum VerticalAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Bottom, } @@ -5561,7 +5760,8 @@ declare enum VerticalAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ImageRepeat { /** @@ -5592,7 +5792,8 @@ declare enum ImageRepeat { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NoRepeat, @@ -5624,7 +5825,8 @@ declare enum ImageRepeat { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ X, @@ -5656,7 +5858,8 @@ declare enum ImageRepeat { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Y, @@ -5688,7 +5891,8 @@ declare enum ImageRepeat { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ XY, } @@ -5725,7 +5929,8 @@ declare enum ImageRepeat { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ImageSize { /** @@ -5756,7 +5961,8 @@ declare enum ImageSize { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Auto, @@ -5788,7 +5994,8 @@ declare enum ImageSize { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Cover, @@ -5820,7 +6027,8 @@ declare enum ImageSize { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Contain, @@ -5830,7 +6038,8 @@ declare enum ImageSize { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FILL = 3, } @@ -5867,7 +6076,8 @@ declare enum ImageSize { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum GradientDirection { /** @@ -5898,7 +6108,8 @@ declare enum GradientDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Left, @@ -5930,7 +6141,8 @@ declare enum GradientDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Top, @@ -5962,7 +6174,8 @@ declare enum GradientDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Right, @@ -5994,7 +6207,8 @@ declare enum GradientDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Bottom, @@ -6026,7 +6240,8 @@ declare enum GradientDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LeftTop, @@ -6058,7 +6273,8 @@ declare enum GradientDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LeftBottom, @@ -6090,7 +6306,8 @@ declare enum GradientDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RightTop, @@ -6122,7 +6339,8 @@ declare enum GradientDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RightBottom, @@ -6154,7 +6372,8 @@ declare enum GradientDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, } @@ -6181,7 +6400,8 @@ declare enum GradientDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SharedTransitionEffectType { /** @@ -6206,7 +6426,8 @@ declare enum SharedTransitionEffectType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Static, @@ -6229,7 +6450,8 @@ declare enum SharedTransitionEffectType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Exchange, } @@ -6266,7 +6488,8 @@ declare enum SharedTransitionEffectType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FontStyle { /** @@ -6297,7 +6520,8 @@ declare enum FontStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Normal, @@ -6329,7 +6553,8 @@ declare enum FontStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Italic, } @@ -6366,7 +6591,8 @@ declare enum FontStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FontWeight { /** @@ -6397,7 +6623,8 @@ declare enum FontWeight { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Lighter, @@ -6429,7 +6656,8 @@ declare enum FontWeight { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Normal, @@ -6461,7 +6689,8 @@ declare enum FontWeight { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Regular, @@ -6493,7 +6722,8 @@ declare enum FontWeight { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Medium, @@ -6525,7 +6755,8 @@ declare enum FontWeight { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Bold, @@ -6557,7 +6788,8 @@ declare enum FontWeight { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Bolder, } @@ -6594,7 +6826,8 @@ declare enum FontWeight { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TextAlign { /** @@ -6625,7 +6858,8 @@ declare enum TextAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Center, @@ -6657,7 +6891,8 @@ declare enum TextAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Start, @@ -6689,7 +6924,8 @@ declare enum TextAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ End, @@ -6708,7 +6944,8 @@ declare enum TextAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ JUSTIFY, } @@ -6745,7 +6982,8 @@ declare enum TextAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TextOverflow { /** @@ -6776,7 +7014,8 @@ declare enum TextOverflow { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, @@ -6808,7 +7047,8 @@ declare enum TextOverflow { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Clip, @@ -6840,7 +7080,8 @@ declare enum TextOverflow { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Ellipsis, @@ -6857,7 +7098,8 @@ declare enum TextOverflow { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ MARQUEE, } @@ -6894,7 +7136,8 @@ declare enum TextOverflow { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TextDecorationType { /** @@ -6925,7 +7168,8 @@ declare enum TextDecorationType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, @@ -6957,7 +7201,8 @@ declare enum TextDecorationType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Underline, @@ -6989,7 +7234,8 @@ declare enum TextDecorationType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Overline, @@ -7021,7 +7267,8 @@ declare enum TextDecorationType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LineThrough, } @@ -7058,7 +7305,8 @@ declare enum TextDecorationType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TextCase { /** @@ -7089,7 +7337,8 @@ declare enum TextCase { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Normal, @@ -7121,7 +7370,8 @@ declare enum TextCase { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LowerCase, @@ -7153,7 +7403,8 @@ declare enum TextCase { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ UpperCase, } @@ -7173,7 +7424,8 @@ declare enum TextCase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TextHeightAdaptivePolicy { /** @@ -7193,7 +7445,8 @@ declare enum TextHeightAdaptivePolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ MAX_LINES_FIRST, @@ -7214,7 +7467,8 @@ declare enum TextHeightAdaptivePolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ MIN_FONT_SIZE_FIRST, @@ -7237,7 +7491,8 @@ declare enum TextHeightAdaptivePolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LAYOUT_CONSTRAINT_FIRST, } @@ -7264,7 +7519,8 @@ declare enum TextHeightAdaptivePolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ResponseType { /** @@ -7286,7 +7542,8 @@ declare enum ResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RightClick, @@ -7309,7 +7566,8 @@ declare enum ResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LongPress, } @@ -7336,7 +7594,8 @@ declare enum ResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum HoverEffect { /** @@ -7358,7 +7617,8 @@ declare enum HoverEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Auto, @@ -7381,7 +7641,8 @@ declare enum HoverEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Scale, @@ -7404,7 +7665,8 @@ declare enum HoverEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Highlight, @@ -7427,7 +7689,8 @@ declare enum HoverEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, } @@ -7454,7 +7717,8 @@ declare enum HoverEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum Placement { /** @@ -7476,7 +7740,8 @@ declare enum Placement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Left, @@ -7499,7 +7764,8 @@ declare enum Placement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Right, @@ -7522,7 +7788,8 @@ declare enum Placement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Top, @@ -7545,7 +7812,8 @@ declare enum Placement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Bottom, @@ -7568,7 +7836,8 @@ declare enum Placement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ TopLeft, @@ -7591,7 +7860,8 @@ declare enum Placement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ TopRight, @@ -7614,7 +7884,8 @@ declare enum Placement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BottomLeft, @@ -7637,7 +7908,8 @@ declare enum Placement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BottomRight, @@ -7660,7 +7932,8 @@ declare enum Placement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LeftTop, @@ -7683,7 +7956,8 @@ declare enum Placement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LeftBottom, @@ -7706,7 +7980,8 @@ declare enum Placement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RightTop, @@ -7729,7 +8004,8 @@ declare enum Placement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RightBottom, } @@ -7749,7 +8025,8 @@ declare enum Placement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ArrowPointPosition { /** @@ -7765,7 +8042,8 @@ declare enum ArrowPointPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ START = 'Start', @@ -7782,7 +8060,8 @@ declare enum ArrowPointPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CENTER = 'Center', @@ -7799,7 +8078,8 @@ declare enum ArrowPointPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ END = 'End', } @@ -7829,7 +8109,8 @@ declare enum ArrowPointPosition { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum CopyOptions { /** @@ -7854,7 +8135,8 @@ declare enum CopyOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None = 0, @@ -7880,7 +8162,8 @@ declare enum CopyOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ InApp = 1, @@ -7906,7 +8189,8 @@ declare enum CopyOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LocalDevice = 2, @@ -7944,7 +8228,8 @@ declare enum CopyOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum HitTestMode { /** @@ -7969,7 +8254,8 @@ declare enum HitTestMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Default, @@ -7995,7 +8281,8 @@ declare enum HitTestMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Block, @@ -8021,7 +8308,8 @@ declare enum HitTestMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Transparent, @@ -8047,7 +8335,8 @@ declare enum HitTestMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, @@ -8095,7 +8384,8 @@ declare enum HitTestMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TitleHeight { /** @@ -8117,7 +8407,8 @@ declare enum TitleHeight { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ MainOnly, @@ -8140,7 +8431,8 @@ declare enum TitleHeight { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ MainWithSub, } @@ -8160,7 +8452,8 @@ declare enum TitleHeight { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ModifierKey { /** @@ -8176,7 +8469,8 @@ declare enum ModifierKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CTRL, @@ -8193,7 +8487,8 @@ declare enum ModifierKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SHIFT, @@ -8210,7 +8505,8 @@ declare enum ModifierKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ALT, } @@ -8230,7 +8526,8 @@ declare enum ModifierKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FunctionKey { /** @@ -8246,7 +8543,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ESC, @@ -8263,7 +8561,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ F1, @@ -8280,7 +8579,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ F2, @@ -8297,7 +8597,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ F3, @@ -8314,7 +8615,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ F4, @@ -8331,7 +8633,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ F5, @@ -8348,7 +8651,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ F6, @@ -8365,7 +8669,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ F7, @@ -8382,7 +8687,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ F8, @@ -8399,7 +8705,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ F9, @@ -8416,7 +8723,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ F10, @@ -8433,7 +8741,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ F11, @@ -8450,7 +8759,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ F12, @@ -8460,7 +8770,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TAB, @@ -8470,7 +8781,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DPAD_UP, @@ -8480,7 +8792,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DPAD_DOWN, @@ -8490,7 +8803,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DPAD_LEFT, @@ -8500,7 +8814,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DPAD_RIGHT, } @@ -8520,7 +8835,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ImageSpanAlignment { /** @@ -8536,7 +8852,8 @@ declare enum ImageSpanAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BASELINE, @@ -8553,7 +8870,8 @@ declare enum ImageSpanAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BOTTOM, @@ -8570,7 +8888,8 @@ declare enum ImageSpanAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CENTER, @@ -8587,7 +8906,8 @@ declare enum ImageSpanAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ TOP, @@ -8598,6 +8918,7 @@ declare enum ImageSpanAlignment { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ FOLLOW_PARAGRAPH, } @@ -8616,7 +8937,8 @@ declare enum ImageSpanAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ObscuredReasons { /** @@ -8631,7 +8953,8 @@ declare enum ObscuredReasons { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ PLACEHOLDER = 0, } @@ -8650,7 +8973,8 @@ declare enum ObscuredReasons { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TextContentStyle { /** @@ -8665,7 +8989,8 @@ declare enum TextContentStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT, @@ -8681,7 +9006,8 @@ declare enum TextContentStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ INLINE } @@ -8701,7 +9027,8 @@ declare enum TextContentStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ClickEffectLevel { /** @@ -8721,7 +9048,8 @@ declare enum ClickEffectLevel { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LIGHT, @@ -8742,7 +9070,8 @@ declare enum ClickEffectLevel { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ MIDDLE, @@ -8763,7 +9092,8 @@ declare enum ClickEffectLevel { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ HEAVY, } @@ -8790,7 +9120,8 @@ declare enum ClickEffectLevel { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum XComponentType { /** @@ -8812,7 +9143,8 @@ declare enum XComponentType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SURFACE, @@ -8843,7 +9175,8 @@ declare enum XComponentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ TEXTURE, @@ -8872,7 +9205,8 @@ declare enum XComponentType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum NestedScrollMode { /** @@ -8887,7 +9221,8 @@ declare enum NestedScrollMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SELF_ONLY, @@ -8903,7 +9238,8 @@ declare enum NestedScrollMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SELF_FIRST, @@ -8919,7 +9255,8 @@ declare enum NestedScrollMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ PARENT_FIRST, @@ -8935,7 +9272,8 @@ declare enum NestedScrollMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ PARALLEL, } @@ -8946,7 +9284,8 @@ declare enum NestedScrollMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ScrollSource { /** @@ -8954,7 +9293,8 @@ declare enum ScrollSource { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DRAG = 0, @@ -8963,7 +9303,8 @@ declare enum ScrollSource { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FLING, @@ -8972,7 +9313,8 @@ declare enum ScrollSource { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EDGE_EFFECT, @@ -8981,7 +9323,8 @@ declare enum ScrollSource { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ OTHER_USER_INPUT, @@ -8990,7 +9333,8 @@ declare enum ScrollSource { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCROLL_BAR, @@ -8999,7 +9343,8 @@ declare enum ScrollSource { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCROLL_BAR_FLING, @@ -9008,7 +9353,8 @@ declare enum ScrollSource { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCROLLER, @@ -9017,7 +9363,8 @@ declare enum ScrollSource { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCROLLER_ANIMATION, } @@ -9047,7 +9394,8 @@ declare enum ScrollSource { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum RenderFit { /** @@ -9072,7 +9420,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CENTER = 0, /** @@ -9097,7 +9446,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TOP = 1, /** @@ -9122,7 +9472,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ BOTTOM = 2, /** @@ -9147,7 +9498,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ LEFT = 3, /** @@ -9172,7 +9524,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RIGHT = 4, /** @@ -9197,7 +9550,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TOP_LEFT = 5, /** @@ -9222,7 +9576,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TOP_RIGHT = 6, /** @@ -9247,7 +9602,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ BOTTOM_LEFT = 7, /** @@ -9272,7 +9628,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ BOTTOM_RIGHT = 8, /** @@ -9297,7 +9654,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RESIZE_FILL = 9, /** @@ -9328,7 +9686,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RESIZE_CONTAIN = 10, /** @@ -9365,7 +9724,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RESIZE_CONTAIN_TOP_LEFT = 11, /** @@ -9402,7 +9762,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RESIZE_CONTAIN_BOTTOM_RIGHT = 12, /** @@ -9433,7 +9794,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RESIZE_COVER = 13, /** @@ -9470,7 +9832,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RESIZE_COVER_TOP_LEFT = 14, /** @@ -9507,7 +9870,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RESIZE_COVER_BOTTOM_RIGHT = 15, } @@ -9525,7 +9889,8 @@ declare enum RenderFit { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum DialogButtonStyle { /** @@ -9539,7 +9904,8 @@ declare enum DialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 0, @@ -9554,7 +9920,8 @@ declare enum DialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ HIGHLIGHT = 1 } @@ -9566,7 +9933,8 @@ declare enum DialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum WordBreak { /** @@ -9575,7 +9943,8 @@ declare enum WordBreak { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NORMAL = 0, @@ -9585,7 +9954,8 @@ declare enum WordBreak { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BREAK_ALL = 1, @@ -9596,7 +9966,8 @@ declare enum WordBreak { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BREAK_WORD = 2, @@ -9606,7 +9977,8 @@ declare enum WordBreak { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ HYPHENATION = 3, } @@ -9618,7 +9990,8 @@ declare enum WordBreak { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum LineBreakStrategy { /** @@ -9628,7 +10001,8 @@ declare enum LineBreakStrategy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GREEDY = 0, @@ -9639,7 +10013,8 @@ declare enum LineBreakStrategy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HIGH_QUALITY = 1, @@ -9650,7 +10025,8 @@ declare enum LineBreakStrategy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BALANCED = 2, } @@ -9661,7 +10037,8 @@ declare enum LineBreakStrategy { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum IlluminatedType { /** @@ -9669,7 +10046,8 @@ declare enum IlluminatedType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, /** @@ -9677,7 +10055,8 @@ declare enum IlluminatedType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BORDER = 1, /** @@ -9685,7 +10064,8 @@ declare enum IlluminatedType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CONTENT = 2, /** @@ -9693,7 +10073,8 @@ declare enum IlluminatedType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BORDER_CONTENT = 3, /** @@ -9701,7 +10082,8 @@ declare enum IlluminatedType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BLOOM_BORDER = 4, /** @@ -9709,7 +10091,8 @@ declare enum IlluminatedType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BLOOM_BORDER_CONTENT = 5 } @@ -9729,7 +10112,8 @@ declare enum IlluminatedType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum EllipsisMode { /** @@ -9745,7 +10129,8 @@ declare enum EllipsisMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ START = 0, @@ -9762,7 +10147,8 @@ declare enum EllipsisMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CENTER = 1, @@ -9779,7 +10165,8 @@ declare enum EllipsisMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ END = 2, } @@ -9799,7 +10186,8 @@ declare enum EllipsisMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type Nullable = T | undefined; @@ -9819,7 +10207,8 @@ declare type Nullable = T | undefined; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum OptionWidthMode { /** @@ -9835,7 +10224,8 @@ declare enum OptionWidthMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FIT_CONTENT = 'fit_content', @@ -9852,7 +10242,8 @@ declare enum OptionWidthMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FIT_TRIGGER = 'fit_trigger', } @@ -9872,7 +10263,8 @@ declare enum OptionWidthMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FoldStatus { /** @@ -9888,7 +10280,8 @@ declare enum FoldStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FOLD_STATUS_UNKNOWN = 0, /** @@ -9904,7 +10297,8 @@ declare enum FoldStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FOLD_STATUS_EXPANDED = 1, /** @@ -9920,7 +10314,8 @@ declare enum FoldStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FOLD_STATUS_FOLDED = 2, /** @@ -9936,7 +10331,8 @@ declare enum FoldStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FOLD_STATUS_HALF_FOLDED = 3, } @@ -9947,7 +10343,8 @@ declare enum FoldStatus { * @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 AppRotation { @@ -9956,7 +10353,8 @@ declare enum AppRotation { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ROTATION_0 = 0, @@ -9965,7 +10363,8 @@ declare enum AppRotation { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ROTATION_90 = 1, @@ -9974,7 +10373,8 @@ declare enum AppRotation { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ROTATION_180 = 2, @@ -9983,7 +10383,8 @@ declare enum AppRotation { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ROTATION_270 = 3 } @@ -9994,7 +10395,8 @@ declare enum AppRotation { * @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 EmbeddedType { /** @@ -10002,7 +10404,8 @@ declare enum EmbeddedType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EMBEDDED_UI_EXTENSION = 0, } @@ -10014,7 +10417,8 @@ declare enum EmbeddedType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum MarqueeUpdateStrategy { /** @@ -10023,7 +10427,8 @@ declare enum MarqueeUpdateStrategy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 0, @@ -10033,7 +10438,8 @@ declare enum MarqueeUpdateStrategy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PRESERVE_POSITION = 1 } @@ -10045,7 +10451,8 @@ declare enum MarqueeUpdateStrategy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TextDecorationStyle { /** @@ -10054,7 +10461,8 @@ declare enum TextDecorationStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SOLID = 0, @@ -10064,7 +10472,8 @@ declare enum TextDecorationStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DOUBLE = 1, @@ -10074,7 +10483,8 @@ declare enum TextDecorationStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DOTTED = 2, @@ -10084,7 +10494,8 @@ declare enum TextDecorationStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DASHED = 3, @@ -10094,7 +10505,8 @@ declare enum TextDecorationStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ WAVY = 4, } @@ -10106,7 +10518,8 @@ declare enum TextDecorationStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TextSelectableMode { /** @@ -10115,7 +10528,8 @@ declare enum TextSelectableMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SELECTABLE_UNFOCUSABLE = 0, @@ -10125,7 +10539,8 @@ declare enum TextSelectableMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SELECTABLE_FOCUSABLE = 1, @@ -10135,7 +10550,8 @@ declare enum TextSelectableMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ UNSELECTABLE = 2, } @@ -10147,7 +10563,8 @@ declare enum TextSelectableMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum AccessibilityHoverType { /** @@ -10156,7 +10573,8 @@ declare enum AccessibilityHoverType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HOVER_ENTER = 0, @@ -10166,7 +10584,8 @@ declare enum AccessibilityHoverType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HOVER_MOVE = 1, @@ -10176,7 +10595,8 @@ declare enum AccessibilityHoverType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HOVER_EXIT = 2, @@ -10186,7 +10606,8 @@ declare enum AccessibilityHoverType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HOVER_CANCEL = 3, } @@ -10197,7 +10618,8 @@ declare enum AccessibilityHoverType { * @enum {number} * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum WidthBreakpoint { /** @@ -10205,7 +10627,8 @@ declare enum WidthBreakpoint { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ WIDTH_XS = 0, @@ -10214,7 +10637,8 @@ declare enum WidthBreakpoint { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ WIDTH_SM = 1, @@ -10223,7 +10647,8 @@ declare enum WidthBreakpoint { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ WIDTH_MD = 2, @@ -10232,7 +10657,8 @@ declare enum WidthBreakpoint { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ WIDTH_LG = 3, @@ -10241,7 +10667,8 @@ declare enum WidthBreakpoint { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ WIDTH_XL = 4, } @@ -10252,7 +10679,8 @@ declare enum WidthBreakpoint { * @enum {number} * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum HeightBreakpoint { /** @@ -10260,7 +10688,8 @@ declare enum HeightBreakpoint { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ HEIGHT_SM = 0, @@ -10269,7 +10698,8 @@ declare enum HeightBreakpoint { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ HEIGHT_MD = 1, @@ -10278,7 +10708,8 @@ declare enum HeightBreakpoint { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ HEIGHT_LG = 2, } @@ -10289,7 +10720,8 @@ declare enum HeightBreakpoint { * @enum {number} * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum AxisModel { /** @@ -10297,7 +10729,8 @@ declare enum AxisModel { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ ABS_X = 0, @@ -10307,7 +10740,8 @@ declare enum AxisModel { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ ABS_Y = 1, @@ -10316,7 +10750,8 @@ declare enum AxisModel { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ ABS_Z = 2, @@ -10325,7 +10760,8 @@ declare enum AxisModel { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ ABS_RZ = 3, @@ -10334,7 +10770,8 @@ declare enum AxisModel { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ ABS_GAS = 4, @@ -10343,7 +10780,8 @@ declare enum AxisModel { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ ABS_BRAKE = 5, @@ -10352,7 +10790,8 @@ declare enum AxisModel { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ ABS_HAT0X = 6, @@ -10361,7 +10800,8 @@ declare enum AxisModel { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ ABS_HAT0Y = 7, } @@ -10374,7 +10814,8 @@ declare enum AxisModel { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum PageFlipMode { /** @@ -10384,7 +10825,8 @@ declare enum PageFlipMode { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ CONTINUOUS = 0, @@ -10395,7 +10837,8 @@ declare enum PageFlipMode { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ SINGLE = 1, } @@ -10437,7 +10880,8 @@ declare enum FocusWrapMode { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum CrownAction { /** @@ -10445,7 +10889,8 @@ declare enum CrownAction { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ BEGIN = 0, @@ -10454,7 +10899,8 @@ declare enum CrownAction { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ UPDATE = 1, @@ -10463,7 +10909,8 @@ declare enum CrownAction { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ END = 2 } @@ -10474,7 +10921,8 @@ declare enum CrownAction { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum CrownSensitivity { /** @@ -10482,7 +10930,8 @@ declare enum CrownSensitivity { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ LOW = 0, @@ -10491,7 +10940,8 @@ declare enum CrownSensitivity { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ MEDIUM = 1, @@ -10500,7 +10950,8 @@ declare enum CrownSensitivity { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ HIGH = 2 } @@ -10511,7 +10962,8 @@ declare enum CrownSensitivity { * @enum {number} * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum AxisAction { /** @@ -10519,7 +10971,8 @@ declare enum AxisAction { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -10528,7 +10981,8 @@ declare enum AxisAction { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ BEGIN = 1, @@ -10537,7 +10991,8 @@ declare enum AxisAction { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ UPDATE = 2, @@ -10546,7 +11001,8 @@ declare enum AxisAction { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ END = 3, @@ -10555,7 +11011,8 @@ declare enum AxisAction { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CANCEL = 4, } @@ -10568,7 +11025,8 @@ declare enum AxisAction { * @crossplatform * @form * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FocusDrawLevel { /** @@ -10578,7 +11036,8 @@ declare enum AxisAction { * @crossplatform * @form * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SELF = 0, @@ -10589,7 +11048,8 @@ declare enum AxisAction { * @crossplatform * @form * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TOP = 1, } @@ -10601,7 +11061,8 @@ declare enum AxisAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum DividerMode { /** @@ -10610,7 +11071,8 @@ declare enum DividerMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ FLOATING_ABOVE_MENU = 0, @@ -10620,7 +11082,8 @@ declare enum DividerMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ EMBEDDED_IN_MENU = 1, } diff --git a/api/@internal/component/ets/flex.d.ts b/api/@internal/component/ets/flex.d.ts index 7e5a2e45036a5c51d6eca298499d30fdbe8317ad..8a3185e069aecaaabd63320991801647b03d1014 100644 --- a/api/@internal/component/ets/flex.d.ts +++ b/api/@internal/component/ets/flex.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { LengthMetrics } from '../Graphics'; +import { PointLightStyle, CommonMethod } from './common'; +import { FlexWrap, FlexDirection, ItemAlign, FlexAlign } from './enums'; +/*** endif */ + /** * Defines the options of Flex. * @@ -43,14 +49,15 @@ * @since 10 */ /** - * Describes the layout and alignment of child components within the Flex component. + * Defines the options of Flex. * * @interface FlexOptions * @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 FlexOptions { /** @@ -78,15 +85,15 @@ declare interface FlexOptions { * @since 10 */ /** - * Direction in which child components are arranged in the Flex component. + * Sets the horizontal layout of elements. * * @type { ?FlexDirection } - * @default FlexDirection.Row * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ direction?: FlexDirection; @@ -115,15 +122,15 @@ declare interface FlexOptions { * @since 10 */ /** - * Whether the Flex component has a single line or multiple lines. + * Whether the Flex container is a single row/column arrangement or a multi-row/column arrangement. * * @type { ?FlexWrap } - * @default FlexWrap.NoWrap * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ wrap?: FlexWrap; @@ -152,15 +159,15 @@ declare interface FlexOptions { * @since 10 */ /** - * Alignment mode of the child components in the Flex component along the main axis. + * The alignment format of the subassembly on the Flex container spindle. * * @type { ?FlexAlign } - * @default FlexAlign.Start * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ justifyContent?: FlexAlign; @@ -189,15 +196,15 @@ declare interface FlexOptions { * @since 10 */ /** - * Alignment mode of the child components in the Flex component along the cross axis. + * Alignment Format for Subassembly on Flex Container Cross Axis. * * @type { ?ItemAlign } - * @default ItemAlign.Start * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ alignItems?: ItemAlign; @@ -226,62 +233,66 @@ declare interface FlexOptions { * @since 10 */ /** - * Alignment mode of the child components in a multi-row Flex component along the cross axis. - * This parameter is valid only when wrap is set to Wrap or WrapReverse. + * The alignment of multiple lines of content when there is extra space in the cross axis. * * @type { ?FlexAlign } - * @default FlexAlign.Start * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ alignContent?: FlexAlign; /** - * Spacing between child components along the main axis or cross axis of the Flex component. + * The space to be inserted, either horizontally or vertically, + * between two adjacent components in the Flex container. * * @type { ?FlexSpaceOptions } - * @default {main: LengthMetrics.px(0), cross: LengthMetrics.px(0)} * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ space?: FlexSpaceOptions; } /** - * Defines the spacing between child components along the main axis or cross axis of the Flex component. + * The space to be inserted, either horizontally or vertically, + * between two adjacent components in the Flex container. * * @interface FlexSpaceOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface FlexSpaceOptions { /** - * Space on the main axis of the Flex component. + * Defines the main space property. * * @type { ?LengthMetrics } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ main?: LengthMetrics; /** - * Space on the main axis of the Flex component. + * Defines the cross space property. * * @type { ?LengthMetrics } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ cross?: LengthMetrics; } @@ -318,7 +329,8 @@ declare interface FlexSpaceOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface FlexInterface { /** @@ -357,7 +369,8 @@ interface FlexInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (value?: FlexOptions): FlexAttribute; } @@ -394,7 +407,8 @@ interface FlexInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class FlexAttribute extends CommonMethod { /** @@ -404,7 +418,8 @@ declare class FlexAttribute extends CommonMethod { * @returns { FlexAttribute } The attribute of the flex. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ pointLight(value: PointLightStyle): FlexAttribute; } diff --git a/api/@internal/component/ets/flow_item.d.ts b/api/@internal/component/ets/flow_item.d.ts index 83656920348360e55b7d6e14c4567918f07fc1e3..70cf009cce4621798a1bdf6ed9125db999f3e241 100644 --- a/api/@internal/component/ets/flow_item.d.ts +++ b/api/@internal/component/ets/flow_item.d.ts @@ -18,6 +18,10 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod } from './common' +/*** endif */ + /** * Mesh container for static fixed-size layout scenarios. * @@ -40,7 +44,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface FlowItemInterface { /** @@ -65,7 +70,8 @@ interface FlowItemInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (): FlowItemAttribute; } @@ -92,7 +98,8 @@ interface FlowItemInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class FlowItemAttribute extends CommonMethod {} diff --git a/api/@internal/component/ets/focus.d.ts b/api/@internal/component/ets/focus.d.ts index 495e4f6bbd24387a2f2cc8e0ce18ba47da37a708..3c69aa30b4703cdb38777afee2b87bf9bdf34371 100644 --- a/api/@internal/component/ets/focus.d.ts +++ b/api/@internal/component/ets/focus.d.ts @@ -18,6 +18,10 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { LengthMetrics , ColorMetrics } from '../Graphics'; +/*** endif */ + /** * Focus box style. * @@ -25,7 +29,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface FocusBoxStyle { /** @@ -35,7 +40,8 @@ declare interface FocusBoxStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ margin?: LengthMetrics; /** @@ -45,7 +51,8 @@ declare interface FocusBoxStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ strokeColor?: ColorMetrics; /** @@ -55,7 +62,8 @@ declare interface FocusBoxStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ strokeWidth?: LengthMetrics; } @@ -67,7 +75,8 @@ declare interface FocusBoxStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FocusPriority { /** @@ -76,7 +85,8 @@ declare enum FocusPriority { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUTO = 0, @@ -86,7 +96,8 @@ declare enum FocusPriority { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PRIOR = 2000, @@ -96,11 +107,11 @@ declare enum FocusPriority { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PREVIOUS = 3000, } - /** * Key processing mode. * Determines the priority of key event processing when component cannot handle the key event. @@ -109,7 +120,8 @@ declare enum FocusPriority { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum KeyProcessingMode { /** @@ -118,7 +130,8 @@ declare enum KeyProcessingMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ FOCUS_NAVIGATION = 0, @@ -128,7 +141,8 @@ declare enum KeyProcessingMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ ANCESTOR_EVENT = 1, } \ No newline at end of file diff --git a/api/@internal/component/ets/folder_stack.d.ts b/api/@internal/component/ets/folder_stack.d.ts index 0c93809ea69c22d58fd3ab6a78022366d2dcddde..0a0f69faf143ecdb865d938f01a49851e3a0d9ca 100644 --- a/api/@internal/component/ets/folder_stack.d.ts +++ b/api/@internal/component/ets/folder_stack.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import window from '../../@ohos.window'; +import { FoldStatus, Alignment, AppRotation } from './enums'; +import { CommonMethod } from './common'; +/*** endif */ + /** * Import the WindowStatusType type object for onHoverStatusChange. * @@ -28,6 +34,17 @@ */ declare type WindowStatusType = import('../api/@ohos.window').default.WindowStatusType; +/** + * Import the WindowStatusType type object for onHoverStatusChange. + * + * @typedef { window.WindowStatusType } WindowStatusType + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type WindowStatusType = window.WindowStatusType + /** * FolderStack constructor options. * @@ -35,7 +52,8 @@ declare type WindowStatusType = import('../api/@ohos.window').default.WindowStat * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ interface FolderStackOptions { /** @@ -83,7 +101,8 @@ interface FolderStackOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface FolderStackInterface { @@ -115,7 +134,8 @@ interface FolderStackInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ (options?: FolderStackOptions): FolderStackAttribute; } @@ -127,7 +147,8 @@ interface FolderStackInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ interface OnFoldStatusChangeInfo { /** @@ -169,19 +190,20 @@ interface OnFoldStatusChangeInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnFoldStatusChangeCallback = (event: OnFoldStatusChangeInfo) => void; /** * Callback when onHoverStatusChange. - * - * Anonymous Object Rectification + * * @typedef { function } OnHoverStatusChangeCallback * @param { HoverEventParam } param - hover event param * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnHoverStatusChangeCallback = (param: HoverEventParam) => void; @@ -197,7 +219,8 @@ declare type OnHoverStatusChangeCallback = (param: HoverEventParam) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class FolderStackAttribute extends CommonMethod { /** @@ -217,7 +240,8 @@ declare class FolderStackAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ alignContent(value: Alignment): FolderStackAttribute; @@ -249,7 +273,8 @@ declare class FolderStackAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ onFolderStateChange(callback: OnFoldStatusChangeCallback): FolderStackAttribute; @@ -271,7 +296,8 @@ declare class FolderStackAttribute extends CommonMethod { * @returns { FolderStackAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ onHoverStatusChange(handler: OnHoverStatusChangeCallback): FolderStackAttribute; @@ -292,7 +318,8 @@ declare class FolderStackAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableAnimation(value: boolean): FolderStackAttribute; @@ -313,7 +340,8 @@ declare class FolderStackAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ autoHalfFold(value: boolean): FolderStackAttribute; } @@ -324,7 +352,8 @@ declare class FolderStackAttribute extends CommonMethod { * @interface HoverEventParam * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface HoverEventParam { /** @@ -333,7 +362,8 @@ declare interface HoverEventParam { * @type { FoldStatus } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ foldStatus: FoldStatus @@ -343,7 +373,8 @@ declare interface HoverEventParam { * @type { boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isHoverMode: boolean @@ -353,7 +384,8 @@ declare interface HoverEventParam { * @type { AppRotation } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ appRotation: AppRotation @@ -363,7 +395,8 @@ declare interface HoverEventParam { * @type { WindowStatusType } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ windowStatusType: WindowStatusType } diff --git a/api/@internal/component/ets/form_component.d.ts b/api/@internal/component/ets/form_component.d.ts index 0b44fe424c0e785f725998cd72a36224180bfcc4..6a8f557ddaca368f010dc88d6e372d714323d5fb 100644 --- a/api/@internal/component/ets/form_component.d.ts +++ b/api/@internal/component/ets/form_component.d.ts @@ -17,14 +17,20 @@ * @file * @kit ArkUI */ - +/*** if arkts 1.2 */ +import { CommonMethod,Callback } from './common'; +import Want from '../../@ohos.app.ability.Want'; +import { Visibility } from './enums' +import { VoidCallback } from './units'; +/*** endif */ /** * Defines the FormDimension enum. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FormDimension { /** @@ -32,7 +38,8 @@ declare enum FormDimension { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ Dimension_1_2, @@ -41,7 +48,8 @@ declare enum FormDimension { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ Dimension_2_2, @@ -50,7 +58,8 @@ declare enum FormDimension { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ Dimension_2_4, @@ -59,7 +68,8 @@ declare enum FormDimension { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ Dimension_4_4, @@ -68,8 +78,8 @@ declare enum FormDimension { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 - * @deprecated since 20 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ Dimension_2_1, @@ -79,7 +89,8 @@ declare enum FormDimension { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ DIMENSION_1_1 = 6, @@ -88,7 +99,8 @@ declare enum FormDimension { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DIMENSION_6_4, @@ -97,7 +109,8 @@ declare enum FormDimension { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ DIMENSION_2_3 = 8, @@ -106,18 +119,30 @@ declare enum FormDimension { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ DIMENSION_3_3 = 9, + + /** + * 3 x 4 cards used for tv devices + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + DIMENSION_3_4 = 10, } /** * Defines the FormRenderingMode enum. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FormRenderingMode { @@ -126,7 +151,8 @@ declare enum FormRenderingMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ FULL_COLOR, @@ -135,7 +161,8 @@ declare enum FormRenderingMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SINGLE_COLOR, } @@ -143,10 +170,11 @@ declare enum FormRenderingMode { /** * Defines the FormShape enum. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FormShape { /** @@ -154,7 +182,8 @@ declare enum FormShape { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ RECT = 1, @@ -163,7 +192,8 @@ declare enum FormShape { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CIRCLE, } @@ -174,18 +204,20 @@ declare enum FormShape { * @interface FormInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface FormInfo { /** * The id the form. * - * @type { number | string } + * @type { long | string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - id: number | string; + id: long | string; /** * The name of the form. @@ -193,7 +225,8 @@ declare interface FormInfo { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -203,7 +236,8 @@ declare interface FormInfo { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bundle: string; @@ -213,7 +247,8 @@ declare interface FormInfo { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ability: string; @@ -223,7 +258,8 @@ declare interface FormInfo { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ module: string; @@ -233,7 +269,8 @@ declare interface FormInfo { * @type { ?FormDimension } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dimension?: FormDimension; @@ -243,7 +280,8 @@ declare interface FormInfo { * @type { ?boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ temporary?: boolean; @@ -257,13 +295,25 @@ declare interface FormInfo { */ want?: import('../api/@ohos.app.ability.Want').default; + /** + * The want of the form. + * + * @type { ?Want } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + * @arkts 1.2 + */ + want?: Want; + /** * The renderingMode of the form. * * @type { ?FormRenderingMode } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ renderingMode?: FormRenderingMode; @@ -273,7 +323,8 @@ declare interface FormInfo { * @type { ?FormShape } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shape?: FormShape; } @@ -284,14 +335,15 @@ declare interface FormInfo { * @interface FormComponentInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ interface FormComponentInterface { /** * Set a new value. * * @param { { - * id: number; + * id: long; * name: string; * bundle: string; * ability: string; @@ -330,7 +382,8 @@ interface FormComponentInterface { * @returns { FormComponentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ (value: FormInfo): FormComponentAttribute; } @@ -341,18 +394,20 @@ interface FormComponentInterface { * @interface FormCallbackInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface FormCallbackInfo { /** * The id of the form. * - * @type { number } + * @type { long } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - id: number; + id: long; /** * The string id of the form. @@ -360,7 +415,8 @@ interface FormCallbackInfo { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ idString: string; } @@ -368,33 +424,35 @@ interface FormCallbackInfo { /** * Defines the size of Form. * - * @typedef FormSize + * @interface FormSize * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface FormSize { /** * The width of the form. * Anonymous Object Rectification * - * @type { number } + * @type { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - width: number; - + width: double; /** * The height of the form. * Anonymous Object Rectification * - * @type { number } + * @type { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - height: number; + height: double; } /** @@ -403,19 +461,21 @@ interface FormSize { * @typedef ErrorInformation * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface ErrorInformation { /** * Error code. * Anonymous Object Rectification * - * @type { number } + * @type { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - errcode: number; + errcode: int; /** * Error information. @@ -424,7 +484,8 @@ interface ErrorInformation { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ msg: string; } @@ -433,7 +494,8 @@ interface ErrorInformation { * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ declare class FormComponentAttribute extends CommonMethod { /** @@ -449,11 +511,12 @@ declare class FormComponentAttribute extends CommonMethod): FormComponentAttribute; @@ -540,7 +608,8 @@ declare class FormComponentAttribute extends CommonMethod): FormComponentAttribute; @@ -561,7 +630,8 @@ declare class FormComponentAttribute extends CommonMethod): FormComponentAttribute; @@ -581,7 +651,8 @@ declare class FormComponentAttribute extends CommonMethod): FormComponentAttribute; @@ -602,7 +673,8 @@ declare class FormComponentAttribute extends CommonMethod { -} +declare class FormLinkAttribute extends CommonMethod {} /** * Defines FormLink component. diff --git a/api/@internal/component/ets/gauge.d.ts b/api/@internal/component/ets/gauge.d.ts index 9b39da9c99f24917745844fb511e953d9b0e56c7..0d3ebe2d139d1a8d8a32a3f135911025f412f34c 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,8 @@ interface GaugeOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface GaugeInterface { /** @@ -262,7 +274,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 +297,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 +317,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 +339,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 +361,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 +375,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 +386,8 @@ declare interface GaugeConfiguration extends CommonConfiguration { /** @@ -458,7 +480,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 +521,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 +562,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 +603,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 +644,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 +666,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 +688,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 +710,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 +724,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 +737,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; } diff --git a/api/@internal/component/ets/gesture.d.ts b/api/@internal/component/ets/gesture.d.ts index 464be9eddb6335b1ceb7b5d579eca77e1f18d81c..8d3c8593b64e999206be209bbb4de39b21cdcec2 100644 --- a/api/@internal/component/ets/gesture.d.ts +++ b/api/@internal/component/ets/gesture.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { BaseEvent, SourceTool, Callback } from './common' +import { InteractionHand } from './enums' +/*** endif */ + /** * Creating an Object * @@ -40,7 +45,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 PanDirection { /** @@ -62,7 +68,8 @@ declare enum PanDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, @@ -85,7 +92,8 @@ declare enum PanDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Horizontal, @@ -108,7 +116,8 @@ declare enum PanDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Left, @@ -131,7 +140,8 @@ declare enum PanDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Right, @@ -154,7 +164,8 @@ declare enum PanDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Vertical, @@ -177,7 +188,8 @@ declare enum PanDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Up, @@ -200,7 +212,8 @@ declare enum PanDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Down, @@ -223,7 +236,8 @@ declare enum PanDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ All, } @@ -250,7 +264,8 @@ declare enum PanDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SwipeDirection { /** @@ -272,7 +287,8 @@ declare enum SwipeDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, @@ -295,7 +311,8 @@ declare enum SwipeDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Horizontal, @@ -318,7 +335,8 @@ declare enum SwipeDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Vertical, @@ -341,7 +359,8 @@ declare enum SwipeDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ All, } @@ -368,7 +387,8 @@ declare enum SwipeDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum GestureMode { /** @@ -390,7 +410,8 @@ declare enum GestureMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Sequence, @@ -413,7 +434,8 @@ declare enum GestureMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Parallel, @@ -436,7 +458,8 @@ declare enum GestureMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Exclusive, } @@ -463,7 +486,8 @@ declare enum GestureMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum GestureMask { /** @@ -485,7 +509,8 @@ declare enum GestureMask { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Normal, @@ -508,7 +533,8 @@ declare enum GestureMask { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ IgnoreInternal, } @@ -528,7 +554,8 @@ declare enum GestureMask { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum GestureJudgeResult { /** @@ -544,7 +571,8 @@ declare enum GestureJudgeResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CONTINUE = 0, @@ -561,7 +589,8 @@ declare enum GestureJudgeResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ REJECT = 1, } @@ -581,7 +610,8 @@ declare enum GestureJudgeResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace GestureControl { /** @@ -599,7 +629,8 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum GestureType { /** @@ -615,7 +646,8 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TAP_GESTURE = 0, @@ -632,7 +664,8 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LONG_PRESS_GESTURE = 1, @@ -649,7 +682,8 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PAN_GESTURE = 2, @@ -666,7 +700,8 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PINCH_GESTURE = 3, @@ -683,7 +718,8 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SWIPE_GESTURE = 4, @@ -700,7 +736,8 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ROTATION_GESTURE = 5, @@ -717,7 +754,8 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DRAG = 6, @@ -734,7 +772,8 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CLICK = 7, } @@ -755,7 +794,8 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GestureInfo { /** @@ -773,7 +813,8 @@ declare interface GestureInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ tag?: string; @@ -792,7 +833,8 @@ declare interface GestureInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type: GestureControl.GestureType; @@ -811,7 +853,8 @@ declare interface GestureInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isSystemGesture: boolean; } @@ -915,7 +958,8 @@ declare interface EventLocationInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface FingerInfo { /** @@ -940,7 +984,8 @@ interface FingerInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ id: number; @@ -988,7 +1033,8 @@ interface FingerInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ globalX: number; @@ -1014,7 +1060,8 @@ interface FingerInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ globalY: number; @@ -1040,7 +1087,8 @@ interface FingerInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ localX: number; @@ -1066,7 +1114,8 @@ interface FingerInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ localY: number; @@ -1077,7 +1126,8 @@ interface FingerInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ displayX: number; @@ -1088,7 +1138,8 @@ interface FingerInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ displayY: number; @@ -1099,7 +1150,8 @@ interface FingerInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ hand?: InteractionHand; } @@ -1137,6 +1189,18 @@ declare type GestureType = | RotationGestureInterface | GestureGroupInterface; +/** + * Defines the Gesture Type. + * + * @typedef { Gesture | GestureGroup } GestureType + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +export type GestureType = Gesture | GestureGroup; + /** * Defines the gesture base event. * @@ -1154,7 +1218,8 @@ declare type GestureType = * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface BaseGestureEvent extends BaseEvent { /** @@ -1172,7 +1237,8 @@ interface BaseGestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fingerList: FingerInfo[]; @@ -1206,7 +1272,8 @@ interface BaseGestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface TapGestureEvent extends BaseGestureEvent { /** @@ -1238,7 +1305,8 @@ interface TapGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface LongPressGestureEvent extends BaseGestureEvent { /** @@ -1256,7 +1324,8 @@ interface LongPressGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ repeat: boolean; } @@ -1278,7 +1347,8 @@ interface LongPressGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface PanGestureEvent extends BaseGestureEvent { /** @@ -1298,7 +1368,8 @@ interface PanGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ offsetX: number; @@ -1319,7 +1390,8 @@ interface PanGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ offsetY: number; @@ -1336,7 +1408,8 @@ interface PanGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ velocityX: number; @@ -1353,7 +1426,8 @@ interface PanGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ velocityY: number; @@ -1370,7 +1444,8 @@ interface PanGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ velocity: number; } @@ -1392,7 +1467,8 @@ interface PanGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface PinchGestureEvent extends BaseGestureEvent { /** @@ -1410,7 +1486,8 @@ interface PinchGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ scale: number; @@ -1431,7 +1508,8 @@ interface PinchGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pinchCenterX: number; @@ -1452,7 +1530,8 @@ interface PinchGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pinchCenterY: number; } @@ -1474,7 +1553,8 @@ interface PinchGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface RotationGestureEvent extends BaseGestureEvent { /** @@ -1494,7 +1574,8 @@ interface RotationGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ angle: number; } @@ -1516,7 +1597,8 @@ interface RotationGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'112','1.2':'20'} + * @arkts 1.1&1.2 */ interface SwipeGestureEvent extends BaseGestureEvent { /** @@ -1536,7 +1618,8 @@ interface SwipeGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ angle: number; @@ -1557,7 +1640,8 @@ interface SwipeGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ speed: number; } @@ -1587,7 +1671,8 @@ interface SwipeGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface GestureEvent extends BaseEvent { /** @@ -1615,7 +1700,8 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ repeat: boolean; @@ -1644,7 +1730,8 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fingerList: FingerInfo[]; @@ -1688,7 +1775,8 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offsetX: number; @@ -1720,7 +1808,8 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offsetY: number; @@ -1752,7 +1841,8 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ angle: number; @@ -1784,7 +1874,8 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ speed: number; @@ -1813,7 +1904,8 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scale: number; @@ -1845,7 +1937,8 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ pinchCenterX: number; @@ -1877,7 +1970,8 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ pinchCenterY: number; @@ -1894,7 +1988,8 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ velocityX: number; @@ -1911,7 +2006,8 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ velocityY: number; @@ -1928,7 +2024,8 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ velocity: number; @@ -1985,7 +2082,8 @@ interface GestureInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ interface BaseHandlerOptions { /** @@ -1996,11 +2094,49 @@ interface GestureInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ isFingerCountLimited?: boolean; } +/** + * Defines Gesture interface. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +export declare class Gesture { + /** + * Set gesture's tag. + * + * @param { string } tag + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + tag(tag: string): this; + + /** + * Input source type for gesture response. + * + * @param { Array } types - indicate the allowed input source for gesture to response + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + allowedTypes(types: Array): this; +} + /** * Defines TapGesture parameters. * @@ -2018,7 +2154,8 @@ interface GestureInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TapGestureParameters extends BaseHandlerOptions { /** @@ -2028,7 +2165,8 @@ declare interface TapGestureParameters extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ count?: number; /** @@ -2038,7 +2176,8 @@ declare interface TapGestureParameters extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fingers?: number; /** @@ -2048,7 +2187,8 @@ declare interface TapGestureParameters extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ distanceThreshold?: number; } @@ -2157,6 +2297,46 @@ interface TapGestureInterface extends GestureInterface { onAction(event: (event: GestureEvent) => void): TapGestureInterface; } +/*** if arkts 1.2 */ +/** + * Defines TapGesture. + * + * @extends Gesture + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare class TapGesture extends Gesture { + /** + * Set the value. + * TapGestureParameters: The parameters of the tapGesture. + * + * @param { function } factory + * @param { TapGestureParameters } value + * @returns { TapGesture } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + static $_instantiate(factory: () => TapGesture, value?: TapGestureParameters): TapGesture + + /** + * Tap gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onAction(event: Callback): this; +} +/*** endif */ + /** * Defines LongPressGesture interface. * @@ -2334,6 +2514,72 @@ interface LongPressGestureInterface extends GestureInterface): LongPressGestureInterface; } +/*** if arkts 1.2 */ +/** + * Defines LongPressGesture. + * + * @extends Gesture + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare class LongPressGesture extends Gesture { + /** + * Set the value. + * fingers: Indicates the hand index that triggers the long press. + * repeat: Indicates whether to trigger event callback continuously. + * duration: Minimum press and hold time, in milliseconds. + * + * @param { function } factory + * @param { LongPressGestureHandlerOptions } value + * @returns { LongPressGesture } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + static $_instantiate(factory: () => LongPressGesture, value?: LongPressGestureHandlerOptions): LongPressGesture + + /** + * LongPress gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onAction(event: Callback): this; + + /** + * The LongPress gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionEnd(event: Callback): this; + + /** + * The LongPress gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionCancel(event: Callback): this; +} +/*** endif */ + /** * Defines the PanGesture options. * @@ -2353,7 +2599,8 @@ interface LongPressGestureInterface extends GestureInterface { } +/*** if arkts 1.2 */ /** - * Defines the SwipeGesture interface. - * - * @extends GestureInterface - * @interface SwipeGestureInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines the SwipeGesture interface. + * Defines PanGesture. * - * @extends GestureInterface - * @interface SwipeGestureInterface + * @extends Gesture * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 10 + * @atomicservice + * @since 20 */ -/** - * Defines SwipeGesture interface extends GestureInterface. - * - * @extends GestureInterface +export declare class PanGesture extends Gesture { + /** + * Set the value. + * + * @param { function } factory + * @param { PanGestureHandlerOptions | PanGestureOptions } value + * @returns { PanGesture } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + static $_instantiate(factory: () => PanGesture, value?: PanGestureHandlerOptions | PanGestureOptions): PanGesture + + /** + * Pan gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionStart(event: Callback): this; + + /** + * Callback when the Pan gesture is moving. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionUpdate(event: Callback): this; + + /** + * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionEnd(event: Callback): this; + + /** + * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionCancel(event: Callback): this; +} +/*** endif */ + +/** + * Defines the SwipeGesture interface. + * + * @extends GestureInterface + * @interface SwipeGestureInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines the SwipeGesture interface. + * + * @extends GestureInterface + * @interface SwipeGestureInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * Defines SwipeGesture interface extends GestureInterface. + * + * @extends GestureInterface * @interface SwipeGestureInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -2781,6 +3153,45 @@ interface SwipeGestureInterface extends GestureInterface onAction(event: (event: GestureEvent) => void): SwipeGestureInterface; } +/*** if arkts 1.2 */ +/** + * Defines SwipeGesture. + * + * @extends Gesture + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare class SwipeGesture extends Gesture { + /** + * Set the value. + * + * @param { function } factory + * @param { SwipeGestureHandlerOptions } value + * @returns { SwipeGesture } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + static $_instantiate(factory: () => SwipeGesture, value?: SwipeGestureHandlerOptions): SwipeGesture + + /** + * Slide gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onAction(event: Callback): this; +} +/*** endif */ + /** * Defines the PinchGesture interface. * @@ -2979,6 +3390,81 @@ interface PinchGestureInterface extends GestureInterface onActionCancel(event: Callback): PinchGestureInterface; } +/*** if arkts 1.2 */ +/** + * Defines PinchGesture. + * + * @extends Gesture + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare class PinchGesture extends Gesture { + /** + * Set the value. + * + * @param { function } factory + * @param { PinchGestureHandlerOptions } value + * @returns { PinchGesture } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + static $_instantiate(factory: () => PinchGesture, value?: PinchGestureHandlerOptions): PinchGesture + + /** + * Pinch gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionStart(event: Callback): this; + + /** + * Callback when the Pinch gesture is moving. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionUpdate(event: Callback): this; + + /** + * The Pinch gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionEnd(event: Callback): this; + + /** + * The Pinch gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionCancel(event: Callback): this; +} +/*** endif */ + /** * Defines the RotationGesture interface. * @@ -3177,6 +3663,81 @@ interface RotationGestureInterface extends GestureInterface): RotationGestureInterface; } +/*** if arkts 1.2 */ +/** + * Defines RotationGesture. + * + * @extends Gesture + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare class RotationGesture extends Gesture { + /** + * Set the value. + * + * @param { function } factory + * @param { RotationGestureHandlerOptions } value + * @returns { RotationGesture } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + static $_instantiate(factory: () => RotationGesture, value?: RotationGestureHandlerOptions): RotationGesture + + /** + * Rotation gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionStart(event: Callback): this; + + /** + * Callback when the Rotation gesture is moving. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionUpdate(event: Callback): this; + + /** + * The Rotation gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionEnd(event: Callback): this; + + /** + * The Rotation gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionCancel(event: Callback): this; +} +/*** endif */ + /** * Defines the GestureGroup interface. * @@ -3264,6 +3825,45 @@ interface GestureGroupInterface { onCancel(event: () => void): GestureGroupInterface; } +/*** if arkts 1.2 */ +/** + * Defines the GestureGroup. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare class GestureGroup { + /** + * Return to Obtain GestureGroup. + * + * @param { function } factory + * @param { GestureMode } mode + * @param { GestureType[] } gesture + * @returns { GestureGroup } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + static $_instantiate(factory: () => GestureGroup, mode: GestureMode, ...gesture: GestureType[]): GestureGroup; + + /** + * The Gesture group is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { GestureGroup } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onCancel(event: Callback): GestureGroup; +} +/*** endif */ + /** * Defines TapGesture Component. * @@ -3460,6 +4060,42 @@ declare class GestureHandler implements GestureInterface { allowedTypes(types: Array): T; } +/*** if arkts 1.2 */ +/** + * Defines the gesture handler. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare class GestureHandler { + /** + * Set the GestureHandler's tag. + * + * @param { string } tag + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + tag(tag: string): this; + + /** + * Input source type for gesture response. + * + * @param { Array } types - indicate the allowed input source for gesture to response + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + allowedTypes(types: Array): this; +} +/*** endif */ + /** * Defines the TapGestureHandler options. * @@ -3477,7 +4113,8 @@ declare class GestureHandler implements GestureInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ interface TapGestureHandlerOptions extends BaseHandlerOptions { /** @@ -3488,7 +4125,8 @@ interface TapGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ count?: number; /** @@ -3499,7 +4137,8 @@ interface TapGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fingers?: number; } @@ -3537,6 +4176,41 @@ declare class TapGestureHandler extends GestureHandler { onAction(event: Callback): TapGestureHandler; } +/*** if arkts 1.2 */ +/** + * Defines the TapGesture handler. + * + * @extends GestureHandler + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare class TapGestureHandler extends GestureHandler { + /** + * Constructor parameters. + * + * @param { TapGestureHandlerOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + constructor(options?: TapGestureHandlerOptions); + /** + * Tap gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onAction(event: Callback): this; +} +/*** endif */ + /** * Defines the LongPressGestureHandler options. * @@ -3554,7 +4228,8 @@ declare class TapGestureHandler extends GestureHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ interface LongPressGestureHandlerOptions extends BaseHandlerOptions { /** @@ -3565,7 +4240,8 @@ interface LongPressGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fingers?: number; /** @@ -3576,7 +4252,8 @@ interface LongPressGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ repeat?: boolean; /** @@ -3587,7 +4264,8 @@ interface LongPressGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ duration?: number; } @@ -3659,6 +4337,63 @@ declare class LongPressGestureHandler extends GestureHandler): LongPressGestureHandler; } +/*** if arkts 1.2 */ +/** + * Defines the LongPressGesture handler. + * + * @extends GestureHandler + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare class LongPressGestureHandler extends GestureHandler { + /** + * Constructor parameters. + * + * @param { LongPressGestureHandlerOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + constructor(options?: LongPressGestureHandlerOptions); + /** + * LongPress gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onAction(event: Callback): this; + /** + * The LongPress gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionEnd(event: Callback): this; + /** + * The LongPress gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionCancel(event: Callback): this; +} +/*** endif */ + /** * Defines the PanGestureHandler options. * @@ -3676,7 +4411,8 @@ declare class LongPressGestureHandler extends GestureHandler + * @extends GestureHandler + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ +declare class PanGestureHandler extends GestureHandler { + /** + * Constructor parameters. + * + * @param { PanGestureHandlerOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + constructor(options?: PanGestureHandlerOptions); + /** + * Pan gesture recognition success callback. + * + * @param { Callback } event + * @returns { PanGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onActionStart(event: Callback): PanGestureHandler; + /** + * Callback when the Pan gesture is moving. + * + * @param { Callback } event + * @returns { PanGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onActionUpdate(event: Callback): PanGestureHandler; + /** + * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { Callback } event + * @returns { PanGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onActionEnd(event: Callback): PanGestureHandler; + /** + * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { PanGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onActionCancel(event: Callback): PanGestureHandler; + /** + * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * Add GestureEvent in cancel callback. + * + * @param { Callback } event + * @returns { PanGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + onActionCancel(event: Callback): PanGestureHandler; +} + +/*** if arkts 1.2 */ +/** + * Defines the PanGesture handler. + * + * @extends GestureHandler * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since 20 */ -declare class PanGestureHandler extends GestureHandler { +export declare class PanGestureHandler extends GestureHandler { /** * Constructor parameters. * @@ -3741,66 +4559,55 @@ declare class PanGestureHandler extends GestureHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since 20 */ constructor(options?: PanGestureHandlerOptions); /** * Pan gesture recognition success callback. * * @param { Callback } event - * @returns { PanGestureHandler } + * @returns { this } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since 20 */ - onActionStart(event: Callback): PanGestureHandler; + onActionStart(event: Callback): this; /** * Callback when the Pan gesture is moving. * * @param { Callback } event - * @returns { PanGestureHandler } + * @returns { this } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since 20 */ - onActionUpdate(event: Callback): PanGestureHandler; + onActionUpdate(event: Callback): this; /** * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. * * @param { Callback } event - * @returns { PanGestureHandler } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onActionEnd(event: Callback): PanGestureHandler; - /** - * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { Callback } event - * @returns { PanGestureHandler } + * @returns { this } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since 20 */ - onActionCancel(event: Callback): PanGestureHandler; + onActionEnd(event: Callback): this; /** * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * Add GestureEvent in cancel callback. * * @param { Callback } event - * @returns { PanGestureHandler } + * @returns { this } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since 20 */ - onActionCancel(event: Callback): PanGestureHandler; + onActionCancel(event: Callback): this; } +/*** endif */ /** * Defines the SwipeGestureHandler options. @@ -3819,7 +4626,8 @@ declare class PanGestureHandler extends GestureHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ interface SwipeGestureHandlerOptions extends BaseHandlerOptions { /** @@ -3830,7 +4638,8 @@ interface SwipeGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fingers?: number; /** @@ -3841,7 +4650,8 @@ interface SwipeGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ direction?: SwipeDirection; /** @@ -3852,7 +4662,8 @@ interface SwipeGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ speed?: number; } @@ -3890,6 +4701,41 @@ declare class SwipeGestureHandler extends GestureHandler { onAction(event: Callback): SwipeGestureHandler; } +/*** if arkts 1.2 */ +/** + * Defines the SwipeGesture handler. + * + * @extends GestureHandler + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare class SwipeGestureHandler extends GestureHandler { + /** + * Constructor parameters. + * + * @param { SwipeGestureHandlerOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + constructor(options?: SwipeGestureHandlerOptions); + /** + * Swipe gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onAction(event: Callback): this; +} +/*** endif */ + /** * Defines the PinchGestureHandler options. * @@ -3907,7 +4753,8 @@ declare class SwipeGestureHandler extends GestureHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ interface PinchGestureHandlerOptions extends BaseHandlerOptions { /** @@ -3918,7 +4765,8 @@ interface PinchGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fingers?: number; /** @@ -3929,7 +4777,8 @@ interface PinchGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ distance?: number; } @@ -4012,6 +4861,74 @@ declare class PinchGestureHandler extends GestureHandler { onActionCancel(event: Callback): PinchGestureHandler; } +/*** if arkts 1.2 */ +/** + * Defines the PinchGesture handler. + * + * @extends GestureHandler + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare class PinchGestureHandler extends GestureHandler { + /** + * Constructor parameters. + * + * @param { PinchGestureHandlerOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + constructor(options?: PinchGestureHandlerOptions); + /** + * Pinch gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionStart(event: Callback): this; + /** + * Callback when the Pinch gesture is moving. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionUpdate(event: Callback): this; + /** + * The Pinch gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionEnd(event: Callback): this; + /** + * The Pinch gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionCancel(event: Callback): this; +} +/*** endif */ + /** * Defines the RotationGestureHandler options. * @@ -4029,7 +4946,8 @@ declare class PinchGestureHandler extends GestureHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ interface RotationGestureHandlerOptions extends BaseHandlerOptions { /** @@ -4040,7 +4958,8 @@ interface RotationGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fingers?: number; /** @@ -4051,7 +4970,8 @@ interface RotationGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ angle?: number; } @@ -4134,6 +5054,74 @@ declare class RotationGestureHandler extends GestureHandler): RotationGestureHandler; } +/*** if arkts 1.2 */ +/** + * Defines the RotationGesture handler. + * + * @extends GestureHandler + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare class RotationGestureHandler extends GestureHandler { + /** + * Constructor parameters. + * + * @param { RotationGestureHandlerOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + constructor(options?: RotationGestureHandlerOptions); + /** + * Rotation gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionStart(event: Callback): this; + /** + * Callback when the Rotation gesture is moving. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionUpdate(event: Callback): this; + /** + * The Rotation gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionEnd(event: Callback): this; + /** + * The Rotation gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionCancel(event: Callback): this; +} +/*** endif */ + /** * Defines the GestureGroupGestureHandler options. * @@ -4141,7 +5129,8 @@ declare class RotationGestureHandler extends GestureHandler[]; + /** + * Indicates the gestures included in the gesture group. + * + * @type { GestureHandler[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + gestures: GestureHandler[]; } /** @@ -4199,6 +5200,41 @@ declare class GestureGroupHandler extends GestureHandler { onCancel(event: Callback): GestureGroupHandler; } +/*** if arkts 1.2 */ +/** + * Defines the GestureGroup handler. + * + * @extends GestureHandler + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare class GestureGroupHandler extends GestureHandler { + /** + * Constructor parameters. + * + * @param { GestureGroupGestureHandlerOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + constructor(options?: GestureGroupGestureHandlerOptions); + /** + * The GestureGroup gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onCancel(event: Callback): this; +} +/*** endif */ + /** * Creating an Object * @@ -4206,7 +5242,8 @@ declare class GestureGroupHandler extends GestureHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum GesturePriority { /** @@ -4215,7 +5252,8 @@ declare enum GesturePriority { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NORMAL = 0, /** @@ -4224,7 +5262,8 @@ declare enum GesturePriority { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PRIORITY = 1, } @@ -4236,7 +5275,8 @@ declare enum GesturePriority { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum GestureRecognizerState { /** @@ -4245,7 +5285,8 @@ declare enum GestureRecognizerState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ READY = 0, /** @@ -4254,7 +5295,8 @@ declare enum GestureRecognizerState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DETECTING = 1, /** @@ -4263,7 +5305,8 @@ declare enum GestureRecognizerState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PENDING = 2, /** @@ -4272,7 +5315,8 @@ declare enum GestureRecognizerState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BLOCKED = 3, /** @@ -4281,7 +5325,8 @@ declare enum GestureRecognizerState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SUCCESSFUL = 4, /** @@ -4290,7 +5335,8 @@ declare enum GestureRecognizerState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FAILED = 5, } @@ -4302,7 +5348,8 @@ declare enum GestureRecognizerState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ScrollableTargetInfo extends EventTargetInfo { /** @@ -4312,7 +5359,8 @@ declare class ScrollableTargetInfo extends EventTargetInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isBegin(): boolean; /** @@ -4322,7 +5370,8 @@ declare class ScrollableTargetInfo extends EventTargetInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isEnd(): boolean; } @@ -4333,7 +5382,8 @@ declare class ScrollableTargetInfo extends EventTargetInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class EventTargetInfo { /** @@ -4343,7 +5393,8 @@ declare class EventTargetInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getId(): string; } @@ -4384,7 +5435,8 @@ declare class TouchRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class GestureRecognizer { /** @@ -4394,7 +5446,8 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getTag(): string; /** @@ -4404,7 +5457,8 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getType(): GestureControl.GestureType; /** @@ -4414,7 +5468,8 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isBuiltIn(): boolean; /** @@ -4424,7 +5479,8 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setEnabled(isEnabled: boolean): void; /** @@ -4434,7 +5490,8 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isEnabled(): boolean; /** @@ -4444,7 +5501,8 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getState(): GestureRecognizerState; /** @@ -4454,7 +5512,8 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getEventTargetInfo(): EventTargetInfo; /** @@ -4463,7 +5522,8 @@ declare class GestureRecognizer { * @returns { boolean } - true is valid, false is invalid * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isValid(): boolean; /** @@ -4473,7 +5533,8 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getFingerCount(): number; /** @@ -4483,7 +5544,8 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ isFingerCountLimit(): boolean; /** @@ -4510,7 +5572,8 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TapRecognizer extends GestureRecognizer { /** @@ -4520,7 +5583,8 @@ declare class TapRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getTapCount(): number; } @@ -4532,7 +5596,8 @@ declare class TapRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare class LongPressRecognizer extends GestureRecognizer { /** @@ -4542,7 +5607,8 @@ declare class LongPressRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ isRepeat(): boolean; /** @@ -4553,7 +5619,8 @@ declare class LongPressRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getDuration(): number; } @@ -4565,7 +5632,8 @@ declare class LongPressRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare class SwipeRecognizer extends GestureRecognizer { /** @@ -4576,7 +5644,8 @@ declare class SwipeRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getVelocityThreshold(): number; /** @@ -4586,7 +5655,8 @@ declare class SwipeRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getDirection(): SwipeDirection; } @@ -4598,7 +5668,8 @@ declare class SwipeRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare class PinchRecognizer extends GestureRecognizer { /** @@ -4609,7 +5680,8 @@ declare class PinchRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getDistance(): number; } @@ -4621,7 +5693,8 @@ declare class PinchRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RotationRecognizer extends GestureRecognizer { /** @@ -4631,7 +5704,8 @@ declare class RotationRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getAngle(): number; } @@ -4643,7 +5717,8 @@ declare class RotationRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class PanRecognizer extends GestureRecognizer { /** @@ -4653,7 +5728,8 @@ declare class PanRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getPanGestureOptions(): PanGestureOptions; /** diff --git a/api/@internal/component/ets/grid.d.ts b/api/@internal/component/ets/grid.d.ts index 084ccb1306ef8fe08c3a9dddfd9231ba3c4094f7..6a9b34604d87d06e19a666b96b685ae65e858402 100644 --- a/api/@internal/component/ets/grid.d.ts +++ b/api/@internal/component/ets/grid.d.ts @@ -18,6 +18,14 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { EdgeEffectOptions, NestedScrollOptions, ItemDragInfo, ScrollableCommonMethod, Optional, CommonMethod, OnWillScrollCallback, OnScrollCallback, OnItemDragStartCallback } from './common'; +import { Length, Resource } from './units'; +import { Scroller, OnScrollFrameBeginCallback } from './scroll'; +import { ScrollState } from './list'; +import { BarState, Color, EdgeEffect } from './enums'; +/*** endif */ + /** * The options to help grid layout * @@ -33,7 +41,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GridLayoutOptions { /** @@ -51,7 +60,8 @@ declare interface GridLayoutOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ regularSize: [number, number]; @@ -72,7 +82,8 @@ declare interface GridLayoutOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ irregularIndexes?: number[]; @@ -93,7 +104,8 @@ declare interface GridLayoutOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onGetIrregularSizeByIndex?: (index: number) => [number, number] @@ -114,7 +126,8 @@ declare interface GridLayoutOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onGetRectByIndex?: (index: number) => [number, number, number, number] } @@ -141,7 +154,8 @@ declare interface GridLayoutOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface GridInterface { /** @@ -171,7 +185,8 @@ interface GridInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (scroller?: Scroller, layoutOptions?: GridLayoutOptions): GridAttribute; } @@ -198,7 +213,8 @@ interface GridInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum GridDirection { /** @@ -220,7 +236,8 @@ declare enum GridDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Row, @@ -243,7 +260,8 @@ declare enum GridDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Column, @@ -266,7 +284,8 @@ declare enum GridDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RowReverse, @@ -289,7 +308,8 @@ declare enum GridDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ColumnReverse, } @@ -301,7 +321,8 @@ declare enum GridDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum GridItemAlignment { @@ -311,7 +332,8 @@ declare enum GridItemAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 0, @@ -322,7 +344,8 @@ declare enum GridItemAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STRETCH = 1, } @@ -342,7 +365,8 @@ declare enum GridItemAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ComputedBarAttribute { /** @@ -360,7 +384,8 @@ declare interface ComputedBarAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ totalOffset: number; @@ -379,7 +404,8 @@ declare interface ComputedBarAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ totalLength: number; } @@ -465,7 +491,8 @@ declare type OnGridScrollIndexCallback = (first: number, last: number) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class GridAttribute extends ScrollableCommonMethod { /** @@ -493,7 +520,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ columnsTemplate(value: string): GridAttribute; @@ -522,7 +550,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ rowsTemplate(value: string): GridAttribute; @@ -551,7 +580,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ columnsGap(value: Length): GridAttribute; @@ -580,7 +610,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ rowsGap(value: Length): GridAttribute; @@ -692,7 +723,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onScrollBarUpdate(event: (index: number, offset: number) => ComputedBarAttribute): GridAttribute; @@ -726,7 +758,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onScrollIndex(event: (first: number, last: number) => void): GridAttribute; @@ -755,7 +788,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ cachedCount(value: number): GridAttribute; @@ -767,7 +801,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ cachedCount(count: number, show: boolean): GridAttribute; @@ -796,7 +831,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ editMode(value: boolean): GridAttribute; @@ -825,7 +861,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ multiSelectable(value: boolean): GridAttribute; @@ -854,7 +891,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maxCount(value: number): GridAttribute; @@ -883,7 +921,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ minCount(value: number): GridAttribute; @@ -912,7 +951,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ cellLength(value: number): GridAttribute; @@ -941,7 +981,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ layoutDirection(value: GridDirection): GridAttribute; @@ -970,7 +1011,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ supportAnimation(value: boolean): GridAttribute; @@ -1006,6 +1048,19 @@ declare class GridAttribute extends ScrollableCommonMethod { */ onItemDragStart(event: (event: ItemDragInfo, itemIndex: number) => (() => any) | void): GridAttribute; + /** + * After a listener is bound, the component can be dragged. After the drag occurs, a callback is triggered. + * (To be triggered, press and hold for 170 milliseconds (ms)) + * + * @param { OnItemDragStartCallback } event + * @returns { GridAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onItemDragStart(event: OnItemDragStartCallback): GridAttribute; + /** * After binding, a callback is triggered when the component is dragged to the range of the component. * @@ -1031,7 +1086,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onItemDragEnter(event: (event: ItemDragInfo) => void): GridAttribute; @@ -1060,7 +1116,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onItemDragMove(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number) => void): GridAttribute; @@ -1089,7 +1146,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onItemDragLeave(event: (event: ItemDragInfo, itemIndex: number) => void): GridAttribute; @@ -1121,7 +1179,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onItemDrop( event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void, @@ -1219,7 +1278,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ alignItems(alignment: Optional): GridAttribute; @@ -1381,6 +1441,43 @@ declare class GridAttribute extends ScrollableCommonMethod { * @since 11 */ onScrollFrameBegin(event: (offset: number, state: ScrollState) => { offsetRemain: number }): GridAttribute; + + /** + * Called when scrolling begin each frame. + * + * @param { OnScrollFrameBeginCallback } event + * @returns { GridAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onScrollFrameBegin(event: OnScrollFrameBeginCallback): GridAttribute; + + /** + * Called when the scrollable will scroll. + * + * @param { Optional } handler - callback of scrollable. + * @returns { GridAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onWillScroll(handler: Optional): GridAttribute; + + /** + * Called when the scrollable did scroll. + * + * @param { OnScrollCallback } handler - callback of scrollable, + * scrollOffset is offset this frame did scroll, scrollState is current scroll state. + * @returns { GridAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onDidScroll(handler: OnScrollCallback): GridAttribute; } /** diff --git a/api/@internal/component/ets/gridItem.d.ts b/api/@internal/component/ets/gridItem.d.ts index 3f6b51c3f778193238bf2c476fad04ca98b63068..bfb75483273e5d351dd0ad6c171063c4dbac34e1 100644 --- a/api/@internal/component/ets/gridItem.d.ts +++ b/api/@internal/component/ets/gridItem.d.ts @@ -18,6 +18,10 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod, Bindable } from './common' +/*** endif */ + /** * Defines the grid item style. * @@ -33,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 GridItemStyle { /** @@ -49,7 +54,8 @@ declare enum GridItemStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -66,7 +72,8 @@ declare enum GridItemStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PLAIN = 1, } @@ -86,7 +93,8 @@ declare enum GridItemStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GridItemOptions { /** @@ -104,7 +112,8 @@ declare interface GridItemOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ style?: GridItemStyle; } @@ -131,7 +140,8 @@ declare interface GridItemOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface GridItemInterface { /** @@ -157,7 +167,8 @@ interface GridItemInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (value?: GridItemOptions): GridItemAttribute; } @@ -178,7 +189,8 @@ interface GridItemInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class GridItemAttribute extends CommonMethod { /** @@ -206,7 +218,8 @@ declare class GridItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ rowStart(value: number): GridItemAttribute; @@ -235,7 +248,8 @@ declare class GridItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ rowEnd(value: number): GridItemAttribute; @@ -264,7 +278,8 @@ declare class GridItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ columnStart(value: number): GridItemAttribute; @@ -293,7 +308,8 @@ declare class GridItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ columnEnd(value: number): GridItemAttribute; @@ -333,7 +349,8 @@ declare class GridItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectable(value: boolean): GridItemAttribute; @@ -360,6 +377,20 @@ declare class GridItemAttribute extends CommonMethod { */ selected(value: boolean): GridItemAttribute; + /** + * Called when judging whether it is selected. + * This parameter supports $$ for two-way binding of variables. + * + * @param { boolean | Bindable } value + * @returns { GridItemAttribute } the attribute of the gridItem. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + selected(value: boolean | Bindable): GridItemAttribute; + /** * Called when the gridItem is selected. * @@ -385,7 +416,8 @@ declare class GridItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onSelect(event: (isSelected: boolean) => void): GridItemAttribute; } diff --git a/api/@internal/component/ets/grid_col.d.ts b/api/@internal/component/ets/grid_col.d.ts index 147401413a5d1d76e374d19dfaeaf91d95c34c91..5889c45d0dd67c30636031d705265532ac774f33 100644 --- a/api/@internal/component/ets/grid_col.d.ts +++ b/api/@internal/component/ets/grid_col.d.ts @@ -18,6 +18,10 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod } from './common'; +/*** endif */ + /** * Defines the option in number unit of grid-container child component. * @@ -43,7 +47,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GridColColumnOption { /** @@ -71,7 +76,8 @@ declare interface GridColColumnOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ xs?: number, @@ -100,7 +106,8 @@ declare interface GridColColumnOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ sm?: number, @@ -129,7 +136,8 @@ declare interface GridColColumnOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ md?: number, @@ -158,7 +166,8 @@ declare interface GridColColumnOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ lg?: number, @@ -187,7 +196,8 @@ declare interface GridColColumnOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ xl?: number, @@ -216,7 +226,8 @@ declare interface GridColColumnOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ xxl?: number, } @@ -246,7 +257,8 @@ declare interface GridColColumnOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GridColOptions { /** @@ -274,7 +286,8 @@ declare interface GridColOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ span?: number | GridColColumnOption; @@ -303,7 +316,8 @@ declare interface GridColOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: number | GridColColumnOption; @@ -332,7 +346,8 @@ declare interface GridColOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ order?: number | GridColColumnOption; } @@ -362,7 +377,8 @@ declare interface GridColOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface GridColInterface { /** @@ -393,7 +409,8 @@ interface GridColInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (option?: GridColOptions): GridColAttribute; } @@ -423,7 +440,8 @@ interface GridColInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class GridColAttribute extends CommonMethod { /** @@ -454,7 +472,8 @@ declare class GridColAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ span(value: number | GridColColumnOption): GridColAttribute; @@ -486,7 +505,8 @@ declare class GridColAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ gridColOffset(value: number | GridColColumnOption): GridColAttribute; @@ -518,7 +538,8 @@ declare class GridColAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ order(value: number | GridColColumnOption): GridColAttribute; } diff --git a/api/@internal/component/ets/grid_row.d.ts b/api/@internal/component/ets/grid_row.d.ts index beaa5ea7a4b6601bdcb8cbec1162a6161da24bed..a5ea02dc1072a3a5f2bb8f488f3e56806f6e395b 100644 --- a/api/@internal/component/ets/grid_row.d.ts +++ b/api/@internal/component/ets/grid_row.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ItemAlign } from './enums'; +import { CommonMethod } from './common'; +import { Length } from './units'; +/*** endif */ + /** * Defines the option in length unit of grid-row component. * @@ -43,7 +49,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GridRowSizeOption { /** @@ -71,7 +78,8 @@ declare interface GridRowSizeOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ xs?: Length, @@ -100,7 +108,8 @@ declare interface GridRowSizeOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ sm?: Length, @@ -129,7 +138,8 @@ declare interface GridRowSizeOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ md?: Length, @@ -158,7 +168,8 @@ declare interface GridRowSizeOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ lg?: Length, @@ -187,7 +198,8 @@ declare interface GridRowSizeOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ xl?: Length, @@ -216,7 +228,8 @@ declare interface GridRowSizeOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ xxl?: Length, } @@ -246,7 +259,8 @@ declare interface GridRowSizeOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GridRowColumnOption { /** @@ -274,7 +288,8 @@ declare interface GridRowColumnOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ xs?: number, @@ -303,7 +318,8 @@ declare interface GridRowColumnOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ sm?: number, @@ -332,7 +348,8 @@ declare interface GridRowColumnOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ md?: number, @@ -361,7 +378,8 @@ declare interface GridRowColumnOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ lg?: number, @@ -390,7 +408,8 @@ declare interface GridRowColumnOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ xl?: number, @@ -419,7 +438,8 @@ declare interface GridRowColumnOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ xxl?: number, } @@ -449,7 +469,8 @@ declare interface GridRowColumnOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GutterOption { /** @@ -477,7 +498,8 @@ declare interface GutterOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ x?: Length | GridRowSizeOption, @@ -506,7 +528,8 @@ declare interface GutterOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ y?: Length | GridRowSizeOption } @@ -536,7 +559,8 @@ declare interface GutterOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum BreakpointsReference { /** @@ -561,7 +585,8 @@ declare enum BreakpointsReference { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ WindowSize, @@ -587,7 +612,8 @@ declare enum BreakpointsReference { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ComponentSize, } @@ -617,7 +643,8 @@ declare enum BreakpointsReference { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum GridRowDirection { /** @@ -642,7 +669,8 @@ declare enum GridRowDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Row, @@ -668,7 +696,8 @@ declare enum GridRowDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RowReverse, } @@ -698,7 +727,8 @@ declare enum GridRowDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface BreakPoints { /** @@ -726,7 +756,8 @@ declare interface BreakPoints { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ value?: Array, @@ -755,7 +786,8 @@ declare interface BreakPoints { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ reference?: BreakpointsReference, } @@ -785,7 +817,8 @@ declare interface BreakPoints { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GridRowOptions { /** @@ -813,7 +846,8 @@ declare interface GridRowOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ gutter?: Length | GutterOption; @@ -842,7 +876,8 @@ declare interface GridRowOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ columns?: number | GridRowColumnOption; @@ -871,7 +906,8 @@ declare interface GridRowOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ breakpoints?: BreakPoints; @@ -900,7 +936,8 @@ declare interface GridRowOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ direction?: GridRowDirection; } @@ -930,7 +967,8 @@ declare interface GridRowOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface GridRowInterface { /** @@ -961,7 +999,8 @@ interface GridRowInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (option?: GridRowOptions): GridRowAttribute; } @@ -991,7 +1030,8 @@ interface GridRowInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class GridRowAttribute extends CommonMethod { /** @@ -1022,7 +1062,8 @@ declare class GridRowAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onBreakpointChange(callback: (breakpoints: string) => void): GridRowAttribute; @@ -1045,7 +1086,8 @@ declare class GridRowAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ alignItems(value: ItemAlign): GridRowAttribute; } diff --git a/api/@internal/component/ets/image.d.ts b/api/@internal/component/ets/image.d.ts index 5be59d65489a3688252714a71e6ca14a314771b0..0697b86780009fa136801341fba842370f49064d 100644 --- a/api/@internal/component/ets/image.d.ts +++ b/api/@internal/component/ets/image.d.ts @@ -18,6 +18,19 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +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'; +/*** endif */ + /** * Use the DrawableDescriptor class to get drawable image. * @@ -32,7 +45,7 @@ * @atomicservice * @since 11 */ -declare type DrawableDescriptor = import ('../api/@ohos.arkui.drawableDescriptor').DrawableDescriptor; +declare type DrawableDescriptor = import('../api/@ohos.arkui.drawableDescriptor').DrawableDescriptor; /** * Import the DrawingColorFilter type object for image color filter setting. @@ -45,6 +58,18 @@ declare type DrawableDescriptor = import ('../api/@ohos.arkui.drawableDescriptor */ declare type DrawingColorFilter = import('../api/@ohos.graphics.drawing').default.ColorFilter; +/** + * Import the DrawingColorFilter type object for image color filter setting. + * + * @typedef { drawing.ColorFilter } DrawingColorFilter + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type DrawingColorFilter = drawing.ColorFilter; + /** * Enumerates all the levels available for the image resolution quality. * @@ -53,7 +78,18 @@ declare type DrawingColorFilter = import('../api/@ohos.graphics.drawing').defaul * @systemapi * @since 12 */ -declare type ResolutionQuality = import('../api/@ohos.multimedia.image').default.ResolutionQuality; +declare type ResolutionQuality = import('../api/@ohos.multimedia.image').default.ResolutionQuality; + +/** + * Enumerates all the levels available for the image resolution quality. + * + * @typedef { image.ResolutionQuality } ResolutionQuality + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + * @arkts 1.2 + */ +declare type ResolutionQuality = image.ResolutionQuality; /** * Lattice for dividing an image into grids. @@ -64,7 +100,19 @@ declare type ResolutionQuality = import('../api/@ohos.multimedia.image').defaul * @atomicservice * @since 12 */ -declare type DrawingLattice = import('../api/@ohos.graphics.drawing').default.Lattice; +declare type DrawingLattice = import('../api/@ohos.graphics.drawing').default.Lattice; + +/** + * Lattice for dividing an image into grids. + * + * @typedef { drawing.Lattice } DrawingLattice + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type DrawingLattice = drawing.Lattice; /** * Object matrix used for setting image transformations. @@ -75,7 +123,19 @@ declare type DrawingLattice = import('../api/@ohos.graphics.drawing').default.L * @atomicservice * @since 15 */ -declare type ImageMatrix = import ('../api/@ohos.matrix4').default.Matrix4Transit; +declare type ImageMatrix = import('../api/@ohos.matrix4').default.Matrix4Transit; + +/** + * Object matrix used for setting image transformations. + * + * @typedef { matrix4.Matrix4Transit } Matrix4Transit + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type ImageMatrix = matrix4.Matrix4Transit; /** * Business error in onError callback. @@ -113,7 +173,8 @@ declare type BusinessError = import('../api/@ohos.base').BusinessError; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ImageRenderMode { /** @@ -144,7 +205,8 @@ declare enum ImageRenderMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Original, @@ -176,7 +238,8 @@ declare enum ImageRenderMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Template, } @@ -189,7 +252,8 @@ declare enum ImageRenderMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ImageContent { /** @@ -199,7 +263,8 @@ declare enum ImageContent { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EMPTY = 0, } @@ -208,7 +273,8 @@ declare enum ImageContent { * @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 DynamicRangeMode { /** @@ -216,7 +282,8 @@ declare enum DynamicRangeMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HIGH = 0, @@ -225,7 +292,8 @@ declare enum DynamicRangeMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CONSTRAINT = 1, @@ -234,7 +302,8 @@ declare enum DynamicRangeMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STANDARD = 2, } @@ -263,7 +332,8 @@ declare enum DynamicRangeMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ImageInterpolation { /** @@ -294,7 +364,8 @@ declare enum ImageInterpolation { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, @@ -326,7 +397,8 @@ declare enum ImageInterpolation { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Low, @@ -358,7 +430,8 @@ declare enum ImageInterpolation { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Medium, @@ -390,7 +463,8 @@ declare enum ImageInterpolation { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ High, } @@ -400,7 +474,8 @@ declare enum ImageInterpolation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ImageRotateOrientation { /** @@ -409,7 +484,8 @@ declare enum ImageRotateOrientation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ AUTO = 0, @@ -419,7 +495,8 @@ declare enum ImageRotateOrientation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ UP = 1, @@ -429,7 +506,8 @@ declare enum ImageRotateOrientation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ RIGHT = 2, @@ -439,7 +517,8 @@ declare enum ImageRotateOrientation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ DOWN = 3, @@ -449,51 +528,180 @@ declare enum ImageRotateOrientation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ LEFT = 4, /** - * Flip the orignial image horizontally + * Flip the original image horizontally * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ UP_MIRRORED = 5, /** - * Flip the orignial image horizontally and rotate clockwise 90 degrees + * Flip the original image horizontally and rotate clockwise 90 degrees * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ RIGHT_MIRRORED = 6, /** - * Flip the orignial image vertically + * Flip the original image vertically * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ DOWN_MIRRORED = 7, /** - * Flip the orignial image horizontally and rotate clockwise 270 degrees + * Flip the original image horizontally and rotate clockwise 270 degrees * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ LEFT_MIRRORED = 8, } +/** + * ImageCompleteEvent + * + * @interface ImageCompleteEvent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +export interface ImageCompleteEvent { + /** + * The width of the image source. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + width: number; + /** + * The height of the image source. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + height: number; + /** + * The width of the component source. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + componentWidth: number; + /** + * The height of the component source. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + 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 + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + loadingStatus: number; + /** + * The width of the picture that is actually drawn. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + contentWidth: number; + /** + * The height of the picture that is actually drawn. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + contentHeight: number; + /** + * The actual draw is offset from the x-axis of the component itself. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + contentOffsetX: number; + /** + * The actual draw is offset from the y-axis of the component itself. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + contentOffsetY: number; +} + /** * @interface ImageInterface * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -518,7 +726,8 @@ declare enum ImageRotateOrientation { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ImageInterface { /** @@ -570,7 +779,8 @@ interface ImageInterface { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ (src: PixelMap | ResourceStr | DrawableDescriptor | ImageContent): ImageAttribute; @@ -582,7 +792,8 @@ interface ImageInterface { * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ (src: PixelMap | ResourceStr | DrawableDescriptor, imageAIOptions: ImageAIOptions): ImageAttribute; } @@ -595,7 +806,8 @@ interface ImageInterface { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface ImageSourceSize { @@ -642,7 +854,8 @@ interface ImageSourceSize { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ width: number; @@ -689,7 +902,8 @@ interface ImageSourceSize { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ height: number; } @@ -700,7 +914,8 @@ interface ImageSourceSize { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ColorContent { /** @@ -712,7 +927,8 @@ declare class ColorContent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ static readonly ORIGIN: ColorContent; } @@ -741,7 +957,8 @@ declare class ColorContent { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ImageAttribute extends CommonMethod { /** @@ -783,19 +1000,16 @@ declare class ImageAttribute extends CommonMethod { * @since 11 */ /** - * 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. + * Placeholder displayed on load + * + * @param { string | Resource | PixelMap } value * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ alt(value: string | Resource | PixelMap): ImageAttribute; @@ -827,19 +1041,16 @@ declare class ImageAttribute extends CommonMethod { * @since 10 */ /** - * 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. - *

+ * match Text Direction * - * @param { boolean } value - Whether to display the image in the system language direction, Default value is false. + * @param { boolean } value * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ matchTextDirection(value: boolean): ImageAttribute; @@ -873,17 +1084,14 @@ declare class ImageAttribute extends CommonMethod { /** * 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. + * @param { boolean } value * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fitOriginalSize(value: boolean): ImageAttribute; @@ -915,53 +1123,34 @@ declare class ImageAttribute extends CommonMethod { * @since 10 */ /** - * 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. - *

+ * fill Color * - * @param { ResourceColor } value - Fill color to be superimposed on the image. + * @param { ResourceColor } value * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fillColor(value: ResourceColor): ImageAttribute; /** - * 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. - *

+ * fill Color * - * @param { ResourceColor | ColorContent } color - Fill color to be superimposed on the image. + * @param { ResourceColor | ColorContent } color * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ fillColor(color: ResourceColor | ColorContent): ImageAttribute; /** - * 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. - *

+ * fill Color * * @param { ResourceColor | ColorContent | ColorMetrics } color * @returns { ImageAttribute } @@ -969,6 +1158,7 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ fillColor(color: ResourceColor | ColorContent | ColorMetrics): ImageAttribute; @@ -1000,27 +1190,29 @@ declare class ImageAttribute extends CommonMethod { * @since 10 */ /** - * Sets how the image is resized to fit its container. + * Sets the zoom type of an image. * - * @param { ImageFit } value - How the image is resized to fit its container, Default value is ImageFit.Cover. + * @param { ImageFit } value * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ objectFit(value: ImageFit): ImageAttribute; /** - * Sets the transformation matrix of the image. + * Sets the matrix for the image. * - * @param { ImageMatrix } matrix - Transformation matrix of the image. + * @param { ImageMatrix } matrix * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ imageMatrix(matrix: ImageMatrix): ImageAttribute; @@ -1054,18 +1246,14 @@ declare class ImageAttribute extends CommonMethod { /** * 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. + * @param { ImageRepeat } value * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ objectRepeat(value: ImageRepeat): ImageAttribute; @@ -1097,21 +1285,16 @@ declare class ImageAttribute extends CommonMethod { * @since 10 */ /** - * 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. - *

+ * Set the auto style of the picture * - * @param { boolean } value - Whether to resize the image source based on the size of the display area - * during image decoding, Default value is false. + * @param { boolean } value * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ autoResize(value: boolean): ImageAttribute; @@ -1143,37 +1326,28 @@ declare class ImageAttribute extends CommonMethod { * @since 10 */ /** - * 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. - *

+ * Sets the image rendering mode. * - * @param { ImageRenderMode } value - Rendering mode of the image, Default value is ImageRenderMode.Original. + * @param { ImageRenderMode } value * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ renderMode(value: ImageRenderMode): ImageAttribute; /** - * Sets the dynamic range of the image to be displayed. - * - *

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

+ * Set dynamic range mode of image. * - * @param { DynamicRangeMode } value - Dynamic range of the image. - * @returns { ImageAttribute } Returns the instance of the ImageAttribute, Default value is - * dynamicRangeMode.Standard. + * @param { DynamicRangeMode } value - Indicates the resizable options. + * @returns { ImageAttribute } Returns the instance of the ImageAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dynamicRangeMode(value: DynamicRangeMode): ImageAttribute; @@ -1216,20 +1390,16 @@ declare class ImageAttribute extends CommonMethod { * @since 10 */ /** - * 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. - *

+ * Sets the interpolation effect of an image. The interpolation effect is only magnified for the image. * - * @param { ImageInterpolation } value - Interpolation effect of the image, Default value is ImageInterpolation.Low. + * @param { ImageInterpolation } value * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interpolation(value: ImageInterpolation): ImageAttribute; @@ -1276,23 +1446,18 @@ declare class ImageAttribute extends CommonMethod { * @since 11 */ /** - * Sets the decoding size of the image. + * Specifies the picture decoding size. * 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. + * @param { ImageSourceSize } value - Image source size. * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ sourceSize(value: ImageSourceSize): ImageAttribute; @@ -1327,19 +1492,17 @@ declare class ImageAttribute extends CommonMethod { * @since 10 */ /** - * Specifies whether to load the image synchronously. - * - *

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

+ * Sets the synchronous or asynchronous mode for image loading. + * The default parameter type is bool, and the default value is false. * - * @param { boolean } value - Whether to load the image synchronously, Default value is false. + * @param { boolean } value * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ syncLoad(value: boolean): ImageAttribute; @@ -1374,19 +1537,16 @@ declare class ImageAttribute extends CommonMethod { * @since 11 */ /** - * Sets the color filter for the image. - * - *

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

+ * Sets the color filter effect on the image. * - * @param { ColorFilter | DrawingColorFilter } value - Color filter of the image. + * @param { ColorFilter | DrawingColorFilter } value ColorFilter object. * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ colorFilter(value: ColorFilter | DrawingColorFilter): ImageAttribute; @@ -1410,20 +1570,16 @@ declare class ImageAttribute extends CommonMethod { * @since 10 */ /** - * 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. - *

+ * Allow replication. * - * @param { CopyOptions } value - Specifies whether the image can be copied, Default value is CopyOptions.None. + * @param { CopyOptions } value * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ copyOption(value: CopyOptions): ImageAttribute; @@ -1431,7 +1587,7 @@ declare class ImageAttribute extends CommonMethod { * Enable image dragging. * Default value is false. * - * @param { boolean } value - Whether the image is draggable, Default value is false. + * @param { boolean } value * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 @@ -1440,25 +1596,23 @@ declare class ImageAttribute extends CommonMethod { * Enable image dragging. * Default value is true. * - * @param { boolean } value - Whether the image is draggable, Default value is true. + * @param { boolean } value * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ /** - * Specifies whether the image is draggable. - * - *

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

+ * Enable image dragging. + * Default value is true. * - * @param { boolean } value - Whether the image is draggable, Default value is true. + * @param { boolean } value * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ draggable(value: boolean): ImageAttribute; @@ -1469,7 +1623,8 @@ declare class ImageAttribute extends CommonMethod { * @returns { ImageAttribute } The attribute of the image. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ pointLight(value: PointLightStyle): ImageAttribute; @@ -1482,7 +1637,8 @@ declare class ImageAttribute extends CommonMethod { * @returns { ImageAttribute } The attribute of the image. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ edgeAntialiasing(value: number): ImageAttribute; @@ -1517,7 +1673,7 @@ declare class ImageAttribute extends CommonMethod { * @since 10 */ /** - * Triggered when an image is successfully loaded or decoded. + * This callback is triggered when an image is successfully loaded. * The size of the image source that is successfully loaded is returned, in pixels. * *

NOTE: @@ -1800,6 +1956,21 @@ declare class ImageAttribute extends CommonMethod { }) => void, ): ImageAttribute; + /** + * 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 + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onComplete(callback: ImageOnCompleteCallback): ImageAttribute; + /** * This callback is triggered when an exception occurs during image loading. * The field of "message" carries the detailed information of failed image loading. @@ -1822,7 +1993,7 @@ declare class ImageAttribute extends CommonMethod { * @since 10 */ /** - * Triggered when an error occurs during image loading. + * This callback is triggered when an exception occurs during image loading. * The field of "message" carries the detailed information of failed image loading. * *

NOTE: @@ -1835,7 +2006,8 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onError(callback: ImageErrorCallback): ImageAttribute; @@ -1884,7 +2056,8 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onFinish(event: () => void): ImageAttribute; @@ -1897,28 +2070,14 @@ declare class ImageAttribute extends CommonMethod { * @since 11 */ /** - * 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. - *

+ * Enable image analyzer. * - * @param { boolean} enable - Whether to enable the AI analyzer, Default value is false. + * @param { boolean} enable * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableAnalyzer(enable: boolean): ImageAttribute; @@ -1929,7 +2088,8 @@ declare class ImageAttribute extends CommonMethod { * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ analyzerConfig(config: ImageAnalyzerConfig): ImageAttribute; @@ -1943,40 +2103,28 @@ declare class ImageAttribute extends CommonMethod { * @since 11 */ /** - * 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. - *

+ * Set image resizable options. * - * @param { ResizableOptions } value - Resizable image options. + * @param { ResizableOptions } value - Indicates the resizable options. * @returns { ImageAttribute } Returns the instance of the ImageAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ resizable(value: ResizableOptions): ImageAttribute; /** - * Sets whether to secure sensitive information on widgets. - * - *

NOTE: - *
Obscuring requires widget framework support. - *

+ * Whether to support sensitive privacy information * - * @param { boolean } supported - Whether to secure sensitive information on widgets, Default value is false. + * @param { boolean } supported - Whether to support sensitive privacy information. * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ privacySensitive(supported: boolean): ImageAttribute; @@ -1987,20 +2135,21 @@ declare class ImageAttribute extends CommonMethod { * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enhancedImageQuality(imageQuality: ResolutionQuality): ImageAttribute; /** - * Sets the display orientation of the image content. + * Set the rotation angle of image. * - * @param { ImageRotateOrientation } orientation - Display orientation of the image content, Default value - * is ImageRotateOrientation.UP. + * @param { ImageRotateOrientation } orientation * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ orientation(orientation: ImageRotateOrientation) : ImageAttribute; } @@ -2029,16 +2178,6 @@ declare class ImageAttribute extends CommonMethod { /** * Defines Image Component. * - *

If flickering occurs during image loading, set syncLoad to true. - * For details, see [Concurrency Optimization]{@link - * https://developer.huawei.com/consumer/en/doc/best-practices/bpta-click-to-click-response-optimization}

- * - *

If white blocks persist during image loading, follow the steps in [Solution to White Image Blocks]{@link - * https://developer.huawei.com/consumer/en/doc/best-practices/bpta-image-white-lump-solution}

- * - *

If image loading takes a long time, follow the steps in [Reducing the Loading Time of Preset Images]{@link - * https://developer.huawei.com/consumer/en/doc/best-practices/bpta-texture-compression-improve-performance}

- * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -2099,10 +2238,25 @@ declare const ImageInstance: ImageAttribute; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ type ImageErrorCallback = (error: ImageError) => void; +/** + * ImageOnCompleteCallback + * + * @typedef { function } ImageOnCompleteCallback + * @param { ImageCompleteEvent } loadEvent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +type ImageOnCompleteCallback = (loadEvent?: ImageCompleteEvent) => void; + /** * @interface ImageError * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -2122,7 +2276,8 @@ type ImageErrorCallback = (error: ImageError) => void; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ImageError { /** @@ -2150,7 +2305,8 @@ declare interface ImageError { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ componentWidth: number; @@ -2179,7 +2335,8 @@ declare interface ImageError { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ componentHeight: number; @@ -2200,12 +2357,13 @@ declare interface ImageError { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - message: string + message: string; /** - * Business Error. + * Error code. * * @type { ?BusinessError } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -2213,6 +2371,7 @@ declare interface ImageError { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ error?: BusinessError; } @@ -2232,7 +2391,8 @@ declare interface ImageError { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ResizableOptions { /** @@ -2250,7 +2410,8 @@ declare interface ResizableOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ slice?: EdgeWidths; @@ -2261,7 +2422,8 @@ declare interface ResizableOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lattice?: DrawingLattice; } diff --git a/api/@internal/component/ets/image_animator.d.ts b/api/@internal/component/ets/image_animator.d.ts index 16dd7ce744de4be1e7bad47763fc91e4e4228d04..8729e878ffb4754a051e1752137a2d0393067eb1 100644 --- a/api/@internal/component/ets/image_animator.d.ts +++ b/api/@internal/component/ets/image_animator.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource } from "../../global/resource"; +import { CommonMethod, PixelMap } from './common' +import { AnimationStatus,FillMode } from './enums' +/*** endif */ + /** * Defines the ImageAnimator Interface. * @@ -42,7 +48,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ImageAnimatorInterface { /** @@ -69,7 +76,8 @@ interface ImageAnimatorInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (): ImageAnimatorAttribute; } @@ -98,7 +106,8 @@ interface ImageAnimatorInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ImageFrameInfo { /** @@ -142,9 +151,11 @@ interface ImageFrameInfo { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ src: string | Resource | PixelMap; + /** * Image width * @@ -169,7 +180,8 @@ interface ImageFrameInfo { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ width?: number | string; /** @@ -196,7 +208,8 @@ interface ImageFrameInfo { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ height?: number | string; /** @@ -223,7 +236,8 @@ interface ImageFrameInfo { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ top?: number | string; /** @@ -250,7 +264,8 @@ interface ImageFrameInfo { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ left?: number | string; /** @@ -275,7 +290,8 @@ interface ImageFrameInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ duration?: number; } @@ -304,7 +320,8 @@ interface ImageFrameInfo { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ImageAnimatorAttribute extends CommonMethod { /** @@ -326,19 +343,16 @@ declare class ImageAnimatorAttribute extends CommonMethodNOTE: - *
Dynamic update is not supported. - *

+ * list images * - * @param { Array } value - Image frame informatio, Default value is []. + * @param { Array } value * @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 */ images(value: Array): ImageAnimatorAttribute; @@ -361,15 +375,16 @@ declare class ImageAnimatorAttribute extends CommonMethodNOTE: - *
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. + * @param { number } value * @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 */ duration(value: number): ImageAnimatorAttribute; @@ -428,15 +439,16 @@ declare class ImageAnimatorAttribute extends CommonMethod void): ImageAnimatorAttribute; @@ -617,7 +629,8 @@ declare class ImageAnimatorAttribute extends CommonMethod void): ImageAnimatorAttribute; @@ -646,7 +659,8 @@ declare class ImageAnimatorAttribute extends CommonMethod void): ImageAnimatorAttribute; @@ -669,7 +683,7 @@ declare class ImageAnimatorAttribute extends CommonMethod void): ImageAnimatorAttribute; @@ -700,7 +715,7 @@ declare class ImageAnimatorAttribute extends CommonMethod void): ImageAnimatorAttribute; } diff --git a/api/@internal/component/ets/image_common.d.ts b/api/@internal/component/ets/image_common.d.ts index ad4c5d95770ca982a9dbbbc1b788ace434892222..dd1e0209055094c48d055aa69d61e70e336f7aee 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,7 +73,8 @@ 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(); @@ -78,7 +84,8 @@ declare class ImageAnalyzerController { * @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/image_span.d.ts b/api/@internal/component/ets/image_span.d.ts index 40109b352aff809c0bbcaec6101689cdf5ef2e42..3bce91cbbca0dbd9cd51514addd6172d423cc404 100644 --- a/api/@internal/component/ets/image_span.d.ts +++ b/api/@internal/component/ets/image_span.d.ts @@ -18,6 +18,15 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ResourceStr, ColorFilter} from './units'; +import { BaseSpan } from './span'; +import { ImageSpanAlignment, ImageFit } from './enums'; +import { ImageErrorCallback } from './image'; +import { PixelMap } from './common'; +import image from '../../@ohos.multimedia.image'; +/*** endif */ + /** * Provide image decoration in the text component. * @@ -33,7 +42,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ImageSpanInterface { /** @@ -53,7 +63,8 @@ interface ImageSpanInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (value: ResourceStr | PixelMap): ImageSpanAttribute; } @@ -73,7 +84,8 @@ interface ImageSpanInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ImageSpanAttribute extends BaseSpan { /** @@ -93,7 +105,8 @@ declare class ImageSpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ verticalAlign(value: ImageSpanAlignment): ImageSpanAttribute; @@ -126,7 +139,8 @@ declare class ImageSpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ objectFit(value: ImageFit): ImageSpanAttribute; @@ -139,7 +153,8 @@ declare class ImageSpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onComplete(callback: ImageCompleteCallback): ImageSpanAttribute; @@ -152,7 +167,8 @@ declare class ImageSpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onError(callback: ImageErrorCallback): ImageSpanAttribute; @@ -163,7 +179,8 @@ declare class ImageSpanAttribute extends BaseSpan { * @returns { ImageSpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ alt(value: PixelMap): ImageSpanAttribute; } @@ -210,7 +227,8 @@ declare const ImageSpanInstance: ImageSpanAttribute; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type ImageCompleteCallback = (result: ImageLoadResult) => void; @@ -221,7 +239,8 @@ type ImageCompleteCallback = (result: ImageLoadResult) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ImageLoadResult { /** @@ -231,7 +250,8 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width: number; /** @@ -241,7 +261,8 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ height: number; /** @@ -251,7 +272,8 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ componentWidth: number; /** @@ -261,7 +283,8 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ componentHeight: number; /** @@ -273,7 +296,8 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ loadingStatus: number; /** @@ -283,7 +307,8 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentWidth: number; /** @@ -293,7 +318,8 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentHeight: number; /** @@ -303,7 +329,8 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentOffsetX: number; /** @@ -313,7 +340,8 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentOffsetY: number; } diff --git a/api/@internal/component/ets/indicatorcomponent.d.ts b/api/@internal/component/ets/indicatorcomponent.d.ts index 88e13f3b95623c813f011f370ef686e72c5b38ef..fea813bcc067cc81fec075831ffdb0b7a5f51430 100644 --- a/api/@internal/component/ets/indicatorcomponent.d.ts +++ b/api/@internal/component/ets/indicatorcomponent.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod, Callback } from './common'; +import { DotIndicator, DigitIndicator } from './swiper'; +/*** endif */ + /** * Provides methods for switching components. * @@ -25,7 +30,8 @@ * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare class IndicatorComponentController { /** @@ -35,7 +41,8 @@ declare class IndicatorComponentController { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -46,7 +53,8 @@ declare class IndicatorComponentController { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ showNext():void; @@ -57,7 +65,8 @@ declare class IndicatorComponentController { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ showPrevious():void; @@ -71,7 +80,8 @@ declare class IndicatorComponentController { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ changeIndex(index: number, useAnimation?: boolean):void; } @@ -84,7 +94,8 @@ declare class IndicatorComponentController { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ interface IndicatorComponentInterface { @@ -97,7 +108,8 @@ interface IndicatorComponentInterface { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ (controller?: IndicatorComponentController): IndicatorComponentAttribute; } @@ -110,7 +122,8 @@ interface IndicatorComponentInterface { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare class IndicatorComponentAttribute extends CommonMethod { /** @@ -122,7 +135,8 @@ declare class IndicatorComponentAttribute extends CommonMethod): IndicatorComponentAttribute; } diff --git a/api/@internal/component/ets/line.d.ts b/api/@internal/component/ets/line.d.ts index 52525bc39e67f48bf7cc3819b71e7f2cc3ecca1c..472478a96688def0179cf0f2db361586d10b192a 100644 --- a/api/@internal/component/ets/line.d.ts +++ b/api/@internal/component/ets/line.d.ts @@ -18,6 +18,24 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonShapeMethod, CommonMethod } from './common'; +import { Length } from './units'; +/*** endif */ + +/** + * Defines the Shape Point, the first element is the x-axis offset and the second is the y-axis. + * + * @typedef { [Length, Length] } ShapePoint + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +export type ShapePoint = [Length, Length]; + /** * Defines Line constructor options. * @@ -26,7 +44,8 @@ * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface LineOptions { /** @@ -83,6 +102,7 @@ interface LineOptions { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ width?: Length; @@ -140,6 +160,7 @@ interface LineOptions { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ height?: Length; } @@ -269,7 +290,7 @@ interface LineInterface { * @returns { LineAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @form + * @foapi/@internal/component/ets/list.d.tsrm * @since 10 */ /** @@ -332,7 +353,8 @@ interface LineInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class LineAttribute extends CommonShapeMethod { /** @@ -375,6 +397,20 @@ declare class LineAttribute extends CommonShapeMethod { */ startPoint(value: Array): LineAttribute; + /** + * Coordinate of the start point of the line (relative coordinate). + * + * @param { ShapePoint } value + * @returns { LineAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + startPoint(value: ShapePoint): LineAttribute; + /** * Line end coordinates (relative coordinates). * @@ -414,6 +450,20 @@ declare class LineAttribute extends CommonShapeMethod { * @since 11 */ endPoint(value: Array): LineAttribute; + + /** + * Line end coordinates (relative coordinates). + * + * @param { ShapePoint } value + * @returns { LineAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + endPoint(value: ShapePoint): LineAttribute; } /** @@ -479,3 +529,30 @@ declare const Line: LineInterface; * @since 11 */ declare const LineInstance: LineAttribute; + +/** + * Line drawing component. + * + * @interface LineInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface LineInterface { + /** + * The return value of the parameter is Line. + * + * @param { LineOptions } [options] - Line options + * @returns { LineAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + (options?: LineOptions): LineAttribute; +} diff --git a/api/@internal/component/ets/list.d.ts b/api/@internal/component/ets/list.d.ts index 9b1222e6ec97922dce34196fc5deb789cf775aff..467eece6cfbb2adff31005ab0d2c77cae9499743 100644 --- a/api/@internal/component/ets/list.d.ts +++ b/api/@internal/component/ets/list.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-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 @@ -18,6 +18,14 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ChildrenMainSize, ItemDragInfo, RectResult, ScrollableCommonMethod, Optional, + OnWillScrollCallback, OnScrollCallback, OnItemDragStartCallback } from './common'; +import { Axis } from './enums'; +import { OnScrollFrameBeginCallback, ScrollAlign, Scroller } from './scroll'; +import { Dimension, Length, LengthConstrain, ResourceColor } from './units'; +/*** endif */ + /** * Declare scroll status * @@ -50,7 +58,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ScrollState { /** @@ -75,14 +84,14 @@ declare enum ScrollState { * @since 10 */ /** - * Idle state. Triggered when the scroll state returns to idle, and when the controller's - * non-animated methods are used to control the scroll. + * Not activated. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Idle, @@ -108,14 +117,14 @@ declare enum ScrollState { * @since 10 */ /** - * Scrolling state. Triggered when the list is dragged with the finger, - * when the scrollbar is dragged, or when the mouse scroll wheel is used. + * Scrolling status. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Scroll, @@ -141,13 +150,14 @@ declare enum ScrollState { * @since 10 */ /** - * Inertial scrolling state. + * Drag status. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Fling, } @@ -177,7 +187,8 @@ declare enum ScrollState { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ListItemAlign { /** @@ -196,13 +207,14 @@ declare enum ListItemAlign { * @since 10 */ /** - * The list items are packed toward the start edge of the List component along the cross axis. + * Start position in the direction of cross axis. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Start, @@ -222,13 +234,14 @@ declare enum ListItemAlign { * @since 10 */ /** - * The list items are centered in the List component along the cross axis. + * Center position in the direction of cross axis. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Center, @@ -248,13 +261,14 @@ declare enum ListItemAlign { * @since 10 */ /** - * The list items are packed toward the end edge of the List component along the cross axis. + * End position in the direction of cross axis * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ End, } @@ -266,46 +280,51 @@ declare enum ListItemAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ListItemGroupArea { /** - * The edge of the viewport is in the position of none. + * List item group area is none * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, /** - * The edge of the viewport is in the position of a list item. + * List item group area is list item * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ IN_LIST_ITEM_AREA = 1, /** - * The edge of the viewport is in the position of a header. + * List item group area is header * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ IN_HEADER_AREA = 2, /** - * The edge of the viewport is in the position of a footer. + * List item group area is footer * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ IN_FOOTER_AREA = 3, } @@ -335,7 +354,8 @@ declare enum ListItemGroupArea { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum StickyStyle { /** @@ -354,14 +374,14 @@ declare enum StickyStyle { * @since 10 */ /** - * In the ListItemGroup component, the header is not pinned to the top, - * and the footer is not pinned to the bottom. + * The header and footer of each item group will not be pinned. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None = 0, @@ -381,14 +401,14 @@ declare enum StickyStyle { * @since 10 */ /** - * In the ListItemGroup component, the header is pinned to the top, - * and the footer is not pinned to the bottom. + * The header of each item group will be pinned. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Header = 1, @@ -408,14 +428,14 @@ declare enum StickyStyle { * @since 10 */ /** - * In the ListItemGroup component, the footer is pinned to the bottom, - * and the header is not pinned to the top. + * The footer of each item group will be pinned. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Footer = 2, } @@ -426,7 +446,8 @@ declare enum StickyStyle { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ChainEdgeEffect { /** @@ -435,7 +456,8 @@ declare enum ChainEdgeEffect { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT, @@ -444,7 +466,8 @@ declare enum ChainEdgeEffect { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ STRETCH, } @@ -463,7 +486,8 @@ declare enum ChainEdgeEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ScrollSnapAlign { /** @@ -474,14 +498,16 @@ declare enum ScrollSnapAlign { * @since 10 */ /** - * No alignment. This is the default value. + * Default no item scroll snap alignment effect. When scroll end, + * list item will stop without limit. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - NONE = 0, + NONE, /** * The first item in view will be aligned at the start of list. @@ -490,19 +516,15 @@ declare enum ScrollSnapAlign { * @since 10 */ /** - * The first item in the view is aligned at the start of the list. - * - *

NOTE - *
When the list hits the end, the items at the end must be completely displayed. - * In this case, the items at the start may not be aligned. - *

+ * The first item in view will be aligned at the start of list. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - START = 1, + START, /** * The middle item in view will be aligned at the center of list. @@ -511,19 +533,15 @@ declare enum ScrollSnapAlign { * @since 10 */ /** - * The middle items in the view are aligned in the center of the list. - * - *

NOTE - *
The top and end items can be aligned in the center of the list. - * In this case, a blank area may result, and the first or last item is aligned to the center of the list. - * + * The middle item in view will be aligned at the center of list. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - CENTER = 2, + CENTER, /** * The last item in view will be aligned at the end of list. @@ -532,19 +550,15 @@ declare enum ScrollSnapAlign { * @since 10 */ /** - * The last item in the view is aligned at the end of the list. - * - *

NOTE - *
When the list hits the start, the items at the start must be completely displayed. - * In this case, the items at the end may not be aligned. - *

+ * The last item in view will be aligned at the end of list. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - END = 3, + END, } /** @@ -553,7 +567,8 @@ declare enum ScrollSnapAlign { * @interface ChainAnimationOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ChainAnimationOptions { /** @@ -562,7 +577,8 @@ declare interface ChainAnimationOptions { * @type { Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ minSpace: Length; @@ -572,7 +588,8 @@ declare interface ChainAnimationOptions { * @type { Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ maxSpace: Length; @@ -583,7 +600,8 @@ declare interface ChainAnimationOptions { * @default 0.7 * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ conductivity?: number; @@ -594,7 +612,8 @@ declare interface ChainAnimationOptions { * @default 0.3 * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ intensity?: number; @@ -605,7 +624,8 @@ declare interface ChainAnimationOptions { * @default ChainEdgeEffect.DEFAULT * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ edgeEffect?: ChainEdgeEffect; @@ -616,7 +636,8 @@ declare interface ChainAnimationOptions { * @default 228 * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ stiffness?: number; @@ -627,7 +648,8 @@ declare interface ChainAnimationOptions { * @default 30 * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ damping?: number; } @@ -705,7 +727,8 @@ declare interface UIListEvent extends UIScrollableCommonEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CloseSwipeActionOptions { /** @@ -717,13 +740,14 @@ declare interface CloseSwipeActionOptions { * @since 11 */ /** - * Triggered after the collapse animation is complete. + * Called after collapse animation completed. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onFinish?: ()=>void } @@ -735,47 +759,49 @@ declare interface CloseSwipeActionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface VisibleListContentInfo { /** - * Index of the list item or list item group in the list display area. + * Index number of a child in the list. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ index: number /** - * Position of the top or bottom edge of the viewport in the - * list item group to which the edge is located, if applicable. + * Area of the ListItemGroup. * * @type { ?ListItemGroupArea } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ itemGroupArea?: ListItemGroupArea /** - * Index of the starting or ending list item in the list - * item group to which the top or bottom edge of the viewport is located. + * Index number of a ListItem in ListItemGroup. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ itemIndexInGroup?: number } /** - * Called when a child component enters or leaves the list display area. + * Callback of scroll visible content, using in onScrollVisibleContentChange. * * @typedef {function} OnScrollVisibleContentChangeCallback * @param {VisibleListContentInfo} start - Information about the currently displayed first list item or list item group. @@ -783,7 +809,8 @@ declare interface VisibleListContentInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnScrollVisibleContentChangeCallback = (start: VisibleListContentInfo, end: VisibleListContentInfo) => void; @@ -813,7 +840,8 @@ declare type OnListScrollIndexCallback = (start: number, end: number, center: nu * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ListScroller extends Scroller { /** @@ -822,7 +850,7 @@ declare class ListScroller extends Scroller { * @param { number } index - Index of the ListItemGroup in List. * @param { number } indexInGroup - Index of the ListItem in ListItemGroup. * @returns { RectResult } Returns the size and position. - * @throws { BusinessError } 401 - Parameter error. Possible causes: + * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. @@ -832,22 +860,12 @@ declare class ListScroller extends Scroller { * @since 11 */ /** - * Obtains the size of a list item in a list item group and its position relative to the list. + * Gets the size and position of a ListItem in a ListItemGroup. * - *

NOTE: - *
- The value of index must be the index of a child component visible in the display area. - * Otherwise, the value is considered invalid. - *
- The child component for which index is set must be a list item group. Otherwise, - * the index value is considered invalid. - *
- The value of indexInGroup must be the index of a list item in the list item group - * visible in the display area. Otherwise, the value is considered invalid. - *
- When index or indexInGroup is set to an invalid value, the returned size and position are both 0. - *

- * - * @param { number } index - Index of the list item group in the list. - * @param { number } indexInGroup - Index of the list item in the list item group. - * @returns { RectResult } - Size of the list item in the list item group and its position relative to the list. - * @throws { BusinessError } 401 - Parameter error. Possible causes: + * @param { number } index - Index of the ListItemGroup in List. + * @param { number } indexInGroup - Index of the ListItem in ListItemGroup. + * @returns { RectResult } Returns the size and position. + * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. @@ -855,7 +873,8 @@ declare class ListScroller extends Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getItemRectInGroup(index: number, indexInGroup: number): RectResult; @@ -866,7 +885,7 @@ declare class ListScroller extends Scroller { * @param { number } indexInGroup - Index of the ListItem in ListItemGroup. * @param { boolean } smooth - If true, scroll to index item with animation. If false, scroll to index item without animation. * @param { ScrollAlign } align - Sets the alignment mode of a specified index. - * @throws { BusinessError } 401 - Parameter error. Possible causes: + * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. @@ -876,20 +895,13 @@ declare class ListScroller extends Scroller { * @since 11 */ /** - * Scrolls to the specified list item in the specified list item group. + * Called when sliding to the specified index in specified ListItemGroup. * - * @param { number } index - Index of the target list item group in the current container. - *
NOTE - *
If the value set is a negative value or greater than the maximum index of the items in the container, - * the value is deemed abnormal, and no scrolling will be performed. - * @param { number } indexInGroup - Index of the target list item in the list item group specified by index. - *
NOTE - *
If the value set is a negative value or greater than the maximum index of the items in the list item group, - * the value is deemed abnormal, and no scrolling will be performed. - * @param { boolean } smooth - Whether to enable the smooth animation for scrolling to the item with the specified index. - * The value true means to enable that the smooth animation, and false means the opposite.
Default value: false - * @param { ScrollAlign } align - How the list item to scroll to is aligned with the container.
Default value: ScrollAlign.START - * @throws { BusinessError } 401 - Parameter error. Possible causes: + * @param { number } index - Index of the ListItemGroup in List. + * @param { number } indexInGroup - Index of the ListItem in ListItemGroup. + * @param { boolean } smooth - If true, scroll to index item with animation. If false, scroll to index item without animation. + * @param { ScrollAlign } align - Sets the alignment mode of a specified index. + * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. @@ -897,7 +909,8 @@ declare class ListScroller extends Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ scrollToItemInGroup(index: number, indexInGroup:number, smooth?: boolean, align?: ScrollAlign): void; @@ -905,7 +918,7 @@ declare class ListScroller extends Scroller { * Collapse all listItem. * * @param { CloseSwipeActionOptions } options - Options of close Swipe items. - * @throws { BusinessError } 401 - Parameter error. Possible causes: + * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. @@ -915,14 +928,10 @@ declare class ListScroller extends Scroller { * @since 11 */ /** - * Collapses the list items in the EXPANDED state and sets callback events. + * Collapse all listItem. * - *

NOTE: - *
- A ListScroller must be bound to the List component. - *

- * - * @param { CloseSwipeActionOptions } options - Callback events for collapsing list items in the EXPANDED state. - * @throws { BusinessError } 401 - Parameter error. Possible causes: + * @param { CloseSwipeActionOptions } options - Options of close Swipe items. + * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. @@ -930,22 +939,17 @@ declare class ListScroller extends Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ closeAllSwipeActions(options?: CloseSwipeActionOptions): void; /** - * Obtains the index information of the child component at the specified coordinates. + * Get visible list content info by position. * - *

NOTE: - *
- If the provided value of x or y is invalid, - * the returned VisibleListContentInfo object has the index property set to -1, - * and both itemGroupArea and itemIndexInGroup are undefined. - *

- * - * @param { number } x - X-coordinate, in vp. - * @param { number } y - Y-coordinate, in vp. - * @returns { VisibleListContentInfo } Index information of the child component at the specified coordinates. + * @param { number } x - X coordinate relative to the upper left corner of the list's original area, in vp. + * @param { number } y - Y coordinate relative to the upper left corner of the list's original area, in vp. + * @returns { VisibleListContentInfo } Visible list content info of the position. * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. @@ -954,24 +958,22 @@ declare class ListScroller extends Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getVisibleListContentInfo(x: number, y: number): VisibleListContentInfo; } /** - * Defines the options of the List component. + * Defines List constructor options. * - *

NOTE: - *
- The default value of the universal attribute clip is true for the List component. - *

- * * @interface ListOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface ListOptions { /** @@ -1006,24 +1008,8 @@ interface ListOptions { * @crossplatform * @form * @atomicservice - * @since 11 - */ - /** - * Index of the item to be displayed at the start when the list is initially loaded. - * Anonymous Object Rectification. - * - *

NOTE - *
If the set value is a negative number or is greater than the index of the last item in the list, - * the value is invalid. In this case, the default value will be used. - *

- * - * @type { ?number } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ initialIndex?: number; /** @@ -1058,25 +1044,8 @@ interface ListOptions { * @crossplatform * @form * @atomicservice - * @since 11 - */ - /** - * Spacing between list items along the main axis. - * Anonymous Object Rectification. - * - *

NOTE - *
If this parameter is set to a negative number or a value greater than or equal to the length of the list content area, the default value is used. - *
If this parameter is set to a value less than the width of the list divider, the width of the list divider is used as the spacing. - *
Child components of List whose visibility attribute is set to None are not displayed, but the spacing above and below them still takes effect. - *

- * - * @type { ?(number | string) } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ space?: number | string; /** @@ -1111,22 +1080,8 @@ interface ListOptions { * @crossplatform * @form * @atomicservice - * @since 11 - */ - /** - * Scroller, which can be bound to scrollable components. - * Anonymous Object Rectification. - * - *

NOTE - *
The scroller cannot be bound to other scrollable components. - *

- * - * @type { ?Scroller } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scroller?: Scroller; } @@ -1163,7 +1118,8 @@ interface ListOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ListInterface { /** @@ -1214,20 +1170,22 @@ interface ListInterface { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ (options?: ListOptions): ListAttribute; } /** - * Defines the divider style of the list or list item group. + * Defines List divider opotions. * * @interface ListDividerOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ListDividerOptions { /** @@ -1262,18 +1220,8 @@ declare interface ListDividerOptions { * @crossplatform * @form * @atomicservice - * @since 11 - */ - /** - * Width of the divider. - * Anonymous Object Rectification. - * - * @type { Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeWidth: Length; /** @@ -1308,19 +1256,8 @@ declare interface ListDividerOptions { * @crossplatform * @form * @atomicservice - * @since 11 - */ - /** - * Color of the divider. - * Anonymous Object Rectification. - * - * @type { ?ResourceColor } - * @default 0x08000000 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ color?: ResourceColor; /** @@ -1355,19 +1292,8 @@ declare interface ListDividerOptions { * @crossplatform * @form * @atomicservice - * @since 11 - */ - /** - * Distance between the divider and the start edge of the list. - * Anonymous Object Rectification. - * - * @type { ?Length } - * @default 0vp - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ startMargin?: Length; /** @@ -1402,19 +1328,8 @@ declare interface ListDividerOptions { * @crossplatform * @form * @atomicservice - * @since 11 - */ - /** - * Distance between the divider and the end edge of the list. - * Anonymous Object Rectification. - * - * @type { ?Length } - * @default 0vp - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ endMargin?: Length; } @@ -1443,7 +1358,8 @@ declare interface ListDividerOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ListAttribute extends ScrollableCommonMethod { /** @@ -1467,17 +1383,17 @@ declare class ListAttribute extends ScrollableCommonMethod { * @since 10 */ /** - * Sets the number of columns or rows in the list. If the value is set to the gutter type, it indicates the gap between columns. - * It takes effect when the number of columns is greater than 1. + * Called when need to decide how much lanes the list will show. * - * @param { number | LengthConstrain } value - Number of columns or rows in the list.
Default value: 1 - * @param { Dimension } gutter - Gap between columns.
Default value: 0 + * @param { number | LengthConstrain } value + * @param { Dimension } gutter * @returns { ListAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ lanes(value: number | LengthConstrain, gutter?: Dimension): ListAttribute; @@ -1501,16 +1417,16 @@ declare class ListAttribute extends ScrollableCommonMethod { * @since 10 */ /** - * Alignment mode of list items along the cross axis when the cross-axis width of the list is greater - * than the cross-axis width of list items multiplied by the value of lanes. + * Called when need to decide how to align lanes in the direction of the cross axis. * - * @param { ListItemAlign } value - Alignment mode of list items along the cross axis.
Default value: ListItemAlign.Start + * @param { ListItemAlign } value * @returns { ListAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ alignListItem(value: ListItemAlign): ListAttribute; @@ -1542,15 +1458,16 @@ declare class ListAttribute extends ScrollableCommonMethod { * @since 10 */ /** - * Sets the direction in which the list items are arranged. + * Called when the arrangement direction of the list component is set. * - * @param { Axis } value - Direction in which the list items are arranged.
Default value: Axis.Vertical + * @param { Axis } value * @returns { ListAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ listDirection(value: Axis): ListAttribute; @@ -1582,11 +1499,9 @@ declare class ListAttribute extends ScrollableCommonMethod { * @since 10 */ /** - * Sets the scrollbar state. + * Called when the display mode of the side slider is set. * - * @param { BarState } value - Scrollbar state. - *
NOTE - *
Default value: BarState.Auto + * @param { BarState } value * @returns { ListAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -1624,19 +1539,10 @@ declare class ListAttribute extends ScrollableCommonMethod { * @since 10 */ /** - * Sets the effect used when the scroll boundary is reached. + * Called when the sliding effect is set. * - *

NOTE: - *
- By default, this component can produce a bounce effect only when there is more than one screen of content. - * To produce a bounce effect when there is less than one screen of content, - * use the options parameter of the edgeEffect attribute. - *

- * - * @param { EdgeEffect } value - Effect used when the scroll boundary is reached. The spring and shadow effects are supported. - *
Default value: EdgeEffect.Spring - * @param { EdgeEffectOptions } options - Whether to enable the scroll effect when the component content is smaller than the component itself. - * The value { alwaysEnabled: true } means to enable the scroll effect, and { alwaysEnabled: false } means the opposite. - *
Default value: { alwaysEnabled: false } + * @param { EdgeEffect } value + * @param { EdgeEffectOptions } options * @returns { ListAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -1655,14 +1561,14 @@ declare class ListAttribute extends ScrollableCommonMethod { * @since 11 */ /** - * Sets the offset from the start of the list content to the boundary of the list display area. - * @param { number } value - Offset from the start of the list content to the boundary of the list display - *
Default value: 0 + * Called when need to decide contentStartOffset the list will show. + * @param { number } value - the value Of startOffset. * @returns { ListAttribute } the attribute of the list. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentStartOffset(value: number): ListAttribute; @@ -1675,15 +1581,14 @@ declare class ListAttribute extends ScrollableCommonMethod { * @since 11 */ /** - * Sets the offset from the end of the list content to the boundary of the list display area. - * - * @param { number } value - Offset from the end of the list content to the boundary of the list display area. - *
Default value: 0 + * Called when need to decide contentEndOffset the list will show. + * @param { number } value - the value Of endOffset. * @returns { ListAttribute } the attribute of the list. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentEndOffset(value: number): ListAttribute; @@ -1726,25 +1631,25 @@ declare class ListAttribute extends ScrollableCommonMethod { * @since 11 */ /** - * Sets the style of the divider for the list items. By default, there is no divider. - * Anonymous Object Rectification. + * Called when the ListItem split line style is set. * - * @param { ListDividerOptions | null } value - Style of the divider for the list items.
Default value: null + * @param { ListDividerOptions | null } value * @returns { ListAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ divider( value: ListDividerOptions | null, ): ListAttribute; /** - * Sets whether to enable edit mode. + * Called when judging whether it is in editable mode. * - * @param { boolean } value - Whether to enable edit mode.
Default value: false + * @param { boolean } value * @returns { ListAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 @@ -1780,17 +1685,16 @@ declare class ListAttribute extends ScrollableCommonMethod { * @since 10 */ /** - * Sets whether to enable multiselect. + * Called when judging whether it is multiSelectable. * - * @param { boolean } value - Whether to enable multiselect. - *
false (default): Multiselect is disabled. - *
true: Multiselect is enabled. + * @param { boolean } value * @returns { ListAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ multiSelectable(value: boolean): ListAttribute; @@ -1824,31 +1728,29 @@ declare class ListAttribute extends ScrollableCommonMethod { /** * Called when the minimum number of list item caches is set for long list deferred loading. * - * @param { number } value - Number of list items to be preloaded. - *
Default value: number of nodes visible on the screen, with the maximum value of 16 - *
Value range: [0, +∞) + * @param { number } value * @returns { ListAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ cachedCount(value: number): ListAttribute; /** - * Sets the number of list items or list item groups to be cached (preloaded) and specifies whether to display the preloaded nodes. + * Called when the minimum number of list item caches is set for long list deferred loading. * - * @param { number } count - Number of list items to be preloaded. - *
Default value: number of nodes visible on the screen, with the maximum value of 16 - *
Value range: [0, +∞) - * @param { boolean } show - Whether to display the preloaded list items.
Default value: false + * @param { number } count - cached count. + * @param { boolean } show - whether to show the nodes in the cache. * @returns { ListAttribute } the attribute of the list. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ cachedCount(count: number, show: boolean): ListAttribute; @@ -1880,18 +1782,16 @@ declare class ListAttribute extends ScrollableCommonMethod { * @since 10 */ /** - * Sets whether to enable chained animations, which provide a visually connected, - * or "chained," effect when the list is scrolled or its top or bottom edge is dragged. + * Called when setting whether to enable chain linkage dynamic effect. * - * @param { boolean } value - Whether to enable chained animations. - *
false (default): Chained animations are disabled. - *
true: Chained animations are enabled. + * @param { boolean } value * @returns { ListAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ chainAnimation(value: boolean): ListAttribute; @@ -1902,7 +1802,8 @@ declare class ListAttribute extends ScrollableCommonMethod { * @returns { ListAttribute } the attribute of the list. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ chainAnimationOptions(value: ChainAnimationOptions): ListAttribute; @@ -1926,21 +1827,16 @@ declare class ListAttribute extends ScrollableCommonMethod { * @since 10 */ /** - * Sets whether to pin the header to the top or the footer to the bottom in the list item group, - * - *

NOTE: - *
- Occasionally, after sticky is set, floating-point calculation precision may result in small gaps appearing during scrolling. - * To address this issue, you can apply the pixelRound attribute to the current component, which rounds down the pixel values and help eliminate the gaps. - *

+ * Called when header or footer of item group will be pinned. * - * @param { StickyStyle } value - Whether to pin the header to the top or the footer to the bottom in the list item group. - *
Default value: StickyStyle.None + * @param { StickyStyle } value * @returns { ListAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ sticky(value: StickyStyle): ListAttribute; @@ -1953,15 +1849,15 @@ declare class ListAttribute extends ScrollableCommonMethod { * @since 10 */ /** - * Sets the scroll snap alignment effect for list items. - * This effect aligns list items to the nearest snap point when scrolling ends. + * Called to set list item scroll end alignment effect. * - * @param { ScrollSnapAlign } value - Alignment mode of the scroll snap position.
Default value: ScrollSnapAlign.NONE + * @param { ScrollSnapAlign } value - options of the list alignment effect. * @returns { ListAttribute } the attribute of the list. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scrollSnapAlign(value: ScrollSnapAlign): ListAttribute; @@ -1974,10 +1870,9 @@ declare class ListAttribute extends ScrollableCommonMethod { * @since 10 */ /** - * Sets the nested scrolling options. You can set the nested scrolling mode in the forward and backward - * directions to implement scrolling linkage with the parent component. + * Called to setting the nested scroll options. * - * @param { NestedScrollOptions } value - Nested scrolling options. + * @param { NestedScrollOptions } value - options for nested scrolling. * @returns { ListAttribute } the attribute of the list. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -1996,10 +1891,9 @@ declare class ListAttribute extends ScrollableCommonMethod { * @since 10 */ /** - * Sets whether to support scroll gestures. When this attribute is set to false, - * scrolling by finger or mouse is not supported, but the scroll controller API is not affected. + * Called when setting whether to enable scroll by gesture or mouse. * - * @param { boolean } value - Whether to support scroll gestures.
Default value: true + * @param { boolean } value * @returns { ListAttribute } The attribute of the list * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -2018,14 +1912,9 @@ declare class ListAttribute extends ScrollableCommonMethod { * @since 10 */ /** - * Sets the friction coefficient. It applies only to gestures in the scrolling area, - * and it affects only indirectly the scroll chaining during the inertial scrolling process. - * A value less than or equal to 0 evaluates to the default value. + * Called to setting the friction. * - * @param { number | Resource } value - Friction coefficient. - *
Default value: 0.9 for wearable devices and 0.6 for non-wearable devices. - *
Since API version 11, the default value for non-wearable devices is 0.7. - *
Since API version 12, the default value for non-wearable devices is 0.75. + * @param { number | Resource } value - options for scrolling friction. * @returns { ListAttribute } the attribute of the list. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -2035,60 +1924,41 @@ declare class ListAttribute extends ScrollableCommonMethod { friction(value: number | Resource): ListAttribute; /** - * Sets the size information of the child components of a List component along the main axis. + * Set children main size for List. * * @param { ChildrenMainSize } value - children main size for List * @returns { ListAttribute } the attribute of the list. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ childrenMainSize(value: ChildrenMainSize): ListAttribute; /** - * Sets whether the visible content position should remain unchanged when data is inserted or deleted above the visible area. - * - *

NOTE: - *
- The visible content position will only remain unchanged when LazyForEach is used to insert or delete data outside the visible area. - * If ForEach is used to insert or delete data, or if LazyForEach is used for data reloading, - * the visible content position will change even if maintainVisibleContentPosition is set to true. - *
- When maintainVisibleContentPosition is set to true, - * inserting or deleting data above the visible area will trigger onDidScroll and onScrollIndex events. - *
- In a multi-column scenario, setting maintainVisibleContentPosition to true allows - * you to insert or delete entire rows of data while keeping the visible content position unchanged. - * If the insertion or deletion does not involve entire rows, however, the visible content position will still change. - *

- * - * @param { boolean } enabled - Whether the visible content position should remain unchanged - * when data is inserted or deleted above the visible area.
Default value: false + * Set maintain visible content position List. + * + * @param { boolean } enabled - maintain visible content position. * @returns { ListAttribute } the attribute of the list. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ maintainVisibleContentPosition(enabled: boolean): ListAttribute; /** - * Sets whether the list's layout starts from the bottom (end) rather than the top (beginning). - * - *

NOTE: - *
- When stackFromEnd is set to true, the following rules apply: - *
If the content of the List component is shorter than the component height, - * the content will be aligned to the bottom of the component. - *
- If the height of a list item in the visible area changes, or if a new list item is inserted, - * the list items above the changed or inserted item will move upwards to accommodate the new layout. - *
- The default value of initialIndex becomes the total number of list items minus one. - *

- * - * @param { boolean } enabled - Whether the list's layout starts from the bottom (end) rather than the top (beginning). - *
Default value: false + * Sets the layout of the List component from the end. + * + * @param { boolean } enabled - Indicates whether the List is layout from the end. * @returns { ListAttribute } the attribute of the list. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ stackFromEnd(enabled: boolean): ListAttribute; @@ -2145,7 +2015,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @since 10 */ /** - * Triggered when the list scrolls. + * Called when the offset and status callback of the slide are set. * * @param { function } event * @returns { ListAttribute } @@ -2187,27 +2057,29 @@ declare class ListAttribute extends ScrollableCommonMethod { * @since 10 */ /** - * Triggered when a child component enters or leaves the list display area. - * + * Called when the start and end positions of the display change. + * * @param { function } event * @returns { ListAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onScrollIndex(event: (start: number, end: number, center: number) => void): ListAttribute; /** - * Triggered when a child component enters or leaves the list display area. + * Called when the list visible content changes. * - * @param { OnScrollVisibleContentChangeCallback } handler - Callback invoked when the displayed content changes. + * @param { OnScrollVisibleContentChangeCallback } handler - Callback of Scroll Visible. * @returns { ListAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onScrollVisibleContentChange(handler: OnScrollVisibleContentChangeCallback): ListAttribute; @@ -2239,7 +2111,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @since 10 */ /** - * Triggered when the list reaches the start position. + * Called when the list begins to arrive. * * @param { function } event * @returns { ListAttribute } @@ -2279,7 +2151,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @since 10 */ /** - * Triggered when the list reaches the end position. + * Called when the list reaches the end. * * @param { function } event * @returns { ListAttribute } @@ -2311,8 +2183,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @since 10 */ /** - * Triggered when the list starts scrolling initiated by the user's finger dragging the list or its scrollbar. - * This event is also triggered when the animation contained in the scrolling triggered by Scroller starts. + * Called when the slider start. * * @param { function } event * @returns { ListAttribute } @@ -2352,8 +2223,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @since 10 */ /** - * Triggered when the list stops scrolling after the user's finger leaves the screen. - * This event is also triggered when the animation contained in the scrolling triggered by Scroller stops. + * Called when the slider stops. * * @param { function } event * @returns { ListAttribute } @@ -2366,8 +2236,8 @@ declare class ListAttribute extends ScrollableCommonMethod { onScrollStop(event: () => void): ListAttribute; /** - * Triggered when a list item is deleted. - * + * Called when a list item is deleted. + * * @param { function } event * @returns { ListAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -2394,14 +2264,15 @@ declare class ListAttribute extends ScrollableCommonMethod { * @since 10 */ /** - * Triggered when a list item moves. + * Called when a list item is moved. * * @param { function } event * @returns { ListAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onItemMove(event: (from: number, to: number) => boolean): ListAttribute; @@ -2425,7 +2296,8 @@ declare class ListAttribute extends ScrollableCommonMethod { * @since 10 */ /** - * Triggered when a list item starts to be dragged. + * After a listener is bound, the component can be dragged. After the drag occurs, a callback is triggered. + * (To be triggered, press and hold for 170 milliseconds (ms)) * * @param { function } event * @returns { ListAttribute } @@ -2436,6 +2308,19 @@ declare class ListAttribute extends ScrollableCommonMethod { */ onItemDragStart(event: (event: ItemDragInfo, itemIndex: number) => ((() => any) | void)): ListAttribute; + /** + * After a listener is bound, the component can be dragged. After the drag occurs, a callback is triggered. + * (To be triggered, press and hold for 170 milliseconds (ms)) + * + * @param { OnItemDragStartCallback } event - callback function, triggered when the item drag start. + * @returns { ListAttribute } Returns the instance of the ListAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onItemDragStart(event: OnItemDragStartCallback): ListAttribute; + /** * After binding, a callback is triggered when the component is dragged to the range of the component. * @@ -2454,14 +2339,15 @@ declare class ListAttribute extends ScrollableCommonMethod { * @since 10 */ /** - * Triggered when the dragged item enters the drop target of the list. + * After binding, a callback is triggered when the component is dragged to the range of the component. * * @param { function } event * @returns { ListAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onItemDragEnter(event: (event: ItemDragInfo) => void): ListAttribute; @@ -2483,14 +2369,15 @@ declare class ListAttribute extends ScrollableCommonMethod { * @since 10 */ /** - * Triggered when the dragged item moves over the drop target of the list. + * After binding, a callback is triggered when the drag moves within the range of a placeable component. * * @param { function } event * @returns { ListAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onItemDragMove(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number) => void): ListAttribute; @@ -2512,14 +2399,15 @@ declare class ListAttribute extends ScrollableCommonMethod { * @since 10 */ /** - * Triggered when the dragged item leaves the drop target of the list. + * After binding, a callback is triggered when the component is dragged out of the component range. * * @param { function } event * @returns { ListAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onItemDragLeave(event: (event: ItemDragInfo, itemIndex: number) => void): ListAttribute; @@ -2543,14 +2431,16 @@ declare class ListAttribute extends ScrollableCommonMethod { * @since 10 */ /** - * Triggered when the dragged item is dropped on the drop target of the list. + * The component bound to this event can be used as the drag release target. + * This callback is triggered when the drag behavior is stopped within the scope of the component. * * @param { function } event * @returns { ListAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onItemDrop(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void): ListAttribute; @@ -2574,8 +2464,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @since 10 */ /** - * Triggered when the list starts to scroll. The input parameters indicate the amount by which the list will scroll. - * The event handler then works out the amount by which the list needs to scroll based on the real-world situation and returns the result. + * Called when scrolling begin each frame. * * @param { function } event * @returns { ListAttribute } @@ -2586,6 +2475,45 @@ declare class ListAttribute extends ScrollableCommonMethod { * @since 11 */ onScrollFrameBegin(event: (offset: number, state: ScrollState) => { offsetRemain: number }): ListAttribute; + + /** + * Called when scrolling begin each frame. + * + * @param { OnScrollFrameBeginCallback } event + * @returns { ListAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onScrollFrameBegin(event: OnScrollFrameBeginCallback): ListAttribute; + + /** + * Called when the scrollable will scroll. + * + * @param { Optional } handler - callback of scrollable. + * @returns { ListAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onWillScroll(handler: Optional): ListAttribute; + + /** + * Called when the scrollable did scroll. + * + * @param { OnScrollCallback } handler - callback of scrollable, + * scrollOffset is offset this frame did scroll, scrollState is current scroll state. + * @returns { ListAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onDidScroll(handler: OnScrollCallback): ListAttribute; } /** diff --git a/api/@internal/component/ets/list_item.d.ts b/api/@internal/component/ets/list_item.d.ts index ae66c200dc373eae80da40e21983066e76c1ecf8..e5149aa59394752370a561abfd186574be56dfe6 100644 --- a/api/@internal/component/ets/list_item.d.ts +++ b/api/@internal/component/ets/list_item.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-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 @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod } from './common'; +import { CustomBuilder } from './builder' +import { Length } from './units'; +import { ComponentContent } from '../ComponentContent' +/*** endif */ + /** * Declare item ceiling attribute. * @@ -115,7 +122,8 @@ declare enum EditMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SwipeEdgeEffect { /** @@ -137,7 +145,8 @@ declare enum SwipeEdgeEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Spring, @@ -160,7 +169,8 @@ declare enum SwipeEdgeEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, } @@ -180,7 +190,8 @@ declare enum SwipeEdgeEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SwipeActionState { /** @@ -194,7 +205,8 @@ declare enum SwipeActionState { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ COLLAPSED, @@ -209,7 +221,8 @@ declare enum SwipeActionState { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EXPANDED, @@ -224,7 +237,8 @@ declare enum SwipeActionState { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ACTIONING, } @@ -243,7 +257,8 @@ declare enum SwipeActionState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SwipeActionItem { /** @@ -262,7 +277,8 @@ declare interface SwipeActionItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ builder?: CustomBuilder; @@ -274,7 +290,8 @@ declare interface SwipeActionItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ builderComponent?: ComponentContent; @@ -294,7 +311,8 @@ declare interface SwipeActionItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ actionAreaDistance?: Length; @@ -312,7 +330,8 @@ declare interface SwipeActionItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onAction?: () => void; @@ -330,7 +349,8 @@ declare interface SwipeActionItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onEnterActionArea?: () => void; @@ -348,7 +368,8 @@ declare interface SwipeActionItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onExitActionArea?: () => void; @@ -367,7 +388,8 @@ declare interface SwipeActionItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onStateChange?: (state: SwipeActionState) => void; } @@ -394,7 +416,8 @@ declare interface SwipeActionItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SwipeActionOptions { /** @@ -422,7 +445,8 @@ declare interface SwipeActionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ start?: CustomBuilder | SwipeActionItem; @@ -451,7 +475,8 @@ declare interface SwipeActionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ end?: CustomBuilder | SwipeActionItem; @@ -477,7 +502,8 @@ declare interface SwipeActionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ edgeEffect?: SwipeEdgeEffect; @@ -496,7 +522,8 @@ declare interface SwipeActionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onOffsetChange?: (offset: number) => void; } @@ -515,7 +542,8 @@ declare interface SwipeActionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ListItemStyle { /** @@ -530,7 +558,8 @@ declare enum ListItemStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -546,7 +575,8 @@ declare enum ListItemStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CARD = 1, } @@ -565,7 +595,8 @@ declare enum ListItemStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ListItemOptions { /** @@ -582,7 +613,8 @@ declare interface ListItemOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ style?: ListItemStyle; } @@ -619,7 +651,8 @@ declare interface ListItemOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ListItemInterface { /** @@ -641,7 +674,8 @@ interface ListItemInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (value?: ListItemOptions): ListItemAttribute; @@ -691,7 +725,8 @@ interface ListItemInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ListItemAttribute extends CommonMethod { /** @@ -753,7 +788,8 @@ declare class ListItemAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectable(value: boolean): ListItemAttribute; @@ -778,7 +814,8 @@ declare class ListItemAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selected(value: boolean): ListItemAttribute; @@ -807,7 +844,8 @@ declare class ListItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ swipeAction(value: SwipeActionOptions): ListItemAttribute; @@ -847,7 +885,8 @@ declare class ListItemAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onSelect(event: (isSelected: boolean) => void): ListItemAttribute; } diff --git a/api/@internal/component/ets/list_item_group.d.ts b/api/@internal/component/ets/list_item_group.d.ts index 1033ca2cd06f270becb7cd3008d9d0c02ac887d2..44000be5c58f8c36e06573ee8f8d808ff96917d1 100644 --- a/api/@internal/component/ets/list_item_group.d.ts +++ b/api/@internal/component/ets/list_item_group.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-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 @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ChildrenMainSize, CommonMethod } from './common'; +import { CustomBuilder } from './builder' +import { ComponentContent } from '../ComponentContent' +import { ListDividerOptions } from './list'; +/*** endif */ + /** * Defines the list item group style. * @@ -32,7 +39,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 ListItemGroupStyle { /** @@ -47,7 +55,8 @@ declare enum ListItemGroupStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -63,7 +72,8 @@ declare enum ListItemGroupStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CARD = 1, } @@ -90,7 +100,8 @@ declare enum ListItemGroupStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ListItemGroupOptions { /** @@ -115,7 +126,8 @@ declare interface ListItemGroupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ header?: CustomBuilder; @@ -126,7 +138,8 @@ declare interface ListItemGroupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ headerComponent?: ComponentContent; @@ -152,7 +165,8 @@ declare interface ListItemGroupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ footer?: CustomBuilder; @@ -163,7 +177,8 @@ declare interface ListItemGroupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ footerComponent?: ComponentContent; @@ -189,7 +204,8 @@ declare interface ListItemGroupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ space?: number | string; @@ -207,7 +223,8 @@ declare interface ListItemGroupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ style?: ListItemGroupStyle; } @@ -234,7 +251,8 @@ declare interface ListItemGroupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ListItemGroupInterface { /** @@ -262,7 +280,8 @@ interface ListItemGroupInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (options?: ListItemGroupOptions): ListItemGroupAttribute; } @@ -289,7 +308,8 @@ interface ListItemGroupInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ListItemGroupAttribute extends CommonMethod { /** @@ -343,7 +363,8 @@ declare class ListItemGroupAttribute extends CommonMethod { /** @@ -293,7 +305,8 @@ declare class LoadingProgressAttribute extends CommonMethod): LoadingProgressAttribute; } @@ -339,7 +354,8 @@ declare class LoadingProgressAttribute extends CommonMethod { /** @@ -349,7 +365,8 @@ declare interface LoadingProgressConfiguration extends CommonConfigurationNOTE: - *
true: Start scrolling. - *
false: Do not start scrolling. - *
This parameter cannot be used to restart scrolling that has been completed. - *

- * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ start: boolean; @@ -116,24 +107,8 @@ interface MarqueeOptions { * @crossplatform * @form * @atomicservice - * @since 11 - */ - /** - * Scroll animation text scroll step, when step is larger than the text width of Marquee, take the default value. - * - * Anonymous Object Rectification. - * - *

NOTE: - *
If the value is greater than the text width of the marquee, the default value is used. - *

- * - * @type { ?number } - The unit is vp. - * @default 6 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ step?: number; @@ -169,25 +144,8 @@ interface MarqueeOptions { * @crossplatform * @form * @atomicservice - * @since 11 - */ - /** - * Set the number of times the scroll is repeated, infinite loop if it is less than or equal to zero. - * - * Anonymous Object Rectification. - * - *

NOTE: - *
If the value is less than or equal to 0, the marquee will scroll continuously. - *
Regardless of the value, the marquee scrolls only once on an ArkTS widget. - *

- * - * @type { ?number } - * @default -1 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ loop?: number; @@ -223,19 +181,8 @@ interface MarqueeOptions { * @crossplatform * @form * @atomicservice - * @since 11 - */ - /** - * Set text to scroll from the beginning or backward. - * - * Anonymous Object Rectification. - * @type { ?boolean } - * @default true - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fromStart?: boolean; @@ -271,18 +218,8 @@ interface MarqueeOptions { * @crossplatform * @form * @atomicservice - * @since 11 - */ - /** - * Text that needs scrolling. - * - * Anonymous Object Rectification. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ src: string; } @@ -319,7 +256,8 @@ interface MarqueeOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface MarqueeInterface { /** @@ -370,7 +308,8 @@ interface MarqueeInterface { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ (options: MarqueeOptions): MarqueeAttribute; } @@ -407,7 +346,8 @@ interface MarqueeInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class MarqueeAttribute extends CommonMethod { /** @@ -446,7 +386,8 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor(value: ResourceColor): MarqueeAttribute; @@ -491,7 +432,8 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize(value: Length): MarqueeAttribute; @@ -525,17 +467,14 @@ declare class MarqueeAttribute extends CommonMethod { /** * Set marquee allow scale. * - *

NOTE: - *
This parameter is effective only when fontSize is in fp units. - *

- * - * @param { boolean } value - Default value is false. + * @param { boolean } value * @returns { MarqueeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ allowScale(value: boolean): MarqueeAttribute; @@ -569,22 +508,14 @@ declare class MarqueeAttribute extends CommonMethod { /** * Set marquee font weight. * - *

NOTE: - *
If the value is too large, the text may be clipped depending on the font. - *
For the number type, the value range is [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, for example, "400", - * and the following enumerated values of FontWeight are supported: "bold", "bolder", "lighter", "regular", and "medium". - *

- * - * @param { number | FontWeight | string } value - Default value is FontWeight.Normal. + * @param { number | FontWeight | string } value * @returns { MarqueeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontWeight(value: number | FontWeight | string): MarqueeAttribute; @@ -630,24 +561,21 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontFamily(value: string | Resource): MarqueeAttribute; /** * Marquee scrolling strategy after text update. * - *

NOTE: - *
This attribute takes effect when the marquee is in the playing state - * and the text content width exceeds the width of the marquee component. - *

- * - * @param { MarqueeUpdateStrategy } value - The scrolling strategy after text update.Default value is MarqueeUpdateStrategy.DEFAULT. + * @param { MarqueeUpdateStrategy } value - The scrolling strategy after text update. * @returns { MarqueeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ marqueeUpdateStrategy(value: MarqueeUpdateStrategy): MarqueeAttribute; @@ -687,7 +615,8 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onStart(event: () => void): MarqueeAttribute; @@ -731,7 +660,8 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onBounce(event: () => void): MarqueeAttribute; @@ -771,7 +701,8 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onFinish(event: () => void): MarqueeAttribute; } @@ -799,14 +730,7 @@ declare class MarqueeAttribute extends CommonMethod { */ /** * Defines Marquee Component. - * - *

NOTE: - *
To ensure that scrolling frame rates are not affected, - * it is recommended that the number of Marquee components in a scroll container does not exceed four, or alternatively, - * use the Text component's TextOverflow.MARQUEE as a substitute. - *
The text is scrolled only when its width exceeds the width of the Marquee component. - *

- * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form diff --git a/api/@internal/component/ets/matrix2d.d.ts b/api/@internal/component/ets/matrix2d.d.ts index 594e7dc4e95d61c89672e5ad35dc8fb12201d0d5..a0378005cc60e1bfdce048b0084f3a15ad0d3d25 100644 --- a/api/@internal/component/ets/matrix2d.d.ts +++ b/api/@internal/component/ets/matrix2d.d.ts @@ -18,6 +18,10 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { LengthMetricsUnit } from '../Graphics'; +/*** endif */ + /** * 2D transformation matrix, supporting rotation, translation, and scaling of the X-axis and Y-axis * @@ -46,7 +50,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class Matrix2D { /** @@ -81,7 +86,8 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scaleX?: number; @@ -117,7 +123,8 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ rotateY?: number; @@ -153,7 +160,8 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ rotateX?: number; @@ -189,7 +197,8 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scaleY?: number; @@ -225,7 +234,8 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ translateX?: number; @@ -261,7 +271,8 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ translateY?: number; @@ -301,7 +312,8 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ identity(): Matrix2D; @@ -341,7 +353,8 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ invert(): Matrix2D; @@ -413,7 +426,8 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ rotate(degree: number, rx?: number, ry?: number): Matrix2D; @@ -457,7 +471,8 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ translate(tx?: number, ty?: number): Matrix2D; @@ -501,7 +516,8 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scale(sx?: number, sy?: number): Matrix2D; @@ -520,7 +536,8 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -532,7 +549,8 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(unit: LengthMetricsUnit); } diff --git a/api/@internal/component/ets/media_cached_image.d.ts b/api/@internal/component/ets/media_cached_image.d.ts index 70b0546afbc3add213b1b476eb2c70ee883b9a0d..4a20ef46d6b456ce808e2110e72fd041353d73bb 100644 --- a/api/@internal/component/ets/media_cached_image.d.ts +++ b/api/@internal/component/ets/media_cached_image.d.ts @@ -17,14 +17,20 @@ * @file * @kit ArkUI */ - +/*** if arkts 1.2 */ +import { ImageAttribute } from './image'; +import image from '../../@ohos.multimedia.image'; +import { ResourceStr } from './units' +import { DrawableDescriptor } from '../../@ohos.arkui.drawableDescriptor'; +/*** endif */ /** * Defines the resource which can use ASTC. * * @interface ASTCResource * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface ASTCResource { /** @@ -32,7 +38,8 @@ interface ASTCResource { * @type { Array } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ sources: Array; /** @@ -40,7 +47,8 @@ interface ASTCResource { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ column: number; } @@ -49,7 +57,8 @@ interface ASTCResource { * @interface MediaCachedImageInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface MediaCachedImageInterface { /** @@ -62,6 +71,17 @@ interface MediaCachedImageInterface { * @since 12 */ (src: PixelMap | ResourceStr | DrawableDescriptor | ASTCResource): MediaCachedImageAttribute; + /** + * Image resource to be obtained. + * + * @param { PixelMap | ResourceStr | DrawableDescriptor | ASTCResource } src + * @returns { MediaCachedImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + * @arkts 1.2 + */ + (src: image.PixelMap | ResourceStr | DrawableDescriptor | ASTCResource): MediaCachedImageAttribute; } /** @@ -70,7 +90,8 @@ interface MediaCachedImageInterface { * @extends ImageAttribute * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class MediaCachedImageAttribute extends ImageAttribute {} diff --git a/api/@internal/component/ets/menu.d.ts b/api/@internal/component/ets/menu.d.ts index 3e65f327dbc965e5e1b6943e77ff1932b6366c25..52cc8ce8af590973b6ff4fae4f6ade4c3be35e4a 100644 --- a/api/@internal/component/ets/menu.d.ts +++ b/api/@internal/component/ets/menu.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod } from './common'; +import { Length, Font, ResourceColor, Dimension, BorderRadiuses, DividerStyleOptions } from './units'; +/*** endif */ + /** * Defines the Menu Component. * @@ -40,7 +45,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface MenuInterface { /** @@ -65,7 +71,8 @@ interface MenuInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (): MenuAttribute; } @@ -77,7 +84,8 @@ interface MenuInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SubMenuExpandingMode { /** @@ -86,7 +94,8 @@ declare enum SubMenuExpandingMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SIDE_EXPAND = 0, @@ -96,7 +105,8 @@ declare enum SubMenuExpandingMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EMBEDDED_EXPAND = 1, @@ -106,7 +116,8 @@ declare enum SubMenuExpandingMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STACK_EXPAND = 2, } @@ -133,7 +144,8 @@ declare enum SubMenuExpandingMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class MenuAttribute extends CommonMethod { /** @@ -167,7 +179,8 @@ declare class MenuAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ font(value: Font): MenuAttribute; @@ -188,7 +201,8 @@ declare class MenuAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor(value: ResourceColor): MenuAttribute; @@ -211,7 +225,8 @@ declare class MenuAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ radius(value: Dimension | BorderRadiuses): MenuAttribute; @@ -223,7 +238,8 @@ declare class MenuAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ menuItemDivider(options: DividerStyleOptions | undefined): MenuAttribute; @@ -235,7 +251,8 @@ declare class MenuAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ menuItemGroupDivider(options: DividerStyleOptions | undefined): MenuAttribute; @@ -247,7 +264,8 @@ declare class MenuAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ subMenuExpandingMode(mode: SubMenuExpandingMode): MenuAttribute; diff --git a/api/@internal/component/ets/menu_item.d.ts b/api/@internal/component/ets/menu_item.d.ts index 825be1c7b0e954a31ec00c6dd69a795cf3c62029..3af7b8dca9ea25b0f5b45df1a9b12cc4e9f62df1 100644 --- a/api/@internal/component/ets/menu_item.d.ts +++ b/api/@internal/component/ets/menu_item.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ResourceStr, Font, ResourceColor } from './units'; +import { CommonMethod } from './common'; +import { CustomBuilder } from './builder'; +import { SymbolGlyphModifier } from '../../arkui/SymbolGlyphModifier'; +/*** endif */ + /** * Defines the option of MenuItem. * @@ -40,7 +47,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface MenuItemOptions { /** @@ -65,7 +73,8 @@ declare interface MenuItemOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ startIcon?: ResourceStr; @@ -85,6 +94,7 @@ declare interface MenuItemOptions { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ symbolStartIcon?: SymbolGlyphModifier; @@ -110,7 +120,8 @@ declare interface MenuItemOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ content?: ResourceStr; @@ -136,7 +147,8 @@ declare interface MenuItemOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ endIcon?: ResourceStr; @@ -156,6 +168,7 @@ declare interface MenuItemOptions { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ symbolEndIcon?: SymbolGlyphModifier; @@ -181,7 +194,8 @@ declare interface MenuItemOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ labelInfo?: ResourceStr; @@ -207,7 +221,8 @@ declare interface MenuItemOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ builder?: CustomBuilder; } @@ -234,7 +249,8 @@ declare interface MenuItemOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface MenuItemInterface { /** @@ -262,7 +278,8 @@ interface MenuItemInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (value?: MenuItemOptions | CustomBuilder): MenuItemAttribute; } @@ -289,7 +306,8 @@ interface MenuItemInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class MenuItemAttribute extends CommonMethod { /** @@ -317,7 +335,8 @@ declare class MenuItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selected(value: boolean): MenuItemAttribute; @@ -368,7 +387,8 @@ declare class MenuItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ selectIcon(value: boolean | ResourceStr | SymbolGlyphModifier): MenuItemAttribute; @@ -397,7 +417,8 @@ declare class MenuItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onChange(callback: (selected: boolean) => void): MenuItemAttribute; @@ -420,7 +441,8 @@ declare class MenuItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ contentFont(value: Font): MenuItemAttribute; @@ -441,7 +463,8 @@ declare class MenuItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ contentFontColor(value: ResourceColor): MenuItemAttribute; @@ -464,7 +487,8 @@ declare class MenuItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ labelFont(value: Font): MenuItemAttribute; @@ -485,7 +509,8 @@ declare class MenuItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ labelFontColor(value: ResourceColor): MenuItemAttribute; } diff --git a/api/@internal/component/ets/menu_item_group.d.ts b/api/@internal/component/ets/menu_item_group.d.ts index e7e7b8920457ef5ec570d05854e16b40d1a57a36..fa5e23ff42266d460da0a239e866870d6ff9cec1 100644 --- a/api/@internal/component/ets/menu_item_group.d.ts +++ b/api/@internal/component/ets/menu_item_group.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod } from './common'; +import { CustomBuilder } from './builder'; +import { ResourceStr } from './units'; +/*** endif */ + /** * Defines the option of MenuItemGroup. * @@ -40,7 +46,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface MenuItemGroupOptions { /** @@ -65,7 +72,8 @@ declare interface MenuItemGroupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ header?: ResourceStr | CustomBuilder; @@ -91,7 +99,8 @@ declare interface MenuItemGroupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ footer?: ResourceStr | CustomBuilder; } @@ -118,7 +127,8 @@ declare interface MenuItemGroupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface MenuItemGroupInterface { /** @@ -146,7 +156,8 @@ interface MenuItemGroupInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (value?: MenuItemGroupOptions): MenuItemGroupAttribute; } @@ -173,7 +184,8 @@ interface MenuItemGroupInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class MenuItemGroupAttribute extends CommonMethod {} diff --git a/api/@internal/component/ets/nav_destination.d.ts b/api/@internal/component/ets/nav_destination.d.ts index 6ef91a9cc7016c0532c29990d87e3f67ef507e89..a32de22d206b0c4eb5d4fbb9bc95dc97869a6022 100644 --- a/api/@internal/component/ets/nav_destination.d.ts +++ b/api/@internal/component/ets/nav_destination.d.ts @@ -18,6 +18,22 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource } from '../../global/resource' +import { CommonMethod, Callback, LayoutSafeAreaType, LayoutSafeAreaEdge, Optional, PixelMap } from './common' +import { CustomBuilder } from './builder' +import { Length, ResourceStr } from './units' +import { TitleHeight, Curve } from './enums' +import { + NavPathInfo, NavPathStack, NavigationTitleOptions, NavigationMenuItem, NavigationToolbarOptions, + ToolbarItem, NavigationMenuOptions, NavigationOperation, SystemBarStyle +} from './navigation' +import { SymbolGlyphModifier } from '../../arkui/SymbolGlyphModifier' +import window from '../../@ohos.window' +import image from '../../@ohos.multimedia.image' +import { Scroller } from './scroll' +/*** endif */ + /** * Import the Orientation type from @ohos.window. * @@ -29,6 +45,18 @@ */ declare type Orientation = import('../api/@ohos.window').default.Orientation; +/** + * Import the Orientation type from @ohos.window. + * + * @typedef { import('../api/@ohos.window').default.Orientation } Orientation + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type Orientation = window.Orientation; + /** * Defines the navigation destination common title. * @@ -51,7 +79,8 @@ declare type Orientation = import('../api/@ohos.window').default.Orientation; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NavDestinationCommonTitle { /** @@ -85,7 +114,8 @@ declare interface NavDestinationCommonTitle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ main: string | Resource; @@ -120,7 +150,8 @@ declare interface NavDestinationCommonTitle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ sub: string | Resource; } @@ -147,7 +178,8 @@ declare interface NavDestinationCommonTitle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NavDestinationCustomTitle { /** @@ -172,7 +204,8 @@ declare interface NavDestinationCustomTitle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ builder: CustomBuilder; @@ -198,7 +231,8 @@ declare interface NavDestinationCustomTitle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ height: TitleHeight | Length; } @@ -210,79 +244,88 @@ declare interface NavDestinationCustomTitle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum NavigationSystemTransitionType { /** - * Default system transition animation. + * Default system transition. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 0, /** - * No system transition animation. + * None system transition. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 1, /** - * System transition animation of the title bar. + * Configure only titlebar transition. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ TITLE = 2, /** - * System transition animation of the content area. + * Configure only content transition. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ CONTENT = 3, /** - * Fade-type system transition animation. + * Configure fade style system transition. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ FADE = 4, /** - * Center-scale type system transition animation. + * Configure explode style system transition. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ EXPLODE = 5, /** - * Right-slide type system transition animation. + * Configure right-side slide style system transition. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ SLIDE_RIGHT = 6, /** - * Bottom-slide type system transition animation. + * Configure bottom-side slide style system transition. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ SLIDE_BOTTOM = 7, } @@ -302,7 +345,8 @@ declare enum NavigationSystemTransitionType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum NavDestinationMode { /** @@ -318,26 +362,26 @@ declare enum NavDestinationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STANDARD = 0, /** - * Dialog mode, where the navigation destination is transparent by default, and adding or removing the navigation - * destination from the navigation stack does not affect the lifecycle of the lower-layer navigation destinations. + * Dialog mode is transparent by default and does not affect the life cycle of other NavDestination. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** - * Dialog mode, where the navigation destination is transparent by default, and adding or removing the navigation - * destination from the navigation stack does not affect the lifecycle of the lower-layer navigation destinations. + * Dialog mode is transparent by default and does not affect the life cycle of other NavDestination. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DIALOG = 1, } @@ -349,66 +393,73 @@ declare enum NavDestinationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum NavDestinationActiveReason { /** - * The activation state changes through page navigation. + * NavDestination become active or inactive because of page transition. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TRANSITION = 0, /** - * The activation state changes due to the opening or closing of a modal page. + * NavDestination become active or inactive because content cover changes. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CONTENT_COVER = 1, /** - * The activation state changes due to the opening or closing of a sheet. + * NavDestination become active or inactive because sheet changes. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SHEET = 2, /** - * The activation state changes due to the opening or closing of a custom dialog. + * NavDestination become active or inactive because dialog changes. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ DIALOG = 3, /** - * The activation state changes due to the opening or closing of an overlay using **OverlayManager**. + * NavDestination become active or inactive because overlay changes. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ OVERLAY = 4, /** - * The activation state changes due to switching between foreground and background states of the application. + * NavDestination become active or inactive because app state changes. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ APP_STATE = 5, } @@ -435,7 +486,8 @@ declare enum NavDestinationActiveReason { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NavDestinationInterface { /** @@ -460,7 +512,8 @@ declare interface NavDestinationInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (): NavDestinationAttribute; } @@ -472,39 +525,43 @@ declare interface NavDestinationInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RouteMapConfig { /** - * Navdestination name. + * Get destination name. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ name: string; /** - * Path of the navdestination in the current package. + * Get destination builder file position * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pageSourceFile: string; /** - * Custom data of the page. + * Indicate the custom data of current destination. * * @type { Object } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ data: Object } @@ -516,53 +573,56 @@ declare interface RouteMapConfig { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NavDestinationContext { /** - * Path information of the navigation destination page. + * Get path info. * * @type { NavPathInfo } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ pathInfo: NavPathInfo; /** - * Page stack where the current navigation destination page is located. + * Get stack of the Navigation where the NavDestination is located. * * @type { NavPathStack } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ pathStack: NavPathStack; /** - * Unique ID of the current navigation destination page, which is automatically generated by the system - * and is irrelevant to the universal attribute **id** of the component. + * Get the unique id of NavDestination, which is different from common property id of Component. * * @type { ?string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ navDestinationId?: string; /** * Get configuration of current Destination in module.json * - * @returns {RouteMapConfig | undefined} - Route map configuration of the current page. - * **undefined**, returned when the page is not configured through the route table. + * @returns {RouteMapConfig | undefined} * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getConfigInRouteMap(): RouteMapConfig | undefined; } @@ -574,29 +634,31 @@ declare interface NavDestinationContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NestedScrollInfo { /** - * Controller of the target scrollable container. + * The controller of parent scrollable container component. * * @type { Scroller } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ parent: Scroller; /** - * Controller of the scrollable container nested within the target scrollable container. - * This scrollable container is a child component of the target scrollable container. + * The controller of child scrollable container component. * * @type { Scroller } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ child: Scroller; } @@ -608,66 +670,67 @@ declare interface NestedScrollInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice -* @since 15 +* @since arkts {'1.1':'15','1.2':'20'} +* @arkts 1.1&1.2 */ declare interface NavDestinationTransition { /** - * Callback triggered when the transition animation ends. + * This method is called after the transition ends to notify whether the transition was successful. * * @type { ?Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ onTransitionEnd?: Callback; /** - * Duration of the transition animation. - * Default value: **1000** (in milliseconds). + * Define the limit duration of the transition animation. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ duration?: number; /** - * Curve type of the animation. - * Default value: Curve.EaseInOut. + * Define the curve of the transition animation. * * @type { ?Curve } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ curve?: Curve; /** - * Delay of the transition animation. - * Default value: **0** (in milliseconds) + * Define the delay of the transition animation. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ delay?: number; /** - * Closure function specifying the transition animation. - * The system generates the corresponding transition animation based on the modifications - * to the component's UI state within the closure. + * Configure the custom transition event. * * @type { Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ event: Callback; } @@ -694,7 +757,8 @@ declare interface NavDestinationTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class NavDestinationAttribute extends CommonMethod { /** @@ -736,11 +800,7 @@ declare class NavDestinationAttribute extends CommonMethod } hide * @returns { NavDestinationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ hideBackButton(hide: Optional): NavDestinationAttribute; /** - * Called when the navigation destination page is displayed. + * Invoked when the navDestination page is displayed. * * @param { function } callback - Indicates callback when the navDestination page is displayed. * @returns { NavDestinationAttribute } @@ -817,19 +881,20 @@ declare class NavDestinationAttribute extends CommonMethod void): NavDestinationAttribute; /** - * Called when the navigation destination page is hidden. + * Invoked when the navDestination is hidden. * * @param { function } callback - Indicates callback when the navDestination is hidden. * @returns { NavDestinationAttribute } @@ -838,20 +903,20 @@ declare class NavDestinationAttribute extends CommonMethod void): NavDestinationAttribute; /** - * Called when the navigation destination is about - * to be unmounted (or when the transition animation, if any, is about to start). + * Invoked when the backButton is pressed. * * @param { function } callback - Indicates callback when the backButton is pressed. * @returns { NavDestinationAttribute } @@ -860,20 +925,20 @@ declare class NavDestinationAttribute extends CommonMethod boolean): NavDestinationAttribute; /** - * Triggered when popping back from other NavDestination. + * Invoked when pop to the navDestination with result. * * @param {Optional>} callback - Indicates callback when pop to the navDestination with result. * @returns {NavDestinationAttribute} @@ -885,92 +950,74 @@ declare class NavDestinationAttribute extends CommonMethod>): NavDestinationAttribute; /** - * Sets the mode of the **NavDestination** component. Dynamic modification is not supported. + * Sets the different mode of NavDestination. * - * @param { NavDestinationMode } value - Mode of the **NavDestination** component. - *
Default value: **NavDestinationMode.STANDARD**. + * @param { NavDestinationMode } value - NavDestinationMode * @returns { NavDestinationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** - * Sets the mode of the **NavDestination** component. Dynamic modification is not supported. + * Sets the different mode of NavDestination. * * @param { NavDestinationMode } value - NavDestinationMode * @returns { NavDestinationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ mode(value: NavDestinationMode): NavDestinationAttribute; /** - * Sets the icon of the back button on the title bar. + * Set back button icon. * - * @param { ResourceStr | PixelMap } value - Icon of the back button in the title bar. + * @param { ResourceStr | PixelMap } value - Indicates icon of back button. * @returns { NavDestinationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** - * Sets the icon of the back button on the title bar. - * - *

**NOTE**: - *
The following are not allowed: modify the icon size through the **fontSize** attribute of the - * **SymbolGlyphModifier** object, change the animation effects through the **effectStrategy** attribute, - * or change the type of animation effects through the **symbolEffect** attribute. - *

+ * Set back button icon. * - * @param { ResourceStr | PixelMap | SymbolGlyphModifier } value - Icon of the back button in the title bar. + * @param { ResourceStr | PixelMap | SymbolGlyphModifier } value - Indicates icon of back button. * @returns { NavDestinationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backButtonIcon(value: ResourceStr | PixelMap | SymbolGlyphModifier): NavDestinationAttribute; /** - * Sets the icon and accessibility text for the back button on the title bar. + * Set back button icon and accessibility broadcast content. * - *

**NOTE**: - *
The following are not allowed: modify the icon size through the **fontSize** attribute of the - * **SymbolGlyphModifier** object, change the animation effects through the **effectStrategy** attribute, - * or change the type of animation effects through the **symbolEffect** attribute. - *

- * - * @param { ResourceStr | PixelMap | SymbolGlyphModifier } icon - Icon of the back button on the title bar. - * @param { ResourceStr } accessibilityText - Accessibility text for the back button. - *
Default value: **back** when the system language is English. + * @param { ResourceStr | PixelMap | SymbolGlyphModifier } icon - Indicates icon of back button. + * @param { ResourceStr } accessibilityText - Indicates content needs to broadcast. * @returns { NavDestinationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backButtonIcon(icon: ResourceStr | PixelMap | SymbolGlyphModifier, accessibilityText?: ResourceStr): NavDestinationAttribute; - + + /** - * Sets the menu items in the upper right corner of the page. - * If this attribute is not set, no menu item is displayed. - * When the value type is Array**NOTE**: - *
he following are not allowed: modify the icon size through the **fontSize** attribute of - * the **SymbolGlyphModifier** object, change the animation effects through the **effectStrategy** attribute, - * or change the type of animation effects through the **symbolEffect** attribute. - *

- * @param { Array | CustomBuilder } value - Menu items in the upper right corner of the NavDestination. + * NavDestination title bar's menus + * + * @param { Array | CustomBuilder } value * @returns { NavDestinationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ menus(value: Array | CustomBuilder): NavDestinationAttribute; @@ -983,58 +1030,41 @@ declare class NavDestinationAttribute extends CommonMethod | CustomBuilder, options?: NavigationMenuOptions): NavDestinationAttribute; /** - * Sets the content of the toolbar. If this API is not called, the toolbar remains hidden. + * Configure toolbar with default style parameter or custom parameter. * - * @param { Array | CustomBuilder } toolbarParam - Content of the toolbar. - *
When configured with Array<ToolbarItem>, - * the toolbar follows the rules below:
- Toolbar items are evenly distributed on the bottom toolbar, - * with text and icons evenly spaced in each content area.
- If any item contains overlong text and - * there are fewer than five items, the toolbar will: 1. Increase the item width to accommodate the text - * until the toolbar spans the screen width; 2. Reduce the text size progressively; 3. Wrap the text over two lines; - * 4. Clip the text with an ellipsis (...).
- In portrait mode, the toolbar shows a maximum of five icons, - * with any additional icons placed under an automatically generated **More** icon. In landscape mode, - * the behavior of the toolbar is determined by the display mode: (1) If the display mode is - * Split, the toolbar follows the same rules as in portrait mode. (2) If the display mode is Stack, - * the toolbar must be used together with Array<NavigationMenuItem> of the **menus** attribute; - * in this configuration, the bottom toolbar is automatically hidden, and all items on the toolbar are relocated to - * the menu in the upper right corner of the screen.
When configured with CustomBuilder, the toolbar does not - * follow the above rules, except for evenly distributing items at the bottom of the toolbar. - * + * @param { Array | CustomBuilder } toolbarParam - Toolbar configuration parameters. * @param { NavigationToolbarOptions } [options] - Indicates the options of toolbar. * @returns { NavDestinationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ toolbarConfiguration(toolbarParam: Array | CustomBuilder, options?: NavigationToolbarOptions): NavDestinationAttribute; /** - * Sets whether to hide the toolbar and whether to animate the visibility change. + * Hide tool bar * - * @param { boolean } hide - Whether to hide the toolbar. - * Default value: **false**. - * **true**: Hide the toolbar. - * **false**: Show the toolbar. - * @param { boolean } [animated] - Whether to animate the visibility change. - * Default value: **false** - * **true**: Animate the visibility change. - * **false**: Do not animate the visibility change. + * @param { boolean } hide + * @param { boolean } [animated] * @returns { NavDestinationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ hideToolBar(hide: boolean, animated?: boolean): NavDestinationAttribute; /** - * Called when the **NavDestination** component is about to build a child component. + * Invoked before sub-components of NavDestination are created. * * @param { import('../api/@ohos.base').Callback } callback * - Indicates callback that invoked before sub-components of NavDestination are created. @@ -1047,231 +1077,191 @@ declare class NavDestinationAttribute extends CommonMethod): NavDestinationAttribute; /** - * Called when the navigation destination is about to be mounted. - * You can change the navigation stack in this callback function, and the change takes effect in the current frame. + * Invoked before sub-components of NavDestination are created. + * + * @param { Callback } callback + * - Indicates callback that invoked before sub-components of NavDestination are created. + * @returns { NavDestinationAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onReady(callback: Callback): NavDestinationAttribute; + + /** + * Invoked before the navDestination is appeared. * * @param { Callback } callback - Indicates callback before the navDestination is appeared. * @returns { NavDestinationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillAppear(callback: Callback): NavDestinationAttribute; /** - * Called when the navigation destination is about to be unmounted (or when the transition animation, - * if any, is about to start). + * Invoked before the navDestination is disappeared. * * @param { Callback } callback - Indicates callback before the navDestination is disappeared. * @returns { NavDestinationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDisappear(callback: Callback): NavDestinationAttribute; /** - * Called when the navigation destination is about to be displayed. + * Invoked before the navDestination is displayed. * * @param { Callback } callback - Indicates callback before the navDestination is displayed. * @returns { NavDestinationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillShow(callback: Callback): NavDestinationAttribute; /** - * Called when the navigation destination is about to be hidden. + * Invoked before the navDestination is hidden. * * @param { Callback } callback - Indicates callback before the navDestination is hidden. * @returns { NavDestinationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillHide(callback: Callback): NavDestinationAttribute; /** - * Ignores the layout safe area by allowing the component to extend into the non-safe areas of the screen. + * Set navDestination content expand types and edges. * - * @param { Array } [types] - ypes of non-safe areas to extend into. - * Default value:
[LayoutSafeAreaType.SYSTEM]. - * @param { Array } [edges] - Edges for expanding the safe area. - * Default value:
[LayoutSafeAreaEdge.TOP, LayoutSafeAreaEdge.BOTTOM]. + * @param { Array } [types] - Indicates the types of the safe area. + * @param { Array } [edges] - Indicates the edges of the safe area. * @returns { NavDestinationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ignoreLayoutSafeArea(types?: Array, edges?: Array): NavDestinationAttribute; /** - * Sets the style of the system status bar - * when this **NavDestination** page is displayed in the **Navigation** component. + * Set the style of system bar * - *

**NOTE**: - *
1. The setting takes effect only when the **NavDestination** component is used - * in conjunction with the **Navigation** component. - *
2. For other usage restrictions, see the description of systemBarStylefor the **Navigation** component. - *

- * @param { Optional } style - Style of the system status bar. + * @param { Optional } style - The properties of system bar * @returns { NavDestinationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ systemBarStyle(style: Optional): NavDestinationAttribute; /** - * Sets whether the **NavDestination** component is recoverable. - * If set to recoverable, when the application process exits unexpectedly and restarts, - * the **NavDestination** component will be automatically recreated. To use this feature, - * ensure that the **recoverable** attribute is set for the **Navigation** component associated - * with the **NavDestination** component. - * - *

**NOTE**: - *
This API must be used together with - * the recoverable API of **Navigation**. - *

- * @param { boolean } recoverable - Whether the **NavDestination** component is recoverable. - * By default, it is not recoverable. - * Default value: **false**. - * **true**: The **NavDestination** component is recoverable. - * **false**: The **NavDestination** component is not recoverable. + * Set the NavDestination can be restored after the application is terminated. + * To enable this attribute, recoverable and id of Navigation must be set. + * + * @param { boolean } recoverable - set navdestination can be recovered. * @returns { NavDestinationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ recoverable(recoverable: Optional): NavDestinationAttribute; /** - * Sets the system transition animation of the **NavDestination** component. - * System transition animations for the title bar and content area can be configured separately. + * Configuration of system transition * - * @param { NavigationSystemTransitionType } type - Type of the system transition animation. - * Default value: **NavigationSystemTransitionType.DEFAULT**. + * @param { NavigationSystemTransitionType } type - Types of system Transition * @returns { NavDestinationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ systemTransition(type: NavigationSystemTransitionType): NavDestinationAttribute; /** - * Binds the **NavDestination** component with a scrollable container, which can be a List, Scroll, - * or WaterFlow component. This way, scrolling in the scrollable container triggers - * the display and hide animations of the title bar and toolbar of all **NavDestination** components that are bound - * to it – scrolling up triggers the hide animation, and scrolling down triggers the show animation. - * A single **NavDestination** component can be bound to multiple scrollable containers, - * and a single scrollable container can be bound to multiple **NavDestination** components. - * - *

**NOTE**: - *
The connection between the scrolling actions and the animations for showing or hiding the title bar - * and toolbar of the **NavDestination** component takes effect only when the title bar or toolbar is visible. - * If a **NavDestination** component is bound to multiple scrollable containers, scrolling in any of these containers - * triggers the display or hiding animations of the title bar and toolbar. Specifically, when any scrollable - * container reaches either the bottom or the top, the display animation for the title bar and - * toolbar is triggered without delay. As such, to ensure the optimal user experience, - * avoid triggering scroll events of multiple scrollable containers simultaneously. - *

+ * Bind NavDestination to scrollable container components to automatically hide titlebar and toolbar. * - * @param { Array } scrollers - Controller of the target scrollable container. + * @param { Array } scrollers - The controllers of the scrollable container components. * @returns { NavDestinationAttribute } Returns the instance of the NavDestinationAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ bindToScrollable(scrollers: Array): NavDestinationAttribute; /** - * Binds the **NavDestination** component with a nested scrollable container, - * which can be a List, Scroll, Grid, or WaterFlow component. This way, scrolling in the scrollable container - * triggers the display and hide animations of the title bar and toolbar of all **NavDestination** components that - * are bound to it – scrolling up triggers the hide animation, and scrolling down triggers the show animation. - * A single **NavDestination** component can be bound to multiple nested scrollable containers, and a single nested - * scrollable container can be bound to multiple **NavDestination** components. + * Bind NavDestination to nested scrollable container components to automatically hide titlebar and toolbar. * - *

**NOTE**: - * The connection between the scrolling actions and the animations for showing or hiding the title bar - *
and toolbar of the **NavDestination** component takes effect only when the title bar or toolbar is visible. - * If a **NavDestination** component is bound to multiple scrollable containers, scrolling in any of these containers - *
triggers the display or hiding animations of the title bar and toolbar. Specifically, when any scrollable - *
container reaches either the bottom or the top, the display animation for the title bar and - *
toolbar is triggered without delay. As such, to ensure the optimal user experience, - *
avoid triggering scroll events of multiple scrollable containers simultaneously. - *

- * - * @param { Array } scrollInfos - Controller of the target nested scrollable containers. - + * @param { Array } scrollInfos - The controllers of the nested scrollable container components. * @returns { NavDestinationAttribute } Returns the instance of the NavDestinationAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ bindToNestedScrollable(scrollInfos: Array): NavDestinationAttribute; /** - * Triggered when the **NavDestination** component becomes active (on top of the stack and operable, - * with no special components blocking it). + * Invoked when destination is active. * - * @param { Optional> } callback - Reason why the **NavDestination** component - * switches from inactive to active. + * @param { Optional> } callback - Indicates callback when destination is active. * @returns { NavDestinationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onActive(callback: Optional>): NavDestinationAttribute; /** - * Triggered when **NavDestination** component becomes inactive - * (not on top of the stack and inoperable, or on top but blocked by special components). + * Invoked when destination is inactive. * - * @param { Optional> } callback - Reason why the **NavDestination** component - * switches from active to inactive. + * @param { Optional> } callback - Indicates callback when destination is inactive. * @returns { NavDestinationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 17 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onInactive(callback: Optional>): NavDestinationAttribute; /** - * Sets a custom transition animation for the **NavDestination** component. + * Set NavDestination custom animation. * - *

**NOTE**: - *
If both this attribute and systemTransition are set, whichever is set later takes effect. - *

- * @param { NavDestinationTransitionDelegate } delegate - Delegate function for custom animations of - * the **NavDestination** component. + * @param { NavDestinationTransitionDelegate } delegate - The delegate of NavDestination custom animation. * @returns { NavDestinationAttribute } Returns the instance of the NavDestinationAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ customTransition(delegate: NavDestinationTransitionDelegate): NavDestinationAttribute; /** - * Triggered when a **NavDestination** page that already exists in the stack is moved to the top using - * launchMode.MOVE_TO_TOP_SINGLETON or launchMode.POP_TO_SINGLETON. - * - *

**NOTE**: - *
This callback is not triggered by replacePath or replaceDestination. - *

- * @param { Optional> } callback - Callback triggered by **onNewParam**, with the parameter - * being the data passed to the target page during navigation. + * Invoked when destination be pushed with singleton mode. + * + * @param { Optional> } callback - Indicates callback when destination be pushed with singleton mode. * @returns { NavDestinationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -1279,75 +1269,56 @@ declare class NavDestinationAttribute extends CommonMethod>): NavDestinationAttribute; - /** - * Sets the display orientation for the **NavDestination** component. After the transition to the NavDestination, - * the system also switches the application's main window to the specified display orientation. - * - *

**NOTE**: - *
This attribute is effective only if the following conditions are all met: - *
1. The **NavDestination** component belongs to the application's main window page, - * and the main window is a full-screen window. - *
2. The size of the **Navigation** container to which the **NavDestination** component belongs occupies - * the entire application page. - *
3. The type of **NavDestination** is STANDARD. - * The actual effect of setting the display orientation depends on the specific device support. - *

+ * Invoked when destination be pushed with singleton mode. + * + * @param { Optional> } callback - Indicates callback when destination be pushed with singleton mode. + * @returns { NavDestinationAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onNewParam(callback: Optional>): NavDestinationAttribute; + /** + * Set NavDestination's preferred Orientation. * - * @param { Optional } orientation - Display orientation to set. + * @param { Optional } orientation - The preferred Orientation of NavDestination. * @returns { NavDestinationAttribute } Returns the instance of the NavDestinationAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ preferredOrientation(orientation: Optional): NavDestinationAttribute; /** - * Sets whether to show or hide the system status bar when entering this **NavDestination** component. + * Set statusBar to visible or invisible. * - *

**NOTE**: - *
This attribute is effective only if the following conditions are all met: - *
1. The **NavDestination** component belongs to the application's main window page, and the main window is a - * full-screen window. - *
2. The size of the **Navigation** container to which the **NavDestination** component belongs - * occupies the entire application page. - *
3. The size of the **NavDestination** component occupies the entire **Navigation** container. - *
4. The type of **NavDestination** is STANDARD. - * The actual effect of setting the system status bar depends on the specific device support. - *

- * @param { Optional } enabled - Whether to show or hide the system status bar when entering the current - *
**NavDestination** component. - * @param { boolean } [animated] - Whether to use an animation to show or hide the system status bar. - *
Default value: **false**. + * @param { Optional } enabled - Show statusBar if true, or hide statusBar if false. + * @param { boolean } [animated] - Whether using animation during hiding or showing statusBar, + * using animation if true or not using animation if false. * @returns { NavDestinationAttribute } Returns the instance of the NavDestinationAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableStatusBar(enabled: Optional, animated?: boolean): NavDestinationAttribute; /** - * Sets whether to show or hide the system navigation bar when entering this **NavDestination** component. + * Set navigationIndicator to visible or invisible. * - *

**NOTE** - * This attribute is effective only if the following conditions are all met: - * 1. The **NavDestination** component belongs to the application's main window page, - *
and the main window is a full-screen window. - * 2. The size of the **Navigation** container to which the **NavDestination** component - *
belongs occupies the entire application page. - * 3. The size of the **NavDestination** component occupies the entire **Navigation** container. - * 4. The type of **NavDestination** is STANDARD. - * The actual effect of setting the system navigation bar depends on the specific device support. - *

- * @param { Optional } enabled - Whether to show or hide the system navigation bar - * when entering the current **NavDestination** component. + * @param { Optional } enabled - Show navigationIndicator if true, or hide navigationIndicator if false. * @returns { NavDestinationAttribute } Returns the instance of the NavDestinationAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableNavigationIndicator(enabled: Optional): NavDestinationAttribute; } @@ -1399,19 +1370,17 @@ declare const NavDestination: NavDestinationInterface; declare const NavDestinationInstance: NavDestinationAttribute; /** - * Defines the delegate function for custom transition animations of the **NavDestination** component. + * Delegate function for NavDestination custom animation. * * @typedef { function } NavDestinationTransitionDelegate - * @param { NavigationOperation } operation - Type of navigation operation for the current page transition. - * @param { boolean } isEnter - Whether the current page is an entry page. - *
**true**: The current page is an entry page. - *
**false**: The current page is not an entry page. - * @returns { Array | undefined } Array of custom animations for the **NavDestination** page. - *
If **undefined** is returned, the default system animation is used. + * @param { NavigationOperation } operation - the operation type of current Navigation animation. + * @param { boolean } isEnter - whether current NavDestination will do enter-type transition. + * @returns { Array | undefined } user-set custom navDestination transitions. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare type NavDestinationTransitionDelegate = (operation: NavigationOperation, isEnter: boolean) => Array | undefined; \ No newline at end of file diff --git a/api/@internal/component/ets/navigation.d.ts b/api/@internal/component/ets/navigation.d.ts index a8653f1bdc895f668c79f81ab96b0702629e2174..ea29e346ae6b1618dbad91e70d7e882e7861040a 100644 --- a/api/@internal/component/ets/navigation.d.ts +++ b/api/@internal/component/ets/navigation.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2025 Huawei Device Co., Ltd. + * Copyright (c) 2021-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 @@ -18,6 +18,19 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import window from '../../@ohos.window'; +import { Resource } from '../../global/resource'; +import { TextModifier } from '../../arkui/TextModifier'; +import { LengthMetrics } from '../../arkui/Graphics'; +import { Callback, BlurStyle, CommonMethod, Optional, LayoutSafeAreaType, LayoutSafeAreaEdge, BackgroundEffectOptions, BackgroundBlurStyleOptions, PixelMap } from './common' +import { CustomBuilder, PageMapBuilder } from './builder' +import { Length, ResourceStr, ResourceColor, Dimension, VoidCallback } from './units' +import { TitleHeight } from './enums' +import { SymbolGlyphModifier } from '../../arkui/SymbolGlyphModifier' +import { NavDestinationContext, NavDestinationMode } from './navDestination' +/*** endif */ + /** * Import the SystemBarStyle type for Navigation. * @@ -28,6 +41,18 @@ */ declare type SystemBarStyle = import('../api/@ohos.window').default.SystemBarStyle; + +/** + * Import the SystemBarStyle type for Navigation. + * + * @typedef { window.SystemBarStyle } SystemBarStyle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type SystemBarStyle = window.SystemBarStyle; + /** * Defines the navigation common title. * @@ -50,7 +75,8 @@ declare type SystemBarStyle = import('../api/@ohos.window').default.SystemBarSty * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NavigationCommonTitle { /** @@ -84,7 +110,8 @@ declare interface NavigationCommonTitle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ main: string | Resource; @@ -119,7 +146,8 @@ declare interface NavigationCommonTitle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ sub: string | Resource; } @@ -146,18 +174,19 @@ declare interface NavigationCommonTitle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NavigationCustomTitle { /** - * Custom content of the title bar. + * Sets the custom title builder. * * @type { CustomBuilder } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 */ /** - * Custom content of the title bar. + * Sets the custom title builder. * * @type { CustomBuilder } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -165,25 +194,26 @@ declare interface NavigationCustomTitle { * @since 10 */ /** - * Custom content of the title bar. + * Sets the custom title builder. * * @type { CustomBuilder } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ builder: CustomBuilder; /** - * Height of the title bar. + * Sets the custom title height. * * @type { TitleHeight | Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 */ /** - * Height of the title bar. + * Sets the custom title height. * * @type { TitleHeight | Length } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -191,13 +221,14 @@ declare interface NavigationCustomTitle { * @since 10 */ /** - * Height of the title bar. + * Sets the custom title height. * * @type { TitleHeight | Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ height: TitleHeight | Length; } @@ -225,7 +256,8 @@ declare interface NavigationCustomTitle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum NavigationMode { /** @@ -247,7 +279,8 @@ declare enum NavigationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Stack, @@ -270,7 +303,8 @@ declare enum NavigationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Split, @@ -296,7 +330,8 @@ declare enum NavigationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Auto, } @@ -323,29 +358,31 @@ declare enum NavigationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum NavBarPosition { /** - * In navigation split mode, the main column is at the start of the main axis. + * The navigation bar is on the Start of the container * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 */ /** - * In navigation split mode, the main column is at the start of the main axis. + * The navigation bar is on the Start of the container * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * In navigation split mode, the main column is at the start of the main axis. + * The navigation bar is on the Start of the container * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Start, @@ -368,7 +405,8 @@ declare enum NavBarPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ End, } @@ -395,126 +433,79 @@ declare enum NavBarPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum NavigationTitleMode { /** - * When the content is more than one screen in a scrollable component, the - * main title shrinks as the content scrolls down (the subtitle fades out - * with its size remaining unchanged) and restores as the content scrolls - * up to the top. - *
**NOTE** - *
The effect where the main title's size changes in response to content - * scrolling is effective only when **title** is set to **ResourceStr** or - * **NavigationCommonTitle**. If **title** is set to any other value type, the - * main title changes in mere location when pulled down. - *
For this effect to work when the content is less than one screen in a - * scrollable component, set the **options** parameter of the scrollable - * component's edgeEffect attribute to **true**. In the non-scrolling state, the - * height of the title bar is the same as in **Full** mode; in the scrolling state, - * the minimum height of the title bar is the same as in **Mini** mode. + * The title is free mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * When the content is more than one screen in a scrollable component, the - * main title shrinks as the content scrolls down (the subtitle fades out - * with its size remaining unchanged) and restores as the content scrolls - * up to the top. - *
**NOTE** - *
The effect where the main title's size changes in response to content - * scrolling is effective only when **title** is set to **ResourceStr** or - * **NavigationCommonTitle**. If **title** is set to any other value type, the - * main title changes in mere location when pulled down. - *
For this effect to work when the content is less than one screen in a - * scrollable component, set the **options** parameter of the scrollable - * component's edgeEffect attribute to **true**. In the non-scrolling state, the - * height of the title bar is the same as in **Full** mode; in the scrolling state, - * the minimum height of the title bar is the same as in **Mini** mode. + * The title is free mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * When the content is more than one screen in a scrollable component, the - * main title shrinks as the content scrolls down (the subtitle fades out - * with its size remaining unchanged) and restores as the content scrolls - * up to the top. - *
**NOTE** - *
The effect where the main title's size changes in response to content - * scrolling is effective only when **title** is set to **ResourceStr** or - * **NavigationCommonTitle**. If **title** is set to any other value type, the - * main title changes in mere location when pulled down. - *
For this effect to work when the content is less than one screen in a - * scrollable component, set the **options** parameter of the scrollable - * component's edgeEffect attribute to **true**. In the non-scrolling state, the - * height of the title bar is the same as in **Full** mode; in the scrolling state, - * the minimum height of the title bar is the same as in **Mini** mode. + * The title is free mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Free = 0, /** - * The title is fixed at full mode.
Default value: If there is only a main - * title, the title bar height is 112 vp; if there is both a main title and a - * subtitle, the title bar height is 138 vp. + * The title is full mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * The title is fixed at full mode.
Default value: If there is only a main - * title, the title bar height is 112 vp; if there is both a main title and a - * subtitle, the title bar height is 138 vp. + * The title is full mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * The title is fixed at full mode.
Default value: If there is only a main - * title, the title bar height is 112 vp; if there is both a main title and a - * subtitle, the title bar height is 138 vp. + * The title is full mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Full, /** - * The title is fixed at mini mode. - * Default value:if there is only a main title, The title bar height is 56 vp. - * If there are both a main title and a subtitle, the title bar height is 82 vp. + * The title is mini mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * The title is fixed at mini mode. Default value: In versions earlier than API version 12, - * If there is only a main title, the title bar height is 56 vp; if there are both a main title and a subtitle, - * The title bar height is 82 vp. Since API version 12, the title bar height is 56 vp. + * The title is mini mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * The title is fixed at mini mode. Default value: In versions earlier than API version 12, - * If there is only a main title, the title bar height is 56 vp; if there are both a main title and a subtitle, - * The title bar height is 82 vp. Since API version 12, the title bar height is 56 vp. + * The title is mini mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Mini, } @@ -541,7 +532,8 @@ declare enum NavigationTitleMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NavigationMenuItem { /** @@ -575,7 +567,8 @@ declare interface NavigationMenuItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ value: string | Resource; @@ -604,13 +597,14 @@ declare interface NavigationMenuItem { * @since 11 */ /** - * The icon of navigation menu item. + * The value of navigation menu item. * * @type { ?(string | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ icon?: string | Resource; @@ -620,16 +614,8 @@ declare interface NavigationMenuItem { * @type { ?SymbolGlyphModifier } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 - */ - /** - * The symbol of navigation menu item. - * - * @type { ?SymbolGlyphModifier } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ symbolIcon?: SymbolGlyphModifier; @@ -640,7 +626,8 @@ declare interface NavigationMenuItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isEnabled?: boolean; @@ -666,7 +653,8 @@ declare interface NavigationMenuItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ action?: () => void; } @@ -686,7 +674,8 @@ declare interface NavigationMenuItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PopInfo { /** @@ -704,7 +693,8 @@ declare interface PopInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ info: NavPathInfo; @@ -723,7 +713,8 @@ declare interface PopInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ result: Object; } @@ -741,7 +732,8 @@ declare interface PopInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class NavPathInfo { /** @@ -779,7 +771,22 @@ declare class NavPathInfo { constructor(name: string, param: unknown, onPop?: import('../api/@ohos.base').Callback, isEntry?: boolean); /** - * Name of the navigation destination page. + * Creates an instance of NavPathInfo. + * + * @param { string } name - The name of NavDestination. + * @param { Object | null | undefined } param - The detailed parameter of the NavDestination. + * @param { Callback } [onPop] - The callback when next page returns. + * @param { boolean } [isEntry] - Indicates whether it is an entry destination. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(name: string, param: Object | null | undefined, onPop?: Callback, isEntry?: boolean); + + /** + * The name of NavDestination. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -787,18 +794,19 @@ declare class NavPathInfo { * @since 10 */ /** - * Name of the navigation destination page. + * The name of NavDestination. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ name: string; /** - * Detailed parameters of the navigation destination page. + * The detailed parameter of the NavDestination. * * @type { ?unknown } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -806,7 +814,7 @@ declare class NavPathInfo { * @since 10 */ /** - * Detailed parameters of the navigation destination page. + * The detailed parameter of the NavDestination. * * @type { ?unknown } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -817,8 +825,19 @@ declare class NavPathInfo { param?: unknown; /** - * Callback returned when pop is called on the navigation destination page. - * It is invoked only after the **result** parameter is set in pop. + * The detailed parameter of the NavDestination. + * + * @type { ?(Object | null | undefined) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + param?: Object | null | undefined; + + /** + * The callback when next page returns. * * @type { ?import('../api/@ohos.base').Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -826,8 +845,7 @@ declare class NavPathInfo { * @since 11 */ /** - * Callback returned when pop is called on the navigation destination page. - * It is invoked only after the **result** parameter is set in pop. + * The callback when next page returns. * * @type { ?import('../api/@ohos.base').Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -837,6 +855,18 @@ declare class NavPathInfo { */ onPop?: import('../api/@ohos.base').Callback; + /** + * The callback when next page returns. + * + * @type { ?Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onPop?: Callback; + /** * Indicates whether it is an entry destination. * @@ -844,7 +874,8 @@ declare class NavPathInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isEntry?: boolean; @@ -855,7 +886,8 @@ declare class NavPathInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ navDestinationId?: string; } @@ -867,18 +899,18 @@ declare class NavPathInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum LaunchMode { /** - * Default navigation stack operation mode.
In this mode, - * push operations add the specified **NavDestination**page to - * the stack; replace operations replace the current top **NavDestination** page. + * The default mode of stack operation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STANDARD = 0, @@ -889,7 +921,8 @@ declare enum LaunchMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MOVE_TO_TOP_SINGLETON = 1, @@ -900,18 +933,19 @@ declare enum LaunchMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ POP_TO_SINGLETON = 2, - + /** - * This mode creates an instance of **NavDestination**. Compared with - * **STANDARD**, this mode does not reuse the instance with the same name in the stack. + * Forced to create a new NavDestination instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NEW_INSTANCE = 3, } @@ -923,32 +957,31 @@ declare enum LaunchMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NavigationOptions { /** - * Navigation stack operation mode. - *
Default value: **LaunchMode.STANDARD**. + * Indicates the launchMode of stack operation. * * @type { ?LaunchMode } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ launchMode?: LaunchMode; /** - * Whether to support transition animation. - *
Default value: **true**. - *
**true**: The transition animation is supported. - *
**false**: The transition animation is not supported. + * Indicates whether the transition is animated. * * @type { ?boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ animated?: boolean; } @@ -966,7 +999,8 @@ declare interface NavigationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class NavPathStack { /** @@ -982,12 +1016,13 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); /** - * Pushes the navigation destination page specified by **info** onto the navigation stack. + * Pushes the NavDestination into the stack. * * @param { NavPathInfo } info - Indicates the NavDestination to be pushed. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -995,41 +1030,36 @@ declare class NavPathStack { * @since 10 */ /** - * Pushes the navigation destination page specified by **info** onto the navigation stack. + * Pushes the NavDestination into the stack. * * @param { NavPathInfo } info - Indicates the NavDestination to be pushed. - * @param { boolean } [animated] - Whether to support the transition animation. - *
Default value: **true**. - *
**true**: The transition animation is supported. **false**: The transition animation is not supported. + * @param { boolean } [animated] - Indicates whether the transition is animated. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ pushPath(info: NavPathInfo, animated?: boolean): void; /** - * Pushes the navigation destination page specified by **info** onto the navigation stack. - * Depending on the launchMode specified in the **options** parameter, different behaviors will be triggered. + * Pushes the NavDestination into the stack. * * @param { NavPathInfo } info - Indicates the NavDestination to be pushed. * @param { NavigationOptions } [options] - Indicates options of stack operation. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pushPath(info: NavPathInfo, options?: NavigationOptions): void; /** - * Pushes the navigation destination page specified by **info** onto - * the navigation stack. This API uses a promise to return the result. + * Pushes the NavDestination into the stack. * - * @param { NavPathInfo } info - Information about the navigation destination page. - * @param { boolean } [animated] - Whether to support the transition animation. - *
Default value: **true**. - *
**true**: The transition animation is supported. - *
**false**: The transition animation is not supported. + * @param { NavPathInfo } info - Indicates the NavDestination to be pushed. + * @param { boolean } [animated] - Indicates whether the transition is animated. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1. Mandatory parameters are left unspecified. @@ -1043,14 +1073,10 @@ declare class NavPathStack { * @since 11 */ /** - * Pushes the navigation destination page specified by **info** onto - * the navigation stack. This API uses a promise to return the result. + * Pushes the NavDestination into the stack. * - * @param { NavPathInfo } info - Information about the navigation destination page. - * @param { boolean } [animated] - Whether to support the transition animation. - *
Default value: **true**. - *
**true**: The transition animation is supported. - *
**false**: The transition animation is not supported. + * @param { NavPathInfo } info - Indicates the NavDestination to be pushed. + * @param { boolean } [animated] - Indicates whether the transition is animated. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1. Mandatory parameters are left unspecified. @@ -1062,17 +1088,16 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pushDestination(info: NavPathInfo, animated?: boolean): Promise; /** - * Pushes the navigation destination page specified by **info** onto the navigation stack. - * This API uses a promise to return the result. Depending on the LaunchMode - * specified in the **options** parameter, different behaviors will be triggered. + * Pushes the NavDestination into the stack. * - * @param { NavPathInfo } info - Information about the navigation destination page. - * @param { NavigationOptions } [options] - Navigation options. + * @param { NavPathInfo } info - Indicates the NavDestination to be pushed. + * @param { NavigationOptions } [options] - Indicates options of stack operation. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1. Mandatory parameters are left unspecified. @@ -1084,7 +1109,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pushDestination(info: NavPathInfo, options?: NavigationOptions): Promise; @@ -1112,6 +1138,20 @@ declare class NavPathStack { */ pushPathByName(name: string, param: unknown, animated?: boolean): void; + /** + * Pushes the specified NavDestination into the stack. + * + * @param { string } name - Indicates the name of the NavDestination to be pushed. + * @param { Object | null | undefined } param - Indicates the detailed parameter of the NavDestination to be pushed. + * @param { boolean } [animated] - Indicates whether the transition is animated. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + pushPathByName(name: string, param: Object | null | undefined, animated?: boolean): void; + /** * Pushes the specified NavDestination into the stack. * @@ -1141,6 +1181,21 @@ declare class NavPathStack { */ pushPathByName(name: string, param: Object, onPop: import('../api/@ohos.base').Callback, animated?: boolean): void; + /** + * Pushes the specified NavDestination into the stack. + * + * @param { string } name - Indicates the name of the NavDestination to be pushed. + * @param { Object } param - Indicates the detailed parameter of the NavDestination to be pushed. + * @param { Callback } onPop - The callback when next page returns. + * @param { boolean } [animated] - Indicates whether the transition is animated. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + pushPathByName(name: string, param: Object, onPop: Callback, animated?: boolean): void; + /** * Pushes the specified NavDestination into the stack. * @@ -1176,7 +1231,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pushDestinationByName(name: string, param: Object, animated?: boolean): Promise; @@ -1221,6 +1277,29 @@ declare class NavPathStack { */ pushDestinationByName(name: string, param: Object, onPop: import('../api/@ohos.base').Callback, animated?: boolean): Promise; + /** + * Pushes the specified NavDestination into the stack. + * + * @param { string } name - Indicates the name of the NavDestination to be pushed. + * @param { Object } param - Indicates the detailed parameter of the NavDestination to be pushed. + * @param { Callback } onPop - The callback when next page returns. + * @param { boolean } [animated] - Indicates whether the transition is animated. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified. + * 2. Incorrect parameters types. + * 3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal error. + * @throws { BusinessError } 100005 - Builder function not registered. + * @throws { BusinessError } 100006 - NavDestination not found. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + pushDestinationByName(name: string, param: Object, onPop: Callback, animated?: boolean): Promise; + /** * Replace the current NavDestination with the specific one.The current NavDestination will be destroyed. * @@ -1238,7 +1317,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ replacePath(info: NavPathInfo, animated?: boolean): void; @@ -1250,7 +1330,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ replacePath(info: NavPathInfo, options?: NavigationOptions): void; @@ -1270,7 +1351,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ replaceDestination(info: NavPathInfo, options?: NavigationOptions): Promise; @@ -1297,7 +1379,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ replacePathByName(name: string, param: Object, animated?: boolean): void; @@ -1318,12 +1401,13 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ removeByIndexes(indexes: Array): number; /** - * Removes the navigation destination page specified by **name** from the navigation stack. + * Remove the specified NavDestination by name. * * @param { string } name - Indicates the name of the NavDestination to be removed. * @returns { number } Returns the number of removed NavDestinations. @@ -1332,28 +1416,28 @@ declare class NavPathStack { * @since 11 */ /** - * Removes the navigation destination page specified by **name** from the navigation stack. + * Remove the specified NavDestination by name. * * @param { string } name - Indicates the name of the NavDestination to be removed. * @returns { number } Returns the number of removed NavDestinations. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ removeByName(name: string): number; /** - * Removes the navigation destination page specified by **navDestinationId** from - * the navigation stack. **navDestinationId** can be obtained from the onReady callback - * of **NavDestination** or from NavDestinationInfo. + * Remove the specified NavDestination by its navDestinationId. * - * @param { string } navDestinationId - Unique ID of the navigation destination page to remove. + * @param { string } navDestinationId - Indicates the navDestinationId of the NavDestination to be removed. * @returns { boolean } Returns true if remove successfully, otherwise returns false. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ removeByNavDestinationId(navDestinationId: string): boolean; @@ -1368,35 +1452,37 @@ declare class NavPathStack { /** * Pops the top NavDestination out of the stack. * - * @param { boolean } [animated] - Indicates whether the transition is animated. Default value is **true**. + * @param { boolean } [animated] - Indicates whether the transition is animated. * @returns { NavPathInfo | undefined } Returns the top NavPathInfo if the stack is not empty, otherwise returns undefined. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ pop(animated?: boolean): NavPathInfo | undefined; /** - * Pops the top NavDestination out of the stack. Invokes the **onPop** callback to pass the page processing result. + * Pops the top NavDestination out of the stack. * * @param { Object } result - The result of the NavDestination. - * @param { boolean } [animated] - Indicates whether the transition is animated. Default value is **true**. + * @param { boolean } [animated] - Indicates whether the transition is animated. * @returns { NavPathInfo | undefined } Returns the top NavPathInfo if the stack is not empty, otherwise returns undefined. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** - * Pops the top NavDestination out of the stack. Invokes the **onPop** callback to pass the page processing result. + * Pops the top NavDestination out of the stack. * * @param { Object } result - The result of the NavDestination. - * @param { boolean } [animated] - Indicates whether the transition is animated. Default value is **true**. + * @param { boolean } [animated] - Indicates whether the transition is animated. * @returns { NavPathInfo | undefined } Returns the top NavPathInfo if the stack is not empty, otherwise returns undefined. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pop(result: Object, animated?: boolean): NavPathInfo | undefined; @@ -1420,14 +1506,13 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ popToName(name: string, animated?: boolean): number; /** - * Pops pages until the first navigation destination page. - * That matches **name** from the bottom of the navigation stack is at the top of the stack. - * This API uses the **onPop** callback to pass in the page processing result. + * Pops the specified NavDestination out of the stack. * * @param { string } name - Indicates the name of the NavDestination to be popped. * @param { Object } result - The result of the NavDestination. @@ -1440,9 +1525,7 @@ declare class NavPathStack { * @since 11 */ /** - * Pops pages until the first navigation destination page. - * That matches **name** from the bottom of the navigation stack is at the top of the stack. - * This API uses the **onPop** callback to pass in the page processing result. + * Pops the specified NavDestination out of the stack. * * @param { string } name - Indicates the name of the NavDestination to be popped. * @param { Object } result - The result of the NavDestination. @@ -1453,7 +1536,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ popToName(name: string, result: Object, animated?: boolean): number; @@ -1475,7 +1559,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ popToIndex(index: number, animated?: boolean): void; @@ -1490,13 +1575,13 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ popToIndex(index: number, result: Object, animated?: boolean): void; /** - * Moves the first navigation destination page of this name to the top of stack. - * That matches **name** from the bottom of the navigation stack to the top of the stack. + * Moves the specified NavDestination to stack top. * * @param { string } name - Indicates the name of the NavDestination to be moved to the top. * @returns { number } Returns the index of the NavDestination if it exists in the stack, otherwise returns -1; @@ -1505,8 +1590,7 @@ declare class NavPathStack { * @since 10 */ /** - * Moves the first navigation destination page of this name to the top of stack. - * That matches **name** from the bottom of the navigation stack to the top of the stack. + * Moves the specified NavDestination to stack top. * * @param { string } name - Indicates the name of the NavDestination to be moved to the top. * @param { boolean } [animated] - Indicates whether the transition is animated. @@ -1514,56 +1598,53 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ moveToTop(name: string, animated?: boolean): number; /** - * Moves to the top of the navigation stack the navigation destination page specified by **index**. + * Moves the specified NavDestination to stack top. * - * @param { number } index - Index of the navigation destination page. The index is zero-based. + * @param { number } index - Indicates the index of the NavDestination to be moved to the top. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Moves to the top of the navigation stack the navigation destination page specified by **index**. + * Moves the specified NavDestination to stack top. * - * @param { number } index - Index of the navigation destination page. The index is zero-based. - * @param { boolean } [animated] - Whether to support the transition animation. - *
Default value: **true**. - *
**true**: The transition animation is supported. - *
**false**: The transition animation is not supported. + * @param { number } index - Indicates the index of the NavDestination to be moved to the top. + * @param { boolean } [animated] - Indicates whether the transition is animated. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ moveIndexToTop(index: number, animated?: boolean): void; /** - * Clears the navigation stack. + * Clears the stack. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Clears the navigation stack. + * Clears the stack. * - * @param { boolean } [animated] - Whether to support the transition animation. - *
Default value: **true**. - *
**true**: The transition animation is supported. - *
**false**: The transition animation is not supported. + * @param { boolean } [animated] - Indicates whether the transition is animated. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ clear(animated?: boolean): void; /** - * Obtains the names of all navigation destination pages in the navigation stack. + * Obtains all the NavDestination name in the stack. * * @returns { Array } Returns all the NavDestination name in the stack; * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1571,38 +1652,38 @@ declare class NavPathStack { * @since 10 */ /** - * Obtains the names of all navigation destination pages in the navigation stack. + * Obtains all the NavDestination name in the stack. * * @returns { Array } Returns all the NavDestination name in the stack; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getAllPathName(): Array; /** - * Obtains the parameter information of the navigation destination page specified by **index**. + * Obtains the param of the specified NavDestination. * - * @param { number } index - Index of the navigation destination page. The index is zero-based. - * @returns { unknown | undefined } Returns the detailed parameter of the NavDestination. - *
If it exists in the stack, otherwise returns undefined; + * @param { number } index - Indicates the index of the NavDestination. + * @returns { unknown | undefined } Returns the detailed parameter of the NavDestination if it exists in the stack, otherwise returns undefined; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Obtains the parameter information of the navigation destination page specified by **index**. + * Obtains the param of the specified NavDestination. * - * @param { number } index - Index of the navigation destination page. The index is zero-based. - * @returns { unknown | undefined } Returns the detailed parameter of the NavDestination. - *
If it exists in the stack, otherwise returns undefined; + * @param { number } index - Indicates the index of the NavDestination. + * @returns { Object | null | undefined } Returns the detailed parameter of the NavDestination if it exists in the stack, otherwise returns undefined; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - getParamByIndex(index: number): unknown | undefined; + getParamByIndex(index: number): Object | null | undefined; /** * Obtains the param of the specified NavDestination. @@ -1617,16 +1698,17 @@ declare class NavPathStack { * Obtains the param of the specified NavDestination. * * @param { string } name - Indicates the name of the NavDestination. - * @returns { Array } Returns the detailed parameter of all the NavDestinations. + * @returns { Array } Returns the detailed parameter of all the NavDestinations. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - getParamByName(name: string): Array; + getParamByName(name: string): Array; /** - * Obtains the indexes of all the navigation destination pages that match **name**. + * Obtains the index of the specified NavDestination. * * @param { string } name - Indicates the name of the NavDestination. * @returns { Array } Returns the index of all the NavDestinations. @@ -1635,84 +1717,79 @@ declare class NavPathStack { * @since 10 */ /** - * Obtains the indexes of all the navigation destination pages that match **name**. + * Obtains the index of the specified NavDestination. * * @param { string } name - Indicates the name of the NavDestination. * @returns { Array } Returns the index of all the NavDestinations. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getIndexByName(name: string): Array; /** - * Obtains the parent navigation path stack. - * When a **Navigation** component is nested (directly or indirectly) insider another **Navigation** component, - * The internal one can obtain the navigation path stack of the external one. + * Obtains the parent of the current stack. * * @returns { NavPathStack | null } Returns the parent of the current stack. If no parent, it returns null. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getParent(): NavPathStack | null; /** - * Obtains the stack size. + * Obtains the size of the stack. * - * @returns { number } Stack size. - *
Value range: [0, +∞) + * @returns { number } Returns the size of the stack. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Obtains the stack size. + * Obtains the size of the stack. * - * @returns { number } Stack size. - *
Value range: [0, +∞) + * @returns { number } Returns the size of the stack. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ size(): number; /** - * Disables or enables the transition animation in the **Navigation** component. + * disable or enable all transition animation in this navigation stack. * - * @param { boolean } value - Whether to disable the transition animation. - *
Default value: **false**. - *
**true**:The transition animation is disabled. - *
**false**: The transition animation is not disabled. + * @param { boolean } value - Indicates whether the transition is animated. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** - * Disables or enables the transition animation in the **Navigation** component. + * disable or enable all transition animation in this navigation stack. * - * @param { boolean } value - Whether to disable the transition animation. - *
Default value: **false**. - *
**true**:The transition animation is disabled. - *
**false**: The transition animation is not disabled. + * @param { boolean } value - Indicates whether the transition is animated. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ disableAnimation(value: boolean): void; /** - * Sets the interception callback for navigation page redirection. + * set navigation transition interception.It will be called in navPathStack changes or navigation mode changes. * - * @param { NavigationInterception } interception - Object to be intercepted during navigation redirection. + * @param { NavigationInterception } interception - the instance to intercept in navigation changes. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setInterception(interception: NavigationInterception): void; @@ -1723,7 +1800,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getPathStack(): Array; @@ -1735,19 +1813,21 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ setPathStack(pathStack: Array, animated?: boolean): void; } /** - * Defines the name of the navigation home page. + * Navigation home name * * @typedef { 'navBar' } NavBar * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type NavBar = 'navBar' @@ -1762,9 +1842,10 @@ declare type NavBar = 'navBar' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ -declare type InterceptionShowCallback = (from: NavDestinationContext|NavBar, to: NavDestinationContext|NavBar, operation: NavigationOperation, isAnimated: boolean) => void; +declare type InterceptionShowCallback = (from: NavDestinationContext | NavBar, to: NavDestinationContext | NavBar, operation: NavigationOperation, isAnimated: boolean) => void; /** * navigation interception callback using in navigation mode change @@ -1774,7 +1855,8 @@ declare type InterceptionShowCallback = (from: NavDestinationContext|NavBar, to: * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type InterceptionModeCallback = (mode: NavigationMode) => void; @@ -1785,18 +1867,20 @@ declare type InterceptionModeCallback = (mode: NavigationMode) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NavigationInterception { /** - * Interception before page redirection, allowing for stack operations. - * The setting takes effect in the current redirection. + * Called before destination transition.NavPathStack can be changed in this callback, + * it will takes effect during this transition.For details, see { @Link InterceptionShowCallback}. * * @type { ?InterceptionShowCallback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ willShow?: InterceptionShowCallback; @@ -1807,7 +1891,8 @@ declare interface NavigationInterception { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ didShow?: InterceptionShowCallback; @@ -1818,53 +1903,21 @@ declare interface NavigationInterception { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ modeChange?: InterceptionModeCallback; } /** - * Indicates the information of home destination. - * - * @interface HomePathInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -declare interface HomePathInfo { - /** - * Name of the home destination. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - name: string; - - /** - * Detailed parameters of the home destination. - * - * @type { ?Object } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - param?: Object; -} - -/** - * Provide navigation view interface + * Provide navigator view interface * * @interface NavigationInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Provide navigation view interface + * Provide navigator view interface * * @interface NavigationInterface * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1872,24 +1925,25 @@ declare interface HomePathInfo { * @since 10 */ /** - * Provide navigation view interface + * Provide navigator view interface * * @interface NavigationInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface NavigationInterface { /** - * Called when the navigation view interface is used. + * Called when the navigator view interface is used. * * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Called when the navigation view interface is used. + * Called when the navigator view interface is used. * * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1897,18 +1951,19 @@ interface NavigationInterface { * @since 10 */ /** - * Called when the navigation view interface is used. + * Called when the navigator view interface is used. * * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (): NavigationAttribute; /** - * Called when the navigation view interface is used, with route table provided. + * Called when the navigator view interface is used, with route table provided. * * @param { NavPathStack } pathInfos - The stack of the route table. * @returns { NavigationAttribute } Returns the instance of the NavigationAttribute. @@ -1917,14 +1972,15 @@ interface NavigationInterface { * @since 10 */ /** - * Called when the navigation view interface is used, with route table provided. + * Called when the navigator view interface is used, with route table provided. * * @param { NavPathStack } pathInfos - The stack of the route table. * @returns { NavigationAttribute } Returns the instance of the NavigationAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (pathInfos: NavPathStack): NavigationAttribute; @@ -1956,26 +2012,24 @@ interface NavigationInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ToolbarItemStatus { /** - * Normal state. In this state, the toolbar item takes on the default style and - * can switch to another state-specific style by responding to the hover, press, - * and focus events. + * Normal state of toolbar item. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** - * Normal state. In this state, the toolbar item takes on the default style and - * can switch to another state-specific style by responding to the hover, press, - * and focus events. + * Normal state of toolbar item. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NORMAL = 0, @@ -1991,25 +2045,25 @@ declare enum ToolbarItemStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ DISABLED = 1, /** - * Active state. In this state, the toolbar item can update its icon - * to the one specified by **activeIcon** by responding to a click event. + * Active state of toolbar item. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** - * Active state. In this state, the toolbar item can update its icon - * to the one specified by **activeIcon** by responding to a click event. + * Active state of toolbar item. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ACTIVE = 2, } @@ -2029,7 +2083,8 @@ declare enum ToolbarItemStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum NavigationOperation { /** @@ -2045,7 +2100,8 @@ declare enum NavigationOperation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PUSH = 1, @@ -2062,24 +2118,26 @@ declare enum NavigationOperation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ POP = 2, /** - * The transition is page replacement. + * Replace operation of navigation transition. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** - * The transition is page replacement. + * Replace operation of navigation transition. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ REPLACE = 3, } @@ -2097,16 +2155,8 @@ declare enum NavigationOperation { * @interface ToolbarItem * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 - */ -/** - * Defines configurable parameters for toolbar item. - * - * @interface ToolbarItem - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ToolbarItem { /** @@ -2124,7 +2174,8 @@ declare interface ToolbarItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ value: ResourceStr; @@ -2143,7 +2194,8 @@ declare interface ToolbarItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ icon?: ResourceStr; @@ -2153,16 +2205,8 @@ declare interface ToolbarItem { * @type { ?SymbolGlyphModifier } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 - */ - /** - * The symbol of navigation toolbar item. - * - * @type { ?SymbolGlyphModifier } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ symbolIcon?: SymbolGlyphModifier; @@ -2181,7 +2225,8 @@ declare interface ToolbarItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ action?: () => void; @@ -2200,7 +2245,8 @@ declare interface ToolbarItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ status?: ToolbarItemStatus; @@ -2219,7 +2265,8 @@ declare interface ToolbarItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ activeIcon?: ResourceStr; @@ -2229,16 +2276,8 @@ declare interface ToolbarItem { * @type { ?SymbolGlyphModifier } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 - */ - /** - * The symbol of navigation toolbar item in active state. - * - * @type { ?SymbolGlyphModifier } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ activeSymbolIcon?: SymbolGlyphModifier; } @@ -2250,29 +2289,31 @@ declare interface ToolbarItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NavigationTitleOptions { /** - * Background color of the title bar. If this parameter is not set, the default color is used. + * Background color. * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor?: ResourceColor; /** - * Background blur style of the title bar. If this parameter is not set, the background - * blur effect is disabled. + * Background blur style. * * @type { ?BlurStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyle?: BlurStyle; @@ -2283,7 +2324,8 @@ declare interface NavigationTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; @@ -2294,20 +2336,21 @@ declare interface NavigationTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundEffect?: BackgroundEffectOptions; /** - * Layout style of the title bar. - *
Default value: **BarStyle.STANDARD**. + * Set title bar style. * * @type { ?BarStyle } * @default BarStyle.STANDARD * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ barStyle?: BarStyle; @@ -2319,7 +2362,8 @@ declare interface NavigationTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ paddingStart?: LengthMetrics; @@ -2331,7 +2375,8 @@ declare interface NavigationTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ paddingEnd?: LengthMetrics; @@ -2342,7 +2387,8 @@ declare interface NavigationTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ mainTitleModifier?: TextModifier; @@ -2353,10 +2399,11 @@ declare interface NavigationTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ subTitleModifier?: TextModifier; - + /** * Defines whether to respond to the hover mode. * @@ -2365,7 +2412,8 @@ declare interface NavigationTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ enableHoverMode?: boolean; } @@ -2377,26 +2425,29 @@ declare interface NavigationTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum BarStyle { /** - * In this mode, the title bar or toolbar is laid out above the content area. + * Standard style means that the bar and content area are column layouts. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STANDARD = 0, /** - * In this mode, the title bar or toolbar is overlaid on top of the content area. + * Stack style means that the bar and content area are stack layouts. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STACK = 1, @@ -2406,7 +2457,8 @@ declare enum BarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ SAFE_AREA_PADDING = 2, } @@ -2418,29 +2470,31 @@ declare enum BarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NavigationToolbarOptions { /** - * Background color of the toolbar. If this parameter is not set, the default color is used. + * Background color. * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor?: ResourceColor; /** - * Background blur style of the toolbar. If this parameter is not set, the background blur - * effect is disabled. + * Background blur style. * * @type { ?BlurStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyle?: BlurStyle; @@ -2451,7 +2505,8 @@ declare interface NavigationToolbarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; @@ -2462,7 +2517,8 @@ declare interface NavigationToolbarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundEffect?: BackgroundEffectOptions; @@ -2473,7 +2529,8 @@ declare interface NavigationToolbarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ moreButtonOptions?: MoreButtonOptions; @@ -2485,7 +2542,8 @@ declare interface NavigationToolbarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ barStyle?: BarStyle; @@ -2497,7 +2555,8 @@ declare interface NavigationToolbarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ hideItemValue?: boolean } @@ -2509,18 +2568,20 @@ declare interface NavigationToolbarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NavigationMenuOptions { -/** - * More button options. - * - * @type { ?MoreButtonOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 19 - */ + /** + * More button options. + * + * @type { ?MoreButtonOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ moreButtonOptions?: MoreButtonOptions; } @@ -2531,7 +2592,8 @@ declare interface NavigationMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface MoreButtonOptions { /** @@ -2541,10 +2603,11 @@ declare interface MoreButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyle?: BlurStyle; - + /** * Background blur style options. * @@ -2552,7 +2615,8 @@ declare interface MoreButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; @@ -2563,7 +2627,8 @@ declare interface MoreButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundEffect?: BackgroundEffectOptions; } @@ -2590,146 +2655,118 @@ declare interface MoreButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class NavigationAttribute extends CommonMethod { /** - * Sets the width of the navigation bar. - * This attribute takes effect only when the **Navigation** component is in split mode. + * Sets the width of navigation bar. * - * @param { Length } value - Width of the navigation bar. - *
Default value: **240**. Unit: vp. - *
**undefined**: No action is taken, and the navigation bar width remains consistent with the default value. + * @param { Length } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 */ /** - * Sets the width of the navigation bar. - * This attribute takes effect only when the **Navigation** component is in split mode. + * Sets the width of navigation bar. * - * @param { Length } value - Width of the navigation bar. - *
Default value: **240**. Unit: vp. - *
**undefined**: No action is taken, and the navigation bar width remains consistent with the default value. + * @param { Length } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Sets the width of the navigation bar. - * This attribute takes effect only when the **Navigation** component is in split mode. + * Sets the width of navigation bar. * - * @param { Length } value - Width of the navigation bar. - *
Default value: **240**. Unit: vp. - *
**undefined**: No action is taken, and the navigation bar width remains consistent with the default value. + * @param { Length } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ navBarWidth(value: Length): NavigationAttribute; /** - * Sets the position of the navigation bar. This attribute takes effect - * only when the **Navigation** component is split. + * Sets the position of navigation bar. * - * @param { NavBarPosition } value - Position of the navigation bar. - *
Default value: **NavBarPosition.Start**. + * @param { NavBarPosition } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 */ /** - * Sets the position of the navigation bar. This attribute takes effect - * only when the **Navigation** component is split. + * Sets the position of navigation bar. * - * @param { NavBarPosition } value - Position of the navigation bar. - *
Default value: **NavBarPosition.Start**. + * @param { NavBarPosition } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Sets the position of the navigation bar. This attribute takes effect - * only when the **Navigation** component is split. + * Sets the position of navigation bar. * - * @param { NavBarPosition } value - Position of the navigation bar. - *
Default value: **NavBarPosition.Start**. + * @param { NavBarPosition } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ navBarPosition(value: NavBarPosition): NavigationAttribute; /** - * Sets the minimum and maximum widths of the navigation bar (effective in split mode). + * Sets the minimum width and the maximum width of navigation bar. * - * @param { [Dimension, Dimension] } value - Minimum and maximum widths of the navigation bar. - *
Default value: 240 for the minimum value; 40% of the component width (not greater than 432) - * for the maximum value; if either of the widths is not set, the default value is used for that width. - *
Unit: vp. + * @param { [Dimension, Dimension] } value - The minimum and the maximum width of navigation bar. * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Sets the minimum and maximum widths of the navigation bar (effective in split mode). + * Sets the minimum width and the maximum width of navigation bar. * - * @param { [Dimension, Dimension] } value - Minimum and maximum widths of the navigation bar. - *
Default value: 240 for the minimum value; 40% of the component width (not greater than 432) - * for the maximum value; if either of the widths is not set, the default value is used for that width. - *
Unit: vp. + * @param { [Dimension, Dimension] } value - The minimum and the maximum width of navigation bar. * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ navBarWidthRange(value: [Dimension, Dimension]): NavigationAttribute; /** - * Sets the minimum width of the navigation bar content area (effective in split mode). + * Sets the minimum width of content. * - * @param { Dimension } value - Minimum width of the navigation bar content area. - *
Default value: **360**. - *
Unit: vp. - *
**undefined**: No action is taken, and the minimum width of the navigation bar remains - * consistent with the default value.
Breakpoint calculation in Auto mode: default 600 vp = - * minNavBarWidth (240 vp) + minContentWidth (360 vp). + * @param { Dimension } value - The minimum width of content. * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Sets the minimum width of the navigation bar content area (effective in split mode). + * Sets the minimum width of content. * - * @param { Dimension } value - Minimum width of the navigation bar content area. - *
Default value: **360**. - *
Unit: vp. - *
**undefined**: No action is taken, and the minimum width of the navigation bar remains - * consistent with the default value.
Breakpoint calculation in Auto mode: default 600 vp = - * minNavBarWidth (240 vp) + minContentWidth (360 vp). + * @param { Dimension } value - The minimum width of content. * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ minContentWidth(value: Dimension): NavigationAttribute; /** * Sets the mode of navigation. * - * @param { NavigationMode } value - Display mode of the navigation. - *
Default value: **NavigationMode.Auto**. - *
At the default settings, the navigation adapts to stack or split mode based on the component width. + * @param { NavigationMode } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 @@ -2737,9 +2774,7 @@ declare class NavigationAttribute extends CommonMethod { /** * Sets the mode of navigation. * - * @param { NavigationMode } value - Display mode of the navigation. - *
Default value: **NavigationMode.Auto**. - *
At the default settings, the navigation adapts to stack or split mode based on the component width. + * @param { NavigationMode } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -2748,38 +2783,37 @@ declare class NavigationAttribute extends CommonMethod { /** * Sets the mode of navigation. * - * @param { NavigationMode } value - Display mode of the navigation. - *
Default value: **NavigationMode.Auto**. - *
At the default settings, the navigation adapts to stack or split mode based on the component width. + * @param { NavigationMode } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ mode(value: NavigationMode): NavigationAttribute; /** - * Sets the icon of the back button in the title bar. + * Sets the back button icon. * - * @param { string | PixelMap | Resource } value - Icon of the back button in the title bar. + * @param { string | PixelMap | Resource } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 */ /** - * Sets the icon of the back button in the title bar. + * Sets the back button icon. * - * @param { string | PixelMap | Resource } value - Icon of the back button in the title bar. + * @param { string | PixelMap | Resource } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Sets the icon of the back button in the title bar. + * Sets the back button icon. * - * @param { string | PixelMap | Resource } value - Icon of the back button in the title bar. + * @param { string | PixelMap | Resource } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -2787,14 +2821,15 @@ declare class NavigationAttribute extends CommonMethod { * @since 11 */ /** - * Sets the icon of the back button in the title bar. + * Sets the back button icon. * - * @param { string | PixelMap | Resource | SymbolGlyphModifier } value - Icon of the back button in the title bar. + * @param { string | PixelMap | Resource | SymbolGlyphModifier } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backButtonIcon(value: string | PixelMap | Resource | SymbolGlyphModifier): NavigationAttribute; @@ -2807,15 +2842,15 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backButtonIcon(icon: string | PixelMap | Resource | SymbolGlyphModifier, accessibilityText?: ResourceStr): NavigationAttribute; /** * Hide the NavBar, which includes title bar, the child of Navigation and tool bar. Supported in split mode. * - * @param { boolean } value - Whether to hide the navigation bar. - *
Default value: **false**. **true**: Hide the navigation bar. **false**: Show the navigation bar. + * @param { boolean } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 @@ -2823,8 +2858,7 @@ declare class NavigationAttribute extends CommonMethod { /** * Hide the NavBar, which includes title bar, the child of Navigation and tool bar. Supported in split mode. * - * @param { boolean } value - Whether to hide the navigation bar. - *
Default value: **false**. **true**: Hide the navigation bar. **false**: Show the navigation bar. + * @param { boolean } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -2834,13 +2868,13 @@ declare class NavigationAttribute extends CommonMethod { * Hide the NavBar, which includes title bar, the child of Navigation and tool bar. Supported in all mode. * It will show top page in the NavPathStack directly or empty if there is no page in the NavPathStack. * - * @param { boolean } value - Whether to hide the navigation bar. - *
Default value: **false**. **true**: Hide the navigation bar. **false**: Show the navigation bar. + * @param { boolean } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ hideNavBar(value: boolean): NavigationAttribute; @@ -2855,11 +2889,7 @@ declare class NavigationAttribute extends CommonMethod { /** * Navigation title * - * @param { string | CustomBuilder | NavigationCommonTitle | NavigationCustomTitle } value - Navigation title. - *
When the NavigationCustomTitle type is used to set the height, titleMode does not take effect. - *
When the title string is too long: - *
If no subtitle is set, the string is scaled down, wrapped in two lines, and then clipped. - *
If a subtitle is set, the subtitle is scaled down and then clipped. + * @param { string | CustomBuilder | NavigationCommonTitle | NavigationCustomTitle } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 @@ -2867,11 +2897,7 @@ declare class NavigationAttribute extends CommonMethod { /** * Navigation title * - * @param { ResourceStr | CustomBuilder | NavigationCommonTitle | NavigationCustomTitle } value - Navigation title. - *
When the NavigationCustomTitle type is used to set the height, titleMode does not take effect. - *
When the title string is too long: - *
If no subtitle is set, the string is scaled down, wrapped in two lines, and then clipped. - *
If a subtitle is set, the subtitle is scaled down and then clipped. + * @param { ResourceStr | CustomBuilder | NavigationCommonTitle | NavigationCustomTitle } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -2880,24 +2906,21 @@ declare class NavigationAttribute extends CommonMethod { /** * Navigation title * - * @param { ResourceStr | CustomBuilder | NavigationCommonTitle | NavigationCustomTitle } value - Navigation title. - *
When the NavigationCustomTitle type is used to set the height, titleMode does not take effect. - *
When the title string is too long: - *
If no subtitle is set, the string is scaled down, wrapped in two lines, and then clipped. - *
If a subtitle is set, the subtitle is scaled down and then clipped. + * @param { ResourceStr | CustomBuilder | NavigationCommonTitle | NavigationCustomTitle } value * @param { NavigationTitleOptions } [options] - Indicates the options of titlebar. * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ title(value: ResourceStr | CustomBuilder | NavigationCommonTitle | NavigationCustomTitle, options?: NavigationTitleOptions): NavigationAttribute; /** - * Sets the subtitle of the navigation. + * Navigation subtitle * - * @param { string } value - Content of subtitle. + * @param { string } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 @@ -2909,8 +2932,7 @@ declare class NavigationAttribute extends CommonMethod { /** * Hide navigation title bar * - * @param { boolean } value - Whether to hide the title bar. - *
Default value is **false**. **true**: Hide the title bar. **false**: Show the title bar. + * @param { boolean } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 @@ -2918,8 +2940,7 @@ declare class NavigationAttribute extends CommonMethod { /** * Hide navigation title bar * - * @param { boolean } value - Whether to hide the title bar. - *
Default value is **false**. **true**: Hide the title bar. **false**: Show the title bar. + * @param { boolean } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -2928,137 +2949,117 @@ declare class NavigationAttribute extends CommonMethod { /** * Hide navigation title bar * - * @param { boolean } value - Whether to hide the title bar. - *
Default value is **false**. **true**: Hide the title bar. **false**: Show the title bar. + * @param { boolean } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ hideTitleBar(value: boolean): NavigationAttribute; /** - * Sets whether to hide the title bar and whether to animate the visibility change. + * Hide navigation title bar * - * @param { boolean } hide - Whether to hide the title bar. - *
Default value is **false**. **true**: Hide the title bar. **false**: Show the title bar. - * @param { boolean } animated - Whether to animate the visibility change. - *
Default value is **false**. - *
**true**: Animate the visibility change. **false**: Do not animate the visibility change. + * @param { boolean } hide + * @param { boolean } animated * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ hideTitleBar(hide: boolean, animated: boolean): NavigationAttribute; /** - * Sets whether to hide the back button in the title bar. - * The back button is available only when titleMode is set to **NavigationTitleMode.Mini**. + * Hide navigation back button * - * @param { boolean } value - Whether to hide the back button in the title bar. - *
Default value: **false**. **true**: Hide the back button. **false**: Show the back button. + * @param { boolean } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Sets whether to hide the back button in the title bar. - * The back button is available only when titleMode is set to **NavigationTitleMode.Mini**. + * Hide navigation back button * - * @param { boolean } value - Whether to hide the back button in the title bar. - *
Default value: **false**. **true**: Hide the back button. **false**: Show the back button. + * @param { boolean } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Sets whether to hide the back button in the title bar. - * The back button is available only when titleMode is set to **NavigationTitleMode.Mini**. + * Hide navigation back button * - * @param { boolean } value - Whether to hide the back button in the title bar. - *
Default value: **false**. **true**: Hide the back button. **false**: Show the back button. + * @param { boolean } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ hideBackButton(value: boolean): NavigationAttribute; /** - * Sets the display mode of the navigation title mode. + * Navigation title mode * - * @param { NavigationTitleMode } value - Display mode of the page title bar. - *
Default value: **NavigationTitleMode.Free** + * @param { NavigationTitleMode } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Sets the display mode of the navigation title mode. + * Navigation title mode * - * @param { NavigationTitleMode } value - Display mode of the page title bar. - *
Default value: **NavigationTitleMode.Free** + * @param { NavigationTitleMode } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Sets the display mode of the navigation title mode. + * Navigation title mode * - * @param { NavigationTitleMode } value - Display mode of the page title bar. - *
Default value: **NavigationTitleMode.Free** + * @param { NavigationTitleMode } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ titleMode(value: NavigationTitleMode): NavigationAttribute; /** - * Sets the menu items in the upper right corner of the navigation. - * If this attribute is not set, no menu item is displayed. When the value type is NavigationMenuItem, - * The menu shows a maximum of three icons in portrait mode and a maximum of five icons in landscape mode, - * With excess icons (if any) placed under the automatically generated **More** icon. + * Navigation title bar's menus * - * @param { Array | CustomBuilder } value - - *
Menu items in the upper right corner of the navigation. + * @param { Array | CustomBuilder } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Sets the menu items in the upper right corner of the navigation. - * If this attribute is not set, no menu item is displayed. When the value type is NavigationMenuItem, - * The menu shows a maximum of three icons in portrait mode and a maximum of five icons in landscape mode, - * With excess icons (if any) placed under the automatically generated **More** icon. + * Navigation title bar's menus * - * @param { Array | CustomBuilder } value - - *
Menu items in the upper right corner of the navigation. + * @param { Array | CustomBuilder } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Sets the menu items in the upper right corner of the navigation. - * If this attribute is not set, no menu item is displayed. When the value type is NavigationMenuItem, - * The menu shows a maximum of three icons in portrait mode and a maximum of five icons in landscape mode, - * With excess icons (if any) placed under the automatically generated **More** icon. + * Navigation title bar's menus * - * @param { Array | CustomBuilder } value - - *
Menu items in the upper right corner of the navigation. + * @param { Array | CustomBuilder } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ menus(value: Array | CustomBuilder): NavigationAttribute; @@ -3071,18 +3072,15 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ menus(items: Array | CustomBuilder, options?: NavigationMenuOptions): NavigationAttribute; /** - * Sets the content of the toolbar. If this attribute is not set, no toolbar is displayed. - * Toolbar items are evenly distributed on the bottom toolbar, with text and icons evenly - * spaced in each content area. If any item contains overlong text and there are fewer than - * five items, the toolbar will reduce the text size progressively, wrap the text over two - * lines if necessary, and then clip the text to fit. + * Tool bar * - * @param { object | CustomBuilder } value - Content of the toolbar. + * @param { object | CustomBuilder } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 @@ -3092,7 +3090,7 @@ declare class NavigationAttribute extends CommonMethod { toolBar(value: object | CustomBuilder): NavigationAttribute; /** - * Sets the content of the toolbar. If this attribute is not set, no toolbar is displayed. + * Configure toolbar with default style parameter or custom parameter. * * @param { Array | CustomBuilder } value - Toolbar configuration parameters. * @returns { NavigationAttribute } @@ -3101,7 +3099,7 @@ declare class NavigationAttribute extends CommonMethod { * @since 10 */ /** - * Sets the content of the toolbar. If this attribute is not set, no toolbar is displayed. + * Configure toolbar with default style parameter or custom parameter. * * @param { Array | CustomBuilder } value - Toolbar configuration parameters. * @param { NavigationToolbarOptions } [options] - Indicates the options of toolbar. @@ -3109,15 +3107,15 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + `* @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ toolbarConfiguration(value: Array | CustomBuilder, options?: NavigationToolbarOptions): NavigationAttribute; /** * Hide tool bar * - * @param { boolean } value - Whether to hide the toolbar. - *
Default value: **false**. **true**: Hide the toolbar. **false**: Show the toolbar. + * @param { boolean } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 @@ -3125,8 +3123,7 @@ declare class NavigationAttribute extends CommonMethod { /** * Hide tool bar * - * @param { boolean } value - Whether to hide the toolbar. - *
Default value: **false**. **true**: Hide the toolbar. **false**: Show the toolbar. + * @param { boolean } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -3135,29 +3132,27 @@ declare class NavigationAttribute extends CommonMethod { /** * Hide tool bar * - * @param { boolean } value - Whether to hide the toolbar. - *
Default value: **false**. **true**: Hide the toolbar. **false**: Show the toolbar. + * @param { boolean } value * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ hideToolBar(value: boolean): NavigationAttribute; /** - * Sets whether to hide the toolbar and whether to animate the visibility change. + * Hide tool bar * - * @param { boolean } hide - Whether to hide the toolbar. - *
Default value: **false**. **true**: Hide the toolbar. **false**: Show the toolbar. - * @param { boolean } animated - Whether to animate the visibility change. - *
Default value: **false**. - *
**true**: Animate the visibility change. **false**: Do not animate the visibility change. + * @param { boolean } hide + * @param { boolean } animated * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ hideToolBar(hide: boolean, animated: boolean): NavigationAttribute; @@ -3169,13 +3164,13 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableToolBarAdaptation(enable: Optional): NavigationAttribute; /** - * Triggered when titleMode is set to **NavigationTitleMode.Free** - * and the title bar mode changes as content scrolls. + * Trigger callback when title mode change finished at free mode. * * @param { (titleMode: NavigationTitleMode) => void } callback * @returns { NavigationAttribute } @@ -3183,8 +3178,7 @@ declare class NavigationAttribute extends CommonMethod { * @since 8 */ /** - * Triggered when titleMode is set to **NavigationTitleMode.Free** - * and the title bar mode changes as content scrolls. + * Trigger callback when title mode change finished at free mode. * * @param { function } callback * @returns { NavigationAttribute } @@ -3193,23 +3187,22 @@ declare class NavigationAttribute extends CommonMethod { * @since 10 */ /** - * Triggered when titleMode is set to **NavigationTitleMode.Free** - * and the title bar mode changes as content scrolls. + * Trigger callback when title mode change finished at free mode. * * @param { function } callback * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onTitleModeChange(callback: (titleMode: NavigationTitleMode) => void): NavigationAttribute; /** * Trigger callback when the visibility of navigation bar change. * - * @param { (isVisible: boolean) => void } callback - Whether the navigation bar is visible. - *
The value **true** means that the navigation bar is visible, and **false** means the opposite. + * @param { (isVisible: boolean) => void } callback * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 @@ -3217,8 +3210,7 @@ declare class NavigationAttribute extends CommonMethod { /** * Trigger callback when the visibility of navigation bar change. * - * @param { function } callback - Whether the navigation bar is visible. - *
The value **true** means that the navigation bar is visible, and **false** means the opposite. + * @param { function } callback * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -3227,26 +3219,26 @@ declare class NavigationAttribute extends CommonMethod { /** * Trigger callback when the visibility of navigation bar change. * - * @param { function } callback - Whether the navigation bar is visible. - *
The value **true** means that the navigation bar is visible, and **false** means the opposite. + * @param { function } callback * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onNavBarStateChange(callback: (isVisible: boolean) => void): NavigationAttribute; /** - * Triggered when the **Navigation** component is displayed for the first time or - * its display mode switches between Stack and Split. + * Trigger callback when navigation mode changes. * * @param { function } callback * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onNavigationModeChange(callback: (mode: NavigationMode) => void): NavigationAttribute; @@ -3275,6 +3267,19 @@ declare class NavigationAttribute extends CommonMethod { */ navDestination(builder: (name: string, param: unknown) => void): NavigationAttribute; + /** + * Set builder for user-defined NavDestination component. + * + * @param { PageMapBuilder | undefined } builder - The builder function of NavDestination component. + * @returns { NavigationAttribute } Returns the instance of the NavigationAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + navDestination(builder: PageMapBuilder | undefined): NavigationAttribute; + /** * Set custom navigation content transition animation. * @@ -3292,36 +3297,37 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ customNavContentTransition(delegate: (from: NavContentInfo, to: NavContentInfo, operation: NavigationOperation) => NavigationAnimatedTransition | undefined): NavigationAttribute; /** - * Ignores the layout safe area by allowing the component to extend into the non-safe areas of the screen. + * Set navigation content expand types and edges. * - * @param { Array } [types] - Types of non-safe areas to extend into. - *
Default value:
[LayoutSafeAreaType.SYSTEM]. - * @param { Array } [edges] - Edges for expanding the safe area. - *
Default value:
[LayoutSafeAreaEdge.TOP, LayoutSafeAreaEdge.BOTTOM]. + * @param { Array } [types] - Indicates the types of the safe area. + * @param { Array } [edges] - Indicates the edges of the safe area. * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ignoreLayoutSafeArea(types?: Array, edges?: Array): NavigationAttribute; /** - * Sets the style of the system status bar when the navbar of the **Navigation** component is displayed. + * Set the style of system bar * - * @param { Optional } style - Style of the system status bar. + * @param { Optional } style - The properties of system bar * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ systemBarStyle(style: Optional): NavigationAttribute; - + /** * Set the Navigation can be restored after the application is terminated. * To enable this attribute, a navigation id must be set. @@ -3329,7 +3335,8 @@ declare class NavigationAttribute extends CommonMethod { * @param { boolean } recoverable - navigation can be recovered. * @returns { NavigationAttribute } Returns the instance of the NavigationAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ recoverable(recoverable: Optional): NavigationAttribute; @@ -3341,10 +3348,11 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enableDragBar(isEnabled: Optional): NavigationAttribute; - + /** * whether to enable modeChangeAnimation * @@ -3353,7 +3361,8 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ enableModeChangeAnimation(isEnabled: Optional): NavigationAttribute; @@ -3385,7 +3394,8 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice -* @since 12 +* @since arkts {'1.1':'12','1.2':'20'} +* @arkts 1.1&1.2 */ declare interface NavigationAnimatedTransition { /** @@ -3403,7 +3413,8 @@ declare interface NavigationAnimatedTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onTransitionEnd?: (success: boolean) => void @@ -3422,7 +3433,8 @@ declare interface NavigationAnimatedTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ timeout?: number; @@ -3434,7 +3446,8 @@ declare interface NavigationAnimatedTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isInteractive?: boolean; @@ -3453,7 +3466,8 @@ declare interface NavigationAnimatedTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ transition: (transitionProxy: NavigationTransitionProxy) => void } @@ -3473,7 +3487,8 @@ declare interface NavigationAnimatedTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 +* @since arkts {'1.1':'12','1.2':'20'} +* @arkts 1.1&1.2 */ declare interface NavigationTransitionProxy { /** @@ -3491,7 +3506,8 @@ declare interface NavigationTransitionProxy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ from: NavContentInfo; @@ -3510,7 +3526,8 @@ declare interface NavigationTransitionProxy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ to: NavContentInfo; @@ -3522,7 +3539,8 @@ declare interface NavigationTransitionProxy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isInteractive?: boolean; @@ -3539,14 +3557,13 @@ declare interface NavigationTransitionProxy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ finishTransition(): void; /** - * Cancels this interactive transition animation, restoring the navigation - * stack to its state before page redirection. (Non-interactive transition - * animations cannot be canceled.) + * Notification system transition animation canceled. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -3556,8 +3573,19 @@ declare interface NavigationTransitionProxy { cancelTransition?(): void; /** - * Updates the progress of this interactive transition animation. (Non-interactive - * animations do not support setting the animation progress). + * Notification system transition animation canceled. + * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + cancelTransition?: VoidCallback; + + /** + * Notification system transition animation update. * * @param { number } progress - The progress of transition animation. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -3566,8 +3594,33 @@ declare interface NavigationTransitionProxy { * @since 12 */ updateTransition?(progress: number): void; + + /** + * Notification system transition animation update. + * + * @type { ?UpdateTransitionCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + updateTransition?: UpdateTransitionCallback; } +/** + * navigation update transition callback. + * + * @typedef { function } UpdateTransitionCallback + * @param { number } progress - Indicates the process of transition + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type UpdateTransitionCallback = (progress: number) => void; + /** * Navigation content info. * @@ -3583,7 +3636,8 @@ declare interface NavigationTransitionProxy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NavContentInfo { /** @@ -3601,7 +3655,8 @@ declare interface NavContentInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ name?: string; @@ -3620,7 +3675,8 @@ declare interface NavContentInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ index: number; @@ -3639,7 +3695,8 @@ declare interface NavContentInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ mode?: NavDestinationMode; @@ -3650,7 +3707,8 @@ declare interface NavContentInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ param?: Object; @@ -3661,7 +3719,8 @@ declare interface NavContentInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ navDestinationId?: string; } diff --git a/api/@internal/component/ets/node_container.d.ts b/api/@internal/component/ets/node_container.d.ts index 074ad34b57e164e1dc2971b4b2283886be3a61d0..85dde515625b7cba65a8ee30830df501c9d15737 100644 --- a/api/@internal/component/ets/node_container.d.ts +++ b/api/@internal/component/ets/node_container.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { NodeController } from '../../@ohos.arkui.node'; +import { CommonMethod } from './common'; +/*** endif */ + /** * Defines the Interface of NodeContainer. To display the node build by an associated NodeController. * @@ -33,7 +38,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface NodeContainerInterface { /** @@ -56,6 +62,18 @@ interface NodeContainerInterface { * @since 12 */ (controller: import('../api/@ohos.arkui.node').NodeController): NodeContainerAttribute; + /** + * Constructor parameters + * + * @param { NodeController } controller - Indicates the controller of the NodeContainer. + * @returns { NodeContainerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + (controller: NodeController): NodeContainerAttribute; } /** @@ -71,7 +89,8 @@ interface NodeContainerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class NodeContainerAttribute extends CommonMethod {} diff --git a/api/@internal/component/ets/page_transition.d.ts b/api/@internal/component/ets/page_transition.d.ts index 1ee6c15fac5035805d5b306b9d36fde7df14bbf9..bb0bf750182f8f362954c843b372dbd8651a995d 100644 --- a/api/@internal/component/ets/page_transition.d.ts +++ b/api/@internal/component/ets/page_transition.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ICurve, TranslateOptions, ScaleOptions } from './common' +import { Curve } from './enums' +/*** endif */ + /** * Declare the jump method. * @@ -40,7 +45,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 RouteType { /** @@ -62,7 +68,8 @@ declare enum RouteType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, @@ -85,7 +92,8 @@ declare enum RouteType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Push, @@ -108,7 +116,8 @@ declare enum RouteType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Pop, } @@ -135,7 +144,8 @@ declare enum RouteType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SlideEffect { /** @@ -157,7 +167,8 @@ declare enum SlideEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Left, @@ -180,7 +191,8 @@ declare enum SlideEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Right, @@ -203,7 +215,8 @@ declare enum SlideEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Top, @@ -226,7 +239,8 @@ declare enum SlideEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Bottom, @@ -236,7 +250,8 @@ declare enum SlideEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ START = 5, @@ -246,7 +261,8 @@ declare enum SlideEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ END = 6, } @@ -361,7 +377,7 @@ declare class CommonTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since 14 */ translate(value: TranslateOptions): T; @@ -401,7 +417,7 @@ declare class CommonTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since 14 */ scale(value: ScaleOptions): T; @@ -435,6 +451,69 @@ declare class CommonTransition { opacity(value: number): T; } +/** + * Provides interfaces for common transitions. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare class CommonTransition { + /** + * Called when the slide in effect of the transition is set. + * + * @param { SlideEffect } value + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + slide(value: SlideEffect): this; + + /** + * Called when the translation effect of page transition is set. + * + * @param { TranslateOptions } value + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + translate(value: TranslateOptions): this; + + /** + * Called when setting the zoom effect of page transition. + * + * @param { ScaleOptions } value + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + scale(value: ScaleOptions): this; + + /** + * Called when the transparency value of the starting point of entry or the ending point of exit is set. + * + * @param { number } value + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + opacity(value: number): this; +} + /** * Defines pageTransition constructor parameters. * @@ -457,7 +536,8 @@ declare class CommonTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PageTransitionOptions { /** @@ -479,7 +559,8 @@ declare interface PageTransitionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ type?: RouteType; /** @@ -501,7 +582,8 @@ declare interface PageTransitionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ duration?: number; /** @@ -526,7 +608,8 @@ declare interface PageTransitionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ curve?: Curve | string | ICurve; /** @@ -551,7 +634,8 @@ declare interface PageTransitionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ delay?: number; } @@ -565,7 +649,8 @@ declare interface PageTransitionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare type PageTransitionCallback = (type: RouteType, progress: number) => void; @@ -665,11 +750,53 @@ interface PageTransitionEnterInterface extends CommonTransition = [T1, T2]; @@ -36,7 +44,8 @@ declare type ParticleTuple = [T1, T2]; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface VelocityOptions { /** @@ -56,13 +65,14 @@ declare interface VelocityOptions { */ /** * Particle speed. - * + * * Anonymous Object Rectification. * @type { ParticleTuple } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ speed: ParticleTuple; @@ -83,13 +93,14 @@ declare interface VelocityOptions { */ /** * Angle of particle's direction. - * + * * Anonymous Object Rectification. * @type { ParticleTuple } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ angle: ParticleTuple; } @@ -124,7 +135,7 @@ declare interface AccelerationOptions< */ /** * Speed property options. - * + * * Anonymous Object Rectification. * @type { ?ParticlePropertyOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -151,7 +162,7 @@ declare interface AccelerationOptions< */ /** * Angle property options. - * + * * Anonymous Object Rectification. * @type { ?ParticlePropertyOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -162,6 +173,42 @@ declare interface AccelerationOptions< angle?: ParticlePropertyOptions; } +/** + * Defines acceleration options. + * + * @interface AccelerationOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare interface AccelerationOptions { + /** + * Speed property options. + * + * @type { ?ParticlePropertyOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + speed?: ParticlePropertyOptions; + + /** + * Angle property options. + * + * @type { ?ParticlePropertyOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + angle?: ParticlePropertyOptions; +} + /** * Defines the ParticleOptions Interface. * @interface ParticleOptions @@ -279,7 +326,7 @@ interface ParticleOptions< */ /** * Particle velocity. - * + * * Anonymous Object Rectification. * @type { ?VelocityOptions } * @default {speed:[0,0];angle:[0,0]} @@ -309,7 +356,7 @@ interface ParticleOptions< */ /** * Particle acceleration. - * + * * Anonymous Object Rectification. * @type { ?AccelerationOptions } * @default {speed:{range:[0,0]};angle:{range:[0,0]}} @@ -340,6 +387,102 @@ interface ParticleOptions< spin?: ParticlePropertyOptions; } +/** + * Defines the ParticleOptions Interface. + * @interface ParticleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface ParticleOptions { + /** + * Particle emitter. + * @type { EmitterOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + emitter: EmitterOptions; + + /** + * Particle color. + * @type { ?ParticleColorPropertyOptions } + * @default {range:['#FFFFFF','#FFFFFF']} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + color?: ParticleColorPropertyOptions; + + /** + * Particle opacity. + * @type { ?ParticlePropertyOptions } + * @default {range:[1.0,1.0]} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + opacity?: ParticlePropertyOptions; + + /** + * Particle scale. + * @type { ?ParticlePropertyOptions } + * @default {range:[1.0,1.0]} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + scale?: ParticlePropertyOptions; + + /** + * Particle velocity. + * + * @type { ?VelocityOptions } + * @default {speed:[0,0];angle:[0,0]} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + velocity?: VelocityOptions; + + /** + * Particle acceleration. + * + * @type { ?AccelerationOptions } + * @default {speed:{range:[0,0]};angle:{range:[0,0]}} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + acceleration?: AccelerationOptions; + + /** + * Particle spin. + * @type { ?ParticlePropertyOptions } + * @default {range:[0,0]} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + spin?: ParticlePropertyOptions; +} + /** * Defines the parameters for a point-like particle. * @interface PointParticleParameters @@ -353,7 +496,8 @@ interface ParticleOptions< * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface PointParticleParameters { /** @@ -369,7 +513,8 @@ interface PointParticleParameters { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ radius: VP; } @@ -387,7 +532,8 @@ interface PointParticleParameters { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ImageParticleParameters { /** @@ -403,7 +549,8 @@ interface ImageParticleParameters { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ src: ResourceStr; @@ -424,13 +571,14 @@ interface ImageParticleParameters { */ /** * Particle image size. - * + * * Anonymous Object Rectification. * @type { ParticleTuple } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ size: ParticleTuple; @@ -449,7 +597,8 @@ interface ImageParticleParameters { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ objectFit?: ImageFit; } @@ -505,6 +654,17 @@ interface ParticleConfigs { [ParticleType.IMAGE]: ImageParticleParameters; } +/** + * Defines the particle configs. + * @typedef {PointParticleParameters | ImageParticleParameters} ParticleConfigs + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type ParticleConfigs = PointParticleParameters | ImageParticleParameters; + /** * Defines the emitter property. * @@ -512,7 +672,8 @@ interface ParticleConfigs { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface EmitterProperty { @@ -523,7 +684,8 @@ interface EmitterProperty { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ index: number; @@ -534,7 +696,8 @@ interface EmitterProperty { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ emitRate?: number; @@ -545,7 +708,8 @@ interface EmitterProperty { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ position?: PositionT; @@ -556,7 +720,8 @@ interface EmitterProperty { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ size?: SizeT; @@ -568,8 +733,9 @@ interface EmitterProperty { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ - annulusRegion?: ParticleAnnulusRegion; + annulusRegion?: ParticleAnnulusRegion; } /** @@ -599,7 +765,7 @@ interface EmitterParticleOptions { */ /** * Particle type. - * + * * Anonymous Object Rectification. * @type { PARTICLE } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -625,7 +791,7 @@ interface EmitterParticleOptions { */ /** * Particle config. - * + * * Anonymous Object Rectification. * @type { ParticleConfigs[PARTICLE] } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -652,7 +818,7 @@ interface EmitterParticleOptions { */ /** * Particle count. - * + * * Anonymous Object Rectification. * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -681,7 +847,7 @@ interface EmitterParticleOptions { */ /** * Particle lifetime. - * + * * Anonymous Object Rectification. * @type { ?number } * @default 1000 @@ -705,7 +871,7 @@ interface EmitterParticleOptions { /** * Particle lifetimeRange,value range [0, ∞). * when lifetimeRange>lifetime,minimum lifetime is 0. - * + * * Anonymous Object Rectification. * @type { ?number } * @default 0 @@ -717,6 +883,81 @@ interface EmitterParticleOptions { lifetimeRange?: number; } +/** + * Defines parameters of particles used by emitters. + * + * @interface EmitterParticleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface EmitterParticleOptions { + /** + * Particle type. + * + * @type { ParticleType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type: ParticleType; + + /** + * Particle config. + * + * @type { ParticleConfigs } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + config: ParticleConfigs; + + /** + * Particle count. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + count: number; + + /** + * Particle lifetime. + * + * @type { ?number } + * @default 1000 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + lifetime?: number; + + /** + * Particle lifetimeRange,value range [0, ∞). + * when lifetimeRange>lifetime,minimum lifetime is 0. + * + * @type { ?number } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + lifetimeRange?: number; +} + /** * Defines the emitter Options. * @interface EmitterOptions @@ -750,7 +991,7 @@ interface EmitterOptions { */ /** * Set particle config. - * + * * Anonymous Object Rectification. * @type { EmitterParticleOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -823,7 +1064,7 @@ interface EmitterOptions { * Position of emitter. * The first element means X-axis location. * The second element means the Y-axis location. - * + * * Anonymous Object Rectification. * @type { ?ParticleTuple } * @default [0,0] @@ -845,28 +1086,117 @@ interface EmitterOptions { * @since 10 */ /** - * Size of emitter. - * The first element means emitter width. - * The second element means emitter height. - * @type { ?[Dimension, Dimension] } - * @default ['100%','100%'] + * Size of emitter. + * The first element means emitter width. + * The second element means emitter height. + * @type { ?[Dimension, Dimension] } + * @default ['100%','100%'] + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + /** + * Size of emitter. + * The first element means emitter width. + * The second element means emitter height. + * + * Anonymous Object Rectification. + * @type { ?ParticleTuple } + * @default ['100%','100%'] + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + size?: ParticleTuple; + + /** + * the description of the annulus region. This parameter is valid only for emitter whose shape is annulus. + * + * @type { ?ParticleAnnulusRegion } + * @default {innerRadius:LengthMetrics.vp(0),outerRadius:LengthMetrics.vp(0)} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + annulusRegion?: ParticleAnnulusRegion; +} + +/** + * Defines the emitter Options. + * @interface EmitterOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface EmitterOptions { + /** + * Set particle config. + * + * @type { EmitterParticleOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + particle: EmitterParticleOptions; + + /** + * Emitting rate, that is, the number of particles produced per second. + * @type { ?number } + * @default 5 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + emitRate?: number; + + /** + * Shape of emitter. + * @type { ?ParticleEmitterShape } + * @default ParticleEmitterShape.RECTANGLE + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + shape?: ParticleEmitterShape; + + /** + * Position of emitter. + * The first element means X-axis location. + * The second element means the Y-axis location. + * + * @type { ?ParticleTuple } + * @default [0,0] * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since 20 + * @arkts 1.2 */ + position?: ParticleTuple; + /** * Size of emitter. * The first element means emitter width. * The second element means emitter height. - * - * Anonymous Object Rectification. + * * @type { ?ParticleTuple } * @default ['100%','100%'] * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since 20 + * @arkts 1.2 */ size?: ParticleTuple; @@ -879,6 +1209,7 @@ interface EmitterOptions { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.2 */ annulusRegion?: ParticleAnnulusRegion; } @@ -935,7 +1266,7 @@ interface ParticlePropertyUpdaterConfigs { */ /** * Random effect of particle updater. - * + * * Anonymous Object Rectification. * @type { ParticleTuple } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -963,6 +1294,17 @@ interface ParticlePropertyUpdaterConfigs { [ParticleUpdater.CURVE]: Array>; } +/** + * Defines the particle property updater configs. + * @typedef { undefined | ParticleTuple | Array> } ParticlePropertyUpdaterConfigs + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type ParticlePropertyUpdaterConfigs = undefined | ParticleTuple | Array>; + /** * Defines the particle updater options. * @@ -990,7 +1332,7 @@ interface ParticleUpdaterOptions { */ /** * Particle updater type. - * + * * Anonymous Object Rectification. * @type { UPDATER } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1017,7 +1359,7 @@ interface ParticleUpdaterOptions { */ /** * Particle updater configuration. - * + * * Anonymous Object Rectification. * @type { ParticlePropertyUpdaterConfigs[UPDATER] } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1028,6 +1370,42 @@ interface ParticleUpdaterOptions { config: ParticlePropertyUpdaterConfigs[UPDATER]; } +/** + * Defines the particle updater options. + * + * @typedef ParticleUpdaterOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface ParticleUpdaterOptions { + /** + * Particle updater type. + * + * @type { ParticleUpdater } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type: ParticleUpdater; + + /** + * Particle updater configuration. + * + * @type { ParticlePropertyUpdaterConfigs } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + config: ParticlePropertyUpdaterConfigs; +} + /** * Defines the particle color options. * @@ -1035,7 +1413,8 @@ interface ParticleUpdaterOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface ParticleColorOptions { /** @@ -1055,13 +1434,14 @@ interface ParticleColorOptions { */ /** * Red component of particle color. - * + * * Anonymous Object Rectification. * @type { ParticleTuple } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ r: ParticleTuple; @@ -1082,13 +1462,14 @@ interface ParticleColorOptions { */ /** * Green component of particle color. - * + * * Anonymous Object Rectification. * @type { ParticleTuple } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ g: ParticleTuple; @@ -1109,13 +1490,14 @@ interface ParticleColorOptions { */ /** * Blue component of particle color. - * + * * Anonymous Object Rectification. * @type { ParticleTuple } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ b: ParticleTuple; @@ -1136,13 +1518,14 @@ interface ParticleColorOptions { */ /** * Opacity component of particle color. - * + * * Anonymous Object Rectification. * @type { ParticleTuple } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ a: ParticleTuple; } @@ -1174,7 +1557,7 @@ interface ParticleColorUpdaterOptions { */ /** * Color updater. - * + * * Anonymous Object Rectification. * @type { UPDATER } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1201,7 +1584,7 @@ interface ParticleColorUpdaterOptions { */ /** * Color updater configuration. - * + * * Anonymous Object Rectification. * @type { ParticleColorPropertyUpdaterConfigs[UPDATER] } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1212,6 +1595,42 @@ interface ParticleColorUpdaterOptions { config: ParticleColorPropertyUpdaterConfigs[UPDATER]; } +/** + * Defines the particle color updater options. + * + * @interface ParticleColorUpdaterOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface ParticleColorUpdaterOptions { + /** + * Color updater. + * + * @type { ParticleUpdater } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type: ParticleUpdater; + + /** + * Color updater configuration. + * + * @type { ParticleColorPropertyUpdaterConfigs } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + config: ParticleColorPropertyUpdaterConfigs; +} + /** * Defines the particle property Options. * @interface ParticlePropertyOptions @@ -1245,7 +1664,7 @@ interface ParticlePropertyOptions { */ /** * Initial range, within which the initial value are randomly generated. - * + * * Anonymous Object Rectification. * @type { ParticleTuple } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1274,7 +1693,7 @@ interface ParticlePropertyOptions { */ /** * Particle property updater. - * + * * Anonymous Object Rectification. * @type { ?ParticleUpdaterOptions } * @default {type:UPDATER.NONE;config:ParticlePropertyUpdaterConfigs[UPDATER.NONE]} @@ -1286,6 +1705,42 @@ interface ParticlePropertyOptions { updater?: ParticleUpdaterOptions; } +/** + * Defines the particle property Options. + * @interface ParticlePropertyOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface ParticlePropertyOptions { + /** + * Initial range, within which the initial value are randomly generated. + * + * @type { ParticleTuple } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + range: ParticleTuple; + + /** + * Particle property updater. + * + * @type { ?ParticleUpdaterOptions } + * @default {type:UPDATER.NONE;config:undefined} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + updater?: ParticleUpdaterOptions; +} + /** * Defines the particle color property updater configs. * @interface ParticleColorPropertyUpdaterConfigs @@ -1338,7 +1793,7 @@ interface ParticleColorPropertyUpdaterConfigs { */ /** * Random effect of particle color property updater. - * + * * Anonymous Object Rectification. * @type { ParticleColorOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1368,6 +1823,17 @@ interface ParticleColorPropertyUpdaterConfigs { [ParticleUpdater.CURVE]: Array>; } +/** + * Defines the particle color property updater configs. + * @typedef {undefined | ParticleColorOptions | Array>} ParticleColorPropertyUpdaterConfigs + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type ParticleColorPropertyUpdaterConfigs = undefined | ParticleColorOptions | Array>; + /** * Defines the particle color property updater configs which can support generics. * @interface ParticleColorPropertyOptions @@ -1401,7 +1867,7 @@ interface ParticleColorPropertyOptions { */ /** * Initial color range, within which the initial color is randomly generated. - * + * * Anonymous Object Rectification. * @type { ParticleTuple } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1441,7 +1907,7 @@ interface ParticleColorPropertyOptions { */ /** * Particle color property updater. - * + * * Anonymous Object Rectification. * @type { ?ParticleColorUpdaterOptions } * @default {type:UPDATER.NONE;config:ParticleColorPropertyUpdaterConfigs[UPDATER.NONE]} @@ -1453,6 +1919,54 @@ interface ParticleColorPropertyOptions { updater?: ParticleColorUpdaterOptions; } +/** + * Defines the particle color property updater. + * @interface ParticleColorPropertyOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface ParticleColorPropertyOptions { + /** + * Initial color range, within which the initial color is randomly generated. + * + * @type { ParticleTuple } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + range: ParticleTuple; + + /** + * Distribution type of particle color. + * @type { ?DistributionType } + * @default DistributionType.UNIFORM + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + distributionType?: DistributionType; + + /** + * Particle color property updater. + * + * @type { ?ParticleColorUpdaterOptions } + * @default {type:UPDATER.NONE;config:undefined} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + updater?: ParticleColorUpdaterOptions; +} + /** * Defines the particle property lifecycle. * @interface ParticlePropertyAnimation @@ -1466,7 +1980,8 @@ interface ParticleColorPropertyOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ParticlePropertyAnimation { /** @@ -1482,7 +1997,8 @@ interface ParticlePropertyAnimation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ from: T; @@ -1499,7 +2015,8 @@ interface ParticlePropertyAnimation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ to: T; @@ -1516,7 +2033,8 @@ interface ParticlePropertyAnimation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ startMillis: number; @@ -1533,7 +2051,8 @@ interface ParticlePropertyAnimation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ endMillis: number; @@ -1552,7 +2071,8 @@ interface ParticlePropertyAnimation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ curve?: Curve | ICurve; } @@ -1592,7 +2112,7 @@ interface Particles< */ /** * Array of particles. - * + * * Anonymous Object Rectification. * @type { Array> } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1613,6 +2133,30 @@ interface Particles< >; } +/** + * Defines the Particles interface. + * + * @interface Particles + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface Particles { + /** + * Array of particles. + * + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + particles: Array; +} + /** * Defines the particle Interface. * @interface ParticleInterface @@ -1650,7 +2194,7 @@ interface ParticleInterface { */ /** * create a particle array. - * + * * Anonymous Object Rectification. * @param { Particles } particles - Array of particles. @@ -1679,6 +2223,23 @@ interface ParticleInterface { >): ParticleAttribute; } +/** + * Defines Particle Component. + * + * @param { Particles } particles - Particle infomation. + * @returns { ParticleAttribute } Returns the particle attribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +//@memo +//@ComponentBuilder +export declare function Particle( + particles: Particles +): ParticleAttribute; + /** * Enumerates the particle types. * @enum { string } @@ -1692,7 +2253,8 @@ interface ParticleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ParticleType { /** @@ -1706,7 +2268,8 @@ declare enum ParticleType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ POINT = 'point', @@ -1721,7 +2284,8 @@ declare enum ParticleType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE = 'image', } @@ -1739,7 +2303,8 @@ declare enum ParticleType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ParticleEmitterShape { /** @@ -1753,7 +2318,8 @@ declare enum ParticleEmitterShape { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RECTANGLE = 'rectangle', @@ -1768,7 +2334,8 @@ declare enum ParticleEmitterShape { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CIRCLE = 'circle', @@ -1783,7 +2350,8 @@ declare enum ParticleEmitterShape { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ELLIPSE = 'ellipse', @@ -1793,8 +2361,9 @@ declare enum ParticleEmitterShape { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ - ANNULUS = 'annulus', + ANNULUS = 'annulus', } /** @@ -1804,7 +2373,8 @@ declare enum ParticleEmitterShape { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum DistributionType { /** @@ -1813,7 +2383,8 @@ declare enum DistributionType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ UNIFORM = 0, @@ -1823,7 +2394,8 @@ declare enum DistributionType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GAUSSIAN = 1, } @@ -1841,7 +2413,8 @@ declare enum DistributionType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ParticleUpdater { /** @@ -1855,7 +2428,8 @@ declare enum ParticleUpdater { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 'none', @@ -1870,7 +2444,8 @@ declare enum ParticleUpdater { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RANDOM = 'random', @@ -1885,7 +2460,8 @@ declare enum ParticleUpdater { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CURVE = 'curve', } @@ -1925,7 +2501,8 @@ declare type PositionT = import('../api/arkui/Graphics').PositionT; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ParticleAttribute extends CommonMethod { /** @@ -1936,7 +2513,8 @@ declare class ParticleAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ disturbanceFields(fields: Array): ParticleAttribute; @@ -1948,9 +2526,10 @@ declare class ParticleAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - emitter(value : Array) : ParticleAttribute; + emitter(value: Array): ParticleAttribute; } /** @@ -1974,7 +2553,8 @@ declare const Particle: ParticleInterface; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DisturbanceFieldOptions { @@ -1988,7 +2568,8 @@ declare interface DisturbanceFieldOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ strength?: number; @@ -2000,7 +2581,8 @@ declare interface DisturbanceFieldOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shape?: DisturbanceFieldShape; @@ -2012,7 +2594,8 @@ declare interface DisturbanceFieldOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ size?: SizeT; @@ -2024,7 +2607,8 @@ declare interface DisturbanceFieldOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ position?: PositionT; @@ -2040,7 +2624,8 @@ declare interface DisturbanceFieldOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ feather?: number; @@ -2052,7 +2637,8 @@ declare interface DisturbanceFieldOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ noiseScale?: number; @@ -2064,7 +2650,8 @@ declare interface DisturbanceFieldOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ noiseFrequency?: number; @@ -2076,7 +2663,8 @@ declare interface DisturbanceFieldOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ noiseAmplitude?: number; } @@ -2088,7 +2676,8 @@ declare interface DisturbanceFieldOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum DisturbanceFieldShape { @@ -2098,19 +2687,21 @@ declare enum DisturbanceFieldShape { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - RECT, + RECT = 0, - /** + /** * Shape circle. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - CIRCLE, + CIRCLE = 1, /** * Shape eclipse. @@ -2118,19 +2709,22 @@ declare enum DisturbanceFieldShape { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - ELLIPSE + ELLIPSE = 2 } /** * Defines particle annuslus region params. + * * @interface ParticleAnnulusRegion * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ declare interface ParticleAnnulusRegion { /** @@ -2142,6 +2736,7 @@ declare interface ParticleAnnulusRegion { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ center?: PositionT, /** @@ -2152,6 +2747,7 @@ declare interface ParticleAnnulusRegion { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ outerRadius: LengthMetrics, /** @@ -2162,6 +2758,7 @@ declare interface ParticleAnnulusRegion { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ innerRadius: LengthMetrics, /** @@ -2173,6 +2770,7 @@ declare interface ParticleAnnulusRegion { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ startAngle?: number, /** @@ -2184,6 +2782,7 @@ declare interface ParticleAnnulusRegion { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ endAngle?: number, } diff --git a/api/@internal/component/ets/paste_button.d.ts b/api/@internal/component/ets/paste_button.d.ts index e50c0fdb650d2ab8075e17871ad62fac4f84cb57..3eba6bab905fb71b471a5bcf8729eabb339cfb36 100644 --- a/api/@internal/component/ets/paste_button.d.ts +++ b/api/@internal/component/ets/paste_button.d.ts @@ -18,20 +18,28 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ButtonType } from './button'; +import { ClickEvent } from './common'; +import { SecurityComponentMethod } from './securityComponent'; +import { BusinessError } from '../../@ohos.base' +/*** endif */ + /** * Enumerates the icon styles. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** * Enumerates the icon styles. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum PasteIconStyle { /** @@ -45,7 +53,8 @@ declare enum PasteIconStyle { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ LINES = 0 } @@ -53,17 +62,18 @@ declare enum PasteIconStyle { /** * Enumerates the text that can be displayed on the paste button. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** * Enumerates the text that can be displayed on the paste button. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum PasteDescription { /** @@ -77,7 +87,8 @@ declare enum PasteDescription { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ PASTE = 0 } @@ -95,7 +106,8 @@ declare enum PasteDescription { * @interface PasteButtonOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PasteButtonOptions { /** @@ -111,7 +123,8 @@ declare interface PasteButtonOptions { * @type { ?PasteIconStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ icon?: PasteIconStyle; @@ -128,7 +141,8 @@ declare interface PasteButtonOptions { * @type { ?PasteDescription } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ text?: PasteDescription; @@ -145,7 +159,8 @@ declare interface PasteButtonOptions { * @type { ?ButtonType } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ buttonType?: ButtonType; } @@ -153,17 +168,18 @@ declare interface PasteButtonOptions { /** * Enumerates the click event results of the paste button. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** * Enumerates the click event results of the paste button. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum PasteButtonOnClickResult { /** @@ -177,7 +193,8 @@ declare enum PasteButtonOnClickResult { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ SUCCESS = 0, @@ -192,7 +209,8 @@ declare enum PasteButtonOnClickResult { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ TEMPORARY_AUTHORIZATION_FAILED = 1 } @@ -210,7 +228,8 @@ declare enum PasteButtonOnClickResult { * @interface PasteButtonInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface PasteButtonInterface { /** @@ -226,7 +245,8 @@ interface PasteButtonInterface { * @returns { PasteButtonAttribute } Returns the attribute of the paste button. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ (): PasteButtonAttribute; @@ -247,11 +267,14 @@ interface PasteButtonInterface { * @returns { PasteButtonAttribute } Returns the attribute of the paste button. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ (options: PasteButtonOptions): PasteButtonAttribute; } + + /** * Callback function when the paste button is clicked. * @@ -261,7 +284,8 @@ interface PasteButtonInterface { * @param { BusinessError } [error] - The error code and message of click event. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ type PasteButtonCallback = (event: ClickEvent, result: PasteButtonOnClickResult, error?: BusinessError) => void; @@ -278,7 +302,8 @@ type PasteButtonCallback = (event: ClickEvent, result: PasteButtonOnClickResult, * @extends SecurityComponentMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class PasteButtonAttribute extends SecurityComponentMethod { /** @@ -305,7 +330,8 @@ declare class PasteButtonAttribute extends SecurityComponentMethod { /** @@ -409,8 +418,9 @@ declare class PathAttribute extends CommonShapeMethod { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ - commands(value: ResourceStr): PathAttribute; + commands(value: string): PathAttribute; } /** @@ -476,3 +486,30 @@ declare const Path: PathInterface; * @since 11 */ declare const PathInstance: PathAttribute; + +/** + * Provides the path drawing interface. + * + * @interface PathInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface PathInterface { + /** + * Called when drawing path. + * + * @param { PathOptions } [options] - path options + * @returns { PathAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + (options?: PathOptions): PathAttribute; +} \ No newline at end of file diff --git a/api/@internal/component/ets/pattern_lock.d.ts b/api/@internal/component/ets/pattern_lock.d.ts index 5abde1178a519bb625045f790d2380bebb58d81c..688f4687b6706768d41ded084ffa6e9c96e20f8e 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,9 +127,10 @@ 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; + 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 { /** @@ -155,12 +170,13 @@ declare class PatternLockController { * @since 10 */ /** - * A constructor used to create a PatternLockController instance. + * constructor. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -178,7 +194,7 @@ declare class PatternLockController { * @since 10 */ /** - * Resets the component status. + * Reset pattern lock. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -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. @@ -195,12 +221,13 @@ declare class PatternLockController { * @since 11 */ /** - * Sets the authentication challenge result for the pattern password. - * @param { PatternLockChallengeResult } result - Authentication challenge result of the pattern password. + * Set challenge result. + * @param { PatternLockChallengeResult } result - The challenge result based on input pattern. * @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,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 */ interface PatternLockInterface { /** @@ -255,7 +283,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 +311,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 */ declare class PatternLockAttribute extends CommonMethod { /** @@ -303,18 +333,15 @@ declare class PatternLockAttribute extends CommonMethod { * @since 10 */ /** - * 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. - *

+ * The square side length of pattern lock component. * - * @param { Length } value - Width and height of the component, Default value is 288vp. + * @param { Length } value * @returns { PatternLockAttribute } * @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; @@ -336,18 +363,15 @@ declare class PatternLockAttribute extends CommonMethod { * @since 10 */ /** - * 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. - *

+ * Circle radius. * - * @param { Length } value - Radius of the dots in a grid, Default value is 6vp. + * @param { Length } value * @returns { PatternLockAttribute } * @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; @@ -369,14 +393,15 @@ declare class PatternLockAttribute extends CommonMethod { * @since 10 */ /** - * Sets the background color. + * The background color. * - * @param { ResourceColor } value - Background color. + * @param { ResourceColor } value * @returns { PatternLockAttribute } * @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; @@ -398,14 +423,15 @@ declare class PatternLockAttribute extends CommonMethod { * @since 10 */ /** - * Sets the fill color of the grid dot in the unselected state. + * Regular color. * - * @param { ResourceColor } value - Fill color of the grid dot in the unselected state, Default value is '#ff182431'. + * @param { ResourceColor } value * @returns { PatternLockAttribute } * @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; @@ -427,14 +453,15 @@ declare class PatternLockAttribute extends CommonMethod { * @since 10 */ /** - * Sets the fill color of the grid dot in the selected state. + * The color when cell is selected. * - * @param { ResourceColor } value - Fill color of the grid dot in the selected state, Default value is '#ff182431'. + * @param { ResourceColor } value * @returns { PatternLockAttribute } * @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; @@ -456,14 +483,15 @@ declare class PatternLockAttribute extends CommonMethod { * @since 10 */ /** - * Sets the fill color of the grid dot in the activated state, which is when the dot is highlighted but not selected. + * The color when cell is active state. * - * @param { ResourceColor } value - Fill color of the grid dot in the activated state, Default value is '#ff182431'. + * @param { ResourceColor } value * @returns { PatternLockAttribute } * @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; @@ -485,14 +513,15 @@ declare class PatternLockAttribute extends CommonMethod { * @since 10 */ /** - * Sets the path color. + * The path line color. * - * @param { ResourceColor } value - Path color, Default value is '#33182431'. + * @param { ResourceColor } value * @returns { PatternLockAttribute } * @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; @@ -514,18 +543,15 @@ declare class PatternLockAttribute extends CommonMethod { * @since 10 */ /** - * 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. - *

+ * The path line stroke width. * - * @param { number | string } value - Width of the path stroke, Default value is 12vp. + * @param { number | string } value * @returns { PatternLockAttribute } * @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; @@ -547,14 +573,15 @@ declare class PatternLockAttribute extends CommonMethod { * @since 10 */ /** - * Invoked when the pattern password input is complete. + * Called when the pattern input completed. * * @param { function } callback * @returns { PatternLockAttribute } * @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; @@ -576,16 +603,15 @@ declare class PatternLockAttribute extends CommonMethod { * @since 10 */ /** - * 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. + * Called when judging whether the input state can be reset by touch pattern lock. * - * @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. + * @param { boolean } value * @returns { PatternLockAttribute } * @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; @@ -598,8 +624,7 @@ declare class PatternLockAttribute extends CommonMethod { * @since 11 */ /** - * Invoked when a grid dot is connected during pattern password input. - * + * Called when connecting to a grid dot. * @param { import('../api/@ohos.base').Callback } callback - A callback instance used when connection to a grid dot. * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -608,29 +633,42 @@ declare class PatternLockAttribute extends CommonMethod { * @since 12 */ onDotConnect(callback: import('../api/@ohos.base').Callback): PatternLockAttribute; - + /** - * Sets the background circle style for the dots in a grid when they are in the activated state. + * 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; + + /** + * The activate circle style. * - * @param { Optional } options - Background circle style of the dots in the activated state. + * @param { Optional } options - the circle style setting options * @returns { PatternLockAttribute } PatternLockAttribute * @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; /** - * Sets whether unselected dots in the grid are automatically selected when the password path passes over them. + * Skip unselected point that the path passes through. * - * @param { boolean } skipped - Whether unselected dots in the grid are automatically selected when the password - * path passes over them, Default value is false. + * @param { boolean } skipped * @returns { PatternLockAttribute } * @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; } diff --git a/api/@internal/component/ets/plugin_component.d.ts b/api/@internal/component/ets/plugin_component.d.ts index 62733df68dffaaa268b70e83c2f9b191c9f474a5..efe09e408f8b1c33c77b3b827363ba640703dbd1 100644 --- a/api/@internal/component/ets/plugin_component.d.ts +++ b/api/@internal/component/ets/plugin_component.d.ts @@ -18,13 +18,19 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod } from './common' +import { VoidCallback } from './units' +/*** endif */ + /** * PluginComponentTemplate * * @interface PluginComponentTemplate * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface PluginComponentTemplate { /** @@ -33,7 +39,8 @@ interface PluginComponentTemplate { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ source: string; /** @@ -42,7 +49,8 @@ interface PluginComponentTemplate { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ bundleName: string; } @@ -54,7 +62,8 @@ interface PluginComponentTemplate { * @interface PluginComponentOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PluginComponentOptions { /** @@ -70,7 +79,8 @@ declare interface PluginComponentOptions { * @type { PluginComponentTemplate } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ template: PluginComponentTemplate; @@ -90,6 +100,16 @@ declare interface PluginComponentOptions { * @since 18 */ data: any; + /** + * Plugin component data. + * AnonyMous Object Rectification + * @type { Object|undefined|null } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + * @arkts 1.2 + */ + data: Object|undefined|null; } /** @@ -99,7 +119,8 @@ declare interface PluginComponentOptions { * @interface PluginErrorData * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PluginErrorData { /** @@ -115,7 +136,8 @@ declare interface PluginErrorData { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ errcode: number; @@ -132,7 +154,8 @@ declare interface PluginErrorData { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ msg: string; } @@ -145,7 +168,8 @@ declare interface PluginErrorData { * @param { PluginErrorData } info - Plugin error data * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type PluginErrorCallback = (info: PluginErrorData) => void; @@ -155,7 +179,8 @@ declare type PluginErrorCallback = (info: PluginErrorData) => void; * @interface PluginComponentInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface PluginComponentInterface { /** @@ -175,7 +200,8 @@ interface PluginComponentInterface { * @returns { PluginComponentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ (options: PluginComponentOptions): PluginComponentAttribute; } @@ -186,7 +212,8 @@ interface PluginComponentInterface { * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ declare class PluginComponentAttribute extends CommonMethod { /** @@ -206,7 +233,8 @@ declare class PluginComponentAttribute extends CommonMethod { /** @@ -349,6 +358,20 @@ declare class PolygonAttribute extends CommonShapeMethod { * @since 11 */ points(value: Array): PolygonAttribute; + + /** + * Called when the vertex coordinate list of a polygon is set. + * + * @param { Array } value + * @returns { PolygonAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + points(value: Array): PolygonAttribute; } /** @@ -414,3 +437,30 @@ declare const Polygon: PolygonInterface; * @since 11 */ declare const PolygonInstance: PolygonAttribute; + +/** + * Provides the polygon drawing interface. + * + * @interface PolygonInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface PolygonInterface { + /** + * Called when drawing a polygon. + * + * @param { PolygonOptions } [options] - Polygon options + * @returns { PolygonAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + (options?: PolygonOptions): PolygonAttribute; +} diff --git a/api/@internal/component/ets/polyline.d.ts b/api/@internal/component/ets/polyline.d.ts index d2ddef1e828d1bd8db41aede69c7303d21d3a849..bdef79e015b04cc527b6064370fb0af2bed74946 100644 --- a/api/@internal/component/ets/polyline.d.ts +++ b/api/@internal/component/ets/polyline.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonShapeMethod } from './common'; +import { ShapePoint } from './line'; +/*** endif */ + /** * Define options used to construct a polyline. * @@ -26,7 +31,8 @@ * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PolylineOptions { /** @@ -83,6 +89,7 @@ declare interface PolylineOptions { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ width?: Length; @@ -140,6 +147,7 @@ declare interface PolylineOptions { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ height?: Length; } @@ -300,7 +308,8 @@ interface PolylineInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class PolylineAttribute extends CommonShapeMethod { /** @@ -342,6 +351,20 @@ declare class PolylineAttribute extends CommonShapeMethod { * @since 11 */ points(value: Array): PolylineAttribute; + + /** + * Called when the polyline is set to pass through the coordinate point list. + * + * @param { Array } value + * @returns { PolylineAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + points(value: Array): PolylineAttribute; } /** @@ -407,3 +430,30 @@ declare const Polyline: PolylineInterface; * @since 11 */ declare const PolylineInstance: PolylineAttribute; + +/** + * Provides an interface for drawing polylines. + * + * @interface PolylineInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface PolylineInterface { + /** + * Set options for polyline component. + * + * @param { PolylineOptions } [options] - Poly line options + * @returns { PolylineAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + (options?: PolylineOptions): PolylineAttribute; +} diff --git a/api/@internal/component/ets/progress.d.ts b/api/@internal/component/ets/progress.d.ts index 4bd94cb93ac49b7025ded7408b59b14bd8a39e60..5640f076e527f808835e08209a6b1b49fb371daf 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 } 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. * @@ -173,6 +181,58 @@ declare interface ProgressOptions { 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 { + + /** + * Sets the value of Progress. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + value: number; + + /** + * Sets the total of Progress. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + total?: number; + + /** + * Sets the type of Progress. + * + * @type { ?ProgressType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type?: ProgressType +} /** * Type of progress bar * @@ -205,7 +265,8 @@ declare interface ProgressOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ProgressType { /** @@ -236,7 +297,8 @@ declare enum ProgressType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Linear = 0, @@ -268,7 +330,8 @@ declare enum ProgressType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Ring = 1, @@ -300,7 +363,8 @@ declare enum ProgressType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Eclipse = 2, @@ -332,7 +396,8 @@ declare enum ProgressType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ScaleRing = 3, @@ -364,7 +429,8 @@ declare enum ProgressType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Capsule = 4 } @@ -383,7 +449,8 @@ declare enum ProgressType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ProgressStatus { /** @@ -398,7 +465,8 @@ declare enum ProgressStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LOADING, @@ -414,7 +482,8 @@ declare enum ProgressStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ PROGRESSING } @@ -455,7 +524,8 @@ declare enum ProgressStatus { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ProgressStyleOptions extends CommonProgressStyleOptions { /** @@ -490,7 +560,8 @@ declare interface ProgressStyleOptions extends CommonProgressStyleOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeWidth?: Length; @@ -526,7 +597,8 @@ declare interface ProgressStyleOptions extends CommonProgressStyleOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scaleCount?: number; @@ -562,7 +634,8 @@ declare interface ProgressStyleOptions extends CommonProgressStyleOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scaleWidth?: Length; } @@ -581,7 +654,8 @@ declare interface ProgressStyleOptions extends CommonProgressStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CommonProgressStyleOptions { /** @@ -600,7 +674,8 @@ declare interface CommonProgressStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enableSmoothEffect?: boolean; } @@ -619,7 +694,8 @@ declare interface CommonProgressStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ScanEffectOptions { /** @@ -638,7 +714,8 @@ declare interface ScanEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enableScanEffect?: boolean; } @@ -658,7 +735,8 @@ declare interface ScanEffectOptions { * @interface EclipseStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface EclipseStyleOptions extends CommonProgressStyleOptions { @@ -680,7 +758,8 @@ declare interface EclipseStyleOptions extends CommonProgressStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ScaleRingStyleOptions extends CommonProgressStyleOptions { /** @@ -697,7 +776,8 @@ declare interface ScaleRingStyleOptions extends CommonProgressStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeWidth?: Length; @@ -715,7 +795,8 @@ declare interface ScaleRingStyleOptions extends CommonProgressStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scaleWidth?: Length; @@ -733,7 +814,8 @@ declare interface ScaleRingStyleOptions extends CommonProgressStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scaleCount?: number; } @@ -754,7 +836,8 @@ declare interface ScaleRingStyleOptions extends CommonProgressStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RingStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { /** @@ -771,7 +854,8 @@ declare interface RingStyleOptions extends ScanEffectOptions, CommonProgressStyl * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeWidth?: Length; @@ -789,7 +873,8 @@ declare interface RingStyleOptions extends ScanEffectOptions, CommonProgressStyl * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ shadow?: boolean; @@ -807,7 +892,8 @@ declare interface RingStyleOptions extends ScanEffectOptions, CommonProgressStyl * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ status?: ProgressStatus; } @@ -828,7 +914,8 @@ declare interface RingStyleOptions extends ScanEffectOptions, CommonProgressStyl * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LinearStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { /** @@ -845,7 +932,8 @@ declare interface LinearStyleOptions extends ScanEffectOptions, CommonProgressSt * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeWidth?: Length; /** @@ -864,7 +952,8 @@ declare interface LinearStyleOptions extends ScanEffectOptions, CommonProgressSt * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeRadius?: PX | VP | LPX | Resource; } @@ -885,7 +974,8 @@ declare interface LinearStyleOptions extends ScanEffectOptions, CommonProgressSt * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CapsuleStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { /** @@ -902,7 +992,8 @@ declare interface CapsuleStyleOptions extends ScanEffectOptions, CommonProgressS * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ borderColor?: ResourceColor; @@ -920,7 +1011,8 @@ declare interface CapsuleStyleOptions extends ScanEffectOptions, CommonProgressS * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ borderWidth?: Length; @@ -948,6 +1040,7 @@ declare interface CapsuleStyleOptions extends ScanEffectOptions, CommonProgressS * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ content?: ResourceStr; @@ -965,7 +1058,8 @@ declare interface CapsuleStyleOptions extends ScanEffectOptions, CommonProgressS * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ font?: Font; @@ -983,7 +1077,8 @@ declare interface CapsuleStyleOptions extends ScanEffectOptions, CommonProgressS * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor?: ResourceColor; @@ -1003,7 +1098,8 @@ declare interface CapsuleStyleOptions extends ScanEffectOptions, CommonProgressS * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ showDefaultPercentage?: boolean; @@ -1015,7 +1111,8 @@ declare interface CapsuleStyleOptions extends ScanEffectOptions, CommonProgressS * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ borderRadius?: LengthMetrics; } @@ -1052,7 +1149,8 @@ declare interface CapsuleStyleOptions extends ScanEffectOptions, CommonProgressS * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ProgressStyle { /** @@ -1083,7 +1181,8 @@ declare enum ProgressStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Linear, @@ -1115,7 +1214,8 @@ declare enum ProgressStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Ring, @@ -1147,7 +1247,8 @@ declare enum ProgressStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Eclipse, @@ -1179,7 +1280,8 @@ declare enum ProgressStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ScaleRing, @@ -1211,7 +1313,8 @@ declare enum ProgressStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Capsule, } @@ -1229,7 +1332,8 @@ declare enum ProgressStyle { * @interface ProgressStyleMap * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ProgressStyleMap { /** @@ -1345,7 +1449,8 @@ declare interface ProgressStyleMap { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ProgressInterface { /** @@ -1387,6 +1492,19 @@ interface ProgressInterface { * @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; } /** @@ -1555,6 +1673,7 @@ declare class ProgressAttribute): ProgressAttribute; @@ -1571,6 +1690,88 @@ declare class ProgressAttribute): ProgressAttribute; } +/** + * Defines the progress attribute functions. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +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 * @@ -1579,7 +1780,8 @@ declare class ProgressAttribute { /** @@ -1589,7 +1791,8 @@ declare interface ProgressConfiguration extends CommonConfiguration { /** @@ -176,7 +185,8 @@ declare class QRCodeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ color(value: ResourceColor): QRCodeAttribute; @@ -216,7 +226,8 @@ declare class QRCodeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor(value: ResourceColor): QRCodeAttribute; @@ -235,7 +246,8 @@ declare class QRCodeAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentOpacity(value: number | Resource): QRCodeAttribute; } diff --git a/api/@internal/component/ets/radio.d.ts b/api/@internal/component/ets/radio.d.ts index e104103f9693eb47145ad64c591512d63787253e..8e5981497572c19ca1d1b05a0917c5bb7230cb9c 100644 --- a/api/@internal/component/ets/radio.d.ts +++ b/api/@internal/component/ets/radio.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod, ContentModifier, CommonConfiguration, Callback } from './common'; +import { CustomBuilder } from './builder'; +import { ResourceColor } from './units'; +/*** endif */ + /** * Defines the IndicatorType of Radio component * @@ -26,7 +32,8 @@ * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum RadioIndicatorType { /** @@ -36,7 +43,8 @@ declare enum RadioIndicatorType { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TICK = 0, /** @@ -46,7 +54,8 @@ declare enum RadioIndicatorType { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DOT = 1, /** @@ -56,7 +65,8 @@ declare enum RadioIndicatorType { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CUSTOM = 2, } @@ -93,7 +103,8 @@ declare enum RadioIndicatorType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RadioOptions { /** @@ -128,7 +139,8 @@ declare interface RadioOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ group: string; @@ -164,7 +176,8 @@ declare interface RadioOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ value: string; /** @@ -175,7 +188,8 @@ declare interface RadioOptions { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ indicatorType?: RadioIndicatorType; /** @@ -186,7 +200,8 @@ declare interface RadioOptions { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ indicatorBuilder?: CustomBuilder; } @@ -206,7 +221,8 @@ declare interface RadioOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RadioStyle { /** @@ -226,7 +242,8 @@ declare interface RadioStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ checkedBackgroundColor?: ResourceColor; @@ -247,7 +264,8 @@ declare interface RadioStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ uncheckedBorderColor?: ResourceColor; @@ -268,7 +286,8 @@ declare interface RadioStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ indicatorColor?: ResourceColor; } @@ -305,7 +324,8 @@ declare interface RadioStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface RadioInterface { /** @@ -344,7 +364,8 @@ interface RadioInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (options: RadioOptions): RadioAttribute; } @@ -356,7 +377,8 @@ interface RadioInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnRadioChangeCallback = (isChecked: boolean) => void; @@ -392,7 +414,8 @@ declare type OnRadioChangeCallback = (isChecked: boolean) => void; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RadioAttribute extends CommonMethod { /** @@ -431,7 +454,8 @@ declare class RadioAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ checked(value: boolean): RadioAttribute; @@ -444,7 +468,8 @@ declare class RadioAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ checked(isChecked: Optional): RadioAttribute; @@ -497,7 +522,8 @@ declare class RadioAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onChange(callback: Optional): RadioAttribute; @@ -518,7 +544,8 @@ declare class RadioAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ radioStyle(value?: RadioStyle): RadioAttribute; @@ -530,7 +557,8 @@ declare class RadioAttribute 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): RadioAttribute; @@ -542,7 +570,8 @@ declare class RadioAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ contentModifier(modifier: Optional>): RadioAttribute; } @@ -555,7 +584,8 @@ declare class RadioAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RadioConfiguration extends CommonConfiguration { /** @@ -565,7 +595,8 @@ declare interface RadioConfiguration extends CommonConfiguration; } diff --git a/api/@internal/component/ets/rating.d.ts b/api/@internal/component/ets/rating.d.ts index 308ed20ef7bd1d1278d618dd7c2c40565aefd26a..2963ab334f227946935f7e375d1984c60b75a14d 100644 --- a/api/@internal/component/ets/rating.d.ts +++ b/api/@internal/component/ets/rating.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonConfiguration, Callback, CommonMethod, Optional, ContentModifier } from './common'; +import { ResourceStr } from './units'; +/*** endif */ + /** * Define options used to construct a rating. * @@ -26,7 +31,8 @@ * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RatingOptions { /** @@ -76,6 +82,19 @@ declare interface RatingOptions { */ rating: number; + /** + * Rating option. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + rating: number; + /** * Indicator option. * @@ -118,7 +137,8 @@ declare interface RatingOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ indicator?: boolean } @@ -131,7 +151,8 @@ declare interface RatingOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface StarStyleOptions { /** @@ -178,6 +199,7 @@ declare interface StarStyleOptions { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ backgroundUri: ResourceStr; @@ -225,6 +247,7 @@ declare interface StarStyleOptions { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ foregroundUri: ResourceStr; @@ -272,6 +295,7 @@ declare interface StarStyleOptions { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ secondaryUri?: ResourceStr } @@ -308,7 +332,8 @@ declare interface StarStyleOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface RatingInterface { /** @@ -359,7 +384,8 @@ interface RatingInterface { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ (options?: RatingOptions): RatingAttribute; } @@ -372,7 +398,8 @@ interface RatingInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RatingConfiguration extends CommonConfiguration { /** @@ -382,7 +409,8 @@ declare interface RatingConfiguration extends CommonConfiguration; } @@ -439,7 +471,8 @@ declare interface RatingConfiguration extends CommonConfiguration void; @@ -475,7 +508,8 @@ declare interface RatingConfiguration extends CommonConfiguration { /** @@ -514,7 +548,8 @@ declare class RatingAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ stars(value: number): RatingAttribute; @@ -527,7 +562,8 @@ declare class RatingAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ stars(starCount: Optional): RatingAttribute; @@ -567,7 +603,8 @@ declare class RatingAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ stepSize(value: number): RatingAttribute; @@ -580,7 +617,8 @@ declare class RatingAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ stepSize(size: Optional): RatingAttribute; @@ -632,7 +670,8 @@ declare class RatingAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ starStyle(options: StarStyleOptions): RatingAttribute; @@ -645,7 +684,8 @@ declare class RatingAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ starStyle(options: Optional): RatingAttribute; @@ -698,7 +738,8 @@ declare class RatingAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onChange(callback: Optional): RatingAttribute; @@ -710,7 +751,8 @@ declare class RatingAttribute 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): RatingAttribute; @@ -722,7 +764,8 @@ declare class RatingAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ contentModifier(modifier: Optional>): RatingAttribute; } diff --git a/api/@internal/component/ets/rect.d.ts b/api/@internal/component/ets/rect.d.ts index a382feb79cf29d864fca05a505c21f219dccf129..00d067823a1c502d832c8e6fa2aea4bd5f5458ec 100644 --- a/api/@internal/component/ets/rect.d.ts +++ b/api/@internal/component/ets/rect.d.ts @@ -18,6 +18,24 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonShapeMethod } from './common'; +import { Length } from './units'; +/*** endif */ + +/** + * Defines the RadiusItem, the first element is the width of the rounded corner, the second is the height of the rounded corner. + * + * @typedef { [Length, Length] } RadiusItem + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type RadiusItem = [Length, Length]; + /** * Define options used to construct a rectangle. * @@ -26,7 +44,8 @@ * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RectOptions { /** @@ -83,6 +102,7 @@ declare interface RectOptions { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ width?: Length; @@ -140,6 +160,7 @@ declare interface RectOptions { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ height?: Length; @@ -199,6 +220,19 @@ declare interface RectOptions { * @since 20 */ radius?: Length | Array; + + /** + * Corner radius of the rectangle. + * + * @type { ?(Length | Array) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + radius?: Length | Array; } /** @@ -209,7 +243,8 @@ declare interface RectOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RoundedRectOptions { /** @@ -266,6 +301,7 @@ declare interface RoundedRectOptions { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ width?: Length; @@ -323,6 +359,7 @@ declare interface RoundedRectOptions { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ height?: Length; @@ -380,6 +417,7 @@ declare interface RoundedRectOptions { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ radiusWidth?: Length; @@ -437,6 +475,7 @@ declare interface RoundedRectOptions { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ radiusHeight?: Length; } @@ -621,7 +660,8 @@ interface RectInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RectAttribute extends CommonShapeMethod { /** @@ -672,6 +712,7 @@ declare class RectAttribute extends CommonShapeMethod { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ radiusWidth(value: Length): RectAttribute; @@ -723,6 +764,7 @@ declare class RectAttribute extends CommonShapeMethod { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ radiusHeight(value: Length): RectAttribute; @@ -764,18 +806,21 @@ declare class RectAttribute extends CommonShapeMethod { * @atomicservice * @since 11 */ + radius(value: number | string | Array): RectAttribute; + /** * Called when the fillet size is set. * - * @param { Length | Array } value + * @param { number | string | Array } value * @returns { RectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 20 + * @arkts 1.2 */ - radius(value: Length | Array): RectAttribute; + radius(value: number | string | Array): RectAttribute; } /** @@ -834,3 +879,32 @@ declare const RectInStance: RectAttribute; * @since 11 */ declare const RectInstance: RectAttribute; + +/** + * Provides an interface for drawing rectangles. + * + * @interface RectInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface RectInterface { + /** + * Called when a rectangle is created. + * + * @param { RectOptions | RoundedRectOptions } [options] - Rect options + * @returns { RectAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + ( + options?: RectOptions | RoundedRectOptions, + ): RectAttribute; +} \ No newline at end of file diff --git a/api/@internal/component/ets/refresh.d.ts b/api/@internal/component/ets/refresh.d.ts index 9ded23e6625325db0bccd80c2777dbe56d3b0333..71823f45aa30c4305b1d31159f914d3f00c16d4c 100644 --- a/api/@internal/component/ets/refresh.d.ts +++ b/api/@internal/component/ets/refresh.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Callback, Optional, CommonMethod } from './common' +import { CustomBuilder } from './builder' +import { ResourceStr } from './units' +import { ComponentContent } from '../ComponentContent' +/*** endif */ + /** * The refresh status of the drop-down refresh. * @@ -40,7 +47,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 RefreshStatus { /** @@ -62,7 +70,8 @@ declare enum RefreshStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Inactive, @@ -85,7 +94,8 @@ declare enum RefreshStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Drag, @@ -108,7 +118,8 @@ declare enum RefreshStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ OverDrag, @@ -131,7 +142,8 @@ declare enum RefreshStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Refresh, @@ -154,7 +166,8 @@ declare enum RefreshStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Done, } @@ -181,7 +194,8 @@ declare enum RefreshStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface RefreshOptions { /** @@ -209,7 +223,8 @@ interface RefreshOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ refreshing: boolean; @@ -266,7 +281,8 @@ interface RefreshOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ promptText?: ResourceStr; @@ -285,7 +301,8 @@ interface RefreshOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ builder?: CustomBuilder; @@ -296,7 +313,8 @@ interface RefreshOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ refreshingContent?: ComponentContent; } @@ -323,7 +341,8 @@ interface RefreshOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface RefreshInterface { /** @@ -351,7 +370,8 @@ interface RefreshInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (value: RefreshOptions): RefreshAttribute; } @@ -378,7 +398,8 @@ interface RefreshInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RefreshAttribute extends CommonMethod { /** @@ -406,7 +427,8 @@ declare class RefreshAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onStateChange(callback: (state: RefreshStatus) => void): RefreshAttribute; @@ -435,7 +457,8 @@ declare class RefreshAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onRefreshing(callback: () => void): RefreshAttribute; @@ -447,7 +470,8 @@ declare class RefreshAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ refreshOffset(value: number): RefreshAttribute; @@ -459,7 +483,8 @@ declare class RefreshAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pullToRefresh(value: boolean): RefreshAttribute; @@ -472,7 +497,8 @@ declare class RefreshAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onOffsetChange(callback: Callback): RefreshAttribute; @@ -484,7 +510,8 @@ declare class RefreshAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pullDownRatio(ratio: Optional): RefreshAttribute; diff --git a/api/@internal/component/ets/relative_container.d.ts b/api/@internal/component/ets/relative_container.d.ts index cd67f313f5e676b8592ebd42beae25bc6c1555b5..1caa3043b68934d16bf5ec1ef5bcedb3f9cce0a1 100644 --- a/api/@internal/component/ets/relative_container.d.ts +++ b/api/@internal/component/ets/relative_container.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Dimension } from './units'; +import { Axis } from './enums'; +import { CommonMethod } from './common'; +/*** endif */ + /** * Provides ports for relative containers. * @@ -43,7 +49,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface RelativeContainerInterface { /** @@ -71,7 +78,8 @@ interface RelativeContainerInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (): RelativeContainerAttribute; } @@ -83,7 +91,8 @@ interface RelativeContainerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GuideLinePosition { /** @@ -93,7 +102,8 @@ declare interface GuideLinePosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start? : Dimension; @@ -104,7 +114,8 @@ declare interface GuideLinePosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ end? : Dimension; } @@ -116,7 +127,8 @@ declare interface GuideLinePosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GuideLineStyle { /** @@ -126,7 +138,8 @@ declare interface GuideLineStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ id : string; @@ -137,7 +150,8 @@ declare interface GuideLineStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ direction : Axis; @@ -148,7 +162,8 @@ declare interface GuideLineStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ position : GuideLinePosition; } @@ -160,7 +175,8 @@ declare interface GuideLineStyle { * @syscap SystemCapability.Test.UiTest * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum BarrierDirection { /** @@ -169,7 +185,8 @@ declare enum BarrierDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LEFT, @@ -179,7 +196,8 @@ declare enum BarrierDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ RIGHT, @@ -189,7 +207,8 @@ declare enum BarrierDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TOP, @@ -199,7 +218,8 @@ declare enum BarrierDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BOTTOM, } @@ -211,7 +231,8 @@ declare enum BarrierDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum LocalizedBarrierDirection { /** @@ -220,7 +241,8 @@ declare enum LocalizedBarrierDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ START = 0, @@ -230,7 +252,8 @@ declare enum LocalizedBarrierDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ END = 1, @@ -240,7 +263,8 @@ declare enum LocalizedBarrierDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TOP = 2, @@ -250,7 +274,8 @@ declare enum LocalizedBarrierDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BOTTOM = 3, } @@ -262,7 +287,8 @@ declare enum LocalizedBarrierDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface BarrierStyle { /** @@ -272,7 +298,8 @@ declare interface BarrierStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ id : string; @@ -283,7 +310,8 @@ declare interface BarrierStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ direction : BarrierDirection; @@ -294,7 +322,8 @@ declare interface BarrierStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ referencedId : Array; } @@ -306,7 +335,8 @@ declare interface BarrierStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LocalizedBarrierStyle { /** @@ -316,7 +346,8 @@ declare interface LocalizedBarrierStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ id : string; @@ -327,7 +358,8 @@ declare interface LocalizedBarrierStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ localizedDirection : LocalizedBarrierDirection; @@ -338,7 +370,8 @@ declare interface LocalizedBarrierStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ referencedId : Array; } @@ -362,7 +395,8 @@ declare interface LocalizedBarrierStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RelativeContainerAttribute extends CommonMethod { /** @@ -373,7 +407,8 @@ declare class RelativeContainerAttribute extends CommonMethod): RelativeContainerAttribute; @@ -385,7 +420,8 @@ declare class RelativeContainerAttribute extends CommonMethod): RelativeContainerAttribute; @@ -397,7 +433,8 @@ declare class RelativeContainerAttribute extends CommonMethod): RelativeContainerAttribute; } diff --git a/api/@internal/component/ets/remote_window.d.ts b/api/@internal/component/ets/remote_window.d.ts index 97f7b030b67026f700320961466df2ee9a6971d5..e0daccbb03c60e893cb8015f501a1a5304afc45b 100644 --- a/api/@internal/component/ets/remote_window.d.ts +++ b/api/@internal/component/ets/remote_window.d.ts @@ -17,21 +17,25 @@ * @file * @kit ArkUI */ - +/*** if arkts 1.2 */ +import { CommonMethod } from './common'; +/*** endif */ /** * Round rect. * * @interface RRect * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface RRect { /** * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ left: number; @@ -39,7 +43,8 @@ interface RRect { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ top: number; @@ -47,7 +52,8 @@ interface RRect { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ width: number; @@ -55,7 +61,8 @@ interface RRect { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ height: number; @@ -63,7 +70,8 @@ interface RRect { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ radius: number; } @@ -74,7 +82,8 @@ interface RRect { * @interface WindowAnimationTarget * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface WindowAnimationTarget { /** @@ -82,7 +91,8 @@ interface WindowAnimationTarget { * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ readonly bundleName: string; @@ -91,7 +101,8 @@ interface WindowAnimationTarget { * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ readonly abilityName: string; @@ -100,7 +111,8 @@ interface WindowAnimationTarget { * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ readonly windowBounds: RRect; @@ -109,7 +121,8 @@ interface WindowAnimationTarget { * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ readonly missionId: number; } @@ -120,7 +133,8 @@ interface WindowAnimationTarget { * @interface RemoteWindowInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface RemoteWindowInterface { /** @@ -130,7 +144,8 @@ interface RemoteWindowInterface { * @returns { RemoteWindowAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ (target: WindowAnimationTarget): RemoteWindowAttribute; } @@ -141,7 +156,8 @@ interface RemoteWindowInterface { * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RemoteWindowAttribute extends CommonMethod {} diff --git a/api/@internal/component/ets/rich_editor.d.ts b/api/@internal/component/ets/rich_editor.d.ts index b83d6aa2ffcc5c1f4fb4aa957ecba28ca4c52b83..22a84958421435ce5d196925c07be12a43c53b33 100644 --- a/api/@internal/component/ets/rich_editor.d.ts +++ b/api/@internal/component/ets/rich_editor.d.ts @@ -18,6 +18,21 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ShadowOptions, ClickEvent, SelectionOptions, CommonMethod, Callback, HapticFeedbackMode, RectResult, HoverEvent, PixelMap } from './common'; +import { CustomBuilder } from './builder'; +import { ResourceColor, Length, ResourceStr, Dimension, Margin, BorderRadiuses, Font } from './units'; +import { FontStyle, FontWeight, TextAlign, WordBreak, LineBreakStrategy, ImageSpanAlignment, ImageFit, ResponseType, CopyOptions, BarState } from './enums'; +import { DecorationStyleInterface, StyledString, MutableStyledString } from './styledString'; +import { Resource } from './../../../api/global/resource'; +import { SymbolEffectStrategy, SymbolRenderingStrategy } from './symbolglyph'; +import { DecorationStyleResult, TextRange, MenuType, TextEditControllerEx, LayoutManager, PreviewText, StyledStringController, StyledStringChangedListener, TextDataDetectorConfig, OnDidChangeCallback, EditMenuOptions, KeyboardAppearance } from './textCommon'; +import { GestureEvent } from './gesture'; +import { EnterKeyType, SubmitEvent } from './textInput'; +import { LengthMetrics, ColorMetrics } from '../Graphics'; +import { TextBackgroundStyle } from './span'; +/*** endif */ + /** * Defines delete text direction. * @@ -32,7 +47,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 RichEditorDeleteDirection { /** @@ -47,7 +63,8 @@ declare enum RichEditorDeleteDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BACKWARD, @@ -63,7 +80,8 @@ declare enum RichEditorDeleteDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ FORWARD, } @@ -82,7 +100,8 @@ declare enum RichEditorDeleteDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum RichEditorSpanType { /** @@ -97,7 +116,8 @@ declare enum RichEditorSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ TEXT = 0, @@ -113,7 +133,8 @@ declare enum RichEditorSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE = 1, @@ -129,7 +150,8 @@ declare enum RichEditorSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ MIXED = 2, @@ -139,7 +161,8 @@ declare enum RichEditorSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BUILDER = 3, @@ -149,7 +172,8 @@ declare enum RichEditorSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 4, } @@ -200,7 +224,8 @@ declare enum UndoStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum RichEditorResponseType { /** @@ -216,7 +241,8 @@ declare enum RichEditorResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ RIGHT_CLICK = 0, @@ -233,7 +259,8 @@ declare enum RichEditorResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LONG_PRESS = 1, @@ -250,7 +277,8 @@ declare enum RichEditorResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SELECT = 2, @@ -260,7 +288,8 @@ declare enum RichEditorResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 3, } @@ -279,7 +308,8 @@ declare enum RichEditorResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorSpanPosition { /** @@ -296,7 +326,8 @@ declare interface RichEditorSpanPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ spanIndex: number; @@ -314,7 +345,8 @@ declare interface RichEditorSpanPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ spanRange: [number, number]; } @@ -333,7 +365,8 @@ declare interface RichEditorSpanPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorTextStyle { /** @@ -350,7 +383,8 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor?: ResourceColor; @@ -368,7 +402,8 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize?: Length | number; @@ -386,7 +421,8 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontStyle?: FontStyle; @@ -404,7 +440,8 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontWeight?: number | FontWeight | string; @@ -422,7 +459,8 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontFamily?: ResourceStr; @@ -449,7 +487,8 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ decoration?: DecorationStyleInterface; @@ -468,7 +507,8 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textShadow?: ShadowOptions | Array; @@ -479,7 +519,8 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ letterSpacing?: number | string; @@ -490,7 +531,8 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lineHeight?: number | string | Resource; @@ -501,7 +543,8 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ halfLeading?: boolean; @@ -517,7 +560,8 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontFeature?: string; @@ -528,7 +572,8 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ textBackgroundStyle?: TextBackgroundStyle; } @@ -549,7 +594,8 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LeadingMarginPlaceholder { /** @@ -567,7 +613,8 @@ declare interface LeadingMarginPlaceholder { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pixelMap: PixelMap; @@ -586,7 +633,8 @@ declare interface LeadingMarginPlaceholder { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ size: [Dimension, Dimension]; } @@ -606,7 +654,8 @@ declare interface LeadingMarginPlaceholder { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorParagraphStyle { /** @@ -624,7 +673,8 @@ declare interface RichEditorParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textAlign?: TextAlign; @@ -654,7 +704,8 @@ declare interface RichEditorParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ leadingMargin?: Dimension | LeadingMarginPlaceholder; @@ -665,7 +716,8 @@ declare interface RichEditorParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ wordBreak?: WordBreak; @@ -676,7 +728,8 @@ declare interface RichEditorParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lineBreakStrategy?: LineBreakStrategy; @@ -687,7 +740,8 @@ declare interface RichEditorParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ paragraphSpacing?: number; } @@ -699,7 +753,8 @@ declare interface RichEditorParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PasteEvent { /** @@ -718,7 +773,8 @@ declare interface PasteEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ preventDefault?: Callback; } @@ -737,7 +793,8 @@ declare interface PasteEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorTextSpan { /** @@ -754,7 +811,8 @@ declare interface RichEditorTextSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ spanPosition: RichEditorSpanPosition; @@ -772,7 +830,8 @@ declare interface RichEditorTextSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ value: string; @@ -790,7 +849,8 @@ declare interface RichEditorTextSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ textStyle?: RichEditorTextStyle; } @@ -810,7 +870,8 @@ declare interface RichEditorTextSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface RichEditorLayoutStyle { /** @@ -828,7 +889,8 @@ interface RichEditorLayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ margin?: Dimension | Margin; @@ -847,7 +909,8 @@ interface RichEditorLayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderRadius?: Dimension | BorderRadiuses; } @@ -866,7 +929,8 @@ interface RichEditorLayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorImageSpanStyle { /** @@ -883,7 +947,8 @@ declare interface RichEditorImageSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ size?: [Dimension, Dimension]; @@ -901,7 +966,8 @@ declare interface RichEditorImageSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ verticalAlign?: ImageSpanAlignment; @@ -919,7 +985,8 @@ declare interface RichEditorImageSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ objectFit?: ImageFit; @@ -938,7 +1005,8 @@ declare interface RichEditorImageSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ layoutStyle?: RichEditorLayoutStyle; } @@ -958,7 +1026,8 @@ declare interface RichEditorImageSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorSymbolSpanStyle { /** @@ -976,7 +1045,8 @@ declare interface RichEditorSymbolSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize?: number | string | Resource; @@ -995,7 +1065,8 @@ declare interface RichEditorSymbolSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor?: Array; @@ -1014,7 +1085,8 @@ declare interface RichEditorSymbolSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontWeight?: number | FontWeight | string; @@ -1033,7 +1105,8 @@ declare interface RichEditorSymbolSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ effectStrategy?: SymbolEffectStrategy; @@ -1052,7 +1125,8 @@ declare interface RichEditorSymbolSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ renderingStrategy?: SymbolRenderingStrategy; } @@ -1071,7 +1145,8 @@ declare interface RichEditorSymbolSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorTextStyleResult { /** @@ -1088,7 +1163,8 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor: ResourceColor; @@ -1106,7 +1182,8 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize: number; @@ -1124,7 +1201,8 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontStyle: FontStyle; @@ -1142,7 +1220,8 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontWeight: number; @@ -1160,7 +1239,8 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontFamily: string; @@ -1187,7 +1267,8 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ decoration: DecorationStyleResult; @@ -1198,7 +1279,8 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textShadow?: Array; @@ -1209,7 +1291,8 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ letterSpacing?: number; @@ -1220,7 +1303,8 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lineHeight?: number; @@ -1231,7 +1315,8 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ halfLeading?: boolean; @@ -1247,7 +1332,8 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontFeature?: string; @@ -1258,7 +1344,8 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ textBackgroundStyle?: TextBackgroundStyle; } @@ -1278,7 +1365,8 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorParagraphResult { /** @@ -1296,7 +1384,8 @@ declare interface RichEditorParagraphResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ style: RichEditorParagraphStyle; @@ -1315,7 +1404,8 @@ declare interface RichEditorParagraphResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ range: [number, number]; } @@ -1335,7 +1425,8 @@ declare interface RichEditorParagraphResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorSymbolSpanStyleResult { /** @@ -1353,7 +1444,8 @@ declare interface RichEditorSymbolSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize: number | string | Resource; @@ -1372,7 +1464,8 @@ declare interface RichEditorSymbolSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor: Array; @@ -1391,7 +1484,8 @@ declare interface RichEditorSymbolSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontWeight: number | FontWeight | string; @@ -1410,7 +1504,8 @@ declare interface RichEditorSymbolSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ effectStrategy: SymbolEffectStrategy; @@ -1429,7 +1524,8 @@ declare interface RichEditorSymbolSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ renderingStrategy: SymbolRenderingStrategy; } @@ -1448,7 +1544,8 @@ declare interface RichEditorSymbolSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorTextSpanResult { /** @@ -1465,7 +1562,8 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ spanPosition: RichEditorSpanPosition; @@ -1483,7 +1581,8 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ value: string; @@ -1501,7 +1600,8 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ textStyle: RichEditorTextStyleResult; @@ -1519,7 +1619,8 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offsetInSpan: [number, number]; @@ -1538,7 +1639,8 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ symbolSpanStyle?: RichEditorSymbolSpanStyle; @@ -1557,7 +1659,8 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ valueResource?: Resource; @@ -1568,7 +1671,8 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ paragraphStyle?: RichEditorParagraphStyle; @@ -1579,7 +1683,8 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ previewText?: string; @@ -1590,7 +1695,8 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ urlStyle?: RichEditorUrlStyle; } @@ -1609,7 +1715,8 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorImageSpanStyleResult { /** @@ -1626,7 +1733,8 @@ declare interface RichEditorImageSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ size: [number, number]; @@ -1644,7 +1752,8 @@ declare interface RichEditorImageSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ verticalAlign: ImageSpanAlignment; @@ -1662,7 +1771,8 @@ declare interface RichEditorImageSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ objectFit: ImageFit; @@ -1673,7 +1783,8 @@ declare interface RichEditorImageSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ layoutStyle?: RichEditorLayoutStyle; } @@ -1692,7 +1803,8 @@ declare interface RichEditorImageSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorImageSpanResult { /** @@ -1709,7 +1821,8 @@ declare interface RichEditorImageSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ spanPosition: RichEditorSpanPosition; @@ -1727,7 +1840,8 @@ declare interface RichEditorImageSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ valuePixelMap?: PixelMap; @@ -1745,7 +1859,8 @@ declare interface RichEditorImageSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ valueResourceStr?: ResourceStr; @@ -1763,7 +1878,8 @@ declare interface RichEditorImageSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ imageStyle: RichEditorImageSpanStyleResult; @@ -1781,7 +1897,8 @@ declare interface RichEditorImageSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offsetInSpan: [number, number]; } @@ -1800,7 +1917,8 @@ declare interface RichEditorImageSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorImageSpan { /** @@ -1817,7 +1935,8 @@ declare interface RichEditorImageSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ spanPosition: RichEditorSpanPosition; @@ -1835,7 +1954,8 @@ declare interface RichEditorImageSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ value: PixelMap | ResourceStr; @@ -1853,7 +1973,8 @@ declare interface RichEditorImageSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ imageStyle?: RichEditorImageSpanStyle; } @@ -1872,7 +1993,8 @@ declare interface RichEditorImageSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorRange { /** @@ -1891,7 +2013,8 @@ declare interface RichEditorRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ start?: number; @@ -1911,7 +2034,8 @@ declare interface RichEditorRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ end?: number; } @@ -1931,7 +2055,8 @@ declare interface RichEditorRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorGesture { /** @@ -1949,7 +2074,8 @@ declare interface RichEditorGesture { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onClick?: Callback; @@ -1968,7 +2094,8 @@ declare interface RichEditorGesture { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onLongPress?: Callback; @@ -1979,7 +2106,8 @@ declare interface RichEditorGesture { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ onDoubleClick?: Callback; } @@ -1998,7 +2126,8 @@ declare interface RichEditorGesture { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorTextSpanOptions { /** @@ -2015,7 +2144,8 @@ declare interface RichEditorTextSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: number; @@ -2033,7 +2163,8 @@ declare interface RichEditorTextSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ style?: RichEditorTextStyle; @@ -2052,7 +2183,8 @@ declare interface RichEditorTextSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ paragraphStyle?: RichEditorParagraphStyle; @@ -2071,7 +2203,8 @@ declare interface RichEditorTextSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ gesture?: RichEditorGesture; @@ -2082,7 +2215,8 @@ declare interface RichEditorTextSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ urlStyle?: RichEditorUrlStyle; } @@ -2094,7 +2228,8 @@ declare interface RichEditorTextSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface KeyboardOptions { /** @@ -2104,7 +2239,8 @@ declare interface KeyboardOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ supportAvoidance?: boolean; } @@ -2123,7 +2259,8 @@ declare interface KeyboardOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorImageSpanOptions { /** @@ -2140,7 +2277,8 @@ declare interface RichEditorImageSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: number; @@ -2158,7 +2296,8 @@ declare interface RichEditorImageSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ imageStyle?: RichEditorImageSpanStyle; @@ -2177,7 +2316,8 @@ declare interface RichEditorImageSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ gesture?: RichEditorGesture; @@ -2188,7 +2328,8 @@ declare interface RichEditorImageSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ onHover?: OnHoverCallback; } @@ -2208,7 +2349,8 @@ declare interface RichEditorImageSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorBuilderSpanOptions { /** @@ -2226,7 +2368,8 @@ declare interface RichEditorBuilderSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: number; @@ -2236,7 +2379,8 @@ declare interface RichEditorBuilderSpanOptions { * @type { ?ColorMetrics } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ dragBackgroundColor? : ColorMetrics; @@ -2246,7 +2390,8 @@ declare interface RichEditorBuilderSpanOptions { * @type { ?boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ isDragShadowNeeded?: boolean; } @@ -2258,7 +2403,8 @@ declare interface RichEditorBuilderSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PlaceholderStyle { /** @@ -2268,7 +2414,8 @@ declare interface PlaceholderStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ font?: Font; @@ -2279,7 +2426,8 @@ declare interface PlaceholderStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor?: ResourceColor; } @@ -2300,7 +2448,8 @@ declare interface PlaceholderStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorSpanStyleOptions extends RichEditorRange { } @@ -2321,7 +2470,8 @@ declare interface RichEditorSpanStyleOptions extends RichEditorRange { } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorParagraphStyleOptions extends RichEditorRange { /** @@ -2339,7 +2489,8 @@ declare interface RichEditorParagraphStyleOptions extends RichEditorRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ style: RichEditorParagraphStyle; } @@ -2360,7 +2511,8 @@ declare interface RichEditorParagraphStyleOptions extends RichEditorRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorUpdateTextSpanStyleOptions extends RichEditorSpanStyleOptions { /** @@ -2377,7 +2529,8 @@ declare interface RichEditorUpdateTextSpanStyleOptions extends RichEditorSpanSty * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ textStyle: RichEditorTextStyle; @@ -2388,7 +2541,8 @@ declare interface RichEditorUpdateTextSpanStyleOptions extends RichEditorSpanSty * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ urlStyle?: RichEditorUrlStyle; } @@ -2409,7 +2563,8 @@ declare interface RichEditorUpdateTextSpanStyleOptions extends RichEditorSpanSty * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorUpdateImageSpanStyleOptions extends RichEditorSpanStyleOptions { /** @@ -2426,7 +2581,8 @@ declare interface RichEditorUpdateImageSpanStyleOptions extends RichEditorSpanSt * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ imageStyle: RichEditorImageSpanStyle; } @@ -2448,7 +2604,8 @@ declare interface RichEditorUpdateImageSpanStyleOptions extends RichEditorSpanSt * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorUpdateSymbolSpanStyleOptions extends RichEditorSpanStyleOptions { /** @@ -2466,7 +2623,8 @@ declare interface RichEditorUpdateSymbolSpanStyleOptions extends RichEditorSpanS * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ symbolStyle: RichEditorSymbolSpanStyle; } @@ -2486,7 +2644,8 @@ declare interface RichEditorUpdateSymbolSpanStyleOptions extends RichEditorSpanS * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorSymbolSpanOptions { /** @@ -2504,7 +2663,8 @@ declare interface RichEditorSymbolSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: number; @@ -2523,7 +2683,8 @@ declare interface RichEditorSymbolSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ style?: RichEditorSymbolSpanStyle; } @@ -2542,7 +2703,8 @@ declare interface RichEditorSymbolSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorSelection { /** @@ -2559,7 +2721,8 @@ declare interface RichEditorSelection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selection: [number, number]; @@ -2577,7 +2740,8 @@ declare interface RichEditorSelection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ spans: Array; } @@ -2596,7 +2760,8 @@ declare interface RichEditorSelection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorInsertValue { /** @@ -2613,7 +2778,8 @@ declare interface RichEditorInsertValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ insertOffset: number; @@ -2631,7 +2797,8 @@ declare interface RichEditorInsertValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ insertValue: string; @@ -2642,7 +2809,8 @@ declare interface RichEditorInsertValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ previewText?: string; } @@ -2661,7 +2829,8 @@ declare interface RichEditorInsertValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorDeleteValue { /** @@ -2678,7 +2847,8 @@ declare interface RichEditorDeleteValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offset: number; @@ -2696,7 +2866,8 @@ declare interface RichEditorDeleteValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ direction: RichEditorDeleteDirection; @@ -2714,7 +2885,8 @@ declare interface RichEditorDeleteValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ length: number; @@ -2732,7 +2904,8 @@ declare interface RichEditorDeleteValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ richEditorDeleteSpans: Array; } @@ -2744,7 +2917,8 @@ declare interface RichEditorDeleteValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorChangeValue { /** @@ -2754,7 +2928,8 @@ declare interface RichEditorChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ rangeBefore: TextRange; @@ -2765,7 +2940,8 @@ declare interface RichEditorChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ replacedSpans: Array; @@ -2776,7 +2952,8 @@ declare interface RichEditorChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ replacedImageSpans: Array; @@ -2787,7 +2964,8 @@ declare interface RichEditorChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ replacedSymbolSpans: Array; @@ -2817,7 +2995,8 @@ declare interface RichEditorChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorOptions { /** @@ -2834,7 +3013,8 @@ declare interface RichEditorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ controller: RichEditorController; } @@ -2846,7 +3026,8 @@ declare interface RichEditorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorStyledStringOptions { /** @@ -2856,7 +3037,8 @@ declare interface RichEditorStyledStringOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ controller: RichEditorStyledStringController; } @@ -2876,7 +3058,8 @@ declare interface RichEditorStyledStringOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SelectionMenuOptions { /** @@ -2903,7 +3086,8 @@ declare interface SelectionMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onAppear?: MenuOnAppearCallback; @@ -2931,7 +3115,8 @@ declare interface SelectionMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onDisappear?: Callback; @@ -2942,7 +3127,8 @@ declare interface SelectionMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ menuType?: MenuType; @@ -2953,7 +3139,8 @@ declare interface SelectionMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ onMenuShow?: MenuCallback; @@ -2964,7 +3151,8 @@ declare interface SelectionMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ onMenuHide?: MenuCallback; @@ -2974,7 +3162,8 @@ declare interface SelectionMenuOptions { * @type { ?PreviewMenuOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ previewMenuOptions?: PreviewMenuOptions; } @@ -2985,7 +3174,8 @@ declare interface SelectionMenuOptions { * @interface PreviewMenuOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PreviewMenuOptions { /** @@ -2994,7 +3184,8 @@ declare interface PreviewMenuOptions { * @type { ?HapticFeedbackMode } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ hapticFeedbackMode? : HapticFeedbackMode; } @@ -3006,7 +3197,8 @@ declare interface PreviewMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RichEditorBaseController implements TextEditControllerEx { /** @@ -3023,7 +3215,8 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getCaretOffset(): number; @@ -3043,7 +3236,8 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ setCaretOffset(offset: number): boolean; @@ -3059,7 +3253,8 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ closeSelectionMenu(): void; @@ -3078,7 +3273,8 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getTypingStyle(): RichEditorTextStyle; @@ -3097,7 +3293,8 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setTypingStyle(value: RichEditorTextStyle): void; @@ -3130,7 +3327,8 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setSelection(selectionStart: number, selectionEnd: number, options?: SelectionOptions): void; @@ -3141,7 +3339,8 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isEditing(): boolean; @@ -3151,7 +3350,8 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ stopEditing(): void; @@ -3162,7 +3362,8 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getLayoutManager(): LayoutManager; @@ -3173,7 +3374,8 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getPreviewText(): PreviewText; @@ -3184,7 +3386,8 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getCaretRect(): RectResult | undefined; } @@ -3210,7 +3413,8 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RichEditorController extends RichEditorBaseController { /** @@ -3231,20 +3435,10 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - /** - * Add a text span. - * - * @param { ResourceStr } content - text value. - * @param { RichEditorTextSpanOptions } [options] - span info. - * @returns { number } span index - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - addTextSpan(content: ResourceStr, options?: RichEditorTextSpanOptions): number; + addTextSpan(value: string, options?: RichEditorTextSpanOptions): number; /** * Add a image span. @@ -3264,7 +3458,8 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ addImageSpan(value: PixelMap | ResourceStr, options?: RichEditorImageSpanOptions): number; @@ -3287,7 +3482,8 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ addBuilderSpan(value: CustomBuilder, options?: RichEditorBuilderSpanOptions): number; @@ -3310,7 +3506,8 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ addSymbolSpan(value: Resource, options?: RichEditorSymbolSpanOptions ): number; @@ -3328,7 +3525,8 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ updateSpanStyle(value: RichEditorUpdateTextSpanStyleOptions | RichEditorUpdateImageSpanStyleOptions | RichEditorUpdateSymbolSpanStyleOptions): void; @@ -3347,7 +3545,8 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ updateParagraphStyle(value: RichEditorParagraphStyleOptions): void; @@ -3365,7 +3564,8 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ deleteSpans(value?: RichEditorRange): void; @@ -3385,7 +3585,8 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getSpans(value?: RichEditorRange): Array; @@ -3406,7 +3607,8 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getParagraphs(value?: RichEditorRange): Array; @@ -3425,7 +3627,8 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getSelection(): RichEditorSelection; @@ -3439,7 +3642,8 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fromStyledString(value: StyledString): Array; @@ -3453,7 +3657,8 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ toStyledString(value: RichEditorRange): StyledString; } @@ -3465,7 +3670,8 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type RichEditorSpan = RichEditorImageSpanResult | RichEditorTextSpanResult; @@ -3477,7 +3683,8 @@ declare type RichEditorSpan = RichEditorImageSpanResult | RichEditorTextSpanResu * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RichEditorStyledStringController extends RichEditorBaseController implements StyledStringController { /** @@ -3487,7 +3694,8 @@ declare class RichEditorStyledStringController extends RichEditorBaseController * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setStyledString(styledString: StyledString): void; @@ -3497,16 +3705,8 @@ declare class RichEditorStyledStringController extends RichEditorBaseController * @returns { MutableStyledString } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 - */ - /** - * Get the StyledString of the RichEditor. - * - * @returns { MutableStyledString } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getStyledString(): MutableStyledString; @@ -3517,7 +3717,8 @@ declare class RichEditorStyledStringController extends RichEditorBaseController * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getSelection(): RichEditorRange; @@ -3528,7 +3729,8 @@ declare class RichEditorStyledStringController extends RichEditorBaseController * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onContentChanged(listener: StyledStringChangedListener): void; } @@ -3547,7 +3749,8 @@ declare class RichEditorStyledStringController extends RichEditorBaseController * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RichEditorAttribute extends CommonMethod { /** @@ -3576,7 +3779,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onReady(callback: Callback): RichEditorAttribute; @@ -3606,7 +3810,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onSelect(callback: Callback): RichEditorAttribute; @@ -3618,7 +3823,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onSelectionChange(callback: Callback): RichEditorAttribute; @@ -3648,7 +3854,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ aboutToIMEInput(callback: Callback): RichEditorAttribute; @@ -3678,7 +3885,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onIMEInputComplete(callback: Callback): RichEditorAttribute; @@ -3690,7 +3898,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onDidIMEInput(callback: Callback): RichEditorAttribute; @@ -3720,7 +3929,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ aboutToDelete(callback: Callback): RichEditorAttribute; @@ -3750,7 +3960,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onDeleteComplete(callback: Callback): RichEditorAttribute; @@ -3771,7 +3982,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ copyOptions(value: CopyOptions): RichEditorAttribute; @@ -3798,7 +4010,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bindSelectionMenu(spanType: RichEditorSpanType, content: CustomBuilder, responseType: ResponseType | RichEditorResponseType, options?: SelectionMenuOptions): RichEditorAttribute; @@ -3830,7 +4043,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ customKeyboard(value: CustomBuilder, options?: KeyboardOptions): RichEditorAttribute; @@ -3851,7 +4065,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onPaste(callback: PasteEventCallback): RichEditorAttribute; @@ -3872,7 +4087,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableDataDetector(enable: boolean): RichEditorAttribute; @@ -3884,7 +4100,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enablePreviewText(enable: boolean): RichEditorAttribute; @@ -3905,7 +4122,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dataDetectorConfig(config: TextDataDetectorConfig): RichEditorAttribute; @@ -3918,7 +4136,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ placeholder(value: ResourceStr, style?: PlaceholderStyle): RichEditorAttribute; @@ -3930,7 +4149,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ caretColor(value: ResourceColor): RichEditorAttribute; @@ -3942,7 +4162,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ selectedBackgroundColor(value: ResourceColor): RichEditorAttribute; @@ -3954,7 +4175,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onEditingChange(callback: Callback): RichEditorAttribute; @@ -3966,7 +4188,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enterKeyType(value: EnterKeyType): RichEditorAttribute; @@ -3978,7 +4201,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onSubmit(callback: SubmitCallback): RichEditorAttribute; @@ -3990,7 +4214,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillChange(callback: Callback) : RichEditorAttribute; @@ -4002,7 +4227,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onDidChange(callback: OnDidChangeCallback) : RichEditorAttribute; @@ -4014,7 +4240,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onCut(callback: Callback): RichEditorAttribute; @@ -4026,7 +4253,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onCopy(callback: Callback): RichEditorAttribute; @@ -4038,7 +4266,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ editMenuOptions(editMenu: EditMenuOptions): RichEditorAttribute; @@ -4050,7 +4279,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableKeyboardOnFocus(isEnabled: boolean): RichEditorAttribute; @@ -4062,7 +4292,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ enableHapticFeedback(isEnabled: boolean): RichEditorAttribute; @@ -4074,7 +4305,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ barState(state: BarState): RichEditorAttribute; @@ -4086,7 +4318,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ maxLength(maxLength: Optional): RichEditorAttribute; @@ -4098,7 +4331,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ maxLines(maxLines: Optional): RichEditorAttribute; @@ -4121,7 +4355,8 @@ declare class RichEditorAttribute extends CommonMethod { * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ keyboardAppearance(appearance: Optional): RichEditorAttribute; @@ -4132,7 +4367,8 @@ declare class RichEditorAttribute extends CommonMethod { * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ stopBackPress(isStopped: Optional): RichEditorAttribute; @@ -4155,7 +4391,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CutEvent { /** @@ -4165,7 +4402,8 @@ declare interface CutEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ preventDefault?: Callback; } @@ -4176,7 +4414,8 @@ declare interface CutEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CopyEvent { /** @@ -4186,7 +4425,8 @@ declare interface CopyEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ preventDefault?: Callback; } @@ -4197,7 +4437,8 @@ declare interface CopyEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorUrlStyle { /** @@ -4207,7 +4448,8 @@ declare interface RichEditorUrlStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ url?: ResourceStr; } @@ -4221,7 +4463,8 @@ declare interface RichEditorUrlStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type SubmitCallback = (enterKey: EnterKeyType, event: SubmitEvent) => void; @@ -4234,7 +4477,8 @@ declare type SubmitCallback = (enterKey: EnterKeyType, event: SubmitEvent) => vo * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type MenuOnAppearCallback = (start: number, end: number) => void; @@ -4247,7 +4491,8 @@ declare type MenuOnAppearCallback = (start: number, end: number) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare type MenuCallback = (start: number, end: number) => void; @@ -4259,7 +4504,8 @@ declare type MenuCallback = (start: number, end: number) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type PasteEventCallback = (event?: PasteEvent) => void; @@ -4272,7 +4518,8 @@ declare type PasteEventCallback = (event?: PasteEvent) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnHoverCallback = (status: boolean, event: HoverEvent) => void; @@ -4290,7 +4537,8 @@ declare type OnHoverCallback = (status: boolean, event: HoverEvent) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface RichEditorInterface { /** @@ -4309,7 +4557,8 @@ interface RichEditorInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (value: RichEditorOptions): RichEditorAttribute; @@ -4321,7 +4570,8 @@ interface RichEditorInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ (options: RichEditorStyledStringOptions): RichEditorAttribute; } diff --git a/api/@internal/component/ets/rich_text.d.ts b/api/@internal/component/ets/rich_text.d.ts index 2f0984f0502bbd2f849adde94e98e24ed6551ac8..9d3d7000c41acc1928830e2de97054e67b08b3d1 100644 --- a/api/@internal/component/ets/rich_text.d.ts +++ b/api/@internal/component/ets/rich_text.d.ts @@ -18,6 +18,10 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod} from './common'; +/*** endif */ + /** * Provides an interface for RichText component. * @@ -40,7 +44,8 @@ * @interface RichTextInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface RichTextInterface { /** @@ -78,6 +83,7 @@ interface RichTextInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ (content: string | Resource): RichTextAttribute; } @@ -104,7 +110,8 @@ interface RichTextInterface { * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RichTextAttribute extends CommonMethod { /** @@ -132,7 +139,8 @@ declare class RichTextAttribute extends CommonMethod { * @returns { RichTextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onStart(callback: () => void): RichTextAttribute; @@ -161,7 +169,8 @@ declare class RichTextAttribute extends CommonMethod { * @returns { RichTextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onComplete(callback: () => void): RichTextAttribute; } diff --git a/api/@internal/component/ets/root_scene.d.ts b/api/@internal/component/ets/root_scene.d.ts index 503451a4751dd3ed000bce86b98819e43dfcc3aa..9d06f6b9740f03851dc23a96aeeacb6f7c7f6f80 100644 --- a/api/@internal/component/ets/root_scene.d.ts +++ b/api/@internal/component/ets/root_scene.d.ts @@ -17,14 +17,17 @@ * @file * @kit ArkUI */ - +/*** if arkts 1.2 */ +import { CommonMethod} from './common'; +/*** endif */ /** * Defines the session of RootScene. * * @interface RootSceneSession * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ interface RootSceneSession { } @@ -35,7 +38,8 @@ interface RootSceneSession { * @interface RootSceneInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ interface RootSceneInterface { /** @@ -45,7 +49,8 @@ interface RootSceneInterface { * @returns { RootSceneAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ (session: RootSceneSession): RootSceneAttribute; } @@ -56,7 +61,8 @@ interface RootSceneInterface { * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RootSceneAttribute extends CommonMethod { } diff --git a/api/@internal/component/ets/row.d.ts b/api/@internal/component/ets/row.d.ts index 36d502a1feb9129f65a79c70a37b64d30d47b1cb..2e71740c4bf2371c54101ede8e2f0eb59d50cc39 100644 --- a/api/@internal/component/ets/row.d.ts +++ b/api/@internal/component/ets/row.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { PointLightStyle, Optional, CommonMethod } from './common'; +import { VerticalAlign, FlexAlign } from './enums'; +import { SpaceType } from './column'; +/*** endif */ + + /** * Define options used to construct a row. * @@ -26,7 +33,8 @@ * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RowOptions { /** @@ -72,7 +80,8 @@ declare interface RowOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ space?: string | number; } @@ -85,7 +94,8 @@ declare interface RowOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface RowOptionsV2 { /** @@ -96,7 +106,8 @@ interface RowOptionsV2 { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ space?: SpaceType; } @@ -133,7 +144,8 @@ interface RowOptionsV2 { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface RowInterface { /** @@ -177,27 +189,27 @@ interface RowInterface { /** * Called when the layout is set in the horizontal direction. * - * Anonymous Object Rectification * @param { ?RowOptions } options - row options * @returns { RowAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ (options?: RowOptions): RowAttribute; /** * Called when the layout is set in the horizontal direction. * - * Anonymous Object Rectification * @param { ?(RowOptions | RowOptionsV2) } options - row options * @returns { RowAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ (options?: RowOptions | RowOptionsV2): RowAttribute; } @@ -234,7 +246,8 @@ interface RowInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RowAttribute extends CommonMethod { /** @@ -273,7 +286,8 @@ declare class RowAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ alignItems(value: VerticalAlign): RowAttribute; @@ -313,7 +327,8 @@ declare class RowAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ justifyContent(value: FlexAlign): RowAttribute; /** @@ -323,7 +338,8 @@ declare class RowAttribute extends CommonMethod { * @returns { RowAttribute } The attribute of the row. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ pointLight(value: PointLightStyle): RowAttribute; /** @@ -335,7 +351,8 @@ declare class RowAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ reverse(isReversed: Optional): RowAttribute; } diff --git a/api/@internal/component/ets/row_split.d.ts b/api/@internal/component/ets/row_split.d.ts index 936f5c47b8492df8935a174740a702e895cd2a10..395b1e5e0a2cd92953b1690dff8175fbac7153f4 100644 --- a/api/@internal/component/ets/row_split.d.ts +++ b/api/@internal/component/ets/row_split.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod } from './common'; +/*** endif */ + + /** * Provides interfaces for layout in the vertical direction. * @@ -40,7 +45,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface RowSplitInterface { /** @@ -65,7 +71,8 @@ interface RowSplitInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (): RowSplitAttribute; } @@ -86,7 +93,8 @@ interface RowSplitInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RowSplitAttribute extends CommonMethod { /** @@ -114,7 +122,8 @@ declare class RowSplitAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ resizeable(value: boolean): RowSplitAttribute; } diff --git a/api/@internal/component/ets/save_button.d.ts b/api/@internal/component/ets/save_button.d.ts index c1f1563e882f2b62e467576c235d28714c861e5a..71668b6a0b88367c357bf3f943b7de9fa9695985 100644 --- a/api/@internal/component/ets/save_button.d.ts +++ b/api/@internal/component/ets/save_button.d.ts @@ -18,20 +18,28 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ButtonType } from './button'; +import { ClickEvent } from './common'; +import { SecurityComponentMethod } from './securityComponent'; +import { BusinessError } from '../../@ohos.base' +/*** endif */ + /** * Enumerates the icon styles. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** * Enumerates the icon styles. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SaveIconStyle { /** @@ -45,7 +53,8 @@ declare enum SaveIconStyle { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ FULL_FILLED = 0, @@ -60,7 +69,8 @@ declare enum SaveIconStyle { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ LINES = 1, @@ -69,7 +79,8 @@ declare enum SaveIconStyle { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ PICTURE = 2 } @@ -77,17 +88,18 @@ declare enum SaveIconStyle { /** * Enumerates the text that can be displayed on the save button. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** * Enumerates the text that can be displayed on the save button. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SaveDescription { /** @@ -101,7 +113,8 @@ declare enum SaveDescription { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ DOWNLOAD = 0, @@ -116,7 +129,8 @@ declare enum SaveDescription { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ DOWNLOAD_FILE = 1, @@ -131,7 +145,8 @@ declare enum SaveDescription { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ SAVE = 2, @@ -146,7 +161,8 @@ declare enum SaveDescription { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ SAVE_IMAGE = 3, @@ -161,7 +177,8 @@ declare enum SaveDescription { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ SAVE_FILE = 4, @@ -176,7 +193,8 @@ declare enum SaveDescription { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ DOWNLOAD_AND_SHARE = 5, @@ -191,7 +209,8 @@ declare enum SaveDescription { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ RECEIVE = 6, @@ -206,7 +225,8 @@ declare enum SaveDescription { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ CONTINUE_TO_RECEIVE = 7, @@ -215,7 +235,8 @@ declare enum SaveDescription { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ SAVE_TO_GALLERY = 8, @@ -224,7 +245,8 @@ declare enum SaveDescription { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ EXPORT_TO_GALLERY = 9, @@ -233,7 +255,8 @@ declare enum SaveDescription { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ QUICK_SAVE_TO_GALLERY = 10, @@ -242,7 +265,8 @@ declare enum SaveDescription { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ RESAVE_TO_GALLERY = 11, @@ -269,7 +293,8 @@ declare enum SaveDescription { * @interface SaveButtonOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SaveButtonOptions { /** @@ -285,7 +310,8 @@ declare interface SaveButtonOptions { * @type { ?SaveIconStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ icon?: SaveIconStyle; @@ -302,7 +328,8 @@ declare interface SaveButtonOptions { * @type { ?SaveDescription } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ text?: SaveDescription; @@ -319,7 +346,8 @@ declare interface SaveButtonOptions { * @type { ?ButtonType } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ buttonType?: ButtonType; } @@ -327,17 +355,18 @@ declare interface SaveButtonOptions { /** * Enumerates the click event results of the save button. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** * Enumerates the click event results of the save button. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SaveButtonOnClickResult { /** @@ -351,7 +380,8 @@ declare enum SaveButtonOnClickResult { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ SUCCESS = 0, @@ -366,7 +396,8 @@ declare enum SaveButtonOnClickResult { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ TEMPORARY_AUTHORIZATION_FAILED = 1 } @@ -384,7 +415,8 @@ declare enum SaveButtonOnClickResult { * @interface SaveButtonInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface SaveButtonInterface { /** @@ -400,7 +432,8 @@ interface SaveButtonInterface { * @returns { SaveButtonAttribute } Returns the attribute of the save button. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ (): SaveButtonAttribute; @@ -421,11 +454,14 @@ interface SaveButtonInterface { * @returns { SaveButtonAttribute } Returns the attribute of the save button. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ (options: SaveButtonOptions): SaveButtonAttribute; } + + /** * Callback function when the save button is clicked. * @@ -435,7 +471,8 @@ interface SaveButtonInterface { * @param { BusinessError } [error] - The error code and message of click event. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ type SaveButtonCallback = (event: ClickEvent, result: SaveButtonOnClickResult, error?: BusinessError) => void; @@ -452,7 +489,8 @@ type SaveButtonCallback = (event: ClickEvent, result: SaveButtonOnClickResult, e * @extends SecurityComponentMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class SaveButtonAttribute extends SecurityComponentMethod { /** @@ -479,7 +517,8 @@ declare class SaveButtonAttribute extends SecurityComponentMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ScreenAttribute extends CommonMethod { } diff --git a/api/@internal/component/ets/scroll_bar.d.ts b/api/@internal/component/ets/scroll_bar.d.ts index 47db01d9f059443df8c860d123fb8cac851d7e4a..3dfc4cf07a7a1a060e01eb5872d9cce97e0a7736 100644 --- a/api/@internal/component/ets/scroll_bar.d.ts +++ b/api/@internal/component/ets/scroll_bar.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Scroller } from './scroll' +import { BarState } from './enums' +import { Optional, CommonMethod } from './common' +/*** endif */ + /** * Content scroll direction. * @@ -40,7 +46,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 ScrollBarDirection { /** @@ -62,7 +69,8 @@ declare enum ScrollBarDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Vertical, @@ -85,7 +93,8 @@ declare enum ScrollBarDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Horizontal, } @@ -112,7 +121,8 @@ declare enum ScrollBarDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ScrollBarOptions { /** @@ -137,7 +147,8 @@ declare interface ScrollBarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scroller: Scroller; @@ -163,7 +174,8 @@ declare interface ScrollBarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ direction?: ScrollBarDirection; @@ -189,7 +201,8 @@ declare interface ScrollBarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ state?: BarState; } @@ -216,7 +229,8 @@ declare interface ScrollBarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ScrollBarInterface { /** @@ -244,7 +258,8 @@ interface ScrollBarInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (value: ScrollBarOptions): ScrollBarAttribute; } @@ -271,7 +286,8 @@ interface ScrollBarInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ScrollBarAttribute extends CommonMethod { /** @@ -281,7 +297,8 @@ declare class ScrollBarAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enableNestedScroll(enabled: Optional): ScrollBarAttribute; diff --git a/api/@internal/component/ets/search.d.ts b/api/@internal/component/ets/search.d.ts index ba0de091712c43217f1166333edb8bc774e3f163..6433d73a5b8fd0b1ebb3eff92fb85d0e430ec964 100644 --- a/api/@internal/component/ets/search.d.ts +++ b/api/@internal/component/ets/search.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2025 Huawei Device Co., Ltd. + * 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 @@ -18,6 +18,18 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { TextContentControllerBase, SelectionOptions,Callback,CommonMethod,Optional,TextDecorationOptions } from './common'; +import { CustomBuilder } from './builder'; +import { ResourceStr,Length,ResourceColor ,Dimension,Font} from './units'; +import { CaretStyle, EditableTextOnChangeCallback, InsertValue, DeleteValue, EditMenuOptions,KeyboardAppearance,EditableTextChangeValue,AutoCapitalizationMode } from './textCommon'; +import { EnterKeyType, OnTextSelectionChangeCallback, OnContentScrollCallback, OnPasteCallback, SubmitEvent } from './textInput'; +import { CopyOptions,TextAlign } from './enums'; +import { KeyboardOptions } from './richEditor'; +import { Resource } from '../../global/resource'; +import { SymbolGlyphModifier } from '../SymbolGlyphModifier'; +/*** endif */ + /** * Provides the method of switching the cursor position. * @@ -40,7 +52,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class SearchController extends TextContentControllerBase { /** @@ -58,12 +71,12 @@ declare class SearchController extends TextContentControllerBase { */ /** * constructor. - * A constructor used to create a SearchController object. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -85,11 +98,12 @@ declare class SearchController extends TextContentControllerBase { /** * Called when the position of the insertion cursor is set. * - * @param { number } value - Length from the start of the character string to the position where the caret is located. + * @param { number } value * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ caretPosition(value: number): void; @@ -106,34 +120,25 @@ declare class SearchController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ stopEditing(): void; /** * Text selection is achieved by specifying the start and end positions of the text. - * - *

NOTE: - *
If selectionStart or selectionEnd is set to undefined, the value 0 will be used. - *
If selectionMenuHidden is set to true or a 2-in-1 device is used, - * calling setTextSelection does not display the context menu even when options is set to MenuPolicy.SHOW. - *
If the selected text contains an emoji, the emoji is selected when its start position is within the text selection range. - *
Sets the text selection range and highlights the selected text when the component is focused. - *
This API works only when the value of selectionStart is less than that of selectionEnd. - *

- * + * * @param { number } selectionStart - The start position of the selected text. * The start position of text in the text box is 0. * A value less than 0 is handled as 0. * A value greater than the maximum text length is handled as the maximum text length. * @param { number } selectionEnd - The end position of the selected text. - * A value less than 0 is handled as the value 0. - * A value greater than the maximum text length is handled as the maximum text length. - * @param { SelectionOptions } [options] - Indicates the options of the text selection.Default value is MenuPolicy.DEFAULT. + * @param { SelectionOptions } [options] - Indicates the options of the text selection. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ setTextSelection(selectionStart: number, selectionEnd: number, options?: SelectionOptions): void; } @@ -153,7 +158,8 @@ declare class SearchController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum CancelButtonStyle { /** @@ -169,7 +175,8 @@ declare enum CancelButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ CONSTANT, @@ -186,7 +193,8 @@ declare enum CancelButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ INVISIBLE, @@ -203,7 +211,8 @@ declare enum CancelButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ INPUT } @@ -223,7 +232,8 @@ declare enum CancelButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SearchType { /** @@ -235,11 +245,12 @@ declare enum SearchType { */ /** * Basic input mode. - * The value can contain digits, letters, underscores (_), spaces, and special characters. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NORMAL = 0, @@ -256,7 +267,8 @@ declare enum SearchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NUMBER = 2, @@ -269,12 +281,12 @@ declare enum SearchType { */ /** * Phone number entry mode. - * In this mode, the following are allowed: digits, spaces, plus signs (+), hyphens (-), asterisks (*), and number signs (#); - * the length is not limited. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ PHONE_NUMBER = 3, @@ -287,22 +299,23 @@ declare enum SearchType { */ /** * E-mail address input mode. - * This mode accepts only digits, letters, underscores (_), dots (.), - * and the following special characters: ! # $ % & ' * + - / = ? ^ ` { | } ~ @ (which can only appear once) + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ EMAIL = 5, /** * Number decimal entry mode. - * The value can contain digits and one decimal point. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NUMBER_DECIMAL = 12, @@ -312,7 +325,8 @@ declare enum SearchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ URL = 13, @@ -334,7 +348,8 @@ declare enum SearchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SearchOptions { /** @@ -350,32 +365,10 @@ declare interface SearchOptions { * @type { ?string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 - */ - /** - * Text input in the search text box. - * - * Anonymous Object Rectification. - * - *

NOTE: - *
Since API version 10, this parameter supports two-way binding through $$. - *
Since API version 18, this parameter supports two-way binding through !!. - *

- * - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 18 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - /** - * Text input in the search text box. - * - * @type { ?ResourceStr } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - value?: ResourceStr; + value?: string; /** * Text displayed when there is no input. @@ -397,16 +390,8 @@ declare interface SearchOptions { * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 - */ - /** - * Text displayed when there is no input. - * - * Anonymous Object Rectification. - * @type { ?ResourceStr } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 18 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ placeholder?: ResourceStr; @@ -423,27 +408,8 @@ declare interface SearchOptions { * @type { ?string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 - */ - /** - * Path to the search icon. - * - * Anonymous Object Rectification. - * - *

NOTE: - *
The icon data source can be a local or online image. - *

    - *
  • The supported formats include PNG, JPG, BMP, SVG, GIF, pixelmap, and HEIF.
  • - *
  • The Base64 string is supported in the following format: - * data:image/[png|jpeg|bmp|webp|heif];base64,[base64 data], where [base64 data] is a Base64 string.
  • - *
- *
If this attribute and the searchIcon attribute are both set, the searchIcon attribute takes precedence. - *

- * - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 18 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ icon?: string; @@ -460,16 +426,8 @@ declare interface SearchOptions { * @type { ?SearchController } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 - */ - /** - * Controller of the component. - * - * Anonymous Object Rectification. - * @type { ?SearchController } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 18 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ controller?: SearchController; } @@ -496,7 +454,8 @@ declare interface SearchOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface SearchInterface { /** @@ -535,7 +494,8 @@ interface SearchInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ (options?: SearchOptions): SearchAttribute; } @@ -555,7 +515,8 @@ interface SearchInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface IconOptions { /** @@ -568,16 +529,13 @@ interface IconOptions { */ /** * Set the icon size - * - *

NOTE: - *
It cannot be set in percentage. - *

- * + * * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ size?: Length; @@ -596,7 +554,8 @@ interface IconOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ color?: ResourceColor; @@ -615,7 +574,8 @@ interface IconOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ src?: ResourceStr; } @@ -635,7 +595,8 @@ interface IconOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface SearchButtonOptions { /** @@ -648,16 +609,13 @@ interface SearchButtonOptions { */ /** * Set the SearchButton fontSize - * - *

NOTE: - *
It cannot be set in percentage. - *

- * + * * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ fontSize?: Length; @@ -676,24 +634,21 @@ interface SearchButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ fontColor?: ResourceColor; /** * Automatically disables the search button before the user enters text - * - *

NOTE: - *
true: The search button is disabled when there is no text input. - *
false: The search button remains enabled regardless of the text input. - *

- * + * * @type { ?Boolean } * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ autoDisable?: Boolean; } @@ -705,30 +660,31 @@ interface SearchButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface CancelButtonOptions { /** * Set the CancelButton style - * Display state of the Cancel button on the right. - * + * * @type { ?CancelButtonStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ style?: CancelButtonStyle; /** * Set the CancelButton icon - * Icon of the Cancel button on the right. - * + * * @type { ?IconOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ icon?: IconOptions; } @@ -739,47 +695,29 @@ interface CancelButtonOptions { * @interface CancelButtonSymbolOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 - */ -/** - * Defines the CancelButton symbol options - * - * @interface CancelButtonSymbolOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface CancelButtonSymbolOptions { /** - * Set the CancelButton style. - * Display state of the Cancel button on the right. - * + * Set the CancelButton style + * * @type { ?CancelButtonStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ style?: CancelButtonStyle; /** - * Set the CancelButton symbol icon. - * Symbol icon of the Cancel button on the right. - * - * @type { ?SymbolGlyphModifier } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - /** - * Set the CancelButton symbol icon. - * Symbol icon of the Cancel button on the right. - * + * Set the CancelButton symbol icon + * * @type { ?SymbolGlyphModifier } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ icon?: SymbolGlyphModifier; } @@ -793,7 +731,8 @@ interface CancelButtonSymbolOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ declare type SearchSubmitCallback = (searchContent: string, event?: SubmitEvent) => void; @@ -819,7 +758,8 @@ declare type SearchSubmitCallback = (searchContent: string, event?: SubmitEvent) * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class SearchAttribute extends CommonMethod { /** @@ -843,13 +783,7 @@ declare class SearchAttribute extends CommonMethod { */ /** * Set the search button text, fontSize and fontColor - * - *

NOTE: - *
Clicking the search button triggers both onSubmit and onClick callbacks. - *
The default font size on wearable devices is 18 fp. - *

- * - * + * * @param { string } value - indicates the text of the search button. * @param { SearchButtonOptions } option - indicates the fontSize and fontColor of the search button.Default value is { fontSize: '16fp', fontColor: '#ff3f97e9' } * @returns { SearchAttribute } @@ -867,9 +801,10 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - searchButton(value: ResourceStr, option?: SearchButtonOptions): SearchAttribute; + searchButton(value: string, option?: SearchButtonOptions): SearchAttribute; /** * Set the text Color @@ -882,17 +817,14 @@ declare class SearchAttribute extends CommonMethod { */ /** * Set the text Color - * - *

NOTE: - *
Universal text attributes fontSize, fontStyle, fontWeight, and fontFamily are set in the textFont attribute. - *

- * - * @param { ResourceColor } value - indicates the color of the text.Default value is '#FF182431'.The default value on wearable devices is '#dbffffff'. + * + * @param { ResourceColor } value - indicates the color of the text. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ fontColor(value: ResourceColor): SearchAttribute; @@ -917,33 +849,14 @@ declare class SearchAttribute extends CommonMethod { */ /** * Set the search icon style - * - *

NOTE: - *
The default icon size on wearable devices is 16 vp. - *
Default value in light mode: - * - * { - * size: '16vp', - * color: '#99182431', - * src: ' ' - * } - * - *
Default value in dark mode: - * - * { - * size: '16vp', - * color: '#99ffffff', - * src: ' ' - * } - * - *

- * + * * @param { IconOptions | SymbolGlyphModifier } value - indicates the style of the search icon. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ searchIcon(value: IconOptions | SymbolGlyphModifier): SearchAttribute; @@ -968,91 +881,67 @@ declare class SearchAttribute extends CommonMethod { */ /** * Set the cancel button style - * - *

NOTE: - *
The default icon size on wearable devices is 18 vp. - *
When style is set to CancelButtonStyle.CONSTANT, the Cancel button is always displayed. - *
Default value: - * - * { - * style: CancelButtonStyle.INPUT, - * icon: { - * size: '16vp', - * color: '#99ffffff', - * src: ' ' - * } - * } - * - *

- * + * * @param { CancelButtonOptions | CancelButtonSymbolOptions } value - indicates the style of the cancel button. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ cancelButton(value: CancelButtonOptions | CancelButtonSymbolOptions): SearchAttribute; /** * Specify the indentation of the first line in a text-block. * - * @param { Dimension } value - The length of text indent.Default value is 0. + * @param { Dimension } value - The length of text indent. * @returns { SearchAttribute } The attribute of the text. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ textIndent(value: Dimension): SearchAttribute; /** * Called when the inputFilter of text is set. - * - *

NOTE: - *
Only inputs that comply with the regular expression can be displayed. - *
Other inputs are filtered out. - *
The specified regular expression can match single characters, but not strings. - *
If inputFilter is set and the entered characters are not null, - * the filtering effect attached to the text box type (specified through the type attribute) does not take effect. - *

- * - * @param { ResourceStr } value - Regular expression. - * @param { Callback } error - Filtered-out content to return when regular expression matching fails. + * + * @param { ResourceStr } value + * @param { Callback } error * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ inputFilter(value: ResourceStr, error?: Callback): SearchAttribute; /** * Called when judging whether the text editing change finished. - * The text box is in the editing state when it has the caret placed in it, and is in the non-editing state otherwise. - * - * @param { Callback } callback - Returns true if the component is in an editing state. + * + * @param { Callback } callback * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onEditChange(callback: Callback): SearchAttribute; /** * Define the text selected background color of the text input. - * - *

NOTE: - *
If the opacity is not set, a 20% opacity will be used. - *

- * + * * @param { ResourceColor } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ selectedBackgroundColor(value: ResourceColor): SearchAttribute; @@ -1067,24 +956,14 @@ declare class SearchAttribute extends CommonMethod { */ /** * Set the cursor style - * - *

NOTE: - *
Since API version 12, this API can be used to set the text handle color, which is the same as the caret color. - *
Default value: - * - * { - * width: '1.5vp', - * color: '#007DFF' - * } - * - *

- * + * * @param { CaretStyle } value - indicates the style of the cursor. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ caretStyle(value: CaretStyle): SearchAttribute; @@ -1108,12 +987,13 @@ declare class SearchAttribute extends CommonMethod { /** * Set the place hold text color * - * @param { ResourceColor } value - Default value is '#99182431'.The default value on wearable devices is '#99ffffff'. + * @param { ResourceColor } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ placeholderColor(value: ResourceColor): SearchAttribute; @@ -1136,18 +1016,14 @@ declare class SearchAttribute extends CommonMethod { */ /** * Set the font used for place holder text - * - *

NOTE: - *
The 'HarmonyOS Sans' font and registered custom fonts are supported. - *
The default font size on wearable devices is 18 px. - *

- * + * * @param { Font } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ placeholderFont(value?: Font): SearchAttribute; @@ -1170,30 +1046,27 @@ declare class SearchAttribute extends CommonMethod { */ /** * Set the font used for input text - * - *

NOTE: - *
Currently, only the default font family is supported. - *
The default font size on wearable devices is 18 fp. - *

- * + * * @param { Font } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ textFont(value?: Font): SearchAttribute; /** * Set enter key type of soft keyboard * - * @param { EnterKeyType } value - Default value is EnterKeyType.Search. + * @param { EnterKeyType } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enterKeyType(value: EnterKeyType): SearchAttribute; @@ -1227,8 +1100,7 @@ declare class SearchAttribute extends CommonMethod { /** * Call the function when clicked the search button. * - * Anonymous Object Rectification. - * @param { Callback } callback - Search submission callback, which returns the text content currently in the search box. + * @param { Callback } callback * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -1238,8 +1110,7 @@ declare class SearchAttribute extends CommonMethod { onSubmit(callback: Callback): SearchAttribute; /** * Call the function when clicked the search button. - * The submission event provides a method to maintain the edit state of the Search component. - * + * * @param { SearchSubmitCallback } callback - callback of the listened event. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1249,6 +1120,19 @@ declare class SearchAttribute extends CommonMethod { */ onSubmit(callback: SearchSubmitCallback): SearchAttribute; + /** + * Call the function when clicked the search button. + * + * @param { Callback | SearchSubmitCallback } callback - callback of the listened event. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onSubmit(callback: Callback | SearchSubmitCallback): SearchAttribute; + /** * Call the function when editing the input text * @@ -1278,18 +1162,14 @@ declare class SearchAttribute extends CommonMethod { */ /** * Call the function when editing the input text - * - *

NOTE: - *
In this callback, if cursor operations are performed, - * developers need to adjust the cursor logic based on the previewText parameter to ensure it works seamlessly within the preview display scenario. - *

- * + * * @param { EditableTextOnChangeCallback } callback * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onChange(callback: EditableTextOnChangeCallback): SearchAttribute; @@ -1321,7 +1201,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ onTextSelectionChange(callback: OnTextSelectionChangeCallback): SearchAttribute; @@ -1353,7 +1234,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ onContentScroll(callback: OnContentScrollCallback): SearchAttribute; @@ -1387,13 +1269,13 @@ declare class SearchAttribute extends CommonMethod { /** * Called when using the Clipboard menu. * - * Anonymous Object Rectification. - * @param { Callback } callback - Callback used to return the copied text content. + * @param { Callback } callback * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ onCopy(callback: Callback): SearchAttribute; @@ -1427,13 +1309,13 @@ declare class SearchAttribute extends CommonMethod { /** * Called when using the Clipboard menu. * - * Anonymous Object Rectification. - * @param { Callback } callback - Callback used to return the cut text content. + * @param { Callback } callback * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ onCut(callback: Callback): SearchAttribute; @@ -1470,13 +1352,13 @@ declare class SearchAttribute extends CommonMethod { /** * Called when using the Clipboard menu. * - * Anonymous Object Rectification. - * @param { OnPasteCallback } callback - Executed when a paste operation is performed.Callback used to return the pasted text content. + * @param { OnPasteCallback } callback - Executed when a paste operation is performed. * @returns { SearchAttribute } Returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ onPaste(callback: OnPasteCallback): SearchAttribute; @@ -1499,19 +1381,14 @@ declare class SearchAttribute extends CommonMethod { */ /** * Called when the copy option is set. - * - *

NOTE: - *
If this attribute is set to CopyOptions.None, the text can only be pasted; - * all other actions, such as copying, cutting, and sharing, are disabled. - *
Dragging is not allowed when CopyOptions.None is set. - *

- * - * @param { CopyOptions } value - Default value is CopyOptions.LocalDevice. + * + * @param { CopyOptions } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ copyOption(value: CopyOptions): SearchAttribute; @@ -1521,36 +1398,19 @@ declare class SearchAttribute extends CommonMethod { * @param { number } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full + * crossplatform * @since 11 */ /** * Called when the input of maximum text length is set. - * - *

NOTE: - *
By default, there is no maximum number of characters. - *
When the maximum number is reached, no more characters can be entered. - *

- * - * @param { number } value - * @returns { SearchAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - /** - * Called when the input of maximum text length is set. - * - *

NOTE: - *
By default, there is no maximum number of characters. - *
When the maximum number is reached, no more characters can be entered. - *

- * + * * @param { number } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform + * crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ maxLength(value: number): SearchAttribute; @@ -1573,17 +1433,14 @@ declare class SearchAttribute extends CommonMethod { */ /** * Called when the text align is set. - * - *

NOTE: - *
Currently, the following alignment modes are supported: Start, Center, and End. - *

- * - * @param { TextAlign } value - Default value is TextAlign.Start. + * + * @param { TextAlign } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ textAlign(value: TextAlign): SearchAttribute; @@ -1598,17 +1455,14 @@ declare class SearchAttribute extends CommonMethod { */ /** * Sets whether request keyboard or not when on focus. - * - *

NOTE: - *
Since API version 10, the Search component brings up the keyboard by default when it obtains focus. - *

- * - * @param { boolean } value - Default value is true. + * + * @param { boolean } value * @returns { SearchAttribute } Returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enableKeyboardOnFocus(value: boolean): SearchAttribute; @@ -1624,127 +1478,63 @@ declare class SearchAttribute extends CommonMethod { /** * Controls whether the selection menu pops up. * - *

NOTE: - *
true: Tapping, long-pressing, double-tapping, triple-tapping, - * or right-clicking the text box will not trigger the system text selection menu. - *
false: Tapping, long-pressing, double-tapping, triple-tapping, - * or right-clicking the text box will trigger the system text selection menu. - *

- * - * @param { boolean } value - Default value is false. + * @param { boolean } value * @returns { SearchAttribute } returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ selectionMenuHidden(value: boolean): SearchAttribute; /** * Called when the minimum font size of the font is set. * - *

NOTE: - *
For the string type, numeric string values with optional units, for example, "10" or "10fp", are supported. - *
For the setting to take effect, this attribute must be used together with maxFontSize or layout constraint settings. - *
When the adaptive font size is used, the fontSize settings do not take effect. - *

- * - * @param { number | string | Resource } value - The unit is fp. + * @param { number | string | Resource } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ minFontSize(value: number | string | Resource): SearchAttribute; /** * Called when the maximum font size of the font is set. - * - *

NOTE: - *
For the string type, numeric string values with optional units, for example, "10" or "10fp", are supported. - *
For the setting to take effect, this attribute must be used together with minFontSize or layout constraint settings. - *
When the adaptive font size is used, the fontSize settings do not take effect. - *

- * - * @param { number | string | Resource } value - The unit is fp. + * + * @param { number | string | Resource } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ maxFontSize(value: number | string | Resource): SearchAttribute; - /** + /** * Called when the minimum font scale of the font is set. - * Value range: [0, 1] - * - *

NOTE: - *
The undefined type is supported. - *
A value less than 0 is handled as 0. - *
A value greater than 1 is handled as 1. - *
Abnormal values are ineffective by default. - *

- * + * * @param { Optional } scale * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - /** - * Called when the minimum font scale of the font is set. - * Value range: [0, 1] - * - *

NOTE: - *
The undefined type is supported. - *
A value less than 0 is handled as 0. - *
A value greater than 1 is handled as 1. - *
Abnormal values are ineffective by default. - *

- * - * @param { Optional } scale - * @returns { SearchAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - minFontScale(scale: Optional): SearchAttribute; + minFontScale(scale: Optional): SearchAttribute; /** * Called when the maximum font scale of the font is set. - * Value range: [1, +∞) - * - *

NOTE: - *
The undefined type is supported. - *
A value less than 1 is handled as 1. - *
Abnormal values are ineffective by default. - *

- * - * @param { Optional } scale - * @returns { SearchAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 18 - */ - /** - * Called when the maximum font scale of the font is set. - * Value range: [1, +∞) - * - *

NOTE: - *
The undefined type is supported. - *
A value less than 1 is handled as 1. - *
Abnormal values are ineffective by default. - *

- * + * * @param { Optional } scale * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ maxFontScale(scale: Optional): SearchAttribute; @@ -1768,76 +1558,54 @@ declare class SearchAttribute extends CommonMethod { */ /** * Define custom keyboard. - * - *

NOTE: - *
When a custom keyboard is set, activating the text box opens the specified custom component, - * instead of the system input method. - *
The custom keyboard's height can be set through the height attribute of the custom component's root node, - * and its width is fixed at the default value. - *
The custom keyboard is presented by overlaying the original screen. - *
It is not compressed or lifted if avoid mode is not enabled or avoidance is not needed for the text box. - *
The custom keyboard cannot obtain the focus, but it blocks gesture events. - *
By default, the custom keyboard is closed when the input component loses the focus. - *
You can also use the stopEditing API to close the keyboard. - *
When a custom keyboard is set, the text box does not support camera input, even when the device supports. - *
When setting a custom keyboard, you can bind the onKeyPrelme event to prevent input from the physical keyboard. - *

- * + * * @param { CustomBuilder } value - Set up a custom keyboard of Search * @param { KeyboardOptions } [options] - Indicates the custom keyboard options of Search * @returns { SearchAttribute } returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ customKeyboard(value: CustomBuilder, options?: KeyboardOptions): SearchAttribute; /** * Called when the text decoration of the text is set. * - * @param { TextDecorationOptions } value - Default value is { type: TextDecorationType.None, color: Color.Black, style: TextDecorationStyle.SOLID }. + * @param { TextDecorationOptions } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ decoration(value: TextDecorationOptions): SearchAttribute; /** * Called when the distance between text fonts is set. - * - *

NOTE: - *
If the value specified is a percentage or 0, the default value is used. - *
For the string type, numeric string values with optional units, for example, "10" or "10fp", are supported. - *
If the value specified is a negative value, the text is compressed. - *
A negative value too small may result in the text being compressed to 0 and no content being displayed. - *

- * - * @param { number | string | Resource } value - The unit is fp. + * + * @param { number | string | Resource } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ letterSpacing(value: number | string | Resource): SearchAttribute; /** * Called when the line height of the font is set. - * - *

NOTE: - *
If the value is less than or equal to 0, the line height is not limited and the font size is adaptive. - *
If the value is of the number type, the unit fp is used. - *

- * + * * @param { number | string | Resource } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ lineHeight(value: number | string | Resource): SearchAttribute; @@ -1853,12 +1621,13 @@ declare class SearchAttribute extends CommonMethod { /** * Called when the search type is set. * - * @param { SearchType } value - Default value is SearchType.Normal. + * @param { SearchType } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type(value: SearchType): SearchAttribute; @@ -1874,75 +1643,60 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ fontFeature(value: string): SearchAttribute; /** * Get text value information when about to input. - * - *

NOTE: - *
It returns true if the text is inserted; returns false otherwise. - *
This callback is not triggered for pre-edit or candidate word operations. - *
It is available only for system input methods. - *

- * + * * @param { Callback } callback - The triggered function when text content is about to insert. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onWillInsert(callback: Callback): SearchAttribute; /** * Get text value information when completed input. - * - *

NOTE: - *
It is available only for system input methods. - *

- * + * * @param { Callback } callback - The triggered function when text content has been inserted. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onDidInsert(callback: Callback): SearchAttribute; /** * Get text value information when about to delete. - * - *

NOTE: - *
It returns true if the text is deleted; returns false otherwise. - *
This callback is not invoked for text preview. - *
It is available only for system input methods. - *

- * + * * @param { Callback } callback - The triggered function when text content is about to delete. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onWillDelete(callback: Callback): SearchAttribute; /** * Get text value information when the deletion has been completed - * - *

NOTE: - *
It is available only for system input methods. - *

- * + * * @param { Callback } callback - The triggered function when text content has been deleted. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onDidDelete(callback: Callback): SearchAttribute; @@ -1960,56 +1714,40 @@ declare class SearchAttribute extends CommonMethod { /** * Set the custom text menu. - * Sets the extended options of the custom context menu on selection, - * including the text content, icon, and callback. - * + * * @param { EditMenuOptions } editMenu - Customize text menu options. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ editMenuOptions(editMenu: EditMenuOptions): SearchAttribute; /** * Define the preview text mode of the text input. - * - *

NOTE: - *
Preview text is in a temporary state and does not support text interception. - *
As such, it does not trigger onWillInsert, onDidInsert, onWillDelete, or onDidDelete callbacks. - *

- * - * @param { boolean } enable - Indicates the preview text mode.Default value is true. + * + * @param { boolean } enable - Indicates the preview text mode. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enablePreviewText(enable: boolean): SearchAttribute; /** * Enable or disable haptic feedback. - * - *

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", - * } - * ] - * - *

- * + * * @param { boolean } isEnabled - Default value is true, set false to disable haptic feedback. * @returns { SearchAttribute } returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ enableHapticFeedback(isEnabled: boolean): SearchAttribute; @@ -2021,19 +1759,21 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20', '1.2':'20'} + * @arkts 1.1&1.2 */ autoCapitalizationMode(mode: AutoCapitalizationMode): SearchAttribute; /** * Set the text with half leading. * - * @param { Optional } halfLeading - Default value is false.The value true means that half leading is enabled, and false means the opposite. + * @param { Optional } halfLeading * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ halfLeading(halfLeading: Optional): SearchAttribute; @@ -2044,24 +1784,22 @@ declare class SearchAttribute extends CommonMethod { * @returns { SearchAttribute } returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ stopBackPress(isStopped: Optional): SearchAttribute; /** * Get text value information when about to change. - * - *

NOTE: - *
This callback is triggered after onWillInsert and onWillDelete, but before onDidInsert and onDidDelete. - *

- * + * * @param { Callback } callback - The triggered function when text content is about to change. * Returning true allows the change to proceed, while returning false cancels the change. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ onWillChange(callback: Callback): SearchAttribute; @@ -2072,7 +1810,8 @@ declare class SearchAttribute extends CommonMethod { * @returns { SearchAttribute } returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ keyboardAppearance(appearance: Optional): SearchAttribute; diff --git a/api/@internal/component/ets/security_component.d.ts b/api/@internal/component/ets/security_component.d.ts index c84936c7982aad724d3cc4b3c775f2737129bce3..b95b806471edc695409cdcc7d268703babc8778f 100644 --- a/api/@internal/component/ets/security_component.d.ts +++ b/api/@internal/component/ets/security_component.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Dimension, Position, Edges, LocalizedEdges, ResourceColor, Padding, Length, SizeOptions, ConstraintSizeOptions, BorderRadiuses } from './units'; +import { FontStyle, FontWeight, BorderStyle, TextHeightAdaptivePolicy, Axis, Alignment } from './enums'; +import { ChainStyle, LocalizedAlignRuleOptions, AlignRuleOption } from './common'; +import { Resource } from '../../global/resource'; +/*** endif */ + /** * Enumerates the layout direction of the icon and text. * @@ -65,6 +72,37 @@ declare enum SecurityComponentLayoutDirection { VERTICAL = 1 } +/** + * Enumerates the layout direction of the icon and text. + * + * @enum { int } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare enum SecurityComponentLayoutDirection { + /** + * Horizontal layout. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + HORIZONTAL = 0, + + /** + * Vertical layout. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + VERTICAL = 1 +} + /** * Defines the method of a security component. * @@ -76,7 +114,8 @@ declare enum SecurityComponentLayoutDirection { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class SecurityComponentMethod { /** @@ -94,7 +133,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ iconSize(value: Dimension): T; @@ -113,7 +153,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ layoutDirection(value: SecurityComponentLayoutDirection): T; @@ -132,7 +173,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ position(value: Position): T; @@ -153,7 +195,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ markAnchor(value: Position): T; @@ -187,7 +230,8 @@ declare class SecurityComponentMethod { * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ offset(value: Position | Edges | LocalizedEdges): T; @@ -206,7 +250,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ fontSize(value: Dimension): T; @@ -225,7 +270,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ fontStyle(value: FontStyle): T; @@ -246,16 +292,19 @@ declare class SecurityComponentMethod { * @atomicservice * @since 11 */ + fontWeight(value: number | FontWeight | string): T; + /** * Font weight of the inner text. * - * @param { number | FontWeight | string | Resource } value - Indicates the font weight of the text in the security component. + * @param { int | FontWeight | string } value - Indicates the font weight of the text in the security component. * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 20 + * @arkts 1.2 */ - fontWeight(value: number | FontWeight | string | Resource): T; + fontWeight(value: int | FontWeight | string): T; /** * Font family of the inner text. @@ -272,7 +321,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ fontFamily(value: string | Resource): T; @@ -291,7 +341,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ fontColor(value: ResourceColor): T; @@ -310,7 +361,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ iconColor(value: ResourceColor): T; @@ -329,7 +381,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor(value: ResourceColor): T; @@ -348,7 +401,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ borderStyle(value: BorderStyle): T; @@ -367,7 +421,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ borderWidth(value: Dimension): T; @@ -386,7 +441,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ borderColor(value: ResourceColor): T; @@ -405,7 +461,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ borderRadius(value: Dimension): T; @@ -435,7 +492,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ padding(value: Padding | Dimension): T; @@ -454,7 +512,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ textIconSpace(value: Dimension): T; @@ -465,7 +524,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 * @test */ key(value: string): T; @@ -485,7 +545,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ width(value: Length): T; @@ -504,7 +565,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ height(value: Length): T; @@ -523,7 +585,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ size(value: SizeOptions): T; @@ -544,7 +607,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ constraintSize(value: ConstraintSizeOptions): T; @@ -555,7 +619,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ align(alignType: Alignment): T; @@ -566,7 +631,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ alignRules(alignRule: AlignRuleOption): T; @@ -577,7 +643,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ alignRules(alignRule: LocalizedAlignRuleOptions): T; @@ -588,7 +655,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ id(description: string): T; @@ -600,7 +668,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ chainMode(direction: Axis, style: ChainStyle): T; @@ -611,7 +680,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attributes of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ minFontScale(scale: number | Resource): T; @@ -622,7 +692,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attributes of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ maxFontScale(scale: number | Resource): T; @@ -643,6 +714,7 @@ declare class SecurityComponentMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ maxLines(line: number | Resource): T; @@ -653,7 +725,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ minFontSize(minSize: number | string | Resource): T; @@ -664,7 +737,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ maxFontSize(maxSize: number | string | Resource): T; @@ -675,7 +749,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ heightAdaptivePolicy(policy: TextHeightAdaptivePolicy): T; @@ -687,7 +762,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ enabled(respond: boolean): T; } diff --git a/api/@internal/component/ets/select.d.ts b/api/@internal/component/ets/select.d.ts index 41fcdac73f4f97b4797cc06b6e43362cdfc818b7..7ac54deb35e21f4174e91e51bd411624dc5b7bae 100644 --- a/api/@internal/component/ets/select.d.ts +++ b/api/@internal/component/ets/select.d.ts @@ -18,6 +18,16 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonConfiguration, CommonMethod, ContentModifier, Optional, BlurStyle } from './common'; +import { ControlSize } from './button'; +import { DividerOptions } from './textPicker'; +import { ResourceStr, Dimension, EdgeOutlineWidths, ResourceColor, EdgeColors, Resource, Font, Length, Offset, DividerStyleOptions } from './units'; +import { SymbolGlyphModifier } from '../SymbolGlyphModifier'; +import { TextModifier } from '../TextModifier'; +import { OptionWidthMode } from './enums'; +/*** endif */ + /** * The declare of selectOption. * @@ -40,7 +50,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SelectOption { /** @@ -65,7 +76,8 @@ declare interface SelectOption { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ value: ResourceStr; @@ -91,7 +103,8 @@ declare interface SelectOption { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ icon?: ResourceStr; @@ -111,6 +124,7 @@ declare interface SelectOption { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ symbolIcon?: SymbolGlyphModifier; } @@ -137,7 +151,8 @@ declare interface SelectOption { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface SelectInterface { /** @@ -165,7 +180,8 @@ interface SelectInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (options: Array): SelectAttribute; } @@ -185,7 +201,8 @@ interface SelectInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ArrowPosition { /** @@ -201,7 +218,8 @@ declare enum ArrowPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ END = 0, @@ -218,7 +236,8 @@ declare enum ArrowPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ START = 1 } @@ -237,7 +256,8 @@ declare enum ArrowPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum MenuAlignType { /** @@ -252,7 +272,8 @@ declare enum MenuAlignType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ START, /** @@ -267,7 +288,8 @@ declare enum MenuAlignType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CENTER, /** @@ -282,7 +304,8 @@ declare enum MenuAlignType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ END } @@ -293,7 +316,8 @@ declare enum MenuAlignType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum AvoidanceMode { /** @@ -302,7 +326,8 @@ declare enum AvoidanceMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ COVER_TARGET, /** @@ -311,7 +336,8 @@ declare enum AvoidanceMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ AVOID_AROUND_TARGET } @@ -325,7 +351,8 @@ declare enum AvoidanceMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnSelectCallback = (index: number, selectStr: string) => void; @@ -336,7 +363,8 @@ declare type OnSelectCallback = (index: number, selectStr: string) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface MenuOutlineOptions { /** @@ -346,7 +374,8 @@ declare interface MenuOutlineOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ width?: Dimension | EdgeOutlineWidths; @@ -357,7 +386,8 @@ declare interface MenuOutlineOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ color?: ResourceColor | EdgeColors; } @@ -384,7 +414,8 @@ declare interface MenuOutlineOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class SelectAttribute extends CommonMethod { /** @@ -412,7 +443,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selected(value: number | Resource): SelectAttribute; @@ -424,7 +456,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ selected(numCount: Optional): SelectAttribute; @@ -453,7 +486,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ value(value: ResourceStr): SelectAttribute; @@ -465,7 +499,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ value(resStr: Optional): SelectAttribute; @@ -494,7 +529,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ font(value: Font): SelectAttribute; @@ -506,7 +542,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ font(selectFont: Optional): SelectAttribute; @@ -535,7 +572,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor(value: ResourceColor): SelectAttribute; @@ -547,7 +585,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor(resColor: Optional): SelectAttribute; @@ -576,7 +615,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedOptionBgColor(value: ResourceColor): SelectAttribute; @@ -588,7 +628,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ selectedOptionBgColor(resColor: Optional): SelectAttribute; @@ -617,7 +658,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedOptionFont(value: Font): SelectAttribute; @@ -629,7 +671,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ selectedOptionFont(selectFont: Optional): SelectAttribute; @@ -658,7 +701,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedOptionFontColor(value: ResourceColor): SelectAttribute; @@ -670,7 +714,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ selectedOptionFontColor(resColor: Optional): SelectAttribute; @@ -699,7 +744,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ optionBgColor(value: ResourceColor): SelectAttribute; @@ -711,7 +757,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ optionBgColor(resColor: Optional): SelectAttribute; @@ -740,7 +787,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ optionFont(value: Font): SelectAttribute; @@ -752,7 +800,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ optionFont(selectFont: Optional): SelectAttribute; @@ -781,7 +830,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ optionFontColor(value: ResourceColor): SelectAttribute; @@ -793,7 +843,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ optionFontColor(resColor: Optional): SelectAttribute; @@ -834,7 +885,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onSelect(callback: Optional): SelectAttribute; @@ -855,7 +907,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ space(value: Length): SelectAttribute; @@ -867,7 +920,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ space(spaceLength: Optional): SelectAttribute; @@ -888,7 +942,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ arrowPosition(value: ArrowPosition): SelectAttribute; @@ -900,7 +955,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ arrowPosition(position: Optional): SelectAttribute; @@ -922,7 +978,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ menuAlign(alignType: MenuAlignType, offset?: Offset): SelectAttribute; @@ -935,7 +992,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ menuAlign(alignType: Optional, offset?: Offset): SelectAttribute; @@ -956,7 +1014,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ optionWidth(value: Dimension | OptionWidthMode ): SelectAttribute; @@ -968,7 +1027,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ optionWidth(width: Optional ): SelectAttribute; @@ -989,7 +1049,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ optionHeight(value: Dimension): SelectAttribute; @@ -1001,7 +1062,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ optionHeight(height: Optional): SelectAttribute; @@ -1022,7 +1084,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ menuBackgroundColor(value: ResourceColor): SelectAttribute; @@ -1034,7 +1097,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ menuBackgroundColor(resColor: Optional): SelectAttribute; @@ -1055,7 +1119,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ menuBackgroundBlurStyle(value: BlurStyle): SelectAttribute; @@ -1067,7 +1132,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ menuBackgroundBlurStyle(style: Optional): SelectAttribute; @@ -1079,7 +1145,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ controlSize(value: ControlSize): SelectAttribute; @@ -1091,7 +1158,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ controlSize(size: Optional): SelectAttribute; @@ -1103,7 +1171,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ menuItemContentModifier(modifier: ContentModifier): SelectAttribute; @@ -1115,7 +1184,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ menuItemContentModifier(modifier: Optional>): SelectAttribute; @@ -1127,7 +1197,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ divider(options: Optional | null): SelectAttribute; @@ -1139,7 +1210,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ textModifier(modifier: Optional): SelectAttribute; @@ -1151,7 +1223,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ arrowModifier(modifier: Optional): SelectAttribute; @@ -1163,7 +1236,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ optionTextModifier(modifier: Optional): SelectAttribute; @@ -1175,7 +1249,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ selectedOptionTextModifier(modifier: Optional): SelectAttribute; @@ -1187,7 +1262,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ dividerStyle(style: Optional): SelectAttribute; @@ -1199,7 +1275,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ avoidance(mode: AvoidanceMode): SelectAttribute; @@ -1211,7 +1288,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ menuOutline(outline: MenuOutlineOptions): SelectAttribute; @@ -1248,7 +1326,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface MenuItemConfiguration extends CommonConfiguration{ /** @@ -1258,7 +1337,8 @@ declare interface MenuItemConfiguration extends CommonConfiguration { /** @@ -457,7 +406,8 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ viewPort(value: ViewportRect): ShapeAttribute; @@ -497,7 +447,8 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ stroke(value: ResourceColor): ShapeAttribute; @@ -537,7 +488,8 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fill(value: ResourceColor): ShapeAttribute; @@ -577,20 +529,10 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - /** - * Called when the offset of the starting point of border drawing is set. - * - * @param { Length } value - * @returns { ShapeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - strokeDashOffset(value: Length): ShapeAttribute; + strokeDashOffset(value: number | string): ShapeAttribute; /** * Called when the gap of the border is set. @@ -632,6 +574,20 @@ declare class ShapeAttribute extends CommonMethod { */ strokeDashArray(value: Array): ShapeAttribute; + /** + * Called when the gap of the border is set. + * + * @param { Array } value + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + strokeDashArray(value: Array): ShapeAttribute; + /** * Called when the path endpoint drawing style is set. * @@ -668,7 +624,8 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeLineCap(value: LineCapStyle): ShapeAttribute; @@ -708,7 +665,8 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeLineJoin(value: LineJoinStyle): ShapeAttribute; @@ -748,20 +706,10 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 - */ - /** - * Called when the limit value for drawing acute angles as oblique angles is set. - * - * @param { Length } value - * @returns { ShapeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - strokeMiterLimit(value: Length): ShapeAttribute; + strokeMiterLimit(value: number | string): ShapeAttribute; /** * Called when the opacity of the border is set. @@ -799,7 +747,8 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeOpacity(value: number | string | Resource): ShapeAttribute; @@ -839,7 +788,8 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fillOpacity(value: number | string | Resource): ShapeAttribute; @@ -879,20 +829,10 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 - */ - /** - * Called when the width of the border is set. - * - * @param { Length } value - * @returns { ShapeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - strokeWidth(value: Length): ShapeAttribute; + strokeWidth(value: number | string): ShapeAttribute; /** * Called when setting whether anti aliasing is on. @@ -930,7 +870,8 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ antiAlias(value: boolean): ShapeAttribute; @@ -981,6 +922,22 @@ declare class ShapeAttribute extends CommonMethod { * @since 11 */ mesh(value: Array, column: number, row: number): ShapeAttribute; + + /** + * Called when shape mesh. + * + * @param { Array } value + * @param { number } column + * @param { number } row + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + mesh(value: Array, column: number, row: number): ShapeAttribute; } /** @@ -1046,3 +1003,29 @@ declare const Shape: ShapeInterface; * @since 11 */ declare const ShapeInstance: ShapeAttribute; + +/** + * Provides interfaces for drawing components. + * + * @interface ShapeInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface ShapeInterface { + /** + * Shape component constructor. + * + * @param { PixelMap } [value] - PixelMap object to draw. + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + (value?: PixelMap): ShapeAttribute; +} diff --git a/api/@internal/component/ets/sidebar.d.ts b/api/@internal/component/ets/sidebar.d.ts index 4622bd4555f349a4cc90c0b81a16c5a9dfff62e3..fbe62de5d7d1f4df4e98ede5b3fb7328895a3cbc 100644 --- a/api/@internal/component/ets/sidebar.d.ts +++ b/api/@internal/component/ets/sidebar.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource } from '../../global/resource' +import { Length, ResourceColor, Dimension } from './units' +import { CommonMethod, PixelMap } from './common' +/*** endif */ + /** * Sets the sidebar style of showing * @@ -40,7 +46,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 SideBarContainerType { /** @@ -62,7 +69,8 @@ declare enum SideBarContainerType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Embed, @@ -85,7 +93,8 @@ declare enum SideBarContainerType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Overlay, @@ -100,7 +109,8 @@ declare enum SideBarContainerType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ AUTO, } @@ -127,7 +137,8 @@ declare enum SideBarContainerType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SideBarPosition { /** @@ -149,7 +160,8 @@ declare enum SideBarPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Start, @@ -172,7 +184,8 @@ declare enum SideBarPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ End, } @@ -184,7 +197,8 @@ declare enum SideBarPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ButtonIconOptions { /** @@ -219,7 +233,8 @@ declare interface ButtonIconOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ shown: string | PixelMap | Resource; @@ -255,7 +270,8 @@ declare interface ButtonIconOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ hidden: string | PixelMap | Resource; @@ -291,7 +307,8 @@ declare interface ButtonIconOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ switching?: string | PixelMap | Resource; } @@ -318,7 +335,8 @@ declare interface ButtonIconOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ButtonStyle { /** @@ -346,7 +364,8 @@ declare interface ButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ left?: number; @@ -375,7 +394,8 @@ declare interface ButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ top?: number; @@ -404,7 +424,8 @@ declare interface ButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ width?: number; @@ -433,7 +454,8 @@ declare interface ButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ height?: number; @@ -469,7 +491,8 @@ declare interface ButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ icons?: ButtonIconOptions; } @@ -496,7 +519,8 @@ declare interface ButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface SideBarContainerInterface { /** @@ -524,7 +548,8 @@ interface SideBarContainerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (type?: SideBarContainerType): SideBarContainerAttribute; } @@ -546,7 +571,8 @@ interface SideBarContainerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface DividerStyle { /** @@ -566,7 +592,8 @@ interface DividerStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeWidth: Length; @@ -585,7 +612,8 @@ interface DividerStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ color?: ResourceColor; @@ -604,7 +632,8 @@ interface DividerStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ startMargin?: Length; @@ -623,7 +652,8 @@ interface DividerStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ endMargin?: Length; } @@ -650,7 +680,8 @@ interface DividerStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class SideBarContainerAttribute extends CommonMethod { /** @@ -678,7 +709,8 @@ declare class SideBarContainerAttribute extends CommonMethod void): SideBarContainerAttribute; @@ -797,7 +832,8 @@ declare class SideBarContainerAttribute extends CommonMethodNOTE: - *
The trigger occurs when an invalid value is restored to the default value, that is, when the value is set to - * less than min or greater than max. - *

+ * End dragging the slider. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ End, @@ -285,99 +301,95 @@ declare enum SliderChangeMode { * @since 10 */ /** - * The user moves the thumb by touching or clicking the track. + * Click the slider. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Click, } /** - * Interaction mode between the user and the slider. + * Declare SliderInteraction * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SliderInteraction { /** - * Users can drag the slider or touch the track to move the slider. The slider moves as soon as the mouse or - * finger is pressed. + * Allow user to slide the block and click track to move the block * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SLIDE_AND_CLICK, /** - * Users are not allowed to move the slider by touching the slider. + * Only allow user to slide the block * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SLIDE_ONLY, /** - * Users can drag the slider or touch the track to move the slider. The slider moves when the mouse is released or - * finger is lifted, if the release/lift position coincides with the screen press position. - * + * Allow user to slide the block and click track to move the block, but click value only change when touch up. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SLIDE_AND_CLICK_UP = 2 } /** - * Defines the callback type used in SlideRange. - *

NOTE: - *
Currently, this API takes effect only when MIN ≤ from ≤ to ≤ MAX (the values of MIN and MAX do not depend on - * the values set, but on the actual values that take effect). You can set either from or to, or you can set both from - * and to. When the API is effective, if the set from value is between the adjacent multiples of step, then from takes - * the value of the left interval multiple of step or MIN as the corrected value. When the API is effective, if the set - * to value is between the adjacent multiples of step, then to takes the value of the right interval multiple of step - * or MAX as the corrected value. After from and to have taken their corrected values, when value is undefined or null, - * it takes the same value as from; when value is a number type, and if value ≤ from, then it takes from; - * if value > to, then it takes to. - *

+ * Defines the valid slidable range. If and only if MIN <= from <= to <= MAX, sliding range can be set successfully. * * @interface SlideRange * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SlideRange { /** - * Start of the slide range. + * Set the start point of sliding range. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ from?: number; /** - * End of the slide range. + * Set the end point of sliding range. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ to?: number; } @@ -407,14 +419,15 @@ declare interface SlideRange { * @since 10 */ /** - * Parameters of the slider. + * Defines the options of Slider. * * @interface SliderOptions * @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 SliderOptions { /** @@ -442,15 +455,15 @@ declare interface SliderOptions { * @since 10 */ /** - * Current progress. + * Current value of Slider. * * @type { ?number } - * @default same as the value of min * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ value?: number; @@ -479,15 +492,15 @@ declare interface SliderOptions { * @since 10 */ /** - * Minimum value. + * Sets the min value of Slider. * * @type { ?number } - * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ min?: number; @@ -516,20 +529,15 @@ declare interface SliderOptions { * @since 10 */ /** - * Maximum value. - *

NOTE: - *
If the value of min is greater than or equal to the value of max, the min value defaults to 0, and the max - * value defaults to 100. If the value is not within the [min, max] range, the value of min or max is used, whichever - * is closer. - *

+ * Sets the max value of Slider. * * @type { ?number } - * @default 100 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ max?: number; @@ -558,18 +566,15 @@ declare interface SliderOptions { * @since 10 */ /** - * Step of the slider. - *

NOTE: - *
If this parameter is set to a value less than 0 or greater than the value of max, the default value is used. - *

+ * Sets the step of each slide value. * * @type { ?number } - * @default 1 - Value range: [0.01, max - min] * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ step?: number; @@ -598,15 +603,15 @@ declare interface SliderOptions { * @since 10 */ /** - * Style of the slider thumb and track. + * Sets the slider style. * * @type { ?SliderStyle } - * @default SliderStyle.OutSet * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ style?: SliderStyle; @@ -635,15 +640,15 @@ declare interface SliderOptions { * @since 10 */ /** - * Whether the slider moves horizontally or vertically. + * Sets the slider direction style. * * @type { ?Axis } - * @default Axis.Horizontal * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ direction?: Axis; @@ -672,16 +677,15 @@ declare interface SliderOptions { * @since 10 */ /** - * Whether the slider values are reversed. By default, the values increase from left to right for a horizontal - * slider and from top to bottom for a vertical slider. + * Set whether the direction of the slider needs to be reversed. * * @type { ?boolean } - * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ reverse?: boolean; } @@ -695,13 +699,14 @@ declare interface SliderOptions { * @since 10 */ /** - * Enumerates the types of the slider in the block direction. + * Declare SliderBlockType * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SliderBlockType { /** @@ -712,12 +717,13 @@ declare enum SliderBlockType { * @since 10 */ /** - * Round slider. + * Use the default block. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT, @@ -729,12 +735,13 @@ declare enum SliderBlockType { * @since 10 */ /** - * Slider with an image background. + * Use an image as the slider block. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE, @@ -746,12 +753,13 @@ declare enum SliderBlockType { * @since 10 */ /** - * Slider in a custom shape. + * Use a shape as the slider block. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SHAPE, } @@ -765,13 +773,14 @@ declare enum SliderBlockType { * @since 10 */ /** - * Describes the style of the slider in the block direction. + * Defines the style of slider block. * * @interface SliderBlockStyle * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SliderBlockStyle { /** @@ -783,14 +792,14 @@ declare interface SliderBlockStyle { * @since 10 */ /** - * Type of the slider in the block direction. + * Sets the type of slider block. * * @type { SliderBlockType } - * @default SliderBlockType.DEFAULT - indicating the round slider. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ type: SliderBlockType; @@ -803,14 +812,14 @@ declare interface SliderBlockStyle { * @since 10 */ /** - * Image resource of the slider. The area size for displaying the image is subject to the blockSize attribute. - * Be mindful of the image size when selecting an image. + * Sets the image of slider block while the type is set to SliderBlockType.Image. * * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ image?: ResourceStr; @@ -823,13 +832,14 @@ declare interface SliderBlockStyle { * @since 10 */ /** - * Custom shape of the slider. + * Sets the shape of slider block while the type is set to SliderBlockType.Shape. * * @type { ?(CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ shape?: CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute; } @@ -838,34 +848,37 @@ declare interface SliderBlockStyle { * Defines the callback type used in SliderConfiguration. * * @typedef {function} SliderTriggerChangeCallback - * @param { number } value - Current progress. - * @param { SliderChangeMode } mode - State triggered by the event. + * @param { number } value - The value of slider. + * @param { SliderChangeMode } mode - The changeMode of slider. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type SliderTriggerChangeCallback = (value: number, mode: SliderChangeMode) => void; /** - * You need a custom class to implement the ContentModifier API. + * SliderConfiguration used by slider content modifier * * @extends CommonConfiguration * @interface SliderConfiguration * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SliderConfiguration extends CommonConfiguration { /** - * Current progress. + * Current progress value. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ value: number; @@ -876,7 +889,8 @@ declare interface SliderConfiguration extends CommonConfiguration { /** @@ -1192,7 +1212,8 @@ declare class SliderAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ blockColor(value: ResourceColor): SliderAttribute; @@ -1243,7 +1264,8 @@ declare class SliderAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ trackColor(value: ResourceColor | LinearGradient): SliderAttribute; @@ -1283,7 +1305,8 @@ declare class SliderAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedColor(value: ResourceColor): SliderAttribute; /** @@ -1295,7 +1318,8 @@ declare class SliderAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ selectedColor(selectedColor: ResourceColor | LinearGradient): SliderAttribute; @@ -1359,7 +1383,8 @@ declare class SliderAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ showSteps(value: boolean): SliderAttribute; @@ -1417,7 +1442,8 @@ declare class SliderAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ showTips(value: boolean, content?: ResourceStr): SliderAttribute; @@ -1457,7 +1483,8 @@ declare class SliderAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ trackThickness(value: Length): SliderAttribute; @@ -1489,12 +1516,7 @@ declare class SliderAttribute extends CommonMethod { * @since 10 */ /** - * Triggered when the slider is dragged or clicked. - *

NOTE: - *
The Begin and End states are triggered when the slider is clicked with a gesture. The Moving and Click states - * are triggered when the value of value changes. If the coherent action is a drag action, the Click state will - * not be triggered. - *

+ * Called when the selection value changes. * * @param { function } callback * @returns { SliderAttribute } @@ -1502,7 +1524,8 @@ declare class SliderAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onChange(callback: (value: number, mode: SliderChangeMode) => void): SliderAttribute; @@ -1523,7 +1546,8 @@ declare class SliderAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ blockBorderColor(value: ResourceColor): SliderAttribute; @@ -1544,7 +1568,8 @@ declare class SliderAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ blockBorderWidth(value: Length): SliderAttribute; @@ -1565,7 +1590,8 @@ declare class SliderAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ stepColor(value: ResourceColor): SliderAttribute; @@ -1586,7 +1612,8 @@ declare class SliderAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ trackBorderRadius(value: Length): SliderAttribute; @@ -1598,7 +1625,8 @@ declare class SliderAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ selectedBorderRadius(value: Dimension): SliderAttribute; @@ -1619,7 +1647,8 @@ declare class SliderAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ blockSize(value: SizeOptions): SliderAttribute; @@ -1633,15 +1662,15 @@ declare class SliderAttribute extends CommonMethod { * @since 10 */ /** - * Sets the style of the slider in the block direction. + * Called when the style of block is set. * - * @param { SliderBlockStyle } value - Style of the slider in the block direction. - *
Default value is SliderBlockType.DEFAULT, indicating the round slider. + * @param { SliderBlockStyle } value - the style of block. * @returns { SliderAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ blockStyle(value: SliderBlockStyle): SliderAttribute; @@ -1662,20 +1691,21 @@ declare class SliderAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ stepSize(value: Length): SliderAttribute; /** - * Sets the interaction mode between the user and the slider. + * Sets the interaction mode of the slider. * - * @param { SliderInteraction } value - Interaction mode between the user and the slider. - *
Default value is SliderInteraction.SLIDE_AND_CLICK. + * @param { SliderInteraction } value * @returns { SliderAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ sliderInteractionMode(value: SliderInteraction): SliderAttribute; @@ -1687,20 +1717,21 @@ declare class SliderAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ minResponsiveDistance(value: number): SliderAttribute; /** - * Creates a content modifier. + * Set the content modifier of slider. * - * @param { ContentModifier } modifier - Content modifier to apply to the slider. - * modifier: content modifier. You need a custom class to implement the ContentModifier API. + * @param { ContentModifier } modifier - The content modifier of slider. * @returns { SliderAttribute } * @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): SliderAttribute; @@ -1712,7 +1743,8 @@ declare class SliderAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ slideRange(value: SlideRange): SliderAttribute; @@ -1724,7 +1756,8 @@ declare class SliderAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ digitalCrownSensitivity(sensitivity: Optional): SliderAttribute; @@ -1735,7 +1768,8 @@ declare class SliderAttribute extends CommonMethod { * @returns { SliderAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableHapticFeedback(enabled: boolean): SliderAttribute; diff --git a/api/@internal/component/ets/span.d.ts b/api/@internal/component/ets/span.d.ts index cdeb16157e9fba88c242802faf9dfd3db018be61..27b86dd90a023b158994de9361cb3afba424de03 100644 --- a/api/@internal/component/ets/span.d.ts +++ b/api/@internal/component/ets/span.d.ts @@ -18,6 +18,15 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ResourceColor, Dimension, BorderRadiuses, Length, Font } from './units'; +import { CommonMethod, ShadowOptions } from './common'; +import { LengthMetrics } from './../Graphics'; +import { Resource } from './../../../api/global/resource'; +import { FontStyle, FontWeight, TextCase } from './enums'; +import { DecorationStyleInterface } from './styledString'; +/*** endif */ + /** * Define the background style of span. * @@ -33,7 +42,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextBackgroundStyle { /** @@ -51,7 +61,8 @@ declare interface TextBackgroundStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ color?: ResourceColor; @@ -70,7 +81,8 @@ declare interface TextBackgroundStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radius?: Dimension | BorderRadiuses; } @@ -90,7 +102,8 @@ declare interface TextBackgroundStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class BaseSpan extends CommonMethod { /** @@ -110,7 +123,8 @@ declare class BaseSpan extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textBackgroundStyle(style: TextBackgroundStyle): T; @@ -122,7 +136,8 @@ declare class BaseSpan extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ baselineOffset(value: LengthMetrics): T; } @@ -159,7 +174,8 @@ declare class BaseSpan extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface SpanInterface { /** @@ -198,7 +214,8 @@ interface SpanInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (value: string | Resource): SpanAttribute; } @@ -227,7 +244,8 @@ interface SpanInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class SpanAttribute extends BaseSpan { /** @@ -246,7 +264,8 @@ declare class SpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ font(value: Font): SpanAttribute; @@ -286,7 +305,8 @@ declare class SpanAttribute extends BaseSpan { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor(value: ResourceColor): SpanAttribute; @@ -326,7 +346,8 @@ declare class SpanAttribute extends BaseSpan { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize(value: number | string | Resource): SpanAttribute; @@ -366,7 +387,8 @@ declare class SpanAttribute extends BaseSpan { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontStyle(value: FontStyle): SpanAttribute; @@ -418,6 +440,7 @@ declare class SpanAttribute extends BaseSpan { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ fontWeight(value: number | FontWeight | ResourceStr): SpanAttribute; @@ -457,7 +480,8 @@ declare class SpanAttribute extends BaseSpan { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontFamily(value: string | Resource): SpanAttribute; @@ -508,7 +532,8 @@ declare class SpanAttribute extends BaseSpan { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ decoration(value: DecorationStyleInterface): SpanAttribute; @@ -560,6 +585,7 @@ declare class SpanAttribute extends BaseSpan { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ letterSpacing(value: number | ResourceStr): SpanAttribute; @@ -599,7 +625,8 @@ declare class SpanAttribute extends BaseSpan { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ textCase(value: TextCase): SpanAttribute; @@ -619,7 +646,8 @@ declare class SpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ lineHeight(value: Length): SpanAttribute; @@ -640,7 +668,8 @@ declare class SpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textShadow(value: ShadowOptions | Array): SpanAttribute; } diff --git a/api/@internal/component/ets/stack.d.ts b/api/@internal/component/ets/stack.d.ts index 38790a319fe1b5dee03857a64d2dd8aa18244898..676ce4fe4c84b53861146891961dbbd6ad75c0d3 100644 --- a/api/@internal/component/ets/stack.d.ts +++ b/api/@internal/component/ets/stack.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { PointLightStyle, CommonMethod } from './common'; +import { Alignment } from './enums'; +/*** endif */ + /** * Options used to construct the stack. * @@ -26,7 +31,8 @@ * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface StackOptions { /** @@ -64,16 +70,16 @@ declare interface StackOptions { * @since 11 */ /** - * Alignment of child components in the container. + * Set the alignment of sub components within the container. * * Anonymous Object Rectification * @type { ?Alignment } - * @default Alignment.Center * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ alignContent?: Alignment; } @@ -110,7 +116,8 @@ declare interface StackOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface StackInterface { /** @@ -161,7 +168,8 @@ interface StackInterface { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ (options?: StackOptions): StackAttribute; } @@ -190,7 +198,8 @@ interface StackInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class StackAttribute extends CommonMethod { /** @@ -229,18 +238,20 @@ declare class StackAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ alignContent(value: Alignment): StackAttribute; /** - * Sets the point light style. + * Defines the PointLight * * @param { PointLightStyle } value - The point light style. * @returns { StackAttribute } The attribute of the stack. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ pointLight(value: PointLightStyle): StackAttribute; } diff --git a/api/@internal/component/ets/state_management.d.ts b/api/@internal/component/ets/state_management.d.ts index 7db8947e5c83e95aa17f2f194bea6131ba88fd2b..228a3429a362c849a43196efbbac150580a71060 100644 --- a/api/@internal/component/ets/state_management.d.ts +++ b/api/@internal/component/ets/state_management.d.ts @@ -31,7 +31,8 @@ * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ColorMode { /** @@ -45,7 +46,8 @@ declare enum ColorMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LIGHT = 0, @@ -60,7 +62,8 @@ declare enum ColorMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ DARK, } @@ -78,7 +81,8 @@ declare enum ColorMode { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum LayoutDirection { /** @@ -92,7 +96,8 @@ declare enum LayoutDirection { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LTR, @@ -107,7 +112,8 @@ declare enum LayoutDirection { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RTL, @@ -122,7 +128,8 @@ declare enum LayoutDirection { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Auto, } @@ -132,7 +139,8 @@ declare enum LayoutDirection { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ declare class Storage { /** @@ -142,7 +150,8 @@ declare class Storage { * @param { string } file * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(needCrossThread?: boolean, file?: string); @@ -153,7 +162,8 @@ declare class Storage { * @returns { string | undefined } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ get(key: string): string | undefined; @@ -161,19 +171,21 @@ declare class Storage { * Called when setting. * * @param { string } key - * @param { any } val + * @param { Object | undefined | null } val * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ - set(key: string, val: any): void; + set(key: string, val: Object | undefined | null): void; /** * Called when data is cleared. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ clear(): void; @@ -183,7 +195,8 @@ declare class Storage { * @param { string } key * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ delete(key: string): void; } diff --git a/api/@internal/component/ets/stepper.d.ts b/api/@internal/component/ets/stepper.d.ts index f81675778720e5127981089466b785adb87e7ccd..222293c3a301a3dea3822bb085c2ddedd7e0fb07 100644 --- a/api/@internal/component/ets/stepper.d.ts +++ b/api/@internal/component/ets/stepper.d.ts @@ -18,6 +18,45 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Bindable, CommonMethod } from './common' +/*** endif */ + +/** + * Declare the StepperOptions. + * + * @interface StepperOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +interface StepperOptions { + /** + * Set the stepper index. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + index?: number; + + /** + * Set the stepper index. + * + * @type { ?(number | Bindable) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + index?: number | Bindable; +} + /** * Declare the stepper. * @@ -40,7 +79,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface StepperInterface { /** @@ -70,7 +110,19 @@ interface StepperInterface { * @atomicservice * @since 11 */ - (value?: { index?: number }): StepperAttribute; + /** + * Called when the stepper component is used. + * + * Anonymous Object Rectification. + * @param { StepperOptions } value + * @returns { StepperAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + (value?: StepperOptions): StepperAttribute; } /** @@ -95,7 +147,8 @@ interface StepperInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class StepperAttribute extends CommonMethod { /** @@ -123,7 +176,8 @@ declare class StepperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onFinish(callback: () => void): StepperAttribute; @@ -152,7 +206,8 @@ declare class StepperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onSkip(callback: () => void): StepperAttribute; @@ -181,7 +236,8 @@ declare class StepperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onChange(callback: (prevIndex: number, index: number) => void): StepperAttribute; @@ -210,7 +266,8 @@ declare class StepperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onNext(callback: (index: number, pendingIndex: number) => void): StepperAttribute; @@ -239,7 +296,8 @@ declare class StepperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onPrevious(callback: (index: number, pendingIndex: number) => void): StepperAttribute; } diff --git a/api/@internal/component/ets/stepper_item.d.ts b/api/@internal/component/ets/stepper_item.d.ts index 09673bc4925626bed75184c39964c2c1308f19cc..3fab51d1d05d572944ffb59e68d4530f881ee84d 100644 --- a/api/@internal/component/ets/stepper_item.d.ts +++ b/api/@internal/component/ets/stepper_item.d.ts @@ -18,6 +18,10 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod } from './common' +/*** endif */ + /** * ItemState * @@ -40,7 +44,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 ItemState { /** @@ -62,7 +67,8 @@ declare enum ItemState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Normal, @@ -85,7 +91,8 @@ declare enum ItemState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Disabled, @@ -108,7 +115,8 @@ declare enum ItemState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Waiting, @@ -131,7 +139,8 @@ declare enum ItemState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Skip, } @@ -158,7 +167,8 @@ declare enum ItemState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface StepperItemInterface { /** @@ -183,7 +193,8 @@ interface StepperItemInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (): StepperItemAttribute; } @@ -210,7 +221,8 @@ interface StepperItemInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class StepperItemAttribute extends CommonMethod { /** @@ -238,7 +250,8 @@ declare class StepperItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ prevLabel(value: string): StepperItemAttribute; @@ -267,7 +280,8 @@ declare class StepperItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ nextLabel(value: string): StepperItemAttribute; @@ -296,7 +310,8 @@ declare class StepperItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ status(value?: ItemState): StepperItemAttribute; } diff --git a/api/@internal/component/ets/styled_string.d.ts b/api/@internal/component/ets/styled_string.d.ts index 33df80776477273c0172e59c707afe97016f7162..24d0215ad8b27981f4dd865a8bf3ddd1eb48223b 100644 --- a/api/@internal/component/ets/styled_string.d.ts +++ b/api/@internal/component/ets/styled_string.d.ts @@ -18,6 +18,19 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Callback, ShadowOptions, ClickEvent, Optional, PixelMap } from './common'; +import { TextAlign, FontStyle, FontWeight, TextDecorationType, TextDecorationStyle, WordBreak, TextOverflow, ImageFit, ImageSpanAlignment } from './enums'; +import { ResourceStr, ResourceColor, LengthMetrics, SizeOptions, Margin, Padding, BorderRadiuses, ColorFilter } from './units'; +import { TextBackgroundStyle } from './span'; +import { GestureEvent } from "./gesture"; +import { DrawingColorFilter } from './image'; +import { LeadingMarginPlaceholder } from './richEditor'; +import image from '../../@ohos.multimedia.image'; +import drawing from '../../@ohos.graphics.drawing'; +import { DrawContext } from '../../arkui/Graphics'; +/*** endif */ + /** * Defines the StyledStringMarshallingValue Type. * @@ -26,11 +39,11 @@ * @systemapi * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type StyledStringMarshallingValue = UserDataSpan; - /** * Defines the callback type used in marshalling. * @@ -41,7 +54,8 @@ declare type StyledStringMarshallingValue = UserDataSpan; * @systemapi * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ declare type StyledStringMarshallCallback = (marshallableVal: StyledStringMarshallingValue) => ArrayBuffer; @@ -55,7 +69,8 @@ declare type StyledStringMarshallCallback = (marshallableVal: StyledStringMarsha * @systemapi * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ declare type StyledStringUnmarshallCallback = (buf: ArrayBuffer) => StyledStringMarshallingValue; @@ -65,7 +80,8 @@ declare type StyledStringUnmarshallCallback = (buf: ArrayBuffer) => StyledString * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class StyledString { /** @@ -76,7 +92,8 @@ declare class StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(value: string | ImageAttachment | CustomSpan, styles?: Array); @@ -88,7 +105,8 @@ declare class StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly length: number; @@ -99,7 +117,8 @@ declare class StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getString(): string; @@ -117,7 +136,8 @@ declare class StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getStyles(start: number, length: number, styledKey?: StyledStringKey): Array; @@ -129,7 +149,8 @@ declare class StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ equals(other: StyledString): boolean; @@ -146,7 +167,8 @@ declare class StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ subStyledString(start: number, length?: number): StyledString; @@ -162,7 +184,8 @@ declare class StyledString { * @throws { BusinessError } 170001 - Convert Error. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static fromHtml(html: string): Promise; @@ -170,7 +193,7 @@ declare class StyledString { * Returns HTML string from the provided StyledString. * * @param { StyledString } styledString - the StyledString will be converted to a HTML string. - * @returns { string } Returns the HTML string converted from the provided StyledString. + * @returns { string } * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. @@ -178,7 +201,8 @@ declare class StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ static toHtml(styledString: StyledString): string; @@ -190,7 +214,8 @@ declare class StyledString { * @returns { ArrayBuffer } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ static marshalling(styledString: StyledString, callback: StyledStringMarshallCallback): ArrayBuffer; @@ -207,7 +232,8 @@ declare class StyledString { * @throws { BusinessError } 170002 - Styled string decode error. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ static unmarshalling(buffer: ArrayBuffer, callback: StyledStringUnmarshallCallback): Promise; @@ -218,7 +244,8 @@ declare class StyledString { * @returns { ArrayBuffer } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ static marshalling(styledString: StyledString): ArrayBuffer; @@ -234,7 +261,8 @@ declare class StyledString { * @throws { BusinessError } 170002 - Styled string decode error. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ static unmarshalling(buffer: ArrayBuffer): Promise; } @@ -246,7 +274,8 @@ declare class StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface StyleOptions { /** @@ -256,7 +285,8 @@ declare interface StyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start?: number; @@ -267,7 +297,8 @@ declare interface StyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ length?: number; @@ -278,7 +309,8 @@ declare interface StyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ styledKey: StyledStringKey; @@ -289,7 +321,8 @@ declare interface StyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ styledValue: StyledStringValue; } @@ -301,7 +334,8 @@ declare interface StyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SpanStyle { /** @@ -311,7 +345,8 @@ declare interface SpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start: number; @@ -322,7 +357,8 @@ declare interface SpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ length: number; @@ -333,7 +369,8 @@ declare interface SpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ styledKey: StyledStringKey; @@ -344,7 +381,8 @@ declare interface SpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ styledValue: StyledStringValue; } @@ -355,7 +393,8 @@ declare interface SpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TextStyle { @@ -366,7 +405,8 @@ declare class TextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(value?: TextStyleInterface); @@ -378,7 +418,8 @@ declare class TextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly fontColor?: ResourceColor; @@ -390,7 +431,8 @@ declare class TextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly fontFamily?: string; @@ -403,7 +445,8 @@ declare class TextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly fontSize?: number; @@ -415,7 +458,8 @@ declare class TextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly fontWeight?: number; @@ -427,7 +471,8 @@ declare class TextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly fontStyle?: FontStyle; @@ -475,7 +520,8 @@ declare class TextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextStyleInterface { /** @@ -485,7 +531,8 @@ declare interface TextStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor?: ResourceColor; @@ -496,7 +543,8 @@ declare interface TextStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontFamily?: ResourceStr; @@ -507,7 +555,8 @@ declare interface TextStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize?: LengthMetrics; @@ -518,7 +567,8 @@ declare interface TextStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontWeight?: number | FontWeight | string; @@ -529,7 +579,8 @@ declare interface TextStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontStyle?: FontStyle; @@ -595,7 +646,8 @@ declare interface DecorationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class DecorationStyle { @@ -606,7 +658,8 @@ declare class DecorationStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(value: DecorationStyleInterface); @@ -630,7 +683,8 @@ declare class DecorationStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly type: TextDecorationType; @@ -642,7 +696,8 @@ declare class DecorationStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly color?: ResourceColor; @@ -654,7 +709,8 @@ declare class DecorationStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly style?: TextDecorationStyle; @@ -690,7 +746,8 @@ declare class DecorationStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DecorationStyleInterface { /** @@ -700,7 +757,8 @@ declare interface DecorationStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type: TextDecorationType; @@ -711,7 +769,8 @@ declare interface DecorationStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ color?: ResourceColor; @@ -722,7 +781,8 @@ declare interface DecorationStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ style?: TextDecorationStyle; @@ -744,7 +804,8 @@ declare interface DecorationStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class BaselineOffsetStyle { @@ -755,7 +816,8 @@ declare class BaselineOffsetStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(value: LengthMetrics); @@ -768,7 +830,8 @@ declare class BaselineOffsetStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly baselineOffset: number; } @@ -779,7 +842,8 @@ declare class BaselineOffsetStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class LetterSpacingStyle { @@ -790,7 +854,8 @@ declare class LetterSpacingStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(value: LengthMetrics); @@ -803,7 +868,8 @@ declare class LetterSpacingStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly letterSpacing: number; } @@ -814,7 +880,8 @@ declare class LetterSpacingStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TextShadowStyle { @@ -825,7 +892,8 @@ declare class TextShadowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(value: ShadowOptions | Array); @@ -837,7 +905,8 @@ declare class TextShadowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly textShadow: Array; } @@ -848,7 +917,8 @@ declare class TextShadowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare class BackgroundColorStyle { @@ -859,7 +929,8 @@ declare class BackgroundColorStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(textBackgroundStyle: TextBackgroundStyle); @@ -871,7 +942,8 @@ declare class BackgroundColorStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ readonly textBackgroundStyle: TextBackgroundStyle; } @@ -882,7 +954,8 @@ declare class BackgroundColorStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class GestureStyle { @@ -893,7 +966,8 @@ declare class GestureStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(value?: GestureStyleInterface); } @@ -905,7 +979,8 @@ declare class GestureStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GestureStyleInterface { /** @@ -915,7 +990,8 @@ declare interface GestureStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onClick?: Callback; @@ -926,7 +1002,8 @@ declare interface GestureStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onLongPress?: Callback; @@ -948,7 +1025,8 @@ declare interface GestureStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ParagraphStyle { @@ -959,7 +1037,8 @@ declare class ParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(value?: ParagraphStyleInterface); @@ -971,7 +1050,8 @@ declare class ParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly textAlign?: TextAlign; @@ -996,7 +1076,8 @@ declare class ParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly textIndent?: number; @@ -1008,7 +1089,8 @@ declare class ParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly maxLines?: number; @@ -1020,7 +1102,8 @@ declare class ParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly overflow?: TextOverflow; @@ -1032,7 +1115,8 @@ declare class ParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly wordBreak?: WordBreak; @@ -1044,7 +1128,8 @@ declare class ParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly leadingMargin?: number | LeadingMarginPlaceholder; @@ -1057,7 +1142,8 @@ declare class ParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ readonly paragraphSpacing?: number; } @@ -1069,7 +1155,8 @@ declare class ParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ParagraphStyleInterface { /** @@ -1079,7 +1166,8 @@ declare interface ParagraphStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textAlign?: TextAlign; @@ -1101,7 +1189,8 @@ declare interface ParagraphStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textIndent?: LengthMetrics; @@ -1112,7 +1201,8 @@ declare interface ParagraphStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ maxLines?: number; @@ -1123,7 +1213,8 @@ declare interface ParagraphStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ overflow?: TextOverflow; @@ -1134,7 +1225,8 @@ declare interface ParagraphStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ wordBreak?: WordBreak; @@ -1145,7 +1237,8 @@ declare interface ParagraphStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ leadingMargin?: LengthMetrics | LeadingMarginPlaceholder; @@ -1156,7 +1249,8 @@ declare interface ParagraphStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ paragraphSpacing?: LengthMetrics; } @@ -1167,7 +1261,8 @@ declare interface ParagraphStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class LineHeightStyle { @@ -1178,7 +1273,8 @@ declare class LineHeightStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(lineHeight: LengthMetrics); @@ -1191,7 +1287,8 @@ declare class LineHeightStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly lineHeight: number; } @@ -1203,7 +1300,8 @@ declare class LineHeightStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare class UrlStyle { @@ -1214,7 +1312,8 @@ declare class UrlStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(url: string); @@ -1226,7 +1325,8 @@ declare class UrlStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ readonly url: string; } @@ -1252,7 +1352,8 @@ declare class UrlStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare type StyledStringValue = TextStyle | DecorationStyle | BaselineOffsetStyle | LetterSpacingStyle | TextShadowStyle | GestureStyle | ImageAttachment | ParagraphStyle | LineHeightStyle | UrlStyle | CustomSpan | @@ -1265,7 +1366,8 @@ UserDataSpan | BackgroundColorStyle; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class MutableStyledString extends StyledString { /** @@ -1281,7 +1383,8 @@ declare class MutableStyledString extends StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ replaceString(start: number, length: number, other: string): void; @@ -1297,7 +1400,8 @@ declare class MutableStyledString extends StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ insertString(start: number, other: string): void; @@ -1313,7 +1417,8 @@ declare class MutableStyledString extends StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ removeString(start: number, length: number): void; @@ -1328,7 +1433,8 @@ declare class MutableStyledString extends StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ replaceStyle(spanStyle: SpanStyle): void; @@ -1340,7 +1446,8 @@ declare class MutableStyledString extends StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setStyle(spanStyle: SpanStyle): void; @@ -1357,7 +1464,8 @@ declare class MutableStyledString extends StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ removeStyle(start: number, length: number, styledKey: StyledStringKey): void; @@ -1373,7 +1481,8 @@ declare class MutableStyledString extends StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ removeStyles(start: number, length: number): void; @@ -1383,7 +1492,8 @@ declare class MutableStyledString extends StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ clearStyles(): void; @@ -1400,7 +1510,8 @@ declare class MutableStyledString extends StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ replaceStyledString(start: number, length: number, other: StyledString): void; @@ -1416,7 +1527,8 @@ declare class MutableStyledString extends StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ insertStyledString(start: number, other: StyledString): void; @@ -1427,7 +1539,8 @@ declare class MutableStyledString extends StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ appendStyledString(other: StyledString): void; } @@ -1440,7 +1553,8 @@ declare class MutableStyledString extends StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum StyledStringKey { /** @@ -1449,7 +1563,8 @@ declare enum StyledStringKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FONT = 0, @@ -1459,7 +1574,8 @@ declare enum StyledStringKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DECORATION = 1, @@ -1469,7 +1585,8 @@ declare enum StyledStringKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BASELINE_OFFSET = 2, @@ -1479,7 +1596,8 @@ declare enum StyledStringKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LETTER_SPACING = 3, @@ -1489,7 +1607,8 @@ declare enum StyledStringKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TEXT_SHADOW = 4, @@ -1499,7 +1618,8 @@ declare enum StyledStringKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LINE_HEIGHT = 5, @@ -1509,7 +1629,8 @@ declare enum StyledStringKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ BACKGROUND_COLOR = 6, @@ -1519,7 +1640,8 @@ declare enum StyledStringKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ URL = 7, @@ -1529,7 +1651,8 @@ declare enum StyledStringKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GESTURE = 100, @@ -1539,7 +1662,8 @@ declare enum StyledStringKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PARAGRAPH_STYLE = 200, @@ -1549,7 +1673,8 @@ declare enum StyledStringKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE = 300, @@ -1559,7 +1684,8 @@ declare enum StyledStringKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CUSTOM_SPAN = 400, @@ -1569,7 +1695,8 @@ declare enum StyledStringKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ USER_DATA = 500, } @@ -1580,7 +1707,8 @@ declare enum StyledStringKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ImageAttachment { @@ -1606,6 +1734,18 @@ declare class ImageAttachment { */ constructor(attachment: Optional); + /** + * constructor supported by AttachmentType. + * + * @param { ImageAttachmentInterface | Optional } attachment - image attachment object. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(value: ImageAttachmentInterface | Optional); + /** * Get the image content of the StyledString. * @@ -1614,7 +1754,8 @@ declare class ImageAttachment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly value: PixelMap; @@ -1626,7 +1767,8 @@ declare class ImageAttachment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly size?: SizeOptions; @@ -1638,7 +1780,8 @@ declare class ImageAttachment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly verticalAlign?: ImageSpanAlignment; @@ -1650,7 +1793,8 @@ declare class ImageAttachment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly objectFit?: ImageFit; @@ -1662,7 +1806,8 @@ declare class ImageAttachment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly layoutStyle?: ImageAttachmentLayoutStyle; @@ -1674,7 +1819,8 @@ declare class ImageAttachment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ readonly colorFilter?: ColorFilterType; } @@ -1686,7 +1832,8 @@ declare class ImageAttachment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ResourceImageAttachmentOptions { /** @@ -1696,7 +1843,8 @@ declare interface ResourceImageAttachmentOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ resourceValue: Optional; @@ -1707,7 +1855,8 @@ declare interface ResourceImageAttachmentOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ size?: SizeOptions; @@ -1718,7 +1867,8 @@ declare interface ResourceImageAttachmentOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ verticalAlign?: ImageSpanAlignment; @@ -1729,7 +1879,8 @@ declare interface ResourceImageAttachmentOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ objectFit?: ImageFit; @@ -1740,7 +1891,8 @@ declare interface ResourceImageAttachmentOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ layoutStyle?: ImageAttachmentLayoutStyle; @@ -1751,7 +1903,8 @@ declare interface ResourceImageAttachmentOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ colorFilter?: ColorFilterType; @@ -1763,7 +1916,8 @@ declare interface ResourceImageAttachmentOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ syncLoad?: boolean; } @@ -1775,7 +1929,8 @@ declare interface ResourceImageAttachmentOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ImageAttachmentInterface { /** @@ -1785,7 +1940,8 @@ declare interface ImageAttachmentInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ value: PixelMap; @@ -1796,7 +1952,8 @@ declare interface ImageAttachmentInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ size?: SizeOptions; @@ -1807,7 +1964,8 @@ declare interface ImageAttachmentInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ verticalAlign?: ImageSpanAlignment; @@ -1818,7 +1976,8 @@ declare interface ImageAttachmentInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ objectFit?: ImageFit; @@ -1829,7 +1988,8 @@ declare interface ImageAttachmentInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ layoutStyle?: ImageAttachmentLayoutStyle; @@ -1840,7 +2000,8 @@ declare interface ImageAttachmentInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ colorFilter?: ColorFilterType; } @@ -1852,7 +2013,8 @@ declare interface ImageAttachmentInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare type AttachmentType = ImageAttachmentInterface | ResourceImageAttachmentOptions; @@ -1863,7 +2025,8 @@ declare type AttachmentType = ImageAttachmentInterface | ResourceImageAttachment * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare type ColorFilterType = ColorFilter | DrawingColorFilter; @@ -1874,7 +2037,8 @@ declare type ColorFilterType = ColorFilter | DrawingColorFilter; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ImageAttachmentLayoutStyle { /** @@ -1884,7 +2048,8 @@ declare interface ImageAttachmentLayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ margin?: LengthMetrics | Margin; @@ -1895,7 +2060,8 @@ declare interface ImageAttachmentLayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ padding?: LengthMetrics | Padding; @@ -1906,7 +2072,8 @@ declare interface ImageAttachmentLayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderRadius?: LengthMetrics | BorderRadiuses; } @@ -1918,7 +2085,8 @@ declare interface ImageAttachmentLayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CustomSpanMetrics { /** @@ -1930,7 +2098,8 @@ declare interface CustomSpanMetrics { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width: number; @@ -1942,7 +2111,8 @@ declare interface CustomSpanMetrics { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ height?: number; } @@ -1954,7 +2124,8 @@ declare interface CustomSpanMetrics { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CustomSpanDrawInfo { /** @@ -1965,7 +2136,8 @@ declare interface CustomSpanDrawInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ x: number; @@ -1977,7 +2149,8 @@ declare interface CustomSpanDrawInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lineTop: number; @@ -1989,7 +2162,8 @@ declare interface CustomSpanDrawInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lineBottom: number; @@ -2001,7 +2175,8 @@ declare interface CustomSpanDrawInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ baseline: number; } @@ -2013,7 +2188,8 @@ declare interface CustomSpanDrawInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CustomSpanMeasureInfo { /** @@ -2024,7 +2200,8 @@ declare interface CustomSpanMeasureInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize: number; } @@ -2035,7 +2212,8 @@ declare interface CustomSpanMeasureInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare abstract class CustomSpan { /** @@ -2046,7 +2224,8 @@ declare abstract class CustomSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ abstract onMeasure(measureInfo: CustomSpanMeasureInfo) : CustomSpanMetrics; @@ -2058,7 +2237,8 @@ declare abstract class CustomSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ abstract onDraw(context: DrawContext, drawInfo: CustomSpanDrawInfo): void; @@ -2068,7 +2248,8 @@ declare abstract class CustomSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ invalidate(): void; } @@ -2079,6 +2260,7 @@ declare abstract class CustomSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ -declare abstract class UserDataSpan {} \ No newline at end of file +declare abstract class UserDataSpan {} diff --git a/api/@internal/component/ets/swiper.d.ts b/api/@internal/component/ets/swiper.d.ts index d5b6bf321f5c308a5dd851eb831b43829c366f52..d3a73d4f6afc1823eddd2a796c365592b4b48a6d 100644 --- a/api/@internal/component/ets/swiper.d.ts +++ b/api/@internal/component/ets/swiper.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { IndicatorComponentController } from './indicatorcomponent'; +import { CommonMethod, Callback, ICurve, Optional } from './common'; +import { EdgeEffect, Curve, PageFlipMode } from './enums'; +import { Length, LengthMetrics, VoidCallback, ResourceColor, VP, Font } from './units'; +/*** endif */ + /** * Provides methods for switching components. * @@ -39,7 +46,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class SwiperController { /** @@ -63,7 +71,8 @@ declare class SwiperController { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -92,6 +101,18 @@ declare class SwiperController { */ showNext(); + /** + * Called when the next child component is displayed. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + showNext(): void; + /** * Called when the previous subcomponent is displayed. * @@ -117,6 +138,18 @@ declare class SwiperController { */ showPrevious(); + /** + * Called when the previous subcomponent is displayed. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + showPrevious(): void; + /** * Controlling Swiper to change to the specified subcomponent. * @@ -145,6 +178,21 @@ declare class SwiperController { */ changeIndex(index: number, animationMode?: SwiperAnimationMode | boolean); + /** + * Controlling Swiper to change to the specified subcomponent. + * + * @param { number } index - the index of item to be redirected. + * @param { SwiperAnimationMode | boolean } [animationMode] - animation mode for changeIndex, + * true is equivalent to SwiperAnimationMode.DEFAULT_ANIMATION, false is equivalent to SwiperAnimationMode.NO_ANIMATION + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + changeIndex(index: number, animationMode?: SwiperAnimationMode | boolean): void; + /** * Called when need to stop the swiper animation. * @@ -184,6 +232,19 @@ declare class SwiperController { */ finishAnimation(callback?: VoidCallback); + /** + * Called when need to stop the swiper animation. + * + * @param { ?VoidCallback } callback + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + finishAnimation(callback?: VoidCallback): void; + /** * Called when need to preload specified child. * @@ -198,7 +259,8 @@ declare class SwiperController { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ preloadItems(indices: Optional>): Promise; } @@ -218,7 +280,8 @@ declare class SwiperController { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class Indicator { /** @@ -232,7 +295,7 @@ declare class Indicator { * @since 10 */ /** - * Sets the position of the navigation indicator relative to the left edge of the Swiper component. + * Set the indicator to the left. * * @param { Length } value - the indicator to the left. * @returns { T } @@ -240,7 +303,8 @@ declare class Indicator { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ left(value: Length): T; @@ -255,7 +319,7 @@ declare class Indicator { * @since 10 */ /** - * Sets the position of the navigation indicator relative to the top edge of the Swiper component. + * Set the indicator to the top. * * @param { Length } value - the indicator to the top. * @returns { T } @@ -263,7 +327,8 @@ declare class Indicator { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ top(value: Length): T; @@ -278,16 +343,16 @@ declare class Indicator { * @since 10 */ /** - * Sets the position of the navigation indicator relative to the right edge of the Swiper component. + * Set the indicator to the right. * - * @param { Length } value - Position of the navigation indicator relative to the right edge of - * the Swiper component. + * @param { Length } value - the indicator to the right. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ right(value: Length): T; @@ -302,22 +367,21 @@ declare class Indicator { * @since 10 */ /** - * Sets the position of the navigation indicator relative to the bottom edge of the Swiper component. + * Set the indicator to the bottom. * - * @param { Length } value - Position of the navigation indicator relative to the bottom edge of - * the Swiper component. + * @param { Length } value - the indicator to the bottom. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bottom(value: Length): T; /** - * Sets the position of the navigation indicator relative to the bottom edge of the Swiper component. - * You can also choose to ignore the size of the navigation indicator using the ignoreSize property. + * Set the offset of indicator to the bottom. * * @param { LengthMetrics | Length } bottom - the offset of indicator to the bottom. * @param { boolean } ignoreSize - ignore the size of the indicator. @@ -326,13 +390,13 @@ declare class Indicator { * @crossplatform * @form * @atomicservice - * @since 19 + * @since 18 */ bottom(bottom: LengthMetrics | Length, ignoreSize: boolean): T; /** - * Sets the distance between the navigation indicator and the right edge (in right-to-left scripts) - * or the left edge (in left-to-right scripts) of the Swiper component. + * Set the indicator to the left in LTR + * Set the indicator to the right in RTL * * @param { LengthMetrics } value - the indicator to the right in LTR, indicator to the left in RTL * @returns { T } @@ -340,13 +404,14 @@ declare class Indicator { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start(value: LengthMetrics): T; /** - * Sets the distance between the navigation indicator and the left edge (in right-to-left scripts) - * or the right edge (in left-to-right scripts) of the Swiper component. + * Set the indicator to the left in RTL + * Set the indicator to the right in LTR * * @param { LengthMetrics } value - the indicator to the left in RTL, Set the indicator to the right in LTR * @returns { T } @@ -354,7 +419,8 @@ declare class Indicator { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ end(value: LengthMetrics): T; @@ -377,7 +443,8 @@ declare class Indicator { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ static dot(): DotIndicator; @@ -400,7 +467,8 @@ declare class Indicator { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ static digit(): DigitIndicator; } @@ -422,7 +490,8 @@ declare class Indicator { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class DotIndicator extends Indicator { /** @@ -440,7 +509,8 @@ declare class DotIndicator extends Indicator { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -455,16 +525,16 @@ declare class DotIndicator extends Indicator { * @since 10 */ /** - * Sets the width of the dot-style navigation indicator. + * Set the indicator item width. * - * @param { Length } value - Width of the dot-style navigation indicator. Default value is 6vp. - * This parameter cannot be set in percentage. + * @param { Length } value - the indicator item width. * @returns { DotIndicator } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ itemWidth(value: Length): DotIndicator; @@ -479,16 +549,16 @@ declare class DotIndicator extends Indicator { * @since 10 */ /** - * Sets the height of the dot-style navigation indicator. + * Set the indicator item height. * - * @param { Length } value - Height of the dot-style navigation indicator. Default value is 6vp. - * This parameter cannot be set in percentage. + * @param { Length } value - the indicator item height. * @returns { DotIndicator } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ itemHeight(value: Length): DotIndicator; @@ -503,16 +573,16 @@ declare class DotIndicator extends Indicator { * @since 10 */ /** - * Sets the width of the selected dot in the dot-style navigation indicator. + * Set the indicator item width when selected. * - * @param { Length } value - Width of the selected dot in the dot-style navigation indicator. - * Default value is 12vp. This parameter cannot be set in percentage. + * @param { Length } value - the indicator item width when selected. * @returns { DotIndicator } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedItemWidth(value: Length): DotIndicator; @@ -527,16 +597,16 @@ declare class DotIndicator extends Indicator { * @since 10 */ /** - * Sets the height of the selected dot in the dot-style navigation indicator. + * Set the indicator item height when selected. * - * @param { Length } value - Height of the selected dot in the dot-style navigation indicator. - * Default value is 6vp. This parameter cannot be set in percentage. + * @param { Length } value - the indicator item height when selected. * @returns { DotIndicator } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedItemHeight(value: Length): DotIndicator; @@ -551,16 +621,16 @@ declare class DotIndicator extends Indicator { * @since 10 */ /** - * Sets whether to enable the mask for the dot-style navigation indicator. + * Setting indicator style mask. * - * @param { boolean } value - Whether to enable the mask for the dot-style navigation indicator. - * Default value is false. + * @param { boolean } value - the indicator item mask. * @returns { DotIndicator } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ mask(value: boolean): DotIndicator; @@ -575,16 +645,16 @@ declare class DotIndicator extends Indicator { * @since 10 */ /** - * Sets the color of the dot-style navigation indicator. + * Set the indicator color. * - * @param { ResourceColor } value - Color of the dot-style navigation indicator. - * Default value is #182431(10% opacity). + * @param { ResourceColor } value - the indicator item color. * @returns { DotIndicator } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ color(value: ResourceColor): DotIndicator; @@ -599,28 +669,29 @@ declare class DotIndicator extends Indicator { * @since 10 */ /** - * Sets the color of the selected dot in the dot-style navigation indicator. + * Set the navigation point color. * - * @param { ResourceColor } value - Color of the selected dot in the dot-style navigation indicator. - * Default value is #007DFF. + * @param { ResourceColor } value - the indicator item when selected. * @returns { DotIndicator } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedColor(value: ResourceColor): DotIndicator; /** - * Sets the maximum number of navigation dots in the dot-style navigation indicator. + * Set the Indicator maxDisplayCount when selected. * - * @param { number } maxDisplayCount - Maximum number of navigation dots in the dot-style navigation indicator. + * @param { number } maxDisplayCount - the indicator item maxDisplayCount when selected. * @returns { DotIndicator } return the DotIndicator * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ maxDisplayCount(maxDisplayCount: number): DotIndicator; @@ -633,7 +704,8 @@ declare class DotIndicator extends Indicator { * @crossplatform * @form * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ space(space: LengthMetrics): DotIndicator; } @@ -662,7 +734,8 @@ declare class DotIndicator extends Indicator { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SwiperAutoFill { /** @@ -678,7 +751,8 @@ declare interface SwiperAutoFill { * @type { VP } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @form */ minSize: VP; @@ -701,7 +775,8 @@ declare interface SwiperAutoFill { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class DigitIndicator extends Indicator { /** @@ -719,7 +794,8 @@ declare class DigitIndicator extends Indicator { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -734,15 +810,16 @@ declare class DigitIndicator extends Indicator { * @since 10 */ /** - * Sets the font color of the digit-style navigation indicator. + * Set font color of the digital indicator. * - * @param { ResourceColor } value - Font color of the digit-style navigation indicator. Default value is #ff182431. + * @param { ResourceColor } value - the indicator font color. * @returns { DigitIndicator } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor(value: ResourceColor): DigitIndicator; @@ -757,16 +834,16 @@ declare class DigitIndicator extends Indicator { * @since 10 */ /** - * Sets the font color of the selected digit in the digit-style navigation indicator. + * Set font color of the digital indicator when selected. * - * @param { ResourceColor } value - Font color of the selected digit in the digit-style navigation indicator. - * Default value is #ff182431. + * @param { ResourceColor } value - the indicator font color when selected. * @returns { DigitIndicator } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedFontColor(value: ResourceColor): DigitIndicator; @@ -781,21 +858,16 @@ declare class DigitIndicator extends Indicator { * @since 10 */ /** - * Sets the font style of the digit-style navigation indicator. - * - *

NOTE: - *
Only the size and weight parameters in Font are adjustable. - * + * Set the digital indicator font (just support font size and weight). * - * @param { Font } value - Font style of the digit-style navigation indicator. - * Default value is { size: 14, weight: FontWeight.Normal }. + * @param { Font } value - the indicator font size and weight. * @returns { DigitIndicator } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ digitFont(value: Font): DigitIndicator; @@ -810,16 +882,16 @@ declare class DigitIndicator extends Indicator { * @since 10 */ /** - * Sets the font style of the selected digit in the digit-style navigation indicator. + * Set the digital indicator font (just support font size and weight). * - * @param { Font } value - Font style of the selected digit in the digit-style navigation indicator. - * Default value is { size: 14, weight: FontWeight.Normal }. + * @param { Font } value - the indicator font size and weight when selected. * @returns { DigitIndicator } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedDigitFont(value: Font): DigitIndicator; } @@ -838,7 +910,8 @@ declare class DigitIndicator extends Indicator { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ArrowStyle { /** @@ -857,7 +930,8 @@ declare interface ArrowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ showBackground?: boolean; @@ -879,7 +953,8 @@ declare interface ArrowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ isSidebarMiddle?: boolean; @@ -901,7 +976,8 @@ declare interface ArrowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundSize?: Length; @@ -921,7 +997,8 @@ declare interface ArrowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor?: ResourceColor; @@ -945,7 +1022,8 @@ declare interface ArrowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ arrowSize?: Length; @@ -965,7 +1043,8 @@ declare interface ArrowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ arrowColor?: ResourceColor; } @@ -994,7 +1073,8 @@ declare interface ArrowStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SwiperDisplayMode { /** @@ -1034,7 +1114,8 @@ declare enum SwiperDisplayMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ STRETCH, @@ -1084,7 +1165,8 @@ declare enum SwiperDisplayMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface SwiperInterface { /** @@ -1114,7 +1196,8 @@ interface SwiperInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (controller?: SwiperController): SwiperAttribute; } @@ -1224,7 +1307,8 @@ declare interface IndicatorStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SwiperAnimationEvent { /** @@ -1243,7 +1327,8 @@ declare interface SwiperAnimationEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ currentOffset: number; @@ -1263,7 +1348,8 @@ declare interface SwiperAnimationEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ targetOffset: number; @@ -1283,24 +1369,26 @@ declare interface SwiperAnimationEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ velocity: number; } /** - * Defines the properties for controlling the autoplay behavior. + * Define autoPlay related options. * * @interface AutoPlayOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface AutoPlayOptions { /** - * Whether the autoplay stops immediately when the component is touched. + * Set whether to stop autoplay immediately on touch down event. * * @type { boolean } * @default true @@ -1308,7 +1396,8 @@ declare interface AutoPlayOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ stopWhenTouched: boolean; } @@ -1319,25 +1408,27 @@ declare interface AutoPlayOptions { * @enum { number } SwiperNestedScrollMode * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SwiperNestedScrollMode { /** - * The scrolling is contained within the Swiper component, and no scroll chaining occurs, that is, - * the parent container does not scroll when the component scrolling reaches the boundary. + * Only Self response scrolling. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SELF_ONLY = 0, /** - * The Swiper component scrolls first, and when it hits the boundary, the parent container scrolls. + * Self priority response scrolling. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SELF_FIRST = 1, } @@ -1350,7 +1441,8 @@ declare enum SwiperNestedScrollMode { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SwiperAnimationMode { /** @@ -1360,7 +1452,8 @@ declare enum SwiperAnimationMode { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ NO_ANIMATION = 0, @@ -1371,7 +1464,8 @@ declare enum SwiperAnimationMode { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT_ANIMATION = 1, @@ -1383,7 +1477,8 @@ declare enum SwiperAnimationMode { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ FAST_ANIMATION = 2, } @@ -1399,7 +1494,8 @@ declare enum SwiperAnimationMode { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnSwiperAnimationStartCallback = (index: number, targetIndex: number, extraInfo: SwiperAnimationEvent) => void; @@ -1413,7 +1509,8 @@ declare type OnSwiperAnimationStartCallback = (index: number, targetIndex: numbe * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnSwiperAnimationEndCallback = (index: number, extraInfo: SwiperAnimationEvent) => void; @@ -1426,7 +1523,8 @@ declare type OnSwiperAnimationEndCallback = (index: number, extraInfo: SwiperAni * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnSwiperGestureSwipeCallback = (index: number, extraInfo: SwiperAnimationEvent) => void; @@ -1454,7 +1552,8 @@ declare type OnSwiperGestureSwipeCallback = (index: number, extraInfo: SwiperAni * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class SwiperAttribute extends CommonMethod { /** @@ -1476,17 +1575,16 @@ declare class SwiperAttribute extends CommonMethod { * @since 10 */ /** - * Sets the index of the child component currently displayed in the container. + * Called when the index value of the displayed subcomponent is set in the container. * - * @param { number } value - Index of the child component currently displayed in the container. Default value is 0. - * If the value is less than 0 or greater than or equal to the number of child components, - * the default value 0 is used. + * @param { number } value * @returns { SwiperAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ index(value: number): SwiperAttribute; @@ -1509,16 +1607,9 @@ declare class SwiperAttribute extends CommonMethod { * @since 10 */ /** - * Sets whether to enable automatic playback for child component switching. - * - *

NOTE: - *
If loop is set to false, the playback stops when the last page is reached. - *
The playback continues when the page is not the last page after a swipe gesture. - *
If the Swiper component becomes invisible, the playback stops. - *

+ * Called when setting whether the subcomponent plays automatically. * - * @param { boolean } value - Whether to enable automatic playback for child component switching. - * Default value is false. + * @param { boolean } value * @returns { SwiperAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -1529,25 +1620,17 @@ declare class SwiperAttribute extends CommonMethod { autoPlay(value: boolean): SwiperAttribute; /** - * Sets whether child components automatically play when the screen is pressed by fingers, a mouse device, - * or other input devices. - * - *

NOTE: - *
If loop is set to false, the playback stops when the last page is reached. - *
The playback continues when the page is not the last page after a swipe gesture. - *
If the Swiper component becomes invisible, the playback stops. - *

+ * Set whether the subcomponent plays automatically. * - * @param { boolean } autoPlay - Whether to enable automatic playback for child component switching. - * Default value is false. - * @param { AutoPlayOptions } options - Whether child components stop autoplay when the screen is pressed by fingers, - * a mouse device, or other input devices. Default value is { stopWhenTouched: true }. + * @param { boolean } autoPlay - whether the subcomponent plays automatically + * @param { AutoPlayOptions } options - autoPlay related options * @returns { SwiperAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ autoPlay(autoPlay: boolean, options: AutoPlayOptions): SwiperAttribute; @@ -1570,16 +1653,16 @@ declare class SwiperAttribute extends CommonMethod { * @since 10 */ /** - * Sets the interval for automatic playback. + * Called when the time interval for automatic playback is set. * - * @param { number } value - Interval for automatic playback. Default value is 3000, the unit is ms. - * Minimum value is 0ms. If a value less than 0 is set, the default value is used. + * @param { number } value * @returns { SwiperAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interval(value: number): SwiperAttribute; @@ -1602,10 +1685,9 @@ declare class SwiperAttribute extends CommonMethod { * @since 10 */ /** - * Sets the style of the navigation indicator. + * Set indicator is enabled, or set type style. * - * @param { DotIndicator | DigitIndicator | boolean } value - Style of the navigation indicator. - * Default value is true, default style is DotIndicator. + * @param { DotIndicator | DigitIndicator | boolean } value - the style value or show indicator of the swiper indicator. * @returns { SwiperAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -1616,16 +1698,17 @@ declare class SwiperAttribute extends CommonMethod { indicator(value: DotIndicator | DigitIndicator | boolean): SwiperAttribute; /** - * Sets the navigation indicator for the component. + * Use indicator component controller. * * @param { IndicatorComponentController | DotIndicator | DigitIndicator | boolean } indicator - - * Style of the navigation indicator. Default value is true, default style is DotIndicator. + * the style value or show indicator of the swiper indicator. * @returns { SwiperAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ indicator(indicator: IndicatorComponentController | DotIndicator | DigitIndicator | boolean): SwiperAttribute; @@ -1639,16 +1722,16 @@ declare class SwiperAttribute extends CommonMethod { * @since 10 */ /** - * Sets the arrow style of the navigation indicator. + * Set arrow is enabled, or set the arrow style. * - * @param { ArrowStyle | boolean } value - arrow is displayed or set the arrow style. Default value is false. - * @param { boolean } isHoverShow - Whether to show the arrow only when the mouse pointer hovers - * over the navigation indicator. Default value is false. + * @param { ArrowStyle | boolean } value - arrow is displayed or set the arrow style. + * @param { boolean } isHoverShow - arrow is display when mouse hover in indicator hotspot. * @returns { SwiperAttribute } return the component attribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ displayArrow(value: ArrowStyle | boolean, isHoverShow?: boolean): SwiperAttribute; @@ -1671,15 +1754,16 @@ declare class SwiperAttribute extends CommonMethod { * @since 10 */ /** - * Sets whether to enable loop playback. + * Called when setting whether to turn on cyclic sliding. * - * @param { boolean } value - Whether to enable loop playback. Default value is true. + * @param { boolean } value * @returns { SwiperAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ loop(value: boolean): SwiperAttribute; @@ -1701,15 +1785,15 @@ declare class SwiperAttribute extends CommonMethod { * @since 10 */ /** - * Sets the duration of the animation for child component switching. + * Called when the animation duration of the switch is set. * - * @param { number } value - Duration of the autoplay for child component switching. Default value is 400, - * the unit is ms. Minimum value is 0ms. If a value less than 0 is set, the default value is used. + * @param { number } value * @returns { SwiperAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ duration(value: number): SwiperAttribute; @@ -1732,15 +1816,16 @@ declare class SwiperAttribute extends CommonMethod { * @since 10 */ /** - * Sets whether vertical swiping is used. + * Called when setting whether to slide vertically. * - * @param { boolean } value - Whether vertical swiping is used. Default value is false. + * @param { boolean } value * @returns { SwiperAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ vertical(value: boolean): SwiperAttribute; @@ -1764,21 +1849,15 @@ declare class SwiperAttribute extends CommonMethod { */ /** * Sets the space between child components. - * - *

NOTE: - *
If the type is number, the default unit is vp. - *
If the type is string, the pixel unit must be explicitly specified, for example, '10px'; - * if the unit is not specified, for example, '10', the default unit vp is used. - *

* - * @param { number | string } value - Space between child components. Default value is 0, - * Minimum value is 0. If a value less than 0 is set, the default value is used. + * @param { number | string } value * @returns { SwiperAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ itemSpace(value: number | string): SwiperAttribute; @@ -1801,17 +1880,16 @@ declare class SwiperAttribute extends CommonMethod { * @since 10 */ /** - * Sets the mode in which elements are displayed along the main axis. - * This API takes effect only when displayCount is not set. + * Called when setting the size of the swiper container on the spindle. * - * @param { SwiperDisplayMode } value - Mode in which elements are displayed along the main axis. - * Default value is SwiperDisplayMode.STRETCH. + * @param { SwiperDisplayMode } value * @returns { SwiperAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ displayMode(value: SwiperDisplayMode): SwiperAttribute; @@ -1835,36 +1913,30 @@ declare class SwiperAttribute extends CommonMethod { */ /** * Sets the number of child components to be preloaded(cached). - * - *

NOTE: - *
Which are needed for the specific number of pages immediately before and after the current page. - *
If swipeByGroup in displayCount is set to true, child components are cached by group. - *

* - * @param { number } value - Number of child components to be preloaded (cached). Default value is 1. - * Minimum value is 0. If a value less than 0 is set, the default value is used. + * @param { number } value * @returns { SwiperAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ cachedCount(value: number): SwiperAttribute; /** * Sets the number of child components to be preloaded(cached). * - * @param { number } count - Number of child components to be preloaded (cached).Default value is 1. - * Minimum value is 0. If a value less than 0 is set, the default value is used. - * @param { boolean } isShown - Whether the cached nodes within the range rendered - * without being added to the render tree. Default value is false. + * @param { number } count - Number of child components to be preloaded (cached). + * @param { boolean } isShown - whether to show the nodes in the cache. * @returns { SwiperAttribute } the attribute of the swiper. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ cachedCount(count: number, isShown: boolean): SwiperAttribute; @@ -1896,14 +1968,15 @@ declare class SwiperAttribute extends CommonMethod { * 4、Placeholder items do not display any content and are only used as placeholders. * 5、When turning pages, turn pages by group. * - * @param { number | string | SwiperAutoFill } value - Number of elements to display per page. Default value is 1. - * @param { boolean } [swipeByGroup] - Whether to turn pages by group. Default value is false. + * @param { number | string | SwiperAutoFill } value + * @param { boolean } [swipeByGroup] - if swipe by group. * @returns { SwiperAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ displayCount(value: number | string | SwiperAutoFill, swipeByGroup?: boolean): SwiperAttribute; @@ -1926,20 +1999,16 @@ declare class SwiperAttribute extends CommonMethod { * @since 10 */ /** - * Sets the effect used when the component is at one of the edges. - * - *

NOTE: - *
This attribute takes effect when loop is set to false. - *

+ * Invoked when setting the sliding effect * - * @param { EdgeEffect } value - Effect used when the component is at one of the edges. - * Default value is EdgeEffect.Spring. + * @param { EdgeEffect } value * @returns { SwiperAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ effectMode(value: EdgeEffect): SwiperAttribute; @@ -1962,15 +2031,16 @@ declare class SwiperAttribute extends CommonMethod { * @since 10 */ /** - * Sets whether to disable the swipe feature. + * Sets whether to disable the swipe feature * - * @param { boolean } value - Whether to disable the swipe feature. Default value is false. + * @param { boolean } value * @returns { SwiperAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ disableSwipe(value: boolean): SwiperAttribute; @@ -1995,18 +2065,18 @@ declare class SwiperAttribute extends CommonMethod { * @since 10 */ /** - * Sets the animation curve. + * Sets the animation curve * Curve is an enumeration type for common curves * ICurve is a curve object * - * @param { Curve | string | ICurve } value - Animation curve. - * Default value is interpolatingSpring(-1, 1, 328, 34). + * @param { Curve | string | ICurve } value * @returns { SwiperAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ curve(value: Curve | string | ICurve): SwiperAttribute; @@ -2040,8 +2110,7 @@ declare class SwiperAttribute extends CommonMethod { * @since 11 */ /** - * Triggered when the index of the currently displayed child component changes. - * Anonymous Object Rectification + * Called when the index value changes. * * @param { Callback } event * @returns { SwiperAttribute } @@ -2049,7 +2118,8 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onChange(event: Callback): SwiperAttribute; @@ -2062,7 +2132,8 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onSelected(event: Callback): SwiperAttribute; @@ -2096,28 +2167,17 @@ declare class SwiperAttribute extends CommonMethod { * @since 11 */ /** - * Sets the previous margin, used to reveal a small part of the previous item. + * The previous margin which can be used to expose a small portion of the previous item. * When the previous item is empty, do not display blank space. - * - *

NOTE: - *
This attribute is effective only when the layout mode of the child components in Swiper is set to stretch, - * which mainly includes two scenarios: 1. displayMode is set to SwiperDisplayMode.STRETCH; - * 2. displayCount is assigned a numeric value. - *
When the main axis runs horizontally and either the next margin or previous margin is greater than - * the measured width of the child component, neither the next margin nor previous margin is displayed. - *
When the main axis runs vertically and either the next margin or previous margin is greater than - * the measured height of the child component, neither the next margin nor previous margin is displayed. - *

- * - * @param { Length } value - The length of previous margin.This attribute cannot be set in percentage. - * Default value is 0. + * + * @param { Length } value - The length of previous margin. * @param { boolean } [ignoreBlank] - Whether to hide(ignore) the previous margin on the first page in non-loop scenarios. - * Default value is false. * @returns { SwiperAttribute } The attribute of the swiper. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ prevMargin(value: Length, ignoreBlank?: boolean): SwiperAttribute; @@ -2140,28 +2200,17 @@ declare class SwiperAttribute extends CommonMethod { * @since 11 */ /** - * Sets the next margin, used to reveal a small part of the next item. + * The next margin which can be used to expose a small portion of the latter item. * When the next item is empty, do not display blank space. - * - *

NOTE: - *
This attribute is effective only when the layout mode of the child components in Swiper is set to stretch, - * which mainly includes two scenarios: 1. displayMode is set to SwiperDisplayMode.STRETCH; - * 2. displayCount is assigned a numeric value. - *
When the main axis runs horizontally and either the next margin or previous margin is greater than - * the measured width of the child component, neither the next margin nor previous margin is displayed. - *
When the main axis runs vertically and either the next margin or previous margin is greater than - * the measured height of the child component, neither the next margin nor previous margin is displayed. - *

- * - * @param { Length } value - The length of next margin. This attribute cannot be set in percentage. - * Default value is 0. + * + * @param { Length } value - The length of next margin. * @param { boolean } [ignoreBlank] - Whether to hide(ignore) the next margin on the last page in non-loop scenarios. - * Default value is false. * @returns { SwiperAttribute } The attribute of the swiper. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ nextMargin(value: Length, ignoreBlank?: boolean): SwiperAttribute; @@ -2174,7 +2223,8 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onUnselected(event: Callback): SwiperAttribute; @@ -2227,8 +2277,7 @@ declare class SwiperAttribute extends CommonMethod { * @since 11 */ /** - * Triggered when the switching animation starts. - * Anonymous Object Rectification + * Called when the swiper animation start. * * @param { OnSwiperAnimationStartCallback } event * @returns { SwiperAttribute } @@ -2236,7 +2285,8 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onAnimationStart(event: OnSwiperAnimationStartCallback): SwiperAttribute; @@ -2274,8 +2324,7 @@ declare class SwiperAttribute extends CommonMethod { * @since 11 */ /** - * Triggered when the switching animation ends. - * Anonymous Object Rectification + * Called when the swiper animation end. * * @param { OnSwiperAnimationEndCallback } event * @returns { SwiperAttribute } @@ -2283,7 +2332,8 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onAnimationEnd(event: OnSwiperAnimationEndCallback): SwiperAttribute; @@ -2311,69 +2361,46 @@ declare class SwiperAttribute extends CommonMethod { * @since 11 */ /** - * Triggered on a frame-by-frame basis when the page is turned by a swipe. - * Anonymous Object Rectification + * Called when the swiper swipe with the gesture. * * @param { OnSwiperGestureSwipeCallback } event * @returns { SwiperAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onGestureSwipe(event: OnSwiperGestureSwipeCallback): SwiperAttribute; /** - * Sets the nested scrolling mode of the Swiper component and its parent container. - * - *

NOTE: - *
When loop is set to true, the Swiper component has no edge effect and does not trigger - * nested scrolling of its parent container. - *

- * + * Called to setting the nested scroll mode. * * @param { SwiperNestedScrollMode } value - mode for nested scrolling. - * Default value is SwiperNestedScrollMode.SELF_ONLY. * @returns { SwiperAttribute } the attribute of the swiper. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ nestedScroll(value: SwiperNestedScrollMode): SwiperAttribute; /** - * Defines a custom switching animation. - * - *

NOTE: - *
1. This API does not work when prevMargin and nextMargin are set in such a way that - * the Swiper frontend and backend display the same page during loop playback. - *
2. During page scrolling, the ContentDidScrollCallback callback is invoked for all pages in the viewport - * on a frame-by-frame basis. - *
3. When the swipeByGroup parameter of the displayCount attribute is set to true, - * the callback is invoked for all pages in a group if any page in the group is within the viewport. - *

+ * Custom swiper content transition animation. * * @param { SwiperContentAnimatedTransition } transition - custom content transition animation. * @returns { SwiperAttribute } the attribute of the swiper. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ customContentTransition(transition: SwiperContentAnimatedTransition): SwiperAttribute; /** - * Triggered when content in the Swiper component scrolls. - * - *

NOTE: - *
1. This API does not work when prevMargin and nextMargin are set in such a way that - * the Swiper frontend and backend display the same page during loop playback. - *
2. During page scrolling, the ContentDidScrollCallback callback is invoked for all pages in the viewport - * on a frame-by-frame basis. - *
3. When the swipeByGroup parameter of the displayCount** attribute is set to true, - * the callback is invoked for all pages in a group if any page in the group is within the viewport. - *

+ * Called when the swiper content did scroll. * * @param { ContentDidScrollCallback } handler - callback of scroll, * selectedIndex is the index value of the swiper content selected before animation start. @@ -2384,19 +2411,21 @@ declare class SwiperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onContentDidScroll(handler: ContentDidScrollCallback): SwiperAttribute; /** - * Sets whether the navigation indicator is interactive. + * Setting whether the indicator is interactive. * - * @param { boolean } value - Whether the navigation indicator is interactive. Default value is true. + * @param { boolean } value - Whether the indicator is interactive. * @returns { SwiperAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ indicatorInteractive(value: boolean): SwiperAttribute; @@ -2409,7 +2438,8 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ pageFlipMode(mode: Optional): SwiperAttribute; @@ -2422,7 +2452,8 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ onContentWillScroll(handler: ContentWillScrollCallback): SwiperAttribute; @@ -2430,13 +2461,13 @@ declare class SwiperAttribute extends CommonMethod { * Set maintain visible content position. * * @param { boolean } enabled - maintain visible content position. - * Default value is false. * @returns { SwiperAttribute } the attribute of swiper. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ maintainVisibleContentPosition(enabled: boolean): SwiperAttribute; } @@ -2448,7 +2479,8 @@ declare class SwiperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SwiperContentAnimatedTransition { /** @@ -2460,7 +2492,8 @@ declare interface SwiperContentAnimatedTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ timeout?: number; @@ -2471,7 +2504,8 @@ declare interface SwiperContentAnimatedTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ transition: Callback; } @@ -2483,7 +2517,8 @@ declare interface SwiperContentAnimatedTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SwiperContentTransitionProxy { /** @@ -2493,7 +2528,8 @@ declare interface SwiperContentTransitionProxy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ selectedIndex: number; @@ -2504,7 +2540,8 @@ declare interface SwiperContentTransitionProxy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ index: number; @@ -2515,7 +2552,8 @@ declare interface SwiperContentTransitionProxy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ position: number; @@ -2526,7 +2564,8 @@ declare interface SwiperContentTransitionProxy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ mainAxisLength: number; @@ -2536,7 +2575,8 @@ declare interface SwiperContentTransitionProxy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ finishTransition(): void; } @@ -2549,7 +2589,8 @@ declare interface SwiperContentTransitionProxy { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SwiperContentWillScrollResult { /** @@ -2560,7 +2601,8 @@ declare interface SwiperContentWillScrollResult { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ currentIndex: number; @@ -2572,7 +2614,8 @@ declare interface SwiperContentWillScrollResult { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ comingIndex: number; @@ -2585,7 +2628,8 @@ declare interface SwiperContentWillScrollResult { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ offset: number; } @@ -2601,7 +2645,8 @@ declare interface SwiperContentWillScrollResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type ContentDidScrollCallback = (selectedIndex: number, index: number, position: number, mainAxisLength: number) => void; @@ -2615,7 +2660,8 @@ declare type ContentDidScrollCallback = (selectedIndex: number, index: number, p * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare type ContentWillScrollCallback = (result: SwiperContentWillScrollResult) => boolean; diff --git a/api/@internal/component/ets/symbol_span.d.ts b/api/@internal/component/ets/symbol_span.d.ts index c11965a765e2aed98e742e75d274dfd563516d31..b54ed4f4bbb772fa6c4cbe4a634f0abbcaee42ab 100644 --- a/api/@internal/component/ets/symbol_span.d.ts +++ b/api/@internal/component/ets/symbol_span.d.ts @@ -18,6 +18,14 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource } from './../../../api/global/resource'; +import { CommonMethod, AttributeModifier } from './common'; +import { ResourceColor } from './units'; +import { FontWeight } from './enums'; +import { SymbolEffectStrategy, SymbolRenderingStrategy } from './symbolglyph'; +/*** endif */ + /** * Provides an interface for SymbolSpan. * diff --git a/api/@internal/component/ets/symbolglyph.d.ts b/api/@internal/component/ets/symbolglyph.d.ts index 9b9ad64302d868ac9363df80e5bf610ab5cc04f4..7de39cbed7c142ae173c7edbbd8d75ba72aa5780 100644 --- a/api/@internal/component/ets/symbolglyph.d.ts +++ b/api/@internal/component/ets/symbolglyph.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource } from '../../global/resource'; +import { ResourceColor } from './units'; +import { FontWeight } from './enums'; +import { CommonMethod,Optional } from "./common"; +/*** endif */ + /** * Provides an interface for SymbolGlyph. * @@ -32,17 +39,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ -/** - * Provides an interface for SymbolGlyph. - * - * @interface SymbolGlyphInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface SymbolGlyphInterface { /** @@ -61,18 +59,8 @@ interface SymbolGlyphInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * Called when resource is entered in SymbolGlyph. - * - * @param { Resource } value - * @returns { SymbolGlyphAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ (value?: Resource): SymbolGlyphAttribute; } @@ -91,17 +79,8 @@ interface SymbolGlyphInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ -/** - * The symbol rendering strategy. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SymbolRenderingStrategy { /** @@ -116,16 +95,8 @@ declare enum SymbolRenderingStrategy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * The single rendering strategy. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ SINGLE = 0, @@ -141,16 +112,8 @@ declare enum SymbolRenderingStrategy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * The multiple color rendering strategy. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ MULTIPLE_COLOR = 1, @@ -166,16 +129,8 @@ declare enum SymbolRenderingStrategy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * The multiple opacity rendering strategy. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ MULTIPLE_OPACITY = 2, } @@ -194,17 +149,8 @@ declare enum SymbolRenderingStrategy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ -/** - * The symbol effect strategy. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SymbolEffectStrategy { /** @@ -219,16 +165,8 @@ declare enum SymbolEffectStrategy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * There is no effect strategy. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -244,16 +182,8 @@ declare enum SymbolEffectStrategy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * The scale effect strategy. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ SCALE = 1, @@ -269,16 +199,8 @@ declare enum SymbolEffectStrategy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * The hierarchical effect strategy. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ HIERARCHICAL = 2, } @@ -290,17 +212,8 @@ declare enum SymbolEffectStrategy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ -/** - * The direction type of symbol effect - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum EffectDirection { /** @@ -309,16 +222,8 @@ declare enum EffectDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * The scale down animation of symbol - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ DOWN = 0, /** @@ -327,16 +232,8 @@ declare enum EffectDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * The scale up animation of symbol - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ UP = 1, } @@ -348,17 +245,8 @@ declare enum EffectDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ -/** - * Declare scope type of the symbol effect - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum EffectScope { /** @@ -367,16 +255,8 @@ declare enum EffectScope { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * The layered animation of symbol - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ LAYER = 0, /** @@ -385,16 +265,8 @@ declare enum EffectScope { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * The whole animation of symbol - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ WHOLE = 1, } @@ -406,17 +278,8 @@ declare enum EffectScope { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ -/** - * Declare fill style of symbol - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum EffectFillStyle { /** @@ -425,16 +288,8 @@ declare enum EffectFillStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * The cumulative fill style of symbol - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ CUMULATIVE = 0, @@ -444,16 +299,8 @@ declare enum EffectFillStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * The iterative fill style of symbol - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ ITERATIVE = 1, } @@ -464,16 +311,8 @@ declare enum EffectFillStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ -/** - * Defines SymbolEffect class. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class SymbolEffect { } @@ -485,17 +324,8 @@ declare class SymbolEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ -/** - * Defines ScaleSymbolEffect class. - * - * @extends SymbolEffect - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class ScaleSymbolEffect extends SymbolEffect { /** @@ -506,18 +336,8 @@ declare class ScaleSymbolEffect extends SymbolEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * constructor. - * - * @param { EffectScope } [scope] - The scope type of symbol effect. - * @param { EffectDirection } [direction] - The direction of symbol effect. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(scope?: EffectScope, direction?: EffectDirection); @@ -528,17 +348,8 @@ declare class ScaleSymbolEffect extends SymbolEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * The scope type of symbol effect - * - * @type { ?EffectScope } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ scope?: EffectScope; @@ -549,17 +360,8 @@ declare class ScaleSymbolEffect extends SymbolEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * The direction of symbol effect - * - * @type { ?EffectDirection } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ direction?: EffectDirection; } @@ -571,17 +373,8 @@ declare class ScaleSymbolEffect extends SymbolEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ -/** - * Defines HierarchicalSymbolEffect class. - * - * @extends SymbolEffect - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class HierarchicalSymbolEffect extends SymbolEffect { /** @@ -591,17 +384,8 @@ declare class HierarchicalSymbolEffect extends SymbolEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * constructor. - * - * @param { EffectFillStyle } [fillStyle] - The fill style of symbol effect. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(fillStyle?: EffectFillStyle); @@ -612,17 +396,8 @@ declare class HierarchicalSymbolEffect extends SymbolEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * The fill style of symbol effect - * - * @type { ?EffectFillStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ fillStyle?: EffectFillStyle; } @@ -634,17 +409,8 @@ declare class HierarchicalSymbolEffect extends SymbolEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ -/** - * Defines AppearSymbolEffect class. - * - * @extends SymbolEffect - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class AppearSymbolEffect extends SymbolEffect { /** @@ -654,17 +420,8 @@ declare class AppearSymbolEffect extends SymbolEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * constructor. - * - * @param { EffectScope } [scope] - The scope type of symbol effect. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(scope?: EffectScope); @@ -675,17 +432,8 @@ declare class AppearSymbolEffect extends SymbolEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * The scope type of symbol effect - * - * @type { ?EffectScope } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ scope?: EffectScope; } @@ -697,17 +445,8 @@ declare class AppearSymbolEffect extends SymbolEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ -/** - * Defines DisappearSymbolEffect class. - * - * @extends SymbolEffect - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class DisappearSymbolEffect extends SymbolEffect { /** @@ -717,17 +456,8 @@ declare class DisappearSymbolEffect extends SymbolEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * constructor. - * - * @param { EffectScope } [scope] - The scope type of symbol effect. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(scope?: EffectScope); @@ -738,17 +468,8 @@ declare class DisappearSymbolEffect extends SymbolEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * The scope type of symbol effect - * - * @type { ?EffectScope } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ scope?: EffectScope; } @@ -760,17 +481,8 @@ declare class DisappearSymbolEffect extends SymbolEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ -/** - * Defines BounceSymbolEffect class. - * - * @extends SymbolEffect - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class BounceSymbolEffect extends SymbolEffect { /** @@ -781,18 +493,8 @@ declare class BounceSymbolEffect extends SymbolEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * constructor. - * - * @param { EffectScope } [scope] - The scope type of symbol effect. - * @param { EffectDirection } [direction] - The direction of symbol effect. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(scope?: EffectScope, direction?: EffectDirection); @@ -803,17 +505,8 @@ declare class BounceSymbolEffect extends SymbolEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * The scope type of symbol effect - * - * @type { ?EffectScope } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ scope?: EffectScope; @@ -824,17 +517,8 @@ declare class BounceSymbolEffect extends SymbolEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * The direction of symbol effect - * - * @type { ?EffectDirection } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ direction?: EffectDirection; } @@ -846,17 +530,8 @@ declare class BounceSymbolEffect extends SymbolEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ -/** - * Defines ReplaceSymbolEffect class. - * - * @extends SymbolEffect - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class ReplaceSymbolEffect extends SymbolEffect { /** @@ -866,17 +541,8 @@ declare class ReplaceSymbolEffect extends SymbolEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * constructor. - * - * @param { EffectScope } [scope] - The scope type of symbol effect. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(scope?: EffectScope); @@ -887,17 +553,8 @@ declare class ReplaceSymbolEffect extends SymbolEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * The scope type of symbol effect - * - * @type { ?EffectScope } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ scope?: EffectScope; } @@ -909,7 +566,8 @@ declare class ReplaceSymbolEffect extends SymbolEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class PulseSymbolEffect extends SymbolEffect { } @@ -994,17 +652,8 @@ declare class QuickReplaceSymbolEffect extends SymbolEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ -/** - * Provides attribute for SymbolGlyph. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class SymbolGlyphAttribute extends CommonMethod { /** @@ -1023,18 +672,8 @@ declare class SymbolGlyphAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * Called when the SymbolGlyph size is set. - * - * @param { number | string | Resource } value - * @returns { SymbolGlyphAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ fontSize(value: number | string | Resource): SymbolGlyphAttribute; @@ -1054,18 +693,8 @@ declare class SymbolGlyphAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * Called when the SymbolGlyph color is set. - * - * @param { Array } value - * @returns { SymbolGlyphAttribute } The attribute of the SymbolGlyph. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ fontColor(value: Array): SymbolGlyphAttribute; @@ -1096,18 +725,8 @@ declare class SymbolGlyphAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * Called when the font symbolGlyph weight is set. - * - * @param { number | FontWeight | string } value - * @returns { SymbolGlyphAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ fontWeight(value: number | FontWeight | string): SymbolGlyphAttribute; @@ -1127,18 +746,8 @@ declare class SymbolGlyphAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * Called when the symbolGlyph effect is set. - * - * @param { SymbolEffectStrategy } value - * @returns { SymbolGlyphAttribute } The attribute of the SymbolGlyph. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ effectStrategy(value: SymbolEffectStrategy): SymbolGlyphAttribute; @@ -1158,18 +767,8 @@ declare class SymbolGlyphAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 - */ - /** - * Called when the symbolGlyph rendering strategy is set. - * - * @param { SymbolRenderingStrategy } value - * @returns { SymbolGlyphAttribute } The attribute of the SymbolGlyph. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ renderingStrategy(value: SymbolRenderingStrategy): SymbolGlyphAttribute; @@ -1209,17 +808,20 @@ declare class SymbolGlyphAttribute extends CommonMethod { * @atomicservice * @since 12 */ + symbolEffect(symbolEffect: SymbolEffect, triggerValue?: number): SymbolGlyphAttribute; + /** * Define effect options for SymbolGlyph. * * @param { SymbolEffect } [symbolEffect] - The symbol effect type - * @param { number } [triggerValue] - The trigger of the effect + * @param { boolean | number } [triggerValue] - The trigger of the effect * @returns { SymbolGlyphAttribute } The attribute of the SymbolGlyph. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 20 + * @arkts 1.2 */ symbolEffect(symbolEffect: SymbolEffect, triggerValue?: number): SymbolGlyphAttribute; diff --git a/api/@internal/component/ets/tab_content.d.ts b/api/@internal/component/ets/tab_content.d.ts index 0b608df9b788f09b288528d740a3b94c946c3b78..ff9f8c414a874f0893e523f93aefbea98eb9cf75 100644 --- a/api/@internal/component/ets/tab_content.d.ts +++ b/api/@internal/component/ets/tab_content.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2025 Huawei Device Co., Ltd. + * 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 @@ -18,6 +18,15 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod } from './common'; +import { CustomBuilder } from './builder' +import { TextHeightAdaptivePolicy, TextOverflow, VerticalAlign } from './enums'; +import { Dimension, Font, Length, LocalizedPadding, Padding, Resource, ResourceColor, ResourceStr, VoidCallback } from './units'; +import { ComponentContent } from '../ComponentContent' +import { SymbolGlyphModifier } from '../SymbolGlyphModifier'; +/*** endif */ + /** * Enum for the mode of the tab bar when selected. * @@ -33,7 +42,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 SelectedMode { /** @@ -44,12 +54,13 @@ declare enum SelectedMode { * @since 10 */ /** - * Indicator mode. + * The value of indicator * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ INDICATOR, @@ -61,12 +72,13 @@ declare enum SelectedMode { * @since 10 */ /** - * Board mode. + * The value of board * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BOARD } @@ -86,7 +98,8 @@ declare enum SelectedMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum LayoutMode { @@ -103,7 +116,8 @@ declare enum LayoutMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ AUTO = 0, /** @@ -119,7 +133,8 @@ declare enum LayoutMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ VERTICAL = 1, @@ -136,7 +151,8 @@ declare enum LayoutMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ HORIZONTAL = 2 } @@ -171,7 +187,7 @@ interface IndicatorStyle { * @since 10 */ /** - * Color of the indicator and board. + * Define the color of the indicator * * @type { ?ResourceColor } * @default #FF007DFF @@ -191,7 +207,7 @@ interface IndicatorStyle { * @since 10 */ /** - * Height of the indicator. It cannot be set in percentage. + * Define the height of the indicator * * @type { ?Length } * @default 2vp @@ -213,7 +229,7 @@ interface IndicatorStyle { * @since 10 */ /** - * Width of the indicator. It cannot be set in percentage. + * Define the width of the indicator. * If it is 0, the width will be equal to the width of the content * * @type { ?Length } @@ -235,7 +251,7 @@ interface IndicatorStyle { * @since 10 */ /** - * Rounded corner radius of the indicator. It cannot be set in percentage. + * Define the border radius of the indicator * * @type { ?Length } * @default 0 @@ -256,10 +272,10 @@ interface IndicatorStyle { * @since 10 */ /** - * Spacing between the indicator and text.It cannot be set in percentage. + * Define the margin top of the indicator * * @type { ?Length } - * @default 8vp + * @default 8 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -268,6 +284,77 @@ interface IndicatorStyle { marginTop?: Length; } +/** + * Provide an interface for the style of an SubTabBar indicator including color, height, width, border radius + * and margin top + * + * @interface SubTabBarIndicatorStyle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare interface SubTabBarIndicatorStyle { + /** + * Define the color of the indicator + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + color?: ResourceColor; + + /** + * Define the height of the indicator + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + height?: Length; + + /** + * Define the width of the indicator. + * If it is 0, the width will be equal to the width of the content + * + * @type { ?Length } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + width?: Length; + + /** + * Define the border radius of the indicator + * + * @type { ?Length } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + borderRadius?: Length; + + /** + * Define the margin top of the indicator + * + * @type { ?Length } + * @default 8 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + marginTop?: Length; +} + /** * Provide an interface for the style of an indicator including border radius * @@ -283,7 +370,8 @@ interface IndicatorStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface BoardStyle { /** @@ -301,7 +389,8 @@ interface BoardStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ borderRadius?: Length; } @@ -333,7 +422,7 @@ declare interface LabelStyle { * @since 10 */ /** - * Display mode when the label text is too long. + * overflow mode. * * @type { ?TextOverflow } * @default TextOverflow.Ellipsis @@ -353,7 +442,7 @@ declare interface LabelStyle { * @since 10 */ /** - * Maximum number of lines in the label text. + * Label max lines. * * @type { ?number } * @default 1 @@ -373,7 +462,7 @@ declare interface LabelStyle { * @since 10 */ /** - * Minimum font size of the label text. + * Min font size for adapted height. * * @type { ?(number | ResourceStr) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -392,7 +481,7 @@ declare interface LabelStyle { * @since 10 */ /** - * Maximum font size of the label text. + * Max font size for adapted height. * * @type { ?(number | ResourceStr) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -411,7 +500,7 @@ declare interface LabelStyle { * @since 10 */ /** - * How the adaptive height is determined for the label text. + * Adapt text height option. * * @type { ?TextHeightAdaptivePolicy } * @default TextHeightAdaptivePolicy.MAX_LINES_FIRST @@ -431,7 +520,7 @@ declare interface LabelStyle { * @since 10 */ /** - * Font of the label text. + * Font style. * * @type { ?Font } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -442,7 +531,7 @@ declare interface LabelStyle { font?: Font; /** - * Font color of the label text when it is selected. + * The text color of the selected tab bar. * * @type { ?ResourceColor } * @default #FF007DFF @@ -454,7 +543,7 @@ declare interface LabelStyle { selectedColor?: ResourceColor; /** - * Font color of the label text when it is not selected. + * The text color of the unselected tab bar. * * @type { ?ResourceColor } * @default #99182431 @@ -466,6 +555,115 @@ declare interface LabelStyle { unselectedColor?: ResourceColor; } +/** + * TabBarLabelStyle object. + * + * @interface TabBarLabelStyle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare interface TabBarLabelStyle { + + /** + * overflow mode. + * + * @type { ?TextOverflow } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + overflow?: TextOverflow; + + /** + * Label max lines. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + maxLines?: number; + + /** + * Min font size for adapted height. + * + * @type { ?(number | ResourceStr) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + minFontSize?: number | ResourceStr; + + /** + * Max font size for adapted height. + * + * @type { ?(number | ResourceStr) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + maxFontSize?: number | ResourceStr; + + /** + * Adapt text height option. + * + * @type { ?TextHeightAdaptivePolicy } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + heightAdaptivePolicy?: TextHeightAdaptivePolicy; + + /** + * Font style. + * + * @type { ?Font } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + font?: Font; + + /** + * The text color of the selected tab bar. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + selectedColor?: ResourceColor; + + /** + * The text color of the unselected tab bar. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + unselectedColor?: ResourceColor; +} + /** * TabBarIconStyle object. * @@ -473,7 +671,8 @@ declare interface LabelStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TabBarIconStyle { /** @@ -483,7 +682,8 @@ declare interface TabBarIconStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ selectedColor?: ResourceColor; @@ -494,7 +694,8 @@ declare interface TabBarIconStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ unselectedColor?: ResourceColor; } @@ -516,7 +717,7 @@ declare interface TabBarIconStyle { */ declare class TabBarSymbol { /** - * Symbol icon in the normal style. + * The properties of the symbol icon in the tab bar need to be unselected. * * @type { SymbolGlyphModifier } * @default fontColor: #66182431, renderingStrategy: SymbolRenderingStrategy.MULTIPLE_OPACITY, fontSize: 24vp @@ -537,7 +738,7 @@ declare class TabBarSymbol { normal: SymbolGlyphModifier; /** - * Symbol icon in the selected style. + * The properties of the symbol icon in the tab bar need to be selected. * * @type { ?SymbolGlyphModifier } * @default fontColor: #ff007dff, renderingStrategy: SymbolRenderingStrategy.MULTIPLE_OPACITY, fontSize: 24vp @@ -565,7 +766,8 @@ declare class TabBarSymbol { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TabBarOptions { /** @@ -665,7 +867,8 @@ declare interface TabBarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class SubTabBarStyle { /** @@ -690,7 +893,8 @@ declare class SubTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(content: ResourceStr); /** @@ -700,7 +904,8 @@ declare class SubTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(content: ResourceStr | ComponentContent); @@ -715,7 +920,7 @@ declare class SubTabBarStyle { * @since 10 */ /** - * Static constructor used to create a SubTabBarStyle instance. + * constructor * * @param { ResourceStr } content - indicates the content of the sub tab bar * @returns { SubTabBarStyle } the style of the sub tab bar @@ -723,11 +928,12 @@ declare class SubTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ static of(content: ResourceStr): SubTabBarStyle; /** - * Static constructor used to create a SubTabBarStyle instance. You can set custom content with ComponentContent. + * Create a content object of the sub tab bar * * @param { ResourceStr | ComponentContent } content - indicates the content of the sub tab bar * @returns { SubTabBarStyle } the style of the sub tab bar @@ -735,7 +941,8 @@ declare class SubTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static of(content: ResourceStr | ComponentContent): SubTabBarStyle; @@ -749,9 +956,9 @@ declare class SubTabBarStyle { * @since 10 */ /** - * Sets the indicator style of the selected subtab. + * Set the style of the indicator when selected * - * @param { IndicatorStyle } value - indicator style object for the selected subtab. + * @param { IndicatorStyle } value - indicates the indicator style of the sub tab bar * @returns { SubTabBarStyle } the style of the sub tab bar * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -760,6 +967,18 @@ declare class SubTabBarStyle { */ indicator(value: IndicatorStyle): SubTabBarStyle; + /** + * Set the style of the indicator when selected + * + * @param { SubTabBarIndicatorStyle } style - indicates the indicator style of the sub tab bar + * @returns { SubTabBarStyle } the style of the sub tab bar + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + indicator(style: SubTabBarIndicatorStyle): SubTabBarStyle; + /** * Set the mode of the indicator when selected * @@ -770,18 +989,15 @@ declare class SubTabBarStyle { * @since 10 */ /** - * Sets the display mode of the selected subtab. - * - *

NOTE: - *
It takes effect only in the horizontal layout. - *

+ * Set the mode of the indicator when selected * - * @param { SelectedMode } value - display mode of the selected subtab. Default value is SelectedMode.INDICATOR. + * @param { SelectedMode } value - indicates the selected mode of the sub tab bar * @returns { SubTabBarStyle } the style of the sub tab bar * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedMode(value: SelectedMode): SubTabBarStyle; @@ -795,18 +1011,15 @@ declare class SubTabBarStyle { * @since 10 */ /** - * Sets the background style (board style) of the selected subtab. - * - *

NOTE: - *
It takes effect only in the horizontal layout. - *

+ * Set the style of the board when selected * - * @param { BoardStyle } value - background style object for the selected subtab. + * @param { BoardStyle } value - indicates the board style of the sub tab bar * @returns { SubTabBarStyle } the style of the sub tab bar * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ board(value: BoardStyle): SubTabBarStyle; @@ -820,9 +1033,9 @@ declare class SubTabBarStyle { * @since 10 */ /** - * Sets the style of the label text and font for the subtab. + * Set the label style of the indicator * - * @param { LabelStyle } value - style object for the label text and font of the subtab. + * @param { LabelStyle } value - indicates the label style of the sub tab bar * @returns { SubTabBarStyle } the style of the sub tab bar * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -831,6 +1044,18 @@ declare class SubTabBarStyle { */ labelStyle(value: LabelStyle): SubTabBarStyle; + /** + * Set the label style of the sub tab bar + * + * @param { TabBarLabelStyle } style - indicates the label style of the sub tab bar + * @returns { SubTabBarStyle } the style of the sub tab bar + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + labelStyle(style: TabBarLabelStyle): SubTabBarStyle; + /** * Set the padding of the sub tab bar * @@ -853,7 +1078,8 @@ declare class SubTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ padding(value: Padding | Dimension): SubTabBarStyle; @@ -869,7 +1095,8 @@ declare class SubTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ padding(padding: LocalizedPadding): SubTabBarStyle; @@ -890,7 +1117,8 @@ declare class SubTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ id(value: string): SubTabBarStyle; } @@ -914,7 +1142,8 @@ declare class SubTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class BottomTabBarStyle { /** @@ -952,7 +1181,8 @@ declare class BottomTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(icon: ResourceStr | TabBarSymbol, text: ResourceStr); @@ -980,7 +1210,7 @@ declare class BottomTabBarStyle { * @since 11 */ /** - * Static constructor used to create a BottomTabBarStyle instance. + * of. * * @param { ResourceStr | TabBarSymbol } icon - indicates the icon of the bottom tab bar * @param { ResourceStr } text - indicates the text of the bottom tab bar @@ -989,7 +1219,8 @@ declare class BottomTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static of(icon: ResourceStr | TabBarSymbol, text: ResourceStr): BottomTabBarStyle; @@ -1003,9 +1234,9 @@ declare class BottomTabBarStyle { * @since 10 */ /** - * Sets the style of the label text and font for the bottom tab. + * Set the label style of the indicator * - * @param { LabelStyle } value - style of the label text and font for the bottom tab. + * @param { LabelStyle } value - indicates the label style of the bottom tab bar * @returns { BottomTabBarStyle } the style of the bottom tab bar * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -1014,6 +1245,18 @@ declare class BottomTabBarStyle { */ labelStyle(value: LabelStyle): BottomTabBarStyle; + /** + * Set the label style of the bottom tab bar + * + * @param { TabBarLabelStyle } style - indicates the label style of the bottom tab bar + * @returns { BottomTabBarStyle } the style of the bottom tab bar + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + labelStyle(style: TabBarLabelStyle): BottomTabBarStyle; + /** * Set the padding of the bottom tab bar * @@ -1047,7 +1290,8 @@ declare class BottomTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ padding(value: Padding | Dimension | LocalizedPadding): BottomTabBarStyle; @@ -1061,15 +1305,15 @@ declare class BottomTabBarStyle { * @since 10 */ /** - * Sets the layout mode of the images and texts on the bottom tab. + * Set the layout mode of the bottom tab bar * - * @param { LayoutMode } value - layout mode of the images and text on the bottom tab. - * Default value is LayoutMode.VERTICAL. + * @param { LayoutMode } value - indicates the layout mode of the bottom tab bar * @returns { BottomTabBarStyle } the style of the bottom tab bar * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ layoutMode(value: LayoutMode): BottomTabBarStyle; @@ -1083,15 +1327,15 @@ declare class BottomTabBarStyle { * @since 10 */ /** - * Sets the vertical alignment mode of the images and text on the bottom tab. + * Set the vertical alignment style of the bottom tab bar * - * @param { VerticalAlign } value - vertical alignment mode of the images and text on the bottom tab. - * Default value is VerticalAlign.Center. + * @param { VerticalAlign } value - indicates the vertical alignment of the bottom tab bar * @returns { BottomTabBarStyle } the style of the bottom tab bar * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ verticalAlign(value: VerticalAlign): BottomTabBarStyle; @@ -1105,19 +1349,15 @@ declare class BottomTabBarStyle { * @since 10 */ /** - * Sets whether the images and text on the bottom tab can be symmetrically extended by - * the minimum value of the available space on the left and right bottom tabs. - * - *

NOTE: - *
This parameter is valid only between bottom tabs in fixed horizontal mode. - *

+ * Set the symmetric extensible of the bottom tab bar * - * @param { boolean } value - indicates whether the bottom tab bar is extensible. Default value is false. + * @param { boolean } value - indicates whether the bottom tab bar is extensible * @returns { BottomTabBarStyle } the style of the bottom tab bar * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ symmetricExtensible(value: boolean): BottomTabBarStyle; @@ -1138,19 +1378,21 @@ declare class BottomTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ id(value: string): BottomTabBarStyle; /** - * Sets the style of the label icon on the bottom tab. + * Set the icon style of the bottom tab bar * - * @param { TabBarIconStyle } style - style of the label icon on the bottom tab. + * @param { TabBarIconStyle } style - indicates the icon style of the bottom tab bar * @returns { BottomTabBarStyle } the style of the bottom tab bar * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ iconStyle(style: TabBarIconStyle): BottomTabBarStyle; } @@ -1177,7 +1419,8 @@ declare class BottomTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface TabContentInterface { /** @@ -1202,7 +1445,8 @@ interface TabContentInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (): TabContentAttribute; } @@ -1229,7 +1473,8 @@ interface TabContentInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TabContentAttribute extends CommonMethod { /** @@ -1268,14 +1513,9 @@ declare class TabContentAttribute extends CommonMethod { * @since 11 */ /** - * Sets the content displayed on the tab bar. - * Anonymous Object Rectification - * - *

NOTE: - *
If the content set exceeds the space provided by the tab bar, it will be clipped. - *

+ * Called when tabbar is entered. * - * @param { string | Resource | CustomBuilder | TabBarOptions } options - Content displayed on the tab bar. + * @param { string | Resource | CustomBuilder | TabBarOptions } options - TabBar options. * @returns { TabContentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -1302,14 +1542,9 @@ declare class TabContentAttribute extends CommonMethod { * @since 10 */ /** - * Sets the content displayed on the tab bar. - * - *

NOTE: - *
The bottom tab style does not include an indicator. - *
When an icon display error occurs, a gray blank block is displayed. - *

+ * Called when tabbar is entered. * - * @param { SubTabBarStyle | BottomTabBarStyle } value - Content displayed on the tab bar. + * @param { SubTabBarStyle | BottomTabBarStyle } value * @returns { TabContentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -1319,49 +1554,41 @@ declare class TabContentAttribute extends CommonMethod { tabBar(value: SubTabBarStyle | BottomTabBarStyle): TabContentAttribute; /** - * Sets the content displayed on the tab bar. - * Anonymous Object Rectification - * - *

NOTE: - *
If BottomTabBarStyle or TabBarOptions is used and an icon is set, - * a gray block will be displayed if the icon is invalid. - *
If the content exceeds the space provided by the tab bar, it will be clipped. - *

+ * Set the content of the tab bar. * * @param { ComponentContent | SubTabBarStyle | BottomTabBarStyle | string | Resource | CustomBuilder | TabBarOptions } content - * Content displayed on the tab bar. + * Set the content of the tab bar. * @returns { TabContentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ tabBar(content: ComponentContent | SubTabBarStyle | BottomTabBarStyle | string | Resource | CustomBuilder | TabBarOptions): TabContentAttribute; /** - * Called when the tab content is about to be displayed. The scenarios include the first-time display, - * tab switching, page switching, and window switching between the foreground and background. - * + * Called when the tab content will show. * @param { VoidCallback } event * @returns { TabContentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillShow(event: VoidCallback): TabContentAttribute; /** - * Called when the tab content is about to be hidden. The scenarios include the tab switching, - * page switching, and window switching between the foreground and background. - * + * Called when the tab content will hide. * @param { VoidCallback } event * @returns { TabContentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillHide(event: VoidCallback): TabContentAttribute; } diff --git a/api/@internal/component/ets/tabs.d.ts b/api/@internal/component/ets/tabs.d.ts index ed4700810d14fb40e538bc76fbb66768c8405947..ea754311b85c875eded52f729109e118fd6954dd 100644 --- a/api/@internal/component/ets/tabs.d.ts +++ b/api/@internal/component/ets/tabs.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { BackgroundBlurStyleOptions, BackgroundEffectOptions, BlurStyle, Callback, CommonMethod, Optional, TranslateOptions, DividerStyle } from './common'; +import { EdgeEffect, PageFlipMode } from './enums'; +import { Dimension, Length, ResourceColor } from './units'; +import { CommonModifier } from "../CommonModifier"; +/*** endif */ + /** * CommonModifier * @@ -51,7 +58,8 @@ declare type CommonModifier = import('../api/arkui/CommonModifier').CommonModifi * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum BarMode { /** @@ -68,14 +76,13 @@ declare enum BarMode { * @since 10 */ /** - * The width of each tab is determined by the actual layout. The tabs are scrollable in the following case: - * In horizontal layout, the total width exceeds the tab bar width; in vertical layout, - * the total height exceeds the tab bar height. + * The actual layout width of the TabBar is used. If the width exceeds the total width, you can slide the tabbar. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Scrollable = 0, @@ -93,13 +100,13 @@ declare enum BarMode { * @since 10 */ /** - * The width of each tab is determined by equally dividing the number of tabs by the bar width - * (or bar height in the vertical layout). + * The width of all TabBars is evenly allocated. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Fixed = 1, } @@ -111,58 +118,62 @@ declare enum BarMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum AnimationMode { /** - * Load the content of the target page before starting the switching animation. + * Start animation after tabcontent is fully measured. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CONTENT_FIRST = 0, /** - * Start the switching animation before loading the content of the target page. + * Start animation before tabcontent is fully measured. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ACTION_FIRST = 1, /** - * Disable the default switching animation. + * Disable default animation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NO_ANIMATION = 2, /** - * Load the content of the target page first, then jump to the vicinity of the target page without animation, - * and finally jump to the target page with animation. + * Jump to some index near the target without animation, then start animation after tabcontent is fully measured. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ CONTENT_FIRST_WITH_JUMP = 3, /** - * Jump to the vicinity of the target page without animation first, - * then jump to the target page with animation, and finally load the content of the target page. + * Jump to some index near the target without animation, then start animation before tabcontent is fully measured. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ ACTION_FIRST_WITH_JUMP = 4, } @@ -189,7 +200,8 @@ declare enum AnimationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum BarPosition { /** @@ -211,7 +223,8 @@ declare enum BarPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Start, @@ -234,7 +247,8 @@ declare enum BarPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ End, } @@ -254,7 +268,8 @@ declare enum BarPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum LayoutStyle { /** @@ -265,13 +280,13 @@ declare enum LayoutStyle { * @since 10 */ /** - * If the tab content exceeds the tab bar width, the tabs are scrollable. - * If not, the tabs are compactly centered on the tab bar and not scrollable. + * The tab bar items are laid in the center of the tab bar. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ALWAYS_CENTER = 0, /** @@ -282,13 +297,13 @@ declare enum LayoutStyle { * @since 10 */ /** - * If the tab content exceeds the tab bar width, the tabs are scrollable. - * If not, the tabs are not scrollable, and the width of the tab bar is evenly distributed among all tabs. + * The tab bar items are laid in the tab bar by an average split. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ALWAYS_AVERAGE_SPLIT = 1, /** @@ -300,15 +315,14 @@ declare enum LayoutStyle { * @since 10 */ /** - * If the tab content exceeds the tab bar width, the tabs are scrollable. If the tab content exceeds - * half the width of the tab bar but is still within the tab bar width, the tabs are compactly centered and - * not scrollable.If the tab content does not exceed half the width of the tab bar, the tabs are centered within - * half the width of the tab bar with even spacing between them and are not scrollable. + * The tab bar items are laid in the center of the bar when their total length is more than half of the tab bar. + * Otherwise, they are laid in the center half of the tab bar with the same space between them. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SPACE_BETWEEN_OR_CENTER = 2 } @@ -320,7 +334,8 @@ declare enum LayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TabsCacheMode { /** @@ -329,7 +344,8 @@ declare enum TabsCacheMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CACHE_BOTH_SIDE = 0, @@ -339,7 +355,8 @@ declare enum TabsCacheMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CACHE_LATEST_SWITCHED = 1 } @@ -363,7 +380,8 @@ declare enum TabsCacheMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TabsController { /** @@ -385,7 +403,8 @@ declare class TabsController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -405,14 +424,14 @@ declare class TabsController { * @since 10 */ /** - * Switches to the specified tab. + * Called when the tab is switched. * - * @param { number } value - Index of the tab. If this parameter is set to a value less than 0 - * or greater than the maximum number, the default value 0 is used. + * @param { number } value * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ changeIndex(value: number): void; @@ -428,7 +447,8 @@ declare class TabsController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ preloadItems(indices: Optional>): Promise; @@ -439,7 +459,8 @@ declare class TabsController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ setTabBarTranslate(translate: TranslateOptions): void; @@ -450,7 +471,8 @@ declare class TabsController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ setTabBarOpacity(opacity: number): void; } @@ -462,7 +484,8 @@ declare class TabsController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TabsOptions { /** @@ -487,7 +510,8 @@ declare interface TabsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ barPosition?: BarPosition; @@ -513,7 +537,8 @@ declare interface TabsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ index?: number; @@ -539,7 +564,8 @@ declare interface TabsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ controller?: TabsController @@ -550,7 +576,8 @@ declare interface TabsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ barModifier?: CommonModifier } @@ -577,7 +604,8 @@ declare interface TabsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface TabsInterface { /** @@ -615,7 +643,8 @@ interface TabsInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ (options?: TabsOptions): TabsAttribute; } @@ -650,10 +679,10 @@ interface DividerStyle { * @since 10 */ /** - * Width of the divider. It cannot be set in percentage. + * Define the stroke width of the divider * * @type { Length } - * @default 0vp + * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -670,7 +699,7 @@ interface DividerStyle { * @since 10 */ /** - * Color of the divider. + * Define the color of the divider * * @type { ?ResourceColor } * @default #33182431 @@ -691,10 +720,10 @@ interface DividerStyle { * @since 10 */ /** - * Distance between the divider and the top of the sidebar. It cannot be set in percentage. + * Define the start margin of the divider * * @type { ?Length } - * @default 0vp + * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -712,10 +741,10 @@ interface DividerStyle { * @since 10 */ /** - * Distance between the divider and the bottom of the sidebar. It cannot be set in percentage. + * Define the end margin of the divider * * @type { ?Length } - * @default 0vp + * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -739,7 +768,8 @@ interface DividerStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TabsAnimationEvent { /** @@ -759,7 +789,8 @@ declare interface TabsAnimationEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ currentOffset: number; @@ -780,7 +811,8 @@ declare interface TabsAnimationEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ targetOffset: number; @@ -801,7 +833,8 @@ declare interface TabsAnimationEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ velocity: number; } @@ -821,7 +854,8 @@ declare interface TabsAnimationEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface BarGridColumnOptions { /** @@ -833,15 +867,15 @@ interface BarGridColumnOptions { * @since 10 */ /** - * Number of columns occupied by a tab on a screen whose width is - * greater than or equal to 320 vp but less than 600 vp. The value must be a non-negative even number. + * Define the occupied column number when the screen is of small size * * @type { ?number } * @default -1 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ sm?: number; @@ -854,15 +888,15 @@ interface BarGridColumnOptions { * @since 10 */ /** - * Number of columns occupied by a tab on a screen whose width is - * greater than or equal to 600 vp but less than 800 vp. The value must be a non-negative even number. + * Define the occupied column number when the screen is of middle size * * @type { ?number } * @default -1 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ md?: number; @@ -875,15 +909,15 @@ interface BarGridColumnOptions { * @since 10 */ /** - * Number of columns occupied by a tab on a screen whose width is - * greater than or equal to 840 vp but less than 1024 vp. The value must be a non-negative even number. + * Define the occupied column number when the screen is of large size * * @type { ?number } * @default -1 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ lg?: number; @@ -896,14 +930,15 @@ interface BarGridColumnOptions { * @since 10 */ /** - * Column margin in grid mode. It cannot be set in percentage. + * Define the margin size of the columns * * @type { ?Dimension } * @default 24vp * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ margin?: Dimension; @@ -916,14 +951,15 @@ interface BarGridColumnOptions { * @since 10 */ /** - * Column gutter (that is, gap between columns) in grid mode. It cannot be set in percentage. + * Define the gutter size of the columns * * @type { ?Dimension } * @default 24vp * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ gutter?: Dimension; } @@ -943,7 +979,8 @@ interface BarGridColumnOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ScrollableBarModeOptions { /** @@ -955,14 +992,15 @@ interface ScrollableBarModeOptions { * @since 10 */ /** - * Left and right margin of the tab bar in scrollable mode. It cannot be set in percentage. + * Define the margin size of the bar items when the tab bar is scrollable. * * @type { ?Dimension } * @default 0vp * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ margin?: Dimension; @@ -975,14 +1013,15 @@ interface ScrollableBarModeOptions { * @since 10 */ /** - * Tab layout mode of the tab bar when not scrolling in scrollable mode. + * Define the layout style of the bar items when the tab bar is not scrollable. * * @type { ?LayoutStyle } * @default LayoutStyle.ALWAYS_CENTER * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ nonScrollableLayoutStyle?: LayoutStyle; } @@ -997,7 +1036,8 @@ interface ScrollableBarModeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnTabsAnimationStartCallback = (index: number, targetIndex: number, extraInfo: TabsAnimationEvent) => void; @@ -1010,7 +1050,8 @@ declare type OnTabsAnimationStartCallback = (index: number, targetIndex: number, * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnTabsAnimationEndCallback = (index: number, extraInfo: TabsAnimationEvent) => void; @@ -1023,7 +1064,8 @@ declare type OnTabsAnimationEndCallback = (index: number, extraInfo: TabsAnimati * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnTabsGestureSwipeCallback = (index: number, extraInfo: TabsAnimationEvent) => void; @@ -1037,7 +1079,8 @@ declare type OnTabsGestureSwipeCallback = (index: number, extraInfo: TabsAnimati * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type TabsCustomContentTransitionCallback = (from: number, to: number) => TabContentAnimatedTransition | undefined; @@ -1053,7 +1096,8 @@ declare type TabsCustomContentTransitionCallback = (from: number, to: number) => * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnTabsContentWillChangeCallback = (currentIndex: number, comingIndex: number) => boolean; @@ -1079,7 +1123,8 @@ declare type OnTabsContentWillChangeCallback = (currentIndex: number, comingInde * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TabsAttribute extends CommonMethod { /** @@ -1100,14 +1145,15 @@ declare class TabsAttribute extends CommonMethod { * @since 10 */ /** - * Sets whether to use vertical tabs. + * Called when determining whether the tab is vertical. * - * @param { boolean } value - Whether to use vertical tabs. Default value is false. + * @param { boolean } value * @returns { TabsAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ vertical(value: boolean): TabsAttribute; @@ -1129,14 +1175,15 @@ declare class TabsAttribute extends CommonMethod { * @since 10 */ /** - * Sets the position of the Tabs component. + * Called when determining the location of the bar chart. * - * @param { BarPosition } value - Position of the Tabs component. Default value is BarPosition.Start. + * @param { BarPosition } value * @returns { TabsAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ barPosition(value: BarPosition): TabsAttribute; @@ -1158,14 +1205,15 @@ declare class TabsAttribute extends CommonMethod { * @since 10 */ /** - * Sets whether the tabs are scrollable. + * Called when judging whether page switching can be performed by sliding left and right. * - * @param { boolean } value - Whether the tabs are scrollable. Default value is true. + * @param { boolean } value * @returns { TabsAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scrollable(value: boolean): TabsAttribute; @@ -1179,10 +1227,9 @@ declare class TabsAttribute extends CommonMethod { * @since 10 */ /** - * Sets the tab bar layout mode to BarMode.Fixed. + * Called when the graphic format of the bar chart is selected as fixed mode. * - * @param { BarMode.Fixed } value - The width of each tab is determined by equally dividing - * the number of tabs by the bar width (or bar height in the vertical layout). + * @param { BarMode.Fixed } value * @returns { TabsAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -1202,13 +1249,10 @@ declare class TabsAttribute extends CommonMethod { * @since 10 */ /** - * Sets the tab bar layout mode to BarMode.Scrollable. + * Called when the graphic format of the bar chart is selected as scrollable mode. * - * @param { BarMode.Scrollable } value - The width of each tab is determined by the actual layout. - * The tabs are scrollable in the following case: In horizontal layout, the total width exceeds the tab bar width; - * in vertical layout, the total height exceeds the tab bar height. - * @param { ScrollableBarModeOptions } [options] - Layout style of the tab bar in scrollable mode. - * This parameter is effective only when the tab bar is in scrollable mode. + * @param { BarMode.Scrollable } value + * @param { ScrollableBarModeOptions } [options] - options indicate the options for the scrollable bar mode * @returns { TabsAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -1236,16 +1280,16 @@ declare class TabsAttribute extends CommonMethod { * @since 10 */ /** - * Sets the tab bar layout mode. + * Called when the graphic format of the bar chart is selected. * - * @param { BarMode } value - Layout mode. Default value is BarMode.Fixed. - * @param { ScrollableBarModeOptions } [options] - Layout style of the tab bar in scrollable mode. - * This parameter is effective only when the tab bar is in horizontal scrollable mode. + * @param { BarMode } value + * @param { ScrollableBarModeOptions } [options] - options indicate the options for the scrollable bar mode * @returns { TabsAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ barMode(value: BarMode, options?: ScrollableBarModeOptions): TabsAttribute; @@ -1278,16 +1322,16 @@ declare class TabsAttribute extends CommonMethod { * @since 10 */ /** - * Sets the width of the tab bar. + * Called when the width of the bar graph is set. * Notice: barWidth only supports Number type on 7, supports Length type since 8. * - * @param { Length } value - Width of the tab bar. If the set value is less than 0 - * or greater than the width of the Tabs component, the default value is used. + * @param { Length } value * @returns { TabsAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ barWidth(value: Length): TabsAttribute; @@ -1320,16 +1364,16 @@ declare class TabsAttribute extends CommonMethod { * @since 10 */ /** - * Sets the height of the tab bar. + * Called when the height of the bar graph is set. * Notice: barHeight only supports Number type on 7, supports Length type since 8. * - * @param { Length } value - Height of the tab bar. If the set value is less than 0 or - * greater than the height of the Tabs component, the default value is used. + * @param { Length } value * @returns { TabsAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ barHeight(value: Length): TabsAttribute; @@ -1384,42 +1428,41 @@ declare class TabsAttribute extends CommonMethod { * @since 10 */ /** - * Sets the length of time required to complete the tab switching animation, - * which is initiated by clicking a specific tab or by calling the changeIndex API of TabsController. + * Called when the animation duration of the bar graph is set. * * @param { number } value * @returns { TabsAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ animationDuration(value: number): TabsAttribute; /** - * Sets the animation mode for tab switching initiated by clicking a specific tab or - * by calling the changeIndex API of TabsController. + * Set animation mode. * - * @param { Optional } mode - animation mode for tabs switch animation. - * Default value is AnimationMode.CONTENT_FIRST. + * @param { Optional } mode - animation mode for tabs switch animation * @returns { TabsAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ animationMode(mode: Optional): TabsAttribute; /** - * Sets the edge effect used when the boundary of the scrolling area is reached. + * Set the effect used when the component is at one of the edges. * - * @param { Optional } edgeEffect - Effect used when the boundary of the scrolling area is reached. - * Default value is EdgeEffect.Spring. + * @param { Optional } edgeEffect - the effect used when the component is at one of the edges * @returns { TabsAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ edgeEffect(edgeEffect: Optional): TabsAttribute; @@ -1451,23 +1494,15 @@ declare class TabsAttribute extends CommonMethod { * @since 11 */ /** - * Triggered when a tab is switched. - * Anonymous Object Rectification - * - *

NOTE: - *
This event is triggered when any of the following conditions is met: - * 1. The swiping animation is completed, followed by tab switching. - * 2. The Controller API is called. - * 3. The attribute value is updated using a state variable. - * 4. A tab is clicked. - *

+ * Called when the tab is switched. * * @param { Callback } event * @returns { TabsAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onChange(event: Callback): TabsAttribute; @@ -1479,7 +1514,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onSelected(event: Callback): TabsAttribute; @@ -1503,15 +1539,15 @@ declare class TabsAttribute extends CommonMethod { * @since 11 */ /** - * Triggered when a tab is clicked. - * Anonymous Object Rectification + * Called when the tab is clicked. * * @param { Callback } event * @returns { TabsAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onTabBarClick(event: Callback): TabsAttribute; @@ -1523,7 +1559,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onUnselected(event: Callback): TabsAttribute; @@ -1553,15 +1590,15 @@ declare class TabsAttribute extends CommonMethod { * @since 12 */ /** - * Triggered when the tab switching animation starts. - * Anonymous Object Rectification + * Called when the tab content flip animation start. * * @param { OnTabsAnimationStartCallback } handler * @returns { TabsAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onAnimationStart(handler: OnTabsAnimationStartCallback): TabsAttribute; @@ -1589,15 +1626,15 @@ declare class TabsAttribute extends CommonMethod { * @since 12 */ /** - * Triggered when the tab switching animation ends. - * Anonymous Object Rectification + * Called when the tab content flip animation end. * * @param { OnTabsAnimationEndCallback } handler * @returns { TabsAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onAnimationEnd(handler: OnTabsAnimationEndCallback): TabsAttribute; @@ -1625,15 +1662,15 @@ declare class TabsAttribute extends CommonMethod { * @since 12 */ /** - * Triggered on a frame-by-frame basis when the tab is switched by a swipe. - * Anonymous Object Rectification + * Called when swiping the tab content with the gesture. * * @param { OnTabsGestureSwipeCallback } handler * @returns { TabsAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onGestureSwipe(handler: OnTabsGestureSwipeCallback): TabsAttribute; @@ -1647,20 +1684,15 @@ declare class TabsAttribute extends CommonMethod { * @since 10 */ /** - * Sets whether the tab fades out when it exceeds the container width. - * - *

NOTE: - *
It is recommended that this attribute be used together with the barBackgroundColor attribute. - * If the barBackgroundColor attribute is not defined, the tab fades out in white - * when it exceeds the container width by default. - *

+ * Set whether the edges of tab bar are fading. * - * @param { boolean } value - Whether the tab fades out when it exceeds the container width. Default value is true. + * @param { boolean } value - indicates whether the edges of tab bar are fading. * @returns { TabsAttribute } the attribute of the tabs * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fadingEdge(value: boolean): TabsAttribute; @@ -1676,12 +1708,13 @@ declare class TabsAttribute extends CommonMethod { /** * Set the divider between tab bar and tab content. * - * @param { DividerStyle | null } value - indicates the style of the indicator. Default value is null. + * @param { DividerStyle | null } value - indicates the style of the indicator. * @returns { TabsAttribute } the attribute of the tabs * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ divider(value: DividerStyle | null): TabsAttribute; @@ -1694,14 +1727,15 @@ declare class TabsAttribute extends CommonMethod { * @since 10 */ /** - * Sets whether the tab bar is superimposed on the TabContent component after having its background blurred. + * Set whether the tab bar overlaps with the tab content. * - * @param { boolean } value - indicates whether the tab bar overlaps with the tab content. Default value is false. + * @param { boolean } value - indicates whether the tab bar overlaps with the tab content. * @returns { TabsAttribute } the attribute of the tabs * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ barOverlap(value: boolean): TabsAttribute; @@ -1722,7 +1756,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ barBackgroundColor(value: ResourceColor): TabsAttribute; @@ -1736,18 +1771,15 @@ declare class TabsAttribute extends CommonMethod { * @since 10 */ /** - * Sets the visible area of the tab bar in grid mode. - * - *

NOTE: - *
This attribute is effective only in horizontal mode. It is not applicable to XS, XL, and XXL devices. - *

+ * Set the grid alignment options of the tab bar. * * @param { BarGridColumnOptions } value - indicates the bar grid alignment options. * @returns { TabsAttribute } the attribute of the tabs * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ barGridAlign(value: BarGridColumnOptions): TabsAttribute; @@ -1805,19 +1837,21 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ customContentTransition(delegate: TabsCustomContentTransitionCallback): TabsAttribute; /** - * Sets the background blur style of the tab bar. + * Set the BlurStyle of the tab bar. * - * @param { BlurStyle } value - Background blur style of the tab bar. Default value is BlurStyle.NONE. + * @param { BlurStyle } value - indicates the BlurStyle of the tab bar. * @returns { TabsAttribute } the attribute of the tabs * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ barBackgroundBlurStyle(value: BlurStyle): TabsAttribute; @@ -1842,7 +1876,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ barBackgroundBlurStyle(style: BlurStyle, options: BackgroundBlurStyleOptions): TabsAttribute; @@ -1854,10 +1889,24 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ barBackgroundEffect(options: BackgroundEffectOptions): TabsAttribute; + /** + * Setting page flip mode on mouse wheel event. + * + * @param { Optional } mode - page flip mode on mouse wheel event. The default value is PageFlipMode.CONTINUOUS. + * @returns { TabsAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 + */ + pageFlipMode(mode: Optional): TabsAttribute; + /** * Called when content will change. * @@ -1873,25 +1922,15 @@ declare class TabsAttribute extends CommonMethod { * @since 12 */ /** - * Triggered when a new page is about to be displayed. - * Anonymous Object Rectification - * - *

NOTE: - *
This event is triggered when any of the following conditions is met: - * 1. When the user swipes on the TabContent component (provided that it supports swiping) to switch to a new page. - * 2. When TabsController.changeIndex is called to switch to a new page. - * 3. When the **index** attribute is changed to switch to a new page. - * 4. When the user clicks a tab on the tab bar to switch to a new page. - * 5. When the user presses the left or right arrow key on the keyboard to switch to a new page - * while the tab bar is focused. - *

+ * Called when content will change. * * @param { OnTabsContentWillChangeCallback } handler * @returns { TabsAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onContentWillChange(handler: OnTabsContentWillChangeCallback): TabsAttribute; @@ -1904,7 +1943,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ cachedMaxCount(count: number, mode: TabsCacheMode): TabsAttribute; } @@ -1926,7 +1966,8 @@ declare class TabsAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TabContentAnimatedTransition { /** @@ -1950,7 +1991,8 @@ declare interface TabContentAnimatedTransition { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ timeout?: number; @@ -1982,7 +2024,8 @@ declare interface TabContentAnimatedTransition { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ transition: Callback; } @@ -2004,7 +2047,8 @@ declare interface TabContentAnimatedTransition { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TabContentTransitionProxy { /** @@ -2024,7 +2068,8 @@ declare interface TabContentTransitionProxy { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ from: number; @@ -2045,7 +2090,8 @@ declare interface TabContentTransitionProxy { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ to: number; @@ -2064,7 +2110,8 @@ declare interface TabContentTransitionProxy { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ finishTransition(): void; } diff --git a/api/@internal/component/ets/text.d.ts b/api/@internal/component/ets/text.d.ts index 84fe3b61d748acd0cf9756ad7f2b4c51bea72d12..b451f4a94e4b20a2a7ca682d700da65171caf0c2 100644 --- a/api/@internal/component/ets/text.d.ts +++ b/api/@internal/component/ets/text.d.ts @@ -18,6 +18,16 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod, ShadowOptions,Optional,Callback} from "./common"; +import { CustomBuilder } from './builder' +import { EllipsisMode, TextCase, LineBreakStrategy, TextAlign, FontStyle, FontWeight, WordBreak, TextOverflow, CopyOptions, TextHeightAdaptivePolicy, TextSelectableMode} from './enums'; +import { Resource, ResourceColor, Font, Length, LengthMetrics } from './units'; +import { TextDataDetectorConfig, LayoutManager, FontSettingOptions, EditMenuOptions } from "./textCommon"; +import { DecorationStyleInterface, StyledString } from "./styledString"; +import { SelectionMenuOptions } from './richEditor' +/*** endif */ + /** * Text overflow options. * @@ -27,7 +37,8 @@ * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextOverflowOptions { /** @@ -62,19 +73,8 @@ declare interface TextOverflowOptions { * @crossplatform * @form * @atomicservice - * @since 11 - */ - /** - * Text overflow option. - * - * Anonymous Object Rectification. - * @type { TextOverflow } - * @default TextOverflow.Clip - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ overflow: TextOverflow; } @@ -111,7 +111,8 @@ declare interface TextOverflowOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface TextInterface { /** @@ -154,7 +155,8 @@ interface TextInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ (content?: string | Resource, value?: TextOptions): TextAttribute; } @@ -183,7 +185,8 @@ interface TextInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class TextAttribute extends CommonMethod { /** @@ -221,7 +224,8 @@ declare class TextAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ font(fontValue: Font, options?: FontSettingOptions): TextAttribute; @@ -255,13 +259,14 @@ declare class TextAttribute extends CommonMethod { /** * Called when the font color is set. * - * @param { ResourceColor } value - Default value is '#e6182431'.The default value on wearable devices is '#c5ffffff'. + * @param { ResourceColor } value * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ fontColor(value: ResourceColor): TextAttribute; @@ -295,17 +300,14 @@ declare class TextAttribute extends CommonMethod { /** * Called when the font size is set. * - *

NOTE: - *
If fontSize is of the number type, the unit fp is used. - *

- * - * @param { number | string | Resource } value - Default value is 16fp.The default value on wearable devices is 15fp. + * @param { number | string | Resource } value * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ fontSize(value: number | string | Resource): TextAttribute; @@ -339,25 +341,14 @@ declare class TextAttribute extends CommonMethod { /** * Called when the minimum font size of the font is set. * - *

NOTE: - *
For the string type, numeric string values with optional units, for example, "10" or "10fp", are supported. - *
For the setting to take effect, this attribute must be used together with maxFontSize and maxLines, - * or layout constraint settings. - *
When the adaptive font size is used, the fontSize settings do not take effect. - *
If the value of minFontSize is less than or equal to 0, font size adaptation does not take effect. - *
In this case, the actual font size is determined by the value of fontSize. - *
If fontSize is not specified, the default value is used. - *
Since API version 18, this attribute takes effect on child components and styled strings, - * and the adaptive font size is applied to parts where the font size is not set. - *

- * - * @param { number | string | Resource } value - The unit is fp. + * @param { number | string | Resource } value * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ minFontSize(value: number | string | Resource): TextAttribute; @@ -391,25 +382,14 @@ declare class TextAttribute extends CommonMethod { /** * Called when the maximum font size of the font is set. * - *

NOTE: - *
For the string type, numeric string values with optional units, for example, "10" or "10fp", are supported. - *
For the setting to take effect, this attribute must be used together with minFontSize and maxLines, - * or layout constraint settings. - *
When the adaptive font size is used, the fontSize settings do not take effect. - *
If the value of maxFontSize is less than or equal to 0, font size adaptation does not take effect. - *
In this case, the actual font size is determined by the value of fontSize. - *
If fontSize is not specified, the default value is used. - *
Since API version 18, this attribute takes effect on child components and styled strings, - * and the adaptive font size is applied to parts where the font size is not set. - *

- * - * @param { number | string | Resource } value - The unit is fp. + * @param { number | string | Resource } value * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ maxFontSize(value: number | string | Resource): TextAttribute; @@ -427,24 +407,8 @@ declare class TextAttribute extends CommonMethod { * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 - */ - /** - * Called when the minimum font scale of the font is set. - * Value range: [0, 1] - * - *

NOTE: - *
A value less than 0 is handled as 0. - *
A value greater than 1 is handled as 1. - *
Abnormal values are ineffective by default. - *

- * - * @param { number | Resource } scale - * @returns { TextAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ minFontScale(scale: number | Resource): TextAttribute; @@ -461,23 +425,8 @@ declare class TextAttribute extends CommonMethod { * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 - */ - /** - * Called when the maximum font scale of the font is set. - * Value range: [1, +∞) - * - *

NOTE: - *
A value less than 1 is handled as 1. - *
Abnormal values are ineffective by default. - *

- * - * @param { number | Resource } scale - * @returns { TextAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ maxFontScale(scale: number | Resource): TextAttribute; @@ -511,13 +460,14 @@ declare class TextAttribute extends CommonMethod { /** * Called when the font style of a font is set. * - * @param { FontStyle } value - Default value is FontStyle.Normal. + * @param { FontStyle } value * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ fontStyle(value: FontStyle): TextAttribute; @@ -551,16 +501,7 @@ declare class TextAttribute extends CommonMethod { /** * Called when the font weight is set. * - *

NOTE: - *
If the value is too large, the text may be clipped depending on the font. - *
For the number type, the value range is [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, for example, "400", - * and the following enumerated values of FontWeight are supported: "bold", "bolder", "lighter", "regular", and "medium". - *

- * - * @param { number | FontWeight | string } value - Default value is FontWeight.Normal.The default value on wearable devices is FontWeight.Regular. + * @param { number | FontWeight | string } value * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -568,18 +509,7 @@ declare class TextAttribute extends CommonMethod { * @atomicservice * @since 11 */ - /** - * Called when the font weight is set. - * - * @param { number | FontWeight | ResourceStr } value - * @returns { TextAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - fontWeight(value: number | FontWeight | ResourceStr): TextAttribute; + fontWeight(value: number | FontWeight | string): TextAttribute; /** * Called when the font weight is set. @@ -602,33 +532,34 @@ declare class TextAttribute extends CommonMethod { * @atomicservice * @since 12 */ - /** + fontWeight(weight: number | FontWeight | string, options?: FontSettingOptions): TextAttribute; + + + /** * Called when the font weight is set. * - * @param { number | FontWeight | ResourceStr } weight + * @param { number | FontWeight | string } weight * @param { FontSettingOptions } options - font setting options. * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice + * @arkts 1.2 * @since 20 */ - fontWeight(weight: number | FontWeight | ResourceStr, options?: FontSettingOptions): TextAttribute; + fontWeight(weight: number | FontWeight | string, options?: FontSettingOptions): TextAttribute; /** * Set font line spacing. * - *

NOTE: - *
If the value specified is less than or equal to 0, the default value 0 is used. - *

- * - * @param { LengthMetrics } value - Default value is 0. + * @param { LengthMetrics } value * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ lineSpacing(value: LengthMetrics): TextAttribute; @@ -675,25 +606,14 @@ declare class TextAttribute extends CommonMethod { /** * Called when the horizontal center mode of the font is set. * - *

NOTE: - *
The text takes up the full width of the Text component. - *
To set vertical alignment for the text, use the align attribute. - *
The align attribute alone does not control the horizontal position of the text. - *
In other words, Alignment.TopStart, Alignment.Top, and Alignment.TopEnd produce the same effect, - * top-aligning the text; Alignment.Start, Alignment.Center, and Alignment.End produce the same effect, - * centered-aligning the text vertically; Alignment.BottomStart, Alignment.Bottom, - * and Alignment.BottomEnd produce the same effect, bottom-aligning the text. - *
When textAlign is set to TextAlign.JUSTIFY, you must set the wordBreak attribute, - * and the text in the last line is horizontally aligned with the start edge. - *

- * - * @param { TextAlign } value - Default value is TextAlign.Start.The default value on wearable devices is TextAlign.Center. + * @param { TextAlign } value * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ textAlign(value: TextAlign): TextAttribute; @@ -751,7 +671,8 @@ declare class TextAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ lineHeight(value: number | string | Resource): TextAttribute; @@ -819,7 +740,8 @@ declare class TextAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ textOverflow(options: TextOverflowOptions): TextAttribute; @@ -865,7 +787,8 @@ declare class TextAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ fontFamily(value: string | Resource): TextAttribute; @@ -911,7 +834,8 @@ declare class TextAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ maxLines(value: number): TextAttribute; @@ -956,17 +880,14 @@ declare class TextAttribute extends CommonMethod { /** * Called when the text decoration of the text is set. * - *

NOTE: - *
The style parameter cannot be used in widgets. - *

- * - * @param { DecorationStyleInterface } value - Default value is { type: TextDecorationType.None, color: Color.Black, style: TextDecorationStyle.SOLID }. + * @param { DecorationStyleInterface } value * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ decoration(value: DecorationStyleInterface): TextAttribute; @@ -1000,33 +921,16 @@ declare class TextAttribute extends CommonMethod { /** * Called when the distance between text fonts is set. * - *

NOTE: - *
If the value specified is a percentage or 0, the default value is used. - *
For the string type, numeric string values with optional units, for example, "10" or "10fp", are supported. - *
If the value specified is a negative value, the text is compressed. - *
A negative value too small may result in the text being compressed to 0 and no content being displayed. - *

- * - * @param { number | string } value - The unit is fp. - * @returns { TextAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - /** - * Called when the distance between text fonts is set. - * - * @param { number | ResourceStr } value + * @param { number | string } value * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 20 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - letterSpacing(value: number | ResourceStr): TextAttribute; + letterSpacing(value: number | string): TextAttribute; /** * Called when the type of letter in the text font is set. @@ -1058,13 +962,14 @@ declare class TextAttribute extends CommonMethod { /** * Called when the type of letter in the text font is set. * - * @param { TextCase } value - Default value is TextCase.Normal. + * @param { TextCase } value * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ textCase(value: TextCase): TextAttribute; @@ -1098,31 +1003,16 @@ declare class TextAttribute extends CommonMethod { /** * Called when the baseline offset is set. * - *

NOTE: - *
If the value specified is a percentage, the default value is used. - *
Positive values shift the content upwards, while negative values shift it downwards. - *

- * - * @param { number | string } value - Default value is 0. - * @returns { TextAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - /** - * Called when the baseline offset is set. - * - * @param { number | ResourceStr } value + * @param { number | string } value * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 20 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - baselineOffset(value: number | ResourceStr): TextAttribute; + baselineOffset(value: number | string): TextAttribute; /** * Allow replication. @@ -1146,19 +1036,14 @@ declare class TextAttribute extends CommonMethod { /** * Allow replication. * - *

NOTE: - *
If this attribute is set to CopyOptions.InApp or CopyOptions.LocalDevice, - * a long press on the text will display a context menu that offers the copy and select-all options. - *
Because widgets do not have the long press event, the context menu will not be displayed when users long press text. - *

- * - * @param { CopyOptions } value - Default value is CopyOptions.None. + * @param { CopyOptions } value * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ copyOption(value: CopyOptions): TextAttribute; @@ -1182,19 +1067,13 @@ declare class TextAttribute extends CommonMethod { /** * Enable the selectable area can be dragged. * - *

NOTE: - *
This attribute cannot be used together with the onDragStart event. - *
It must be used together with CopyOptions. - *
When it is set to true and copyOptions is set to CopyOptions.InApp or CopyOptions.LocalDevice, - * the selected text can be dragged and copied to the text box. - *

- * - * @param { boolean } value - Default value is false. + * @param { boolean } value * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ draggable(value: boolean): TextAttribute; @@ -1221,7 +1100,8 @@ declare class TextAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ textShadow(value: ShadowOptions | Array): TextAttribute; @@ -1237,32 +1117,13 @@ declare class TextAttribute extends CommonMethod { /** * Called when the height adaptive policy is set. * - *

NOTE: - *

    - *
  • When this attribute is set to TextHeightAdaptivePolicy.MAX_LINES_FIRST, - * the maxLines attribute takes precedence for adjusting the text height. - *
    If the maxLines setting results in a layout beyond the layout constraints, - * the text will shrink to a font size between minFontSize and maxFontSize to allow for more content to be shown.
  • - *
  • If this attribute is set to TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST, - * the minFontSize attribute takes precedence for adjusting the text height. - *
    If the text fits on one line at minFontSize,the system attempts to increase the font size within the range of minFontSize - * and maxFontSize to display the text as large as possible on one line. - *
    If the text cannot fit into a single line even at minFontSize, it sticks with minFontSize.
  • - *
  • If this attribute is set to TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST, - * the layout constraints take precedence for adjusting the text height. - *
    If the resultant layout is beyond the layout constraints, - * the text will shrink to a font size between minFontSize and maxFontSize to respect the layout constraints. - *
    If the text still extends beyond the layout constraints after shrinking to minFontSize, - * the lines that exceed the constraints are deleted.
  • - *
- *

- * - * @param { TextHeightAdaptivePolicy } value - The height adaptive policy.Default value is TextHeightAdaptivePolicy.MAX_LINES_FIRST. + * @param { TextHeightAdaptivePolicy } value - The height adaptive policy. * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ heightAdaptivePolicy(value: TextHeightAdaptivePolicy): TextAttribute; @@ -1278,46 +1139,39 @@ declare class TextAttribute extends CommonMethod { /** * Specify the indentation of the first line in a text-block. * - * @param { Length } value - The length of text indent.Default value is 0. + * @param { Length } value - The length of text indent. * @returns { TextAttribute } The attribute of the text. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ textIndent(value: Length): TextAttribute; /** * Set the word break type. * - *

NOTE: - *
When used with {overflow: TextOverflow.Ellipsis} and maxLines, WordBreak.BREAK_ALL can insert line breaks - * between letters when overflow occurs and display excess content with an ellipsis (...). - *

- * - * @param { WordBreak } value - The word break type.Default value is WordBreak.BREAK_WORD. + * @param { WordBreak } value - The word break type. * @returns { TextAttribute } The attribute of the text. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ wordBreak(value: WordBreak): TextAttribute; /** * Set the text line break strategy type. * - *

NOTE: - *
This attribute takes effect when wordBreak is not set to breakAll. - *
Hyphens are not supported. - *

- * - * @param { LineBreakStrategy } strategy - The text line break strategy type.Default value is LineBreakStrategy.GREEDY. + * @param { LineBreakStrategy } strategy - The text line break strategy type. * @returns { TextAttribute } The attribute of the text. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ lineBreakStrategy(strategy: LineBreakStrategy): TextAttribute; @@ -1330,32 +1184,22 @@ declare class TextAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onCopy(callback: (value: string) => void): TextAttribute; /** * Text selection is achieved by specifying the start and end positions of the text. * - *

NOTE: - *
The selected text is highlighted, and a selection handle is displayed together with a menu of available actions. - *
When copyOption is set to CopyOptions.None, the selection attribute is not effective. - *
When overflow is set to TextOverflow.MARQUEE, the selection attribute is not effective. - *
If the value of selectionStart is greater than or equal to that of selectionEnd, no text will be selected. - *
The value range is [0, textSize], where textSize indicates the maximum number of characters in the text content. - *
If the value is less than 0, the value 0 will be used. - *
If the value is greater than textSize, textSize will be used. - *
If the value of selectionStart or selectionEnd falls within the invisible area, no text will be selected. - *
If clipping is disabled, the text selection outside of the parent component takes effect. - *

- * - * @param { number } selectionStart - The start position of the selected text.Default value is -1. - * @param { number } selectionEnd - The end position of the selected text.Default value is -1. + * @param { number } selectionStart - The start position of the selected text. + * @param { number } selectionEnd - The end position of the selected text. * @returns { TextAttribute } The attribute of the text. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ selection(selectionStart: number, selectionEnd: number): TextAttribute; @@ -1367,7 +1211,8 @@ declare class TextAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ caretColor(color: ResourceColor): TextAttribute; @@ -1379,7 +1224,8 @@ declare class TextAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ selectedBackgroundColor(color: ResourceColor): TextAttribute; @@ -1407,18 +1253,13 @@ declare class TextAttribute extends CommonMethod { /** * Set the ellipsis mode. * - *

NOTE: - *
For the settings to work, overflow must be set to TextOverflow.Ellipsis and maxLines must be specified. - *
Setting ellipsisMode alone does not take effect. - *
EllipsisMode.START and EllipsisMode.CENTER take effect only when text overflows in a single line. - *

- * - * @param { EllipsisMode } value - The ellipsis mode.Default value is EllipsisMode.END. + * @param { EllipsisMode } value - The ellipsis mode. * @returns { TextAttribute } The attribute of the text. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ ellipsisMode(value: EllipsisMode): TextAttribute; @@ -1433,33 +1274,12 @@ declare class TextAttribute extends CommonMethod { /** * Enable data detector. * - *

NOTE: - *
This API only works on devices that provide text recognition. - *
When enableDataDetector is set to true, and the dataDetectorConfig attribute is not set, - * all types of entities are recognized by default, - * and the color and decoration of the recognized entities will be changed to the following styles: - * - * color: '#ff007dff', - * decoration:{ - * type: TextDecorationType.Underline, - * color: '#ff007dff', - * style: TextDecorationStyle.SOLID - * } - * - *
Touching and right-clicking an entity with the mouse will pop up the corresponding entity operation menu based on the type of entity, - * while left-clicking an entity with the mouse will directly respond to the first option of the menu. - *
This API does not work when overflow is set to TextOverflow.MARQUEE. - *
When copyOption is set to CopyOptions.None, the menu displayed after an entity is clicked does not provide the text selection, - * copy, translation, or sharing functionality. - *
When copyOption is not set to CopyOptions.None, and textSelectable is set to TextSelectableMode.UNSELECTABLE, - * the entity still has the copy functionality but does not have the text selection feature. - *

- * - * @param { boolean } enable - Enable data detector.Default value is false. + * @param { boolean } enable - Enable data detector. * @returns { TextAttribute } The attribute of the text. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enableDataDetector(enable: boolean): TextAttribute; @@ -1490,7 +1310,8 @@ declare class TextAttribute extends CommonMethod { * @returns { TextAttribute } The attribute of the text. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ dataDetectorConfig(config: TextDataDetectorConfig): TextAttribute; @@ -1509,22 +1330,16 @@ declare class TextAttribute extends CommonMethod { /** * Bind to the selection menu. * - *

NOTE: - *
The duration required for a long-press gesture is 600 ms for bindSelectionMenu and 800 ms for bindContextMenu. - *
When both bindSelectionMenu and bindContextMenu are set and both are configured to be triggered by a long-press gesture, - * bindSelectionMenu is triggered first. - *
If the custom menu is too long, embed a Scroll component to prevent the keyboard from being blocked. - *

- * - * @param { TextSpanType } spanType - Indicates the type of selection menu.Default value is TextSpanType.TEXT. + * @param { TextSpanType } spanType - Indicates the type of selection menu. * @param { CustomBuilder } content - Indicates the content of selection menu. - * @param { TextResponseType } responseType - Indicates response type of selection menu.Default value is TextResponseType.LONG_PRESS. + * @param { TextResponseType } responseType - Indicates response type of selection menu. * @param { SelectionMenuOptions } [options] - Indicates the options of selection menu. * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ bindSelectionMenu(spanType: TextSpanType, content: CustomBuilder, responseType: TextResponseType, options?: SelectionMenuOptions): TextAttribute; @@ -1546,7 +1361,8 @@ declare class TextAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onTextSelectionChange(callback: (selectionStart: number, selectionEnd: number) => void): TextAttribute; @@ -1563,7 +1379,8 @@ declare class TextAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ fontFeature(value: string): TextAttribute; @@ -1575,7 +1392,8 @@ declare class TextAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ marqueeOptions(options: Optional): TextAttribute; @@ -1587,37 +1405,34 @@ declare class TextAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ onMarqueeStateChange(callback: Callback): TextAttribute; /** * Whether to support sensitive privacy information * - *

NOTE: - *
The value true means to enable privacy mode, in which case text is obscured as hyphens (-). - *
If this parameter is set to null, privacy mode is disabled. - *
Enabling privacy mode requires widget framework support. - *

- * - * @param { boolean } supported - Whether to support sensitive privacy information.Default value is false. + * @param { boolean } supported - Whether to support sensitive privacy information. * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ privacySensitive(supported: boolean): TextAttribute; /** * set text selectable and focusable * - * @param { TextSelectableMode } mode - Default value is TextSelectableMode.SELECTABLE_UNFOCUSABLE. + * @param { TextSelectableMode } mode * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ textSelectable(mode: TextSelectableMode): TextAttribute; @@ -1631,24 +1446,21 @@ declare class TextAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ editMenuOptions(editMenu: EditMenuOptions): TextAttribute; /** * Set the text with half leading. * - *

NOTE: - *
The halfLeading settings configured within the component take precedence over those in module.json5. - *
The value true means that half leading is enabled, and false means the opposite. - *

- * - * @param { boolean } halfLeading - Default value is false. + * @param { boolean } halfLeading * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ halfLeading(halfLeading: boolean): TextAttribute; @@ -1660,7 +1472,8 @@ declare class TextAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ enableHapticFeedback(isEnabled: boolean): TextAttribute; @@ -1790,7 +1603,8 @@ declare const Text: TextInterface; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TextSpanType { /** @@ -1806,7 +1620,8 @@ declare enum TextSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ TEXT = 0, @@ -1823,7 +1638,8 @@ declare enum TextSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE = 1, @@ -1840,7 +1656,8 @@ declare enum TextSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ MIXED = 2, @@ -1852,7 +1669,8 @@ declare enum TextSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 3, } @@ -1883,7 +1701,8 @@ declare enum TextSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TextResponseType { /** @@ -1899,7 +1718,8 @@ declare enum TextResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ RIGHT_CLICK = 0, @@ -1916,7 +1736,8 @@ declare enum TextResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ LONG_PRESS = 1, @@ -1933,7 +1754,8 @@ declare enum TextResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ SELECT = 2, @@ -1945,7 +1767,8 @@ declare enum TextResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 3, } @@ -1957,7 +1780,8 @@ declare enum TextResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum MarqueeState { /** @@ -1966,7 +1790,8 @@ declare enum MarqueeState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ START = 0, @@ -1976,7 +1801,8 @@ declare enum MarqueeState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ BOUNCE = 1, @@ -1986,7 +1812,8 @@ declare enum MarqueeState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ FINISH = 2, } @@ -1998,7 +1825,8 @@ declare enum MarqueeState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum MarqueeStartPolicy { /** @@ -2007,7 +1835,8 @@ declare enum MarqueeStartPolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 0, @@ -2017,7 +1846,8 @@ declare enum MarqueeStartPolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ ON_FOCUS = 1, } @@ -2037,7 +1867,8 @@ declare enum MarqueeStartPolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextOptions { /** @@ -2055,7 +1886,8 @@ declare interface TextOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ controller: TextController; } @@ -2067,7 +1899,8 @@ declare interface TextOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextMarqueeOptions { /** @@ -2077,7 +1910,8 @@ declare interface TextMarqueeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ start: boolean; @@ -2088,7 +1922,8 @@ declare interface TextMarqueeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ step?: number; @@ -2099,7 +1934,8 @@ declare interface TextMarqueeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ loop?: number; @@ -2110,7 +1946,8 @@ declare interface TextMarqueeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ fromStart?: boolean; @@ -2121,7 +1958,8 @@ declare interface TextMarqueeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ delay?: number; @@ -2132,7 +1970,8 @@ declare interface TextMarqueeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ fadeout?: boolean; @@ -2143,7 +1982,8 @@ declare interface TextMarqueeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ marqueeStartPolicy?: MarqueeStartPolicy; } @@ -2161,7 +2001,8 @@ declare interface TextMarqueeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class TextController { /** @@ -2177,7 +2018,8 @@ declare class TextController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ closeSelectionMenu(): void; @@ -2192,7 +2034,8 @@ declare class TextController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ setStyledString(value: StyledString): void; @@ -2203,7 +2046,8 @@ declare class TextController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ getLayoutManager(): LayoutManager; } diff --git a/api/@internal/component/ets/text_area.d.ts b/api/@internal/component/ets/text_area.d.ts index 90fefc9c455cec56d33fbc3dd410d2e399c6a06e..a866c1a6b096558390a2a0a188a13b3df127313a 100644 --- a/api/@internal/component/ets/text_area.d.ts +++ b/api/@internal/component/ets/text_area.d.ts @@ -18,6 +18,20 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { KeyboardOptions, PasteEvent } from './richEditor'; +import { CaretStyle, DeleteValue, EditMenuOptions, EditableTextOnChangeCallback, InsertValue, + AutoCapitalizationMode,EditableTextChangeValue,KeyboardAppearance } from './textCommon'; +import { BarState, CopyOptions, FontStyle, FontWeight, LineBreakStrategy, TextContentStyle, TextAlign, TextOverflow, + TextHeightAdaptivePolicy, WordBreak, EllipsisMode } from './enums'; +import { EnterKeyType, SubmitEvent, ContentType } from './textInput'; +import { Dimension, Font, Length, LengthMetrics, ResourceColor, ResourceStr } from './units'; +import { InputCounterOptions, TextContentControllerBase, SelectionOptions, + TextDecorationOptions, CommonMethod, Callback, Optional } from './common'; +import { CustomBuilder } from './builder'; +import { Resource } from '../../global/resource'; +/*** endif */ + /** * Provides the method of switching the cursor position. * @@ -39,7 +53,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TextAreaController extends TextContentControllerBase { /** @@ -57,12 +72,12 @@ declare class TextAreaController extends TextContentControllerBase { */ /** * constructor. - * A constructor used to create a TextAreaController object. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -84,11 +99,12 @@ declare class TextAreaController extends TextContentControllerBase { /** * Called when the position of the insertion cursor is set. * - * @param { number } value - Length from the start of the string to the position where the caret is located. + * @param { number } value * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ caretPosition(value: number): void; @@ -113,26 +129,18 @@ declare class TextAreaController extends TextContentControllerBase { */ /** * Text selection is achieved by specifying the start and end positions of the text. - * - *

NOTE: - *
If selectionMenuHidden is set to true or a 2-in-1 device is used, - * calling setTextSelection does not display the context menu even when options is set to MenuPolicy.SHOW. - *
If the selected text contains an emoji, - * the emoji is selected when its start position is within the text selection range. - *

- * + * * @param { number } selectionStart - The start position of the selected text. * The start position of text in the text box is 0. * A value less than 0 is handled as 0. * A value greater than the maximum text length is handled as the maximum text length. * @param { number } selectionEnd - The end position of the selected text. - * A value less than 0 is handled as the value 0. - * A value greater than the maximum text length is handled as the maximum text length. - * @param { SelectionOptions } [options] - Indicates the options of the text selection.Default value is MenuPolicy.DEFAULT. + * @param { SelectionOptions } [options] - Indicates the options of the text selection. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setTextSelection(selectionStart: number, selectionEnd: number, options?: SelectionOptions): void; @@ -149,7 +157,8 @@ declare class TextAreaController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ stopEditing(): void; } @@ -176,7 +185,8 @@ declare class TextAreaController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextAreaOptions { /** @@ -196,18 +206,13 @@ declare interface TextAreaOptions { */ /** * The place holder text string. - * Text displayed when there is no input. - * - *

NOTE: - *
When only the placeholder attribute is set, the text selection handle is still available. - *
The caret stays at the beginning of the placeholder text when the handle is released. - *

- * + * * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ placeholder?: ResourceStr; @@ -228,17 +233,13 @@ declare interface TextAreaOptions { */ /** * Sets the current value of TextArea. - * - *

NOTE: - *
You are advised to bind the state variable to the text in real time through the onChange event, - * so as to prevent display errors when the component is updated. - *

- * + * * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ text?: ResourceStr; @@ -264,7 +265,8 @@ declare interface TextAreaOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ controller?: TextAreaController; } @@ -291,7 +293,8 @@ declare interface TextAreaOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface TextAreaInterface { /** @@ -319,7 +322,8 @@ interface TextAreaInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (value?: TextAreaOptions): TextAreaAttribute; } @@ -339,7 +343,8 @@ interface TextAreaInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TextAreaType { /** @@ -351,11 +356,12 @@ declare enum TextAreaType { */ /** * Basic input mode. - * The value can contain digits, letters, underscores (_), spaces, and special characters. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NORMAL = 0, @@ -372,7 +378,8 @@ declare enum TextAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NUMBER = 2, @@ -385,12 +392,12 @@ declare enum TextAreaType { */ /** * Phone number entry mode. - * In this mode, the following are allowed: digits, spaces, plus signs (+), hyphens (-), asterisks (*), and number signs (#). - * the length is not limited. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PHONE_NUMBER = 3, @@ -403,22 +410,23 @@ declare enum TextAreaType { */ /** * E-mail address input mode. - * This mode accepts only digits, letters, underscores (_), dots (.), - * and the following special characters: ! # $ % & ' * + - / = ? ^ ` { | } ~ @ (which can only appear once). + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EMAIL = 5, /** * Number decimal entry mode. - * The value can contain digits and one decimal point. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NUMBER_DECIMAL = 12, @@ -428,7 +436,8 @@ declare enum TextAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ URL = 13, @@ -452,7 +461,8 @@ declare enum TextAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare type TextAreaSubmitCallback = (enterKeyType: EnterKeyType, event?: SubmitEvent) => void; @@ -478,7 +488,8 @@ declare type TextAreaSubmitCallback = (enterKeyType: EnterKeyType, event?: Submi * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TextAreaAttribute extends CommonMethod { /** @@ -500,13 +511,14 @@ declare class TextAreaAttribute extends CommonMethod { */ /** * Called when the color of the placeholder is set. - * - * @param { ResourceColor } value - Default value follows the theme. + * + * @param { ResourceColor } value * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ placeholderColor(value: ResourceColor): TextAreaAttribute; @@ -529,14 +541,14 @@ declare class TextAreaAttribute extends CommonMethod { */ /** * Called when the font property of the placeholder is set. - * The 'HarmonyOS Sans' font and registered custom fonts are supported. - * + * * @param { Font } value * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ placeholderFont(value: Font): TextAreaAttribute; @@ -551,13 +563,14 @@ declare class TextAreaAttribute extends CommonMethod { */ /** * Called when the type of soft keyboard input button is set. - * - * @param { EnterKeyType } value the type of soft keyboard - Default value is EnterKeyType.NEW_LINE. + * + * @param { EnterKeyType } value the type of soft keyboard * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enterKeyType(value: EnterKeyType): TextAreaAttribute; @@ -580,24 +593,14 @@ declare class TextAreaAttribute extends CommonMethod { */ /** * Called when the alignment of the contents of a multiline text box is set. - * - *

NOTE: - *
To set vertical alignment for the text, use the align attribute. - *
The align attribute alone does not control the horizontal position of the text. - *
In other words, Alignment.TopStart, Alignment.Top, and Alignment.TopEnd produce the same effect, - * top-aligning the text; Alignment.Start, Alignment.Center, and Alignment.End produce the same effect, - * centered-aligning the text vertically; Alignment.BottomStart, Alignment.Bottom, - * and Alignment.BottomEnd produce the same effect, bottom-aligning the text. - *
When textAlign is set to TextAlign.JUSTIFY, the text in the last line is horizontally aligned with the start edge. - *
Since API version 11, textAlign can be set to TextAlign.JUSTIFY. - *

- * - * @param { TextAlign } value - Default value is TextAlign.Start. + * + * @param { TextAlign } value * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ textAlign(value: TextAlign): TextAreaAttribute; @@ -620,17 +623,14 @@ declare class TextAreaAttribute extends CommonMethod { */ /** * Called when the insertion cursor color is set. - * - *

NOTE: - *
Since API version 12, this API can be used to set the text handle color, which is the same as the caret color. - *

- * - * @param { ResourceColor } value - Default value is '#007DFF'. + * + * @param { ResourceColor } value * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ caretColor(value: ResourceColor): TextAreaAttribute; @@ -659,7 +659,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor(value: ResourceColor): TextAreaAttribute; @@ -683,14 +684,13 @@ declare class TextAreaAttribute extends CommonMethod { /** * Called when the font size is set. * - * @param { Length } value - Default value is 16fp.The default value on wearable devices is 18fp. - * If fontSize is of the number type, the unit fp is used. - * This parameter cannot be set in percentage. + * @param { Length } value * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize(value: Length): TextAreaAttribute; @@ -714,12 +714,13 @@ declare class TextAreaAttribute extends CommonMethod { /** * Called when the font style of a font is set. * - * @param { FontStyle } value - Default value is FontStyle.Normal. + * @param { FontStyle } value * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontStyle(value: FontStyle): TextAreaAttribute; @@ -741,34 +742,17 @@ declare class TextAreaAttribute extends CommonMethod { * @since 10 */ /** - * Called when the font weight is set. - * - *

NOTE: - *
If the value is too large, the text may be clipped depending on the font. - *
For the number type, the value range is [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, for example, "400", - * and the following enumerated values of FontWeight are supported: "bold", "bolder", "lighter", "regular", and "medium". - *

- * - * @param { number | FontWeight | string } value - Default value is FontWeight.Normal. - * @returns { TextAreaAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** * Called when the font weight is set. * - * @param { number | FontWeight | ResourceStr } value + * @param { number | FontWeight | string } value * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - fontWeight(value: number | FontWeight | ResourceStr): TextAreaAttribute; + fontWeight(value: number | FontWeight | string): TextAreaAttribute; /** * Called when the font list of text is set. @@ -789,51 +773,40 @@ declare class TextAreaAttribute extends CommonMethod { */ /** * Called when the font list of text is set. - * - *

NOTE: - *
The 'HarmonyOS Sans' font and registered custom fonts are supported for applications. - *
Only the 'HarmonyOS Sans' font is supported for widgets. - *

- * - * @param { ResourceStr } value - Default value is 'HarmonyOS Sans'. + * + * @param { ResourceStr } value * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontFamily(value: ResourceStr): TextAreaAttribute; /** * Called when the overflow mode of the font is set. - * - *

NOTE: - *
In inline style, the effect of truncating text according to maxLines only applies when textOverflow is set. - *
Text is clipped at the transition between words. - *
To clip text in the middle of a word, set wordBreak to WordBreak.BREAK_ALL. - *
If overflow is set to TextOverflow.None, TextOverflow.Clip, or TextOverflow.Ellipsis, - * this attribute must be used with maxLines for the settings to take effect. - *
TextOverflow.None produces the same effect as TextOverflow.Clip. - *

- * - * @param { TextOverflow } value - Default value is TextOverflow.Clip. + * + * @param { TextOverflow } value * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textOverflow(value: TextOverflow): TextAreaAttribute; /** * Specify the indentation of the first line in a text-block. * - * @param { Dimension } value - The length of text indent.Default value is 0. + * @param { Dimension } value - The length of text indent. * @returns { TextAreaAttribute } The attribute of the text. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textIndent(value: Dimension): TextAreaAttribute; @@ -858,45 +831,41 @@ declare class TextAreaAttribute extends CommonMethod { */ /** * Called when the inputFilter of text is set. - * - *

NOTE: - *
Only inputs that comply with the regular expression can be displayed. - *
Other inputs are filtered out. - *
The specified regular expression can match single characters, but not strings. - *

- * + * * @param { ResourceStr } value * @param { function } error * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ inputFilter(value: ResourceStr, error?: (value: string) => void): TextAreaAttribute; /** - * Define the caret style of the text input. + * Define the caret style of the text input * * @param { CaretStyle } value * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ caretStyle(value: CaretStyle): TextAreaAttribute; /** * Define the text selected background color of the text input. - * If the opacity is not set, a 20% opacity will be used. - * + * * @param { ResourceColor } value * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ selectedBackgroundColor(value: ResourceColor): TextAreaAttribute; @@ -912,7 +881,7 @@ declare class TextAreaAttribute extends CommonMethod { /** * Called when submitted. * - * @param { function } callback - If it is EnterKeyType.NEW_LINE and the text box is in inline input style, onSubmit is not triggered. + * @param { function } callback * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -922,9 +891,7 @@ declare class TextAreaAttribute extends CommonMethod { onSubmit(callback: (enterKey: EnterKeyType) => void): TextAreaAttribute; /** * Called when submitted. - * Triggered when the Enter key on the soft keyboard is pressed, - * providing methods to maintain the editing state of the TextArea component upon submission. - * + * * @param { TextAreaSubmitCallback } callback - callback of the listened event. * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -933,6 +900,18 @@ declare class TextAreaAttribute extends CommonMethod { * @since 14 */ onSubmit(callback: TextAreaSubmitCallback): TextAreaAttribute; + /** + * Called when submitted. + * + * @param { ((enterKey: EnterKeyType) => void) | TextAreaSubmitCallback } callback - callback of the listened event. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onSubmit(callback: ((enterKey: EnterKeyType) => void) | TextAreaSubmitCallback): TextAreaAttribute; /** * Called when the input changes. @@ -963,19 +942,14 @@ declare class TextAreaAttribute extends CommonMethod { */ /** * Called when the input changes. - * - *

NOTE: - *
In this callback, if cursor operations are performed, - * you need to adjust the cursor logic based on the previewText parameter - * to make sure it works seamlessly under the preview display scenario. - *

- * + * * @param { EditableTextOnChangeCallback } callback * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onChange(callback: EditableTextOnChangeCallback): TextAreaAttribute; @@ -997,7 +971,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onTextSelectionChange(callback: (selectionStart: number, selectionEnd: number) => void): TextAreaAttribute; @@ -1020,7 +995,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onContentScroll(callback: (totalOffsetX: number, totalOffsetY: number) => void): TextAreaAttribute; @@ -1036,15 +1012,15 @@ declare class TextAreaAttribute extends CommonMethod { */ /** * Called when judging whether the text editing change finished. - * The text box is in the editing state when it has the caret placed in it, and is in the non-editing state otherwise. - * + * * @param { function } callback - Triggered when the text area status changes. * If the value of isEditing is true, text area is in progress. * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onEditChange(callback: (isEditing: boolean) => void): TextAreaAttribute; @@ -1073,7 +1049,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onCopy(callback: (value: string) => void): TextAreaAttribute; @@ -1102,7 +1079,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onCut(callback: (value: string) => void): TextAreaAttribute; @@ -1134,7 +1112,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onPaste(callback: (value: string, event: PasteEvent) => void): TextAreaAttribute; @@ -1157,19 +1136,14 @@ declare class TextAreaAttribute extends CommonMethod { */ /** * Called when the copy option is set. - * - *

NOTE: - *
If this attribute is set to CopyOptions.None, the text can only be pasted; - * all other actions, such as copying, cutting, and sharing, are disabled. - *
Dragging is not allowed when CopyOptions.None is set. - *

- * - * @param { CopyOptions } value - Default value is CopyOptions.LocalDevice. + * + * @param { CopyOptions } value * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ copyOption(value: CopyOptions): TextAreaAttribute; @@ -1185,12 +1159,13 @@ declare class TextAreaAttribute extends CommonMethod { /** * Sets whether request keyboard or not when on focus. * - * @param { boolean } value - Default value is true. + * @param { boolean } value * @returns { TextAreaAttribute } Returns the instance of the TextAreaAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enableKeyboardOnFocus(value: boolean): TextAreaAttribute; @@ -1204,19 +1179,14 @@ declare class TextAreaAttribute extends CommonMethod { */ /** * Define the max length content of the text area. - * - *

NOTE: - *
By default, there is no maximum number of characters. - *
When the maximum number of characters is reached, - * no more characters can be entered, and the border turns red. - *

- * + * * @param { number } value * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maxLength(value: number): TextAreaAttribute; @@ -1230,32 +1200,15 @@ declare class TextAreaAttribute extends CommonMethod { */ /** * Define show counter of the text area. - * - *

NOTE: - *
options can be set only when value is set to true, - * in which case a character counter is displayed below the text box. - *
This attribute must be used together with maxlength. - *
The character counter is displayed in this format: Number of characters entered/Character limit. - *
It is visible when the number of characters entered is greater than - * the character limit multiplied by the threshold percentage value. - *
If options is not set, the text box border and character counter subscript turn red - * when the number of characters entered reaches the limit. - *
If value is set to true and options is set, - * the text box border and character counter subscript turn red - * and the text box shakes when the number of characters entered reaches the limit, - * provided that the value of thresholdPercentage is valid. - *
If highlightBorder is set to false, the text box border does not turn red. - *
By default, highlightBorder is set to true. - *
The character counter is not displayed for text boxes in inline input style. - *

- * + * * @param { boolean } value - Set showcounter of the text area. * @param { InputCounterOptions } options - Set the percentage of counter. * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ showCounter(value: boolean, options?: InputCounterOptions): TextAreaAttribute; @@ -1269,17 +1222,14 @@ declare class TextAreaAttribute extends CommonMethod { */ /** * Define style of the text area. - * - *

NOTE: - *
The inline input style is only available for the TextAreaType.Normal type. - *

- * - * @param { TextContentStyle } value - Default value is TextContentStyle.DEFAULT. + * + * @param { TextContentStyle } value * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ style(value: TextContentStyle): TextAreaAttribute; @@ -1294,11 +1244,12 @@ declare class TextAreaAttribute extends CommonMethod { /** * Define bar state of the text area. * - * @param { BarState } value - Default value is BarState.Auto. + * @param { BarState } value * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ barState(value: BarState): TextAreaAttribute; @@ -1313,159 +1264,77 @@ declare class TextAreaAttribute extends CommonMethod { */ /** * Controls whether the selection menu pops up. - * - *

NOTE: - *
true: - *
The system text selection menu does not appear under the following circumstances: clicking the text box cursor, - * long-pressing the text box, double-tapping the text box, triple-tapping the text box, or right-clicking the text box. - *
false: - *
The system text selection menu appears under the following circumstances: clicking the text box cursor, - * long-pressing the text box, double-tapping the text box, triple-tapping the text box, or right-clicking the text box. - *

- * - * @param { boolean } value - Default value is false. + * + * @param { boolean } value * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectionMenuHidden(value: boolean): TextAreaAttribute; /** * Called when the minimum font size of the font is set. - * - *

NOTE: - *
For the string type, numeric string values with optional units, for example, "10" or "10fp", are supported. - *
For the setting to take effect, this attribute must be used together with maxFontSize and maxLines,or layout constraint settings. - *
When the adaptive font size is used, the fontSize settings do not take effect. - *

- * - * @param { number | string | Resource } value - The unit is fp. + * + * @param { number | string | Resource } value * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ minFontSize(value: number | string | Resource): TextAreaAttribute; /** * Called when the maximum font size of the font is set. - * - *

NOTE: - *
For the string type, numeric string values with optional units, for example, "10" or "10fp", are supported. - *
For the setting to take effect, this attribute must be used together with minFontSize and maxLines, or layout constraint settings. - *
When the adaptive font size is used, the fontSize settings do not take effect. - *

- * - * @param { number | string | Resource } value - The unit is fp. + * + * @param { number | string | Resource } value * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ maxFontSize(value: number | string | Resource): TextAreaAttribute; /** * Called when the minimum font scale of the font is set. - * Value range: [0, 1] - * - *

NOTE: - *
The undefined type is supported. - *
A value less than 0 is handled as 0. - *
A value greater than 1 is handled as 1. - *
Abnormal values are ineffective by default. - *

- * - * @param { Optional } scale - * @returns { TextAreaAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 18 - */ - /** - * Called when the minimum font scale of the font is set. - * Value range: [0, 1] - * - *

NOTE: - *
The undefined type is supported. - *
A value less than 0 is handled as 0. - *
A value greater than 1 is handled as 1. - *
Abnormal values are ineffective by default. - *

- * + * * @param { Optional } scale * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ minFontScale(scale: Optional): TextAreaAttribute; /** * Called when the maximum font scale of the font is set. - * Value range: [1, +∞) - * - *

NOTE: - *
A value less than 1 is handled as 1. - *
Abnormal values are ineffective by default. - *

- * - * @param { Optional } scale - * @returns { TextAreaAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 18 - */ - /** - * Called when the maximum font scale of the font is set. - * Value range: [1, +∞) - * - *

NOTE: - *
A value less than 1 is handled as 1. - *
Abnormal values are ineffective by default. - *

- * + * * @param { Optional } scale * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ maxFontScale(scale: Optional): TextAreaAttribute; /** * Called when the height adaptive policy is set. - * - *

NOTE: - *

    - *
  • When this attribute is set to TextHeightAdaptivePolicy.MAX_LINES_FIRST, - * the maxLines attribute takes precedence for adjusting the text height. - *
    If the maxLines setting results in a layout beyond the layout constraints, - * the text will shrink to a font size between minFontSize and maxFontSize to allow for more content to be shown. - *
    If the text box is in inline input style, - * the font size in the editing state is different from that in the non-editing state.
  • - *
  • If this attribute is set to TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST, - * the minFontSize attribute takes precedence for adjusting the text height. - *
    If the text can fit in one line with the minFontSize setting, - * the text will enlarge to the largest possible font size between minFontSize and maxFontSize.
  • - *
  • If this attribute is set to TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST, - * the layout constraints take precedence for adjusting the text height. - *
    If the resultant layout is beyond the layout constraints, - * the text will shrink to a font size between minFontSize and maxFontSize to respect the layout constraints.
  • - *
- *

- * - * @param { TextHeightAdaptivePolicy } value - The height adaptive policy.Default value is TextHeightAdaptivePolicy.MAX_LINES_FIRST. + * + * @param { TextHeightAdaptivePolicy } value - The height adaptive policy. * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ heightAdaptivePolicy(value: TextHeightAdaptivePolicy): TextAreaAttribute; @@ -1479,25 +1348,14 @@ declare class TextAreaAttribute extends CommonMethod { */ /** * Define max lines of the text area. - * Value range: (0, +∞) - * - *

NOTE: - *
Sets the maximum number of lines that can be displayed. - *
When textOverflow is set, text is truncated if the content exceeds this limit. - *
When textOverflow is not set, in inline style, - * the text is scrollable if the content exceeds the limit while the text box is focused; - * maxLines does not apply when the text box is not focused. - *
In non-inline style, the text is truncated according to the number of lines. - *
Default value: 3 with the inline style; +∞ with the non-inline style, - * indicating that there is no maximum number of lines. - *

- * + * * @param { number } value * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maxLines(value: number): TextAreaAttribute; @@ -1529,34 +1387,26 @@ declare class TextAreaAttribute extends CommonMethod { /** * Set the word break type. * - *

NOTE: - *
This attribute does not take effect for the placeholder text. - *
The component does not support the clip attribute. - *
Therefore, setting this attribute does not affect text clipping. - *

- * - * @param { WordBreak } value - The word break type.Default value is WordBreak.BREAK_WORD. + * @param { WordBreak } value - The word break type. * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ wordBreak(value: WordBreak): TextAreaAttribute; /** * Set the text line break strategy type. * - *

NOTE: - *
This attribute takes effect when wordBreak is not set to breakAll. Hyphens are not supported. - *

- * - * @param { LineBreakStrategy } strategy - The text line break strategy type.Default value is LineBreakStrategy.GREEDY. + * @param { LineBreakStrategy } strategy - The text line break strategy type. * @returns { TextAreaAttribute } The attribute of the TextAreaAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lineBreakStrategy(strategy: LineBreakStrategy): TextAreaAttribute; @@ -1580,75 +1430,54 @@ declare class TextAreaAttribute extends CommonMethod { */ /** * Define custom keyboard of the text area. - * - *

NOTE: - *
When a custom keyboard is set, activating the text box opens the specified custom component, - * instead of the system input method. - *
The custom keyboard's height can be set through the height attribute of the custom component's root node, - * and its width is fixed at the default value. - *
The custom keyboard is presented by overlaying the original screen, - * which is not compressed or lifted if avoid mode is not enabled or avoidance is not needed for the text box. - *
The custom keyboard cannot obtain the focus, but it blocks gesture events. - *
By default, the custom keyboard is closed when the input component loses the focus. - *
You can also use the TextAreaController.stopEditing API to close the keyboard. - *
When a custom keyboard is set, the text box does not support camera input, even when the device supports. - *
When setting a custom keyboard, you can bind the onKeyPrelme event to prevent input from the physical keyboard. - *

- * + * * @param { CustomBuilder } value - Set up a custom keyboard of TextArea * @param { KeyboardOptions } [options] - Indicates the custom keyboard options of TextArea * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ customKeyboard(value: CustomBuilder, options?: KeyboardOptions): TextAreaAttribute; /** * Called when the text decoration of the text is set. * - * @param { TextDecorationOptions } value - Default value is { type: TextDecorationType.None, color: Color.Black, style: TextDecorationStyle.SOLID }. + * @param { TextDecorationOptions } value * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ decoration(value: TextDecorationOptions): TextAreaAttribute; /** * Called when the distance between text fonts is set. - * - *

NOTE: - *
If the value specified is a percentage or 0, the default value is used. - *
For the string type, numeric string values with optional units, for example, "10" or "10fp", are supported. - *
If the value specified is a negative value, the text is compressed. - *
A negative value too small may result in the text being compressed to 0 and no content being displayed. - *

- * - * @param { number | string | Resource } value - The unit is fp. + * + * @param { number | string | Resource } value * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ letterSpacing(value: number | string | Resource): TextAreaAttribute; /** * Set font line spacing. - * - *

NOTE: - *
If the value specified is less than or equal to 0, the default value 0 is used. - *

- * - * @param { LengthMetrics } value - Default value is 0. + * + * @param { LengthMetrics } value * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lineSpacing(value: LengthMetrics): TextAreaAttribute; @@ -1667,18 +1496,14 @@ declare class TextAreaAttribute extends CommonMethod { /** * Called when the line height of the font is set. - * - *

NOTE: - *
If the value is less than or equal to 0, the line height is not limited and the font size is adaptive. - *
If the value is of the number type, the unit fp is used. - *

- * + * * @param { number | string | Resource } value * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lineHeight(value: number | string | Resource): TextAreaAttribute; @@ -1694,23 +1519,25 @@ declare class TextAreaAttribute extends CommonMethod { /** * Called when the input type is set. * - * @param { TextAreaType } value - Default value is TextAreaType.Normal. + * @param { TextAreaType } value * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type(value: TextAreaType): TextAreaAttribute; /** * Sets whether enable auto fill or not. - * - * @param { boolean } value - Indicates the flag whether autofill is enabled.Default value is true.True: enable, false: disable. + * + * @param { boolean } value - Indicates the flag whether autofill is enabled. * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableAutoFill(value: boolean): TextAreaAttribute; @@ -1721,7 +1548,8 @@ declare class TextAreaAttribute extends CommonMethod { * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentType(contentType: ContentType): TextAreaAttribute; @@ -1737,130 +1565,99 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontFeature(value: string): TextAreaAttribute; /** * Get text value information when about to input. - * - *

NOTE: - *
It returns true if the text is inserted; returns false otherwise. - *
This callback is not triggered for pre-edit or candidate word operations. - *
It is available only for system input methods. - *

- * + * * @param { Callback } callback - The triggered function when text content is about to insert. * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillInsert(callback: Callback): TextAreaAttribute; /** * Get text value information when completed input. - * - *

NOTE: - *
It is available only for system input methods. - *

- * + * * @param { Callback } callback - The triggered function when text content has been inserted. * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onDidInsert(callback: Callback): TextAreaAttribute; /** * Get text value information when about to delete. - * - *

NOTE: - *
It returns true if the text is deleted; returns false otherwise. - *
This callback is not called for text preview. - *
It is available only for system input methods. - *

- * + * * @param { Callback } callback - The triggered function when text content is about to delete. * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDelete(callback: Callback): TextAreaAttribute; /** * Get text value information when the deletion has been completed - * - *

NOTE: - *
It is available only for system input methods. - *

- * + * * @param { Callback } callback - The triggered function when text content has been deleted. * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onDidDelete(callback: Callback): TextAreaAttribute; /** * Set the custom text menu. - * Sets the extended options of the custom context menu on selection, - * including the text content, icon, and callback. - * + * * @param { EditMenuOptions } editMenu - Customize text menu options. * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ editMenuOptions(editMenu: EditMenuOptions): TextAreaAttribute; /** * Define the preview text mode of the text input. - * - *

NOTE: - *
Preview text is in a temporary state and does not support text interception. - *
As such, it does not trigger onWillInsert, onDidInsert, onWillDelete, or onDidDelete callbacks. - *

- * - * @param { boolean } enable - Indicates the preview text mode.Default value is true. + * + * @param { boolean } enable - Indicates the preview text mode. * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enablePreviewText(enable: boolean): TextAreaAttribute; /** * Enable or disable haptic feedback. - * - *

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", - * } - * ] - * - *

- * + * * @param { boolean } isEnabled - Default value is true, set false to disable haptic feedback. * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ enableHapticFeedback(isEnabled: boolean): TextAreaAttribute; @@ -1872,37 +1669,34 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ autoCapitalizationMode(mode: AutoCapitalizationMode): TextAreaAttribute; /** * Set the text with half leading. * - * @param { Optional } halfLeading - Default value is false.The value true means that half leading is enabled, and false means the opposite. + * @param { Optional } halfLeading * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ halfLeading(halfLeading: Optional): TextAreaAttribute; /** * Set the ellipsis mode. - * - *

NOTE: - *
For the settings to work, overflow must be set to TextOverflow.Ellipsis and maxLines must be specified. - *
Setting ellipsisMode alone does not take effect. - *
EllipsisMode.START and EllipsisMode.CENTER take effect only when maxLines is set to 1. - *

- * - * @param { EllipsisMode } mode - The ellipsis mode.Default value is EllipsisMode.END. + * + * @param { EllipsisMode } mode - The ellipsis mode. * @returns { TextAreaAttribute } The attribute of TextArea. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ellipsisMode(mode: Optional): TextAreaAttribute; @@ -1913,24 +1707,22 @@ declare class TextAreaAttribute extends CommonMethod { * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ stopBackPress(isStopped: Optional): TextAreaAttribute; /** * Get text value information when about to change. - * - *

NOTE: - *
This callback is triggered after onWillInsert and onWillDelete, but before onDidInsert and onDidDelete. - *

- * + * * @param { Callback } callback - The triggered function when text content is about to change. * Returning true allows the change to proceed, while returning false cancels the change. * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ onWillChange(callback: Callback): TextAreaAttribute; @@ -1941,7 +1733,8 @@ declare class TextAreaAttribute extends CommonMethod { * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ keyboardAppearance(appearance: Optional): TextAreaAttribute; diff --git a/api/@internal/component/ets/text_clock.d.ts b/api/@internal/component/ets/text_clock.d.ts index 72059f918df764eb406996d59906dcddcb51ccc3..f1a4d790124b9d3d57fbbe849604fdc307cf0bb1 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,7 +44,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TextClockController { /** @@ -61,7 +68,8 @@ declare class TextClockController { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); /** @@ -87,6 +95,17 @@ declare class TextClockController { * @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. * @@ -110,6 +129,17 @@ declare class TextClockController { * @since 11 */ stop(); + /** + * Provides a stop event for textclock. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + stop(): void; } /** @@ -120,7 +150,8 @@ declare class TextClockController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextClockConfiguration extends CommonConfiguration { /** @@ -132,7 +163,8 @@ declare interface TextClockConfiguration extends CommonConfiguration { /** @@ -410,6 +450,7 @@ declare class TextClockAttribute extends CommonMethod { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ format(value: ResourceStr): TextClockAttribute; @@ -456,7 +497,8 @@ declare class TextClockAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onDateChange(event: (value: number) => void): TextClockAttribute; @@ -486,7 +528,8 @@ declare class TextClockAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor(value: ResourceColor): TextClockAttribute; @@ -516,7 +559,8 @@ declare class TextClockAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize(value: Length): TextClockAttribute; @@ -546,7 +590,8 @@ declare class TextClockAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontStyle(value: FontStyle): TextClockAttribute; @@ -576,7 +621,8 @@ declare class TextClockAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontWeight(value: number | FontWeight | string): TextClockAttribute; @@ -606,7 +652,8 @@ declare class TextClockAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontFamily(value: ResourceStr): TextClockAttribute; @@ -629,7 +676,8 @@ declare class TextClockAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textShadow(value: ShadowOptions | Array): TextClockAttribute; @@ -658,7 +706,8 @@ declare class TextClockAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontFeature(value: string): TextClockAttribute; @@ -670,7 +719,8 @@ declare class TextClockAttribute 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): TextClockAttribute; @@ -683,7 +733,8 @@ declare class TextClockAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dateTimeOptions(dateTimeOptions: Optional): TextClockAttribute; } diff --git a/api/@internal/component/ets/text_common.d.ts b/api/@internal/component/ets/text_common.d.ts index da0a2e01d1e27b6c9f900b840bd40ae0486e104f..18deb43040306d23c2f4a321acfbe102e34779fa 100644 --- a/api/@internal/component/ets/text_common.d.ts +++ b/api/@internal/component/ets/text_common.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ResourceColor, ResourceStr, Length } from './units'; +import { DecorationStyleInterface, MutableStyledString, StyledString } from './styled_string'; +import { SelectionOptions, Callback } from './common'; +import { TextDecorationType, TextDecorationStyle } from './enums'; +/*** endif */ + /** * Defines the text data detector type. * @@ -31,7 +38,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 TextDataDetectorType { /** @@ -45,7 +53,8 @@ declare enum TextDataDetectorType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PHONE_NUMBER = 0, @@ -60,7 +69,8 @@ declare enum TextDataDetectorType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ URL = 1, @@ -75,7 +85,8 @@ declare enum TextDataDetectorType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EMAIL = 2, @@ -90,7 +101,8 @@ declare enum TextDataDetectorType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ADDRESS = 3, @@ -99,7 +111,8 @@ declare enum TextDataDetectorType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DATE_TIME = 4, } @@ -117,7 +130,8 @@ declare enum TextDataDetectorType { * @interface TextDataDetectorConfig * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextDataDetectorConfig { /** @@ -133,7 +147,8 @@ declare interface TextDataDetectorConfig { * @type { TextDataDetectorType[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ types: TextDataDetectorType[] @@ -153,36 +168,37 @@ declare interface TextDataDetectorConfig { * @since 12 */ onDetectResultUpdate?: (result: string) => void - /** - * The color of AI entity. + * Text data detect result callback. * - * @type { ?ResourceColor } + * @type { ?Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since 20 + * @arkts 1.2 */ - color?: ResourceColor, - + onDetectResultUpdate?: Callback /** - * The decoration of AI entity. + * The color of AI entity. * - * @type { ?DecorationStyleInterface } + * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - decoration?: DecorationStyleInterface; + color?: ResourceColor, /** - * Used to set whether the preview window will be displayed when long-presses and selects a word. + * The decoration of AI entity. * - * @type { ?boolean } + * @type { ?DecorationStyleInterface } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 20 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - enablePreviewMenu?: boolean; + decoration?: DecorationStyleInterface } /** @@ -192,7 +208,8 @@ declare interface TextDataDetectorConfig { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextRange { /** @@ -203,7 +220,8 @@ declare interface TextRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start?: number; @@ -215,7 +233,8 @@ declare interface TextRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ end?: number; } @@ -227,7 +246,8 @@ declare interface TextRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface InsertValue { /** @@ -237,7 +257,8 @@ declare interface InsertValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ insertOffset: number; @@ -248,7 +269,8 @@ declare interface InsertValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ insertValue: string; } @@ -260,7 +282,8 @@ declare interface InsertValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TextDeleteDirection { /** @@ -269,7 +292,8 @@ declare enum TextDeleteDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BACKWARD = 0, @@ -279,7 +303,8 @@ declare enum TextDeleteDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FORWARD = 1, } @@ -332,7 +357,8 @@ declare enum SuperscriptStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum MenuType { /** @@ -341,7 +367,8 @@ declare enum MenuType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ SELECTION_MENU = 0, @@ -351,7 +378,8 @@ declare enum MenuType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ PREVIEW_MENU = 1, } @@ -363,7 +391,8 @@ declare enum MenuType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum AutoCapitalizationMode { /** @@ -372,7 +401,8 @@ declare enum AutoCapitalizationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -382,7 +412,8 @@ declare enum AutoCapitalizationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ WORDS = 1, @@ -392,7 +423,8 @@ declare enum AutoCapitalizationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ SENTENCES = 2, @@ -402,7 +434,8 @@ declare enum AutoCapitalizationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ ALL_CHARACTERS = 3, } @@ -414,7 +447,8 @@ declare enum AutoCapitalizationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DeleteValue { /** @@ -424,7 +458,8 @@ declare interface DeleteValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ deleteOffset: number; @@ -435,7 +470,8 @@ declare interface DeleteValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ direction: TextDeleteDirection; @@ -446,7 +482,8 @@ declare interface DeleteValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ deleteValue: string; } @@ -460,7 +497,8 @@ declare interface DeleteValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnDidChangeCallback = (rangeBefore: TextRange, rangeAfter: TextRange) => void; @@ -473,7 +511,8 @@ declare type OnDidChangeCallback = (rangeBefore: TextRange, rangeAfter: TextRang * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ /** * Callback when input sometimes has info of previewText. @@ -485,7 +524,8 @@ declare type OnDidChangeCallback = (rangeBefore: TextRange, rangeAfter: TextRang * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare type EditableTextOnChangeCallback = (value: string, previewText?: PreviewText, options?: TextChangeOptions) => void; @@ -496,7 +536,8 @@ declare type EditableTextOnChangeCallback = (value: string, previewText?: Previe * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextBaseController { /** @@ -508,7 +549,8 @@ declare interface TextBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setSelection(selectionStart: number, selectionEnd: number, options?: SelectionOptions): void; @@ -518,7 +560,8 @@ declare interface TextBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ closeSelectionMenu(): void; @@ -529,7 +572,8 @@ declare interface TextBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getLayoutManager(): LayoutManager; } @@ -542,7 +586,8 @@ declare interface TextBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextEditControllerEx extends TextBaseController { /** @@ -552,7 +597,8 @@ declare interface TextEditControllerEx extends TextBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isEditing(): boolean; @@ -562,7 +608,8 @@ declare interface TextEditControllerEx extends TextBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ stopEditing(): void; @@ -574,7 +621,8 @@ declare interface TextEditControllerEx extends TextBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setCaretOffset(offset: number): boolean; @@ -585,7 +633,8 @@ declare interface TextEditControllerEx extends TextBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCaretOffset(): number; @@ -599,6 +648,18 @@ declare interface TextEditControllerEx extends TextBaseController { * @since 12 */ getPreviewText?(): PreviewText; + + /** + * Get PreviewText. + * + * @returns { PreviewText } - Return the PreviewText. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + getPreviewText(): PreviewText; } /** @@ -607,7 +668,8 @@ declare interface TextEditControllerEx extends TextBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PreviewText { /** @@ -617,7 +679,8 @@ declare interface PreviewText { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ offset: number; @@ -628,7 +691,8 @@ declare interface PreviewText { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ value: string; } @@ -640,7 +704,8 @@ declare interface PreviewText { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface StyledStringController { /** @@ -650,7 +715,8 @@ declare interface StyledStringController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setStyledString(styledString: StyledString): void; @@ -661,7 +727,8 @@ declare interface StyledStringController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getStyledString(): MutableStyledString; } @@ -673,7 +740,8 @@ declare interface StyledStringController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface StyledStringChangedListener { /** @@ -683,7 +751,8 @@ declare interface StyledStringChangedListener { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillChange?: Callback; @@ -694,7 +763,8 @@ declare interface StyledStringChangedListener { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onDidChange?: OnDidChangeCallback; } @@ -706,7 +776,8 @@ declare interface StyledStringChangedListener { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface StyledStringChangeValue { /** @@ -716,7 +787,8 @@ interface StyledStringChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ range: TextRange; @@ -727,7 +799,8 @@ interface StyledStringChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ replacementString: StyledString; @@ -738,7 +811,8 @@ interface StyledStringChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ previewText?: StyledString; } @@ -750,7 +824,8 @@ interface StyledStringChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LayoutManager { /** @@ -760,7 +835,8 @@ declare interface LayoutManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getLineCount(): number; @@ -773,7 +849,8 @@ declare interface LayoutManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getGlyphPositionAtCoordinate(x: number, y: number): PositionWithAffinity; @@ -810,7 +887,8 @@ declare interface LayoutManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface PositionWithAffinity { /** @@ -820,7 +898,8 @@ interface PositionWithAffinity { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ position: number; @@ -906,7 +985,8 @@ declare type TextBox = import('../api/@ohos.graphics.text').default.TextBox; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface CaretStyle { /** @@ -924,7 +1004,8 @@ interface CaretStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ width?: Length, @@ -943,7 +1024,8 @@ interface CaretStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ color?: ResourceColor, } @@ -954,7 +1036,8 @@ interface CaretStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TextMenuItemId { /** @@ -966,7 +1049,8 @@ declare class TextMenuItemId { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static of(id: ResourceStr): TextMenuItemId; @@ -978,7 +1062,8 @@ declare class TextMenuItemId { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ equals(id: TextMenuItemId): boolean; @@ -990,7 +1075,8 @@ declare class TextMenuItemId { * @static * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static readonly CUT: TextMenuItemId; @@ -1002,7 +1088,8 @@ declare class TextMenuItemId { * @static * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static readonly COPY: TextMenuItemId; @@ -1014,7 +1101,8 @@ declare class TextMenuItemId { * @static * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static readonly PASTE: TextMenuItemId; @@ -1026,7 +1114,8 @@ declare class TextMenuItemId { * @static * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static readonly SELECT_ALL: TextMenuItemId; @@ -1038,7 +1127,8 @@ declare class TextMenuItemId { * @static * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static readonly COLLABORATION_SERVICE: TextMenuItemId; @@ -1050,7 +1140,8 @@ declare class TextMenuItemId { * @static * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static readonly CAMERA_INPUT: TextMenuItemId; @@ -1062,7 +1153,8 @@ declare class TextMenuItemId { * @static * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ static readonly AI_WRITER: TextMenuItemId; @@ -1074,7 +1166,8 @@ declare class TextMenuItemId { * @static * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ static readonly TRANSLATE: TextMenuItemId; @@ -1086,7 +1179,8 @@ declare class TextMenuItemId { * @static * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ static readonly SEARCH: TextMenuItemId; @@ -1098,7 +1192,8 @@ declare class TextMenuItemId { * @static * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ static readonly SHARE: TextMenuItemId; @@ -1184,7 +1279,8 @@ declare class TextMenuItemId { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextMenuItem { /** @@ -1194,7 +1290,8 @@ declare interface TextMenuItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ content: ResourceStr; /** @@ -1204,7 +1301,8 @@ declare interface TextMenuItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ icon?: ResourceStr; /** @@ -1214,7 +1312,8 @@ declare interface TextMenuItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ id: TextMenuItemId; /** @@ -1224,7 +1323,8 @@ declare interface TextMenuItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ labelInfo?: ResourceStr; } @@ -1249,7 +1349,8 @@ type OnPrepareMenuCallback = (menuItems: Array) => Array): Array; /** @@ -1272,7 +1374,8 @@ declare interface EditMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onMenuItemClick(menuItem: TextMenuItem, range: TextRange): boolean; /** @@ -1294,7 +1397,8 @@ declare interface EditMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface DecorationStyleResult { /** @@ -1304,7 +1408,8 @@ interface DecorationStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type: TextDecorationType; @@ -1315,7 +1420,8 @@ interface DecorationStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ color: ResourceColor; @@ -1326,7 +1432,8 @@ interface DecorationStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ style?: TextDecorationStyle; @@ -1350,7 +1457,8 @@ interface DecorationStyleResult { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface FontSettingOptions { /** @@ -1361,7 +1469,8 @@ declare interface FontSettingOptions { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableVariableFontWeight?: boolean; } @@ -1372,7 +1481,8 @@ declare interface FontSettingOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextChangeOptions { /** @@ -1382,7 +1492,8 @@ declare interface TextChangeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ rangeBefore: TextRange; @@ -1393,7 +1504,8 @@ declare interface TextChangeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ rangeAfter: TextRange; @@ -1404,7 +1516,8 @@ declare interface TextChangeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ oldContent: string; @@ -1415,7 +1528,8 @@ declare interface TextChangeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ oldPreviewText: PreviewText; } @@ -1427,7 +1541,8 @@ declare interface TextChangeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ interface EditableTextChangeValue { /** @@ -1437,7 +1552,8 @@ interface EditableTextChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ content: string; @@ -1448,7 +1564,8 @@ interface EditableTextChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ previewText?: PreviewText; @@ -1459,7 +1576,8 @@ interface EditableTextChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ options?: TextChangeOptions; } @@ -1471,7 +1589,8 @@ interface EditableTextChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 16 + * @since arkts {'1.1':'16','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TextMenuShowMode { /** @@ -1480,7 +1599,8 @@ declare enum TextMenuShowMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 16 + * @since arkts {'1.1':'16','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 0, @@ -1491,7 +1611,8 @@ declare enum TextMenuShowMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 16 + * @since arkts {'1.1':'16','1.2':'20'} + * @arkts 1.1&1.2 */ PREFER_WINDOW = 1, } @@ -1503,7 +1624,8 @@ declare enum TextMenuShowMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 16 + * @since arkts {'1.1':'16','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextMenuOptions { /** @@ -1513,7 +1635,8 @@ declare interface TextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 16 + * @since arkts {'1.1':'16','1.2':'20'} + * @arkts 1.1&1.2 */ showMode?: TextMenuShowMode; } @@ -1523,7 +1646,8 @@ declare interface TextMenuOptions { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum KeyboardAppearance { /** @@ -1531,7 +1655,8 @@ declare enum KeyboardAppearance { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ NONE_IMMERSIVE = 0, @@ -1540,7 +1665,8 @@ declare enum KeyboardAppearance { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ IMMERSIVE = 1, @@ -1549,7 +1675,8 @@ declare enum KeyboardAppearance { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ LIGHT_IMMERSIVE = 2, @@ -1558,7 +1685,8 @@ declare enum KeyboardAppearance { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ DARK_IMMERSIVE = 3, } diff --git a/api/@internal/component/ets/text_input.d.ts b/api/@internal/component/ets/text_input.d.ts index cd6888ae551923edc5f81e28ca918c82ebf51dbb..9f0281783bcde89ac7ecc97ac97d6e93598131ec 100644 --- a/api/@internal/component/ets/text_input.d.ts +++ b/api/@internal/component/ets/text_input.d.ts @@ -18,6 +18,18 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CancelButtonSymbolOptions, CancelButtonOptions } from "./search"; +import { Callback, CommonMethod, TextContentControllerBase, SelectionOptions, InputCounterOptions, TextDecorationOptions , Optional} from "./common"; +import { CustomBuilder } from './builder'; +import { BarState, LineBreakStrategy, TextAlign, FontStyle, FontWeight, WordBreak, TextOverflow, + CopyOptions, TextHeightAdaptivePolicy, TextContentStyle, EllipsisMode } from './enums'; +import { Resource, ResourceStr, ResourceColor, Dimension, Font, Length } from './units'; +import { InsertValue, DeleteValue, CaretStyle, EditableTextOnChangeCallback, EditMenuOptions, + AutoCapitalizationMode,EditableTextChangeValue,KeyboardAppearance } from "./textCommon"; +import { KeyboardOptions, PasteEvent } from "./richEditor"; +/*** endif */ + /** * Declare the type of input box * @@ -40,7 +52,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 InputType { /** @@ -62,7 +75,8 @@ declare enum InputType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Normal, @@ -85,7 +99,8 @@ declare enum InputType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Number, @@ -108,7 +123,8 @@ declare enum InputType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ PhoneNumber, @@ -128,15 +144,11 @@ declare enum InputType { /** * E-mail address input mode. * - *

NOTE: - *
This mode accepts only digits, letters, underscores (_), dots (.), - * and the following special characters: ! # $ % & ' " * + - / = ? ^ ` { | } ~ @ (which can only appear once) - *

- * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Email, @@ -156,18 +168,11 @@ declare enum InputType { /** * Password entry mode. * - *

NOTE: - *
An eye icon is used to show or hide the password. - *
By default, the entered characters are temporarily shown before being obscured by dots; - * they are directly obscured by dots since API version 12 on certain devices. - *
The password input mode does not support underlines. - *
If Password Vault is enabled, autofill is available for the username and password. - *

- * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Password, @@ -181,17 +186,11 @@ declare enum InputType { /** * Number Password entry mode. * - *

NOTE: - *
An eye icon is used to show or hide the password. - *
By default, the entered characters are temporarily shown before being obscured by dots; - * they are directly obscured by dots since API version 12 on certain devices. - *
The password input mode does not support underlines. - *

- * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NUMBER_PASSWORD = 8, @@ -200,7 +199,8 @@ declare enum InputType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SCREEN_LOCK_PASSWORD = 9, @@ -213,13 +213,10 @@ declare enum InputType { /** * UserName entry mode. * - *

NOTE: - *
If Password Vault is enabled, autofill is available for the username and password. - *

- * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ USER_NAME = 10, @@ -232,30 +229,21 @@ declare enum InputType { /** * NewPassword entry mode. * - *

NOTE: - *
An eye icon is used to show or hide the password. - *
By default, the entered characters are temporarily shown before being obscured by dots; - * they are directly obscured by dots since API version 12 on certain devices. - *
If Password Vault is enabled, a new password can be automatically generated. - *

- * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NEW_PASSWORD = 11, /** * Number decimal entry mode. * - *

NOTE: - *
The value can contain digits and one decimal point. - *

- * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NUMBER_DECIMAL = 12, @@ -265,18 +253,10 @@ declare enum InputType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ URL = 13, - - /** - * One time code mode. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - ONE_TIME_CODE = 14, } /** @@ -285,361 +265,337 @@ declare enum InputType { * @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 ContentType { /** * User name content type. - * Password Vault, when enabled, can automatically save and fill in usernames. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ USER_NAME = 0, /** * Password content type. - * Password Vault, when enabled, can automatically save and fill in passwords. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PASSWORD = 1, /** * New password content type. - * Password Vault, when enabled, can automatically generate a new password. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NEW_PASSWORD = 2, /** * Full street address content type. - * The scenario-based autofill feature, when enabled, - * can automatically save and fill in full street addresses. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FULL_STREET_ADDRESS = 3, /** * House number content type. - * The scenario-based autofill feature, when enabled, - * can automatically save and fill in house numbers. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HOUSE_NUMBER = 4, /** * District address content type. - * The scenario-based autofill feature, when enabled, - * can automatically save and fill in districts and counties. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DISTRICT_ADDRESS = 5, /** * City address content type. - * The scenario-based autofill feature, when enabled, - * can automatically save and fill in cities. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CITY_ADDRESS = 6, /** * Province address content type. - * The scenario-based autofill feature, when enabled, - * can automatically save and fill in provinces. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PROVINCE_ADDRESS = 7, /** * Country address content type. - * The scenario-based autofill feature, when enabled, - * can automatically save and fill in countries. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ COUNTRY_ADDRESS = 8, /** * Person full name content type. - * The scenario-based autofill feature, when enabled, - * can automatically save and fill in full names. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PERSON_FULL_NAME = 9, /** * Person last name content type. - * The scenario-based autofill feature, when enabled, - * can automatically save and fill in last names. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PERSON_LAST_NAME = 10, /** * Person first name content type. - * The scenario-based autofill feature, when enabled, - * can automatically save and fill in first names. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PERSON_FIRST_NAME = 11, /** * Phone number content type. - * The scenario-based autofill feature, when enabled, - * can automatically save and fill in phone numbers. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PHONE_NUMBER = 12, /** * Phone country code content type. - * The scenario-based autofill feature, when enabled, - * can automatically save and fill in country codes. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PHONE_COUNTRY_CODE = 13, /** * Full phone number content type. - * The scenario-based autofill feature, when enabled, - * can automatically save and fill in phone numbers with country codes. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FULL_PHONE_NUMBER = 14, /** * Email address content type. - * The scenario-based autofill feature, when enabled, - * can automatically save and fill in email addresses. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EMAIL_ADDRESS = 15, /** * Bank card number content type. - * The scenario-based autofill feature, when enabled, - * can automatically save and fill in bank card numbers. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BANK_CARD_NUMBER = 16, /** * ID card number content type. - * The scenario-based autofill feature, when enabled, - * can automatically save and fill in ID card numbers. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ID_CARD_NUMBER = 17, /** * Nickname content type. - * The scenario-based autofill feature, when enabled, - * can automatically save and fill in nicknames. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NICKNAME = 23, /** * Detail info without street content type. - * The scenario-based autofill feature, when enabled, - * can automatically save and fill in address information without street addresses. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DETAIL_INFO_WITHOUT_STREET = 24, /** * Format address content type. - * The scenario-based autofill feature, when enabled, - * can automatically save and fill in standard addresses. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FORMAT_ADDRESS = 25, /** * Passport number content type. - * The scenario-based autofill feature, when enabled, - * can automatically save and fill in passport numbers. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ PASSPORT_NUMBER = 26, /** * Passport validity content type. - * The scenario-based autofill feature, when enabled, - * can automatically save and fill in passport validity periods. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ VALIDITY = 27, /** * Place of issue content type. - * The scenario-based autofill feature, when enabled, - * can automatically save and fill in the place of issue for passports. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ISSUE_AT = 28, /** * Invoice organization content type. - * The scenario-based autofill feature, when enabled, - * can automatically save and fill in invoice titles. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ORGANIZATION = 29, /** * Invoice tax id content type. - * The scenario-based autofill feature, when enabled, - * can automatically save and fill in tax IDs. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TAX_ID = 30, /** * Address city and state content type. - * The scenario-based autofill feature, when enabled, - * can automatically save and fill in locations. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ADDRESS_CITY_AND_STATE = 31, /** * Airline flight number content type. - * Currently not supported for automatic saving and auto-filling. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ FLIGHT_NUMBER = 32, /** * License number for drivers content type. - * Currently not supported for automatic saving and auto-filling. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ LICENSE_NUMBER = 33, /** * License file number for drivers content type. - * Currently not supported for automatic saving and auto-filling. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ LICENSE_FILE_NUMBER = 34, /** * License plate for vehicles content type. - * The scenario-based autofill feature, when enabled, - * can automatically save and fill in license plate numbers. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ LICENSE_PLATE = 35, /** * Engine number for vehicles content type. - * Currently not supported for automatic saving and auto-filling. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ENGINE_NUMBER = 36, /** * License chassis number for vehicles content type. - * Currently not supported for automatic saving and auto-filling. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ LICENSE_CHASSIS_NUMBER = 37 } @@ -666,7 +622,8 @@ declare enum ContentType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum EnterKeyType { /** @@ -688,7 +645,8 @@ declare enum EnterKeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Go = 2, @@ -711,7 +669,8 @@ declare enum EnterKeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Search = 3, @@ -734,7 +693,8 @@ declare enum EnterKeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Send = 4, @@ -757,7 +717,8 @@ declare enum EnterKeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Next = 5, @@ -780,7 +741,8 @@ declare enum EnterKeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Done = 6, @@ -797,7 +759,8 @@ declare enum EnterKeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PREVIOUS = 7, @@ -814,7 +777,8 @@ declare enum EnterKeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NEW_LINE = 8, } @@ -826,69 +790,52 @@ declare enum EnterKeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface UnderlineColor { /** * Typing underline color width property. * - *

NOTE: - *
If no value is specified or if the value specified is undefined, - * null, or invalid, the default value is used. - *

- * * @type { ?(ResourceColor | undefined) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ typing?: ResourceColor | undefined; /** * Normal underline color width property. * - *

NOTE: - *
If no value is specified or if the value specified is undefined, - * null, or invalid, the default value is used. - *

- * * @type { ?(ResourceColor | undefined) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ normal?: ResourceColor | undefined; /** * Error underline color width property. * - *

NOTE: - *
If no value is specified or if the value specified is undefined, - * null, or invalid, the default value is used. - *
This option changes the color used in the showCounter attribute - * when the maximum number of characters is reached. - *

- * * @type { ?(ResourceColor | undefined) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ error?: ResourceColor | undefined; /** * Disable underline color width property. * - *

NOTE: - *
If no value is specified or if the value specified is undefined, - * null, or invalid, the default value is used. - *

- * * @type { ?(ResourceColor | undefined) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ disable?: ResourceColor | undefined; } @@ -900,7 +847,8 @@ declare interface UnderlineColor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SubmitEvent { /** @@ -909,7 +857,8 @@ declare interface SubmitEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ keepEditableState(): void; @@ -920,7 +869,8 @@ declare interface SubmitEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ text: string; } @@ -946,7 +896,8 @@ declare interface SubmitEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TextInputController extends TextContentControllerBase { /** @@ -964,12 +915,12 @@ declare class TextInputController extends TextContentControllerBase { */ /** * constructor. - * A constructor used to create a TextInputController object. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -991,16 +942,12 @@ declare class TextInputController extends TextContentControllerBase { /** * Called when the position of the insertion cursor is set. * - *

NOTE: - *
If the value is less than 0, the value 0 is used. - *
If the value exceeds the text length, the caret is placed at the end of the text. - *

- * * @param { number } value * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ caretPosition(value: number): void; @@ -1026,21 +973,14 @@ declare class TextInputController extends TextContentControllerBase { /** * Text selection is achieved by specifying the start and end positions of the text. * - *

NOTE: - *
If selectionStart or selectionEnd is set to undefined, the value 0 will be used. - *
If selectionMenuHidden is set to true or a 2-in-1 device is used, - * calling setTextSelection does not display the context menu even when options is set to MenuPolicy.SHOW. - *
If the selected text contains an emoji, - * the emoji is selected when its start position is within the text selection range. - *

- * - * @param { number } selectionStart - The start position of the selected text.The start position of text in the text box is 0. + * @param { number } selectionStart - The start position of the selected text. * @param { number } selectionEnd - The end position of the selected text. - * @param { SelectionOptions } [options] - Indicates the options of the text selection.Default value is MenuPolicy.DEFAULT. + * @param { SelectionOptions } [options] - Indicates the options of the text selection. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setTextSelection(selectionStart: number, selectionEnd: number, options?: SelectionOptions): void; @@ -1057,7 +997,8 @@ declare class TextInputController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ stopEditing(): void; } @@ -1084,7 +1025,8 @@ declare class TextInputController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextInputOptions { /** @@ -1109,7 +1051,8 @@ declare interface TextInputOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ placeholder?: ResourceStr; @@ -1131,18 +1074,12 @@ declare interface TextInputOptions { /** * Sets the current value of TextInput. * - *

NOTE: - *
You are advised to bind the state variable to the text in real time through the onChange event, - * so as to prevent display errors when the component is updated. - *
Since API version 10, this parameter supports two-way binding through $$. - *
Since API version 18, this parameter supports two-way binding through !!. - *

- * * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ text?: ResourceStr; @@ -1168,7 +1105,8 @@ declare interface TextInputOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ controller?: TextInputController; } @@ -1195,7 +1133,8 @@ declare interface TextInputOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TextInputStyle { /** @@ -1214,15 +1153,11 @@ declare enum TextInputStyle { /** * Text input default style. * - *

NOTE: - *
The caret width is fixed at 1.5 vp, - * and the caret height is subject to the background height and font size of the selected text. - *

- * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Default, @@ -1242,18 +1177,11 @@ declare enum TextInputStyle { /** * Text input inline style. * - *

NOTE: - *
The background height of the selected text is the same as the height of the text box. - *
This style is used in scenarios where editing and non-editing states are obvious, - * for example, renaming in the file list view. - *
The showError attribute is not supported for this style. - *
This style does not allow for text dragging and dropping. - *

- * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Inline } @@ -1280,7 +1208,8 @@ declare enum TextInputStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface TextInputInterface { /** @@ -1308,7 +1237,8 @@ interface TextInputInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (value?: TextInputOptions): TextInputAttribute; } @@ -1327,7 +1257,8 @@ interface TextInputInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface PasswordIcon { /** @@ -1340,16 +1271,12 @@ interface PasswordIcon { /** * Define the on icon source of PasswordIcon. * - *

NOTE: - *
Icon that can be used to hide the password in password input mode. - *
The string type can be used to load network images and local images. - *

- * * @type { ?(string | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onIconSrc?: string | Resource; @@ -1363,16 +1290,12 @@ interface PasswordIcon { /** * Define the off icon source of PasswordIcon. * - *

NOTE: - *
Icon that can be used to show the password in password input mode. - *
The string type can be used to load network images and local images. - *

- * * @type { ?(string | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offIconSrc?: string | Resource; } @@ -1380,57 +1303,56 @@ interface PasswordIcon { /** * Defines a TextInput callback when onSubmit. * - * Anonymous Object Rectification. * @typedef { function } OnSubmitCallback * @param { EnterKeyType } enterKey - Input method Enter key type. * @param { SubmitEvent } event - The event submitted. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnSubmitCallback = (enterKey: EnterKeyType, event: SubmitEvent) => void; /** * Defines a TextInput callback when onTextSelectionChange. * - * Anonymous Object Rectification. * @typedef { function } OnTextSelectionChangeCallback * @param { number } selectionStart - The starting position of the selected text, the starting position of the text is 0. * @param { number } selectionEnd - The end location of the selected text. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnTextSelectionChangeCallback = (selectionStart: number, selectionEnd: number) => void; /** * Defines a TextInput callback when onContentScroll. * - * Anonymous Object Rectification. * @typedef { function } OnContentScrollCallback * @param { number } totalOffsetX - The text is offset in px on the horizontal axis of the content area. * @param { number } totalOffsetY - The text is offset in px on the vertical axis of the content area. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnContentScrollCallback = (totalOffsetX: number, totalOffsetY: number) => void; - /** * Defines a TextInput callback when onPaste. * - * Anonymous Object Rectification. * @typedef { function } OnPasteCallback * @param { string } content - The text content of the paste. * @param { PasteEvent } event - User-defined paste event. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnPasteCallback = (content: string, event: PasteEvent) => void; @@ -1456,7 +1378,8 @@ declare type OnPasteCallback = (content: string, event: PasteEvent) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TextInputAttribute extends CommonMethod { /** @@ -1479,12 +1402,13 @@ declare class TextInputAttribute extends CommonMethod { /** * Called when the input type is set. * - * @param { InputType } value - Default value is InputType.Normal. + * @param { InputType } value * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ type(value: InputType): TextInputAttribute; @@ -1495,7 +1419,8 @@ declare class TextInputAttribute extends CommonMethod { * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentType(value: ContentType): TextInputAttribute; @@ -1519,49 +1444,39 @@ declare class TextInputAttribute extends CommonMethod { /** * Called when the color of the placeholder is set. * - * @param { ResourceColor } value - Default value follows the theme.The default value on wearable devices is '#99ffffff'. + * @param { ResourceColor } value * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ placeholderColor(value: ResourceColor): TextInputAttribute; /** * Called when the overflow mode of the font is set. * - *

NOTE: - *
This attribute is only available for the inline input style. - *
Text is clipped at the transition between words. - *
To clip text in the middle of a word, set wordBreak to WordBreak.BREAK_ALL. - *
TextOverflow.None produces the same effect as TextOverflow.Clip. - *
Default value in non-editing state in the inline input style: TextOverflow.Ellipsis. - *
Default value in editing state in the inline input style: TextOverflow.Clip. - *
The TextInput component does not support the TextOverflow.MARQUEE mode. - *
If TextOverflow.MARQUEE is set, the component automatically switches to TextOverflow.Ellipsis - * for the non-editing state in the inline input style and TextOverflow.Clip - * for the non-inline input style and the editing state in the inline input style. - *

- * * @param { TextOverflow } value * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textOverflow(value: TextOverflow): TextInputAttribute; /** * Specify the indentation of the first line in a text-block. * - * @param { Dimension } value - The length of text indent.Default value is 0. + * @param { Dimension } value - The length of text indent. * @returns { TextInputAttribute } The attribute of the text. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textIndent(value: Dimension): TextInputAttribute; @@ -1585,17 +1500,13 @@ declare class TextInputAttribute extends CommonMethod { /** * Called when the font property of the placeholder is set. * - *

NOTE: - *
The 'HarmonyOS Sans' font and registered custom fonts are supported. - *
The default value on wearable devices is 18fp. - *

- * * @param { Font } value * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ placeholderFont(value?: Font): TextInputAttribute; @@ -1619,12 +1530,13 @@ declare class TextInputAttribute extends CommonMethod { /** * Called when the type of soft keyboard input button is set. * - * @param { EnterKeyType } value - Default value is EnterKeyType.Done. + * @param { EnterKeyType } value * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enterKeyType(value: EnterKeyType): TextInputAttribute; @@ -1648,28 +1560,20 @@ declare class TextInputAttribute extends CommonMethod { /** * Called when the color of the insertion cursor is set. * - *

NOTE: - *
Since API version 12, this API can be used to set the text handle color, which is the same as the caret color. - *

- * - * @param { ResourceColor } value - Default value is '#007DFF'. + * @param { ResourceColor } value * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ caretColor(value: ResourceColor): TextInputAttribute; /** * Called when judging whether the text editing change finished. * - *

NOTE: - *
This API is deprecated since API version 8. - *
You are advised to use onEditChange instead. - *

- * - * @param { function } callback - The value true indicates that the text box is in the editing state. + * @param { function } callback * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 @@ -1708,20 +1612,13 @@ declare class TextInputAttribute extends CommonMethod { /** * Called when judging whether the text editing change finished. * - * Anonymous Object Rectification. - * - *

NOTE: - *
The text box is in the editing state when it has the caret placed in it, - * and is in the non-editing state otherwise. - *
It returns true if the input operation is currently in progress. - *

- * * @param { Callback } callback * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onEditChange(callback: Callback): TextInputAttribute; @@ -1761,7 +1658,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onSubmit(callback: OnSubmitCallback): TextInputAttribute; @@ -1795,17 +1693,13 @@ declare class TextInputAttribute extends CommonMethod { /** * Called when the input of the input box changes. * - *

NOTE: - *
In this callback, if cursor operations are performed, you need to adjust the cursor logic - * based on the previewText parameter to ensure it works seamlessly within the preview display scenario. - *

- * * @param { EditableTextOnChangeCallback } callback * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onChange(callback: EditableTextOnChangeCallback): TextInputAttribute; @@ -1837,7 +1731,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onTextSelectionChange(callback: OnTextSelectionChangeCallback): TextInputAttribute; @@ -1869,7 +1764,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onContentScroll(callback: OnContentScrollCallback): TextInputAttribute; @@ -1893,17 +1789,13 @@ declare class TextInputAttribute extends CommonMethod { /** * Called when the input of maximum text length is set. * - *

NOTE: - *
If this attribute is not set or is set to an invalid value, the default value is used. - *
If a decimal number is specified, the integer part is used. - *

- * - * @param { number } value - Default value is Infinity, indicating that there is no upper limit on the number of characters that can be entered. + * @param { number } value * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maxLength(value: number): TextInputAttribute; @@ -1927,12 +1819,13 @@ declare class TextInputAttribute extends CommonMethod { /** * Called when the font color is set. * - * @param { ResourceColor } value - The default value on wearable devices is '#dbffffff'. + * @param { ResourceColor } value * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor(value: ResourceColor): TextInputAttribute; @@ -1956,19 +1849,13 @@ declare class TextInputAttribute extends CommonMethod { /** * Called when the font size is set. * - *

NOTE: - *
If fontSize is of the number type, the unit fp is used. - *
The default font size is 16 fp. - *
The value cannot be a percentage. - *
The default value on wearable devices is 18fp. - *

- * * @param { Length } value * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize(value: Length): TextInputAttribute; @@ -1992,12 +1879,13 @@ declare class TextInputAttribute extends CommonMethod { /** * Called when the font style of a font is set. * - * @param { FontStyle } value - Default value is FontStyle.Normal. + * @param { FontStyle } value * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontStyle(value: FontStyle): TextInputAttribute; @@ -2035,19 +1923,10 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 - */ - /** - * Called when the font weight is set. - * - * @param { number | FontWeight | ResourceStr } value - * @returns { TextInputAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - fontWeight(value: number | FontWeight | ResourceStr): TextInputAttribute; + fontWeight(value: number | FontWeight | string): TextInputAttribute; /** * Called when the font list of text is set. @@ -2069,18 +1948,13 @@ declare class TextInputAttribute extends CommonMethod { /** * Called when the font list of text is set. * - *

NOTE: - *
Default font: 'HarmonyOS Sans' - *
The 'HarmonyOS Sans' font and registered custom fonts are supported for applications. - *
Only the 'HarmonyOS Sans' font is supported for widgets. - *

- * * @param { ResourceStr } value * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontFamily(value: ResourceStr): TextInputAttribute; @@ -2117,23 +1991,14 @@ declare class TextInputAttribute extends CommonMethod { /** * Called when the inputFilter of text is set. * - * Anonymous Object Rectification. - * - *

NOTE: - *
Only inputs that comply with the regular expression can be displayed. - *
Other inputs are filtered out. - *
The specified regular expression can match single characters, but not strings. - *
Since API version 11, if inputFilter is set and the entered characters are not null, - * the filtering effect attached to the text box type (specified through the type attribute) does not take effect. - *

- * * @param { ResourceStr } value * @param { Callback } [error] * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ inputFilter(value: ResourceStr, error?: Callback): TextInputAttribute; @@ -2167,13 +2032,13 @@ declare class TextInputAttribute extends CommonMethod { /** * Called when using the Clipboard menu. * - * Anonymous Object Rectification. - * @param { Callback } callback - Callback used to return the copied text content. + * @param { Callback } callback * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onCopy(callback: Callback): TextInputAttribute; @@ -2207,13 +2072,13 @@ declare class TextInputAttribute extends CommonMethod { /** * Called when using the Clipboard menu. * - * Anonymous Object Rectification. * @param { Callback } callback * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onCut(callback: Callback): TextInputAttribute; @@ -2250,13 +2115,13 @@ declare class TextInputAttribute extends CommonMethod { /** * Called when using the Clipboard menu. * - * Anonymous Object Rectification. * @param { OnPasteCallback } callback - Executed when a paste operation is performed. * @returns { TextInputAttribute } Returns the instance of the TextInputAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onPaste(callback: OnPasteCallback): TextInputAttribute; @@ -2280,18 +2145,13 @@ declare class TextInputAttribute extends CommonMethod { /** * Called when the copy option is set. * - *

NOTE: - *
If this attribute is set to CopyOptions.None, the text can only be pasted; - * all other actions, such as copying, cutting, and sharing, are disabled. - *
Dragging is not allowed when CopyOptions.None is set. - *

- * - * @param { CopyOptions } value - Default value is CopyOptions.LocalDevice. + * @param { CopyOptions } value * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ copyOption(value: CopyOptions): TextInputAttribute; @@ -2315,21 +2175,13 @@ declare class TextInputAttribute extends CommonMethod { /** * Called when the password show/hide icon is set. * - *

NOTE: - *
This API has effect only when the input type is set to Password, - * NEWPASSWORD, or NUMBERPASSWORD mode. It does not work in other modes. - *
When in password mode, there may be inconsistency between the backend state of the text box - * and the frontend application's state management variables. - *
This can cause issues with the icon at the end of the password text box. - *
To avoid such issues, use the onSecurityStateChange callback to sync the states. - *

- * - * @param { boolean } value - Default value is false. + * @param { boolean } value * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ showPasswordIcon(value: boolean): TextInputAttribute; @@ -2353,21 +2205,13 @@ declare class TextInputAttribute extends CommonMethod { /** * Called when the text align is set. * - *

NOTE: - *
Available options are TextAlign.Start, TextAlign.Center, and TextAlign.End. - *
To set vertical alignment for the text, use the align attribute. - *
The align attribute alone does not control the horizontal position of the text. - *
In other words, Alignment.TopStart, Alignment.Top, and Alignment.TopEnd produce the same effect, top-aligning the text; - * Alignment.Start, Alignment.Center, and Alignment.End produce the same effect, centered-aligning the text vertically; - * Alignment.BottomStart, Alignment.Bottom, and Alignment.BottomEnd produce the same effect, bottom-aligning the text. - *

- * - * @param { TextAlign } value - Default value is TextAlign.Start. + * @param { TextAlign } value * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ textAlign(value: TextAlign): TextInputAttribute; @@ -2391,16 +2235,13 @@ declare class TextInputAttribute extends CommonMethod { /** * Text input style * - *

NOTE: - *
The inline input style only supports InputType.Normal. - *

- * - * @param { TextInputStyle | TextContentStyle } value - Text input style.Default value is TextInputStyle.Default. + * @param { TextInputStyle | TextContentStyle } value - Text input style * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ style(value: TextInputStyle | TextContentStyle): TextInputAttribute; @@ -2421,7 +2262,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ caretStyle(value: CaretStyle): TextInputAttribute; @@ -2437,16 +2279,13 @@ declare class TextInputAttribute extends CommonMethod { /** * Define the text selected background color of the text input. * - *

NOTE: - *
If the opacity is not set, a 20% opacity will be used. - *

- * * @param { ResourceColor } value * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedBackgroundColor(value: ResourceColor): TextInputAttribute; @@ -2467,7 +2306,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ caretPosition(value: number): TextInputAttribute; @@ -2482,18 +2322,14 @@ declare class TextInputAttribute extends CommonMethod { */ /** * Sets whether request keyboard or not when on focus. - * Sets whether to enable the input method when the TextInput component obtains focus in a way other than clicking. - * - *

NOTE: - *
Since API version 10, the TextInput component brings up the keyboard by default when it obtains focus. - *

* - * @param { boolean } value - Default value is true. + * @param { boolean } value * @returns { TextInputAttribute } Returns the instance of the TextInputAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enableKeyboardOnFocus(value: boolean): TextInputAttribute; @@ -2508,18 +2344,13 @@ declare class TextInputAttribute extends CommonMethod { /** * Define the password icon of the text input. * - *

NOTE: - *
Images in JPG, PNG, BMP, HEIC, and WEBP formats are supported. - *
By default, the system-provided icon is used. - *
The icon size is fixed at 24 vp (or 28 vp on wearable devices), regardless of the source image size. - *

- * * @param { PasswordIcon } value * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ passwordIcon(value: PasswordIcon): TextInputAttribute; @@ -2544,20 +2375,13 @@ declare class TextInputAttribute extends CommonMethod { /** * Define the show error of the text input. * - *

NOTE: - *
On wearable devices, the error message is displayed at a font size of 13 fp and center-aligned. - *
If the data type is ResourceStr and the input content does not comply with specifications, the error message is displayed. - *
If the error message does not fit in one line, an ellipsis (…) is displayed to represent clipped text. - *
If the data type is undefined, no error message is displayed. - *
By default, no error message is displayed. - *

- * * @param { ResourceStr | undefined } [value] * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ showError(value?: ResourceStr | undefined): TextInputAttribute; @@ -2572,16 +2396,13 @@ declare class TextInputAttribute extends CommonMethod { /** * Define the show unit of the text input. * - *

NOTE: - *
This attribute effective only when showUnderline is set to true. - *

- * * @param { CustomBuilder } value * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ showUnit(value: CustomBuilder): TextInputAttribute; @@ -2596,36 +2417,26 @@ declare class TextInputAttribute extends CommonMethod { /** * Define the show underline of the text input. * - *

NOTE: - *
By default, the underline comes in the color of '#33182431', thickness of 1 px, and text box size of 48 vp. - *
The underline is only available for the InputType.Normal type. - *

- * - * @param { boolean } value - Default value is false. + * @param { boolean } value * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ showUnderline(value: boolean): TextInputAttribute; /** * Define the underline color of the text input. * - *

NOTE: - *
The underline color changes with the underline mode. - *
If the underline color is only set for the normal state, you can directly enter a value of the ResourceColor type. - *
If the value specified is undefined, null, or invalid, all underlines are restored to the default value. - *
Default value: underline color configured for the theme, which is #33182431 by default. - *

- * * @param { ResourceColor | UnderlineColor | undefined } value * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ underlineColor(value: ResourceColor | UnderlineColor | undefined): TextInputAttribute; @@ -2641,23 +2452,13 @@ declare class TextInputAttribute extends CommonMethod { /** * Controls whether the selection menu pops up. * - *

NOTE: - *
true: - *
The system text selection menu does not appear under the following circumstances: - * clicking the text box cursor, long-pressing the text box, double-tapping the text box, - * triple-tapping the text box, or right-clicking the text box. - *
false: - *
The system text selection menu appears under the following circumstances: - * clicking the text box cursor, long-pressing the text box, double-tapping the text box, - * triple-tapping the text box, or right-clicking the text box. - *

- * - * @param { boolean } value - Default value is false. + * @param { boolean } value * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectionMenuHidden(value: boolean): TextInputAttribute; @@ -2672,11 +2473,12 @@ declare class TextInputAttribute extends CommonMethod { /** * Define bar state of the text input. * - * @param { BarState } value - Default value is BarState.Auto. + * @param { BarState } value * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ barState(value: BarState): TextInputAttribute; @@ -2690,51 +2492,40 @@ declare class TextInputAttribute extends CommonMethod { */ /** * Define max lines of the text input. - * Value range: (0, +∞) * - * @param { number } value - Default value is 3. + * @param { number } value * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maxLines(value: number): TextInputAttribute; /** * Set the text inline style word break type. * - *

NOTE: - *
This attribute is effective for the inline input style, - * but does not apply to the placeholder text. - *
The component does not support the clip attribute. - *
Therefore, setting this attribute does not affect text clipping. - *

- * - * @param { WordBreak } value - The word break type.Default value is WordBreak.BREAK_WORD. + * @param { WordBreak } value - The word break type. * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ wordBreak(value: WordBreak): TextInputAttribute; /** * Set the text line break strategy type. * - *

NOTE: - *
This attribute takes effect when wordBreak is not set to breakAll. - *
Hyphens are not supported. - *
This attribute does not take effect for the non-inline input style. - *

- * - * @param { LineBreakStrategy } strategy - The text line break strategy type.Default value is LineBreakStrategy.GREEDY. + * @param { LineBreakStrategy } strategy - The text line break strategy type. * @returns { TextInputAttribute } The attribute of the TextInputAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lineBreakStrategy(strategy: LineBreakStrategy): TextInputAttribute; @@ -2760,55 +2551,28 @@ declare class TextInputAttribute extends CommonMethod { /** * Define custom keyboard of the text input. * - *

NOTE: - *
When a custom keyboard is set, activating the text box opens the specified custom component, - * instead of the system input method. - *
The custom keyboard's height can be set through the height attribute of the custom component's root node, - * and its width is fixed at the default value. - *
The custom keyboard is presented by overlaying the original screen, - * which is not compressed or lifted if avoid mode is not enabled or avoidance is not needed for the text box. - *
The custom keyboard cannot obtain the focus, but it blocks gesture events. - *
By default, the custom keyboard is closed when the input component loses the focus. - *
You can also use the TextInputController.stopEditing API to close the keyboard. - *
When a custom keyboard is set, the text box does not support camera input, even when the device supports. - *
When setting a custom keyboard, you can bind the onKeyPrelme event to prevent input from the physical keyboard. - *

- * * @param { CustomBuilder } value - Set up a custom keyboard of TextInput * @param { KeyboardOptions } [options] - Indicates the custom keyboard options of TextInput * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ customKeyboard(value: CustomBuilder, options?: KeyboardOptions): TextInputAttribute; /** * Show the counter when the number of characters entered exceeds the threshold through InputCounterOptions. * - *

NOTE: - *
options can be set only when value is set to true, in which case a character counter is displayed below the text box. - *
This attribute must be used together with maxLength. - *
The character counter is displayed in this format: Number of characters entered/Character limit. - *
It is visible when the number of characters entered is greater than the character limit multiplied by the threshold percentage value. - *
If options is not set, the text box border and character counter subscript turn red - * when the number of characters entered exceeds the limit. - *
If value is set to true and options is set, the text box border and character counter subscript turn red - * and the text box shakes when the number of characters entered reaches the limit, - * provided that the value of thresholdPercentage is valid. - *
If highlightBorder is set to false, the text box border does not turn red. - *
By default, highlightBorder is set to true. - *
The character counter is not displayed for text boxes in inline or password input style. - *

- * * @param { boolean } value - Set showcounter of the text input. * @param { InputCounterOptions } options - Set the percentage of counter. * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ showCounter(value: boolean, options?: InputCounterOptions): TextInputAttribute; @@ -2853,11 +2617,7 @@ declare class TextInputAttribute extends CommonMethod { /** * Set the cancel button style * - *

NOTE: - *
This attribute is not available for the inline input style. - *

- * - * @param { CancelButtonSymbolOptions } symbolOptions - indicates the style of the cancel button.Default value is { style: CancelButtonStyle.INPUT }. + * @param { CancelButtonSymbolOptions } symbolOptions - indicates the style of the cancel button. * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice @@ -2865,6 +2625,19 @@ declare class TextInputAttribute extends CommonMethod { */ cancelButton(symbolOptions: CancelButtonSymbolOptions): TextInputAttribute; + /** + * Set the cancel button style + * + * @param { CancelButtonOptions | CancelButtonSymbolOptions } symbolOptions - indicates the style of the cancel button. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + cancelButton(symbolOptions: CancelButtonOptions | CancelButtonSymbolOptions): TextInputAttribute; + /** * Sets selection when on focus. * @@ -2877,56 +2650,39 @@ declare class TextInputAttribute extends CommonMethod { /** * Sets selection when on focus. * - *

NOTE: - *
This attribute is not available for the inline input style. - *

- * - * @param { boolean } value - Sets selection or not.Default value is false. + * @param { boolean } value - Sets selection or not. * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ selectAll(value: boolean): TextInputAttribute; /** * Called when the minimum font size of the font is set. * - *

NOTE: - *
For the string type, numeric string values with optional units, - * for example, "10" or "10fp", are supported. - *
For the setting to take effect, this attribute must be used together with maxFontSize - * and maxLines (when the component is in editing state in the inline input style), or layout constraint settings. - *
When the adaptive font size is used, the fontSize settings do not take effect. - *

- * - * @param { number | string | Resource } value - The unit is fp. + * @param { number | string | Resource } value * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ minFontSize(value: number | string | Resource): TextInputAttribute; /** * Called when the maximum font size of the font is set. * - *

NOTE: - *
For the string type, numeric string values with optional units, - * for example, "10" or "10fp", are supported. - *
For the setting to take effect, this attribute must be used together with minFontSize - * and maxLines (when the component is in editing state in the inline input style), or layout constraint settings. - *
When the adaptive font size is used, the fontSize settings do not take effect. - *

- * - * @param { number | string | Resource } value - The unit is fp. + * @param { number | string | Resource } value * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ maxFontSize(value: number | string | Resource): TextInputAttribute; @@ -2975,30 +2731,13 @@ declare class TextInputAttribute extends CommonMethod { /** * Called when the height adaptive policy is set. * - *

NOTE: - *

    - *
  • When this attribute is set to TextHeightAdaptivePolicy.MAX_LINES_FIRST, - * the maxLines attribute takes precedence for adjusting the text height. - *
    If the maxLines setting results in a layout beyond the layout constraints, - * the text will shrink to a font size between minFontSize and maxFontSize to allow for more content to be shown.
  • - *
  • If this attribute is set to TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST, - * the minFontSize attribute takes precedence for adjusting the text height. - *
    If the text can fit in one line with the minFontSize setting, - * the text will enlarge to the largest possible font size between minFontSize and maxFontSize.
  • - *
  • TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST produces the same effect as TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST.
  • - *
- *
When the component is in the non-inline input style, the three values of TextHeightAdaptivePolicy have the same effect, - * that is, the text will shrink to a font size between minFontSize and maxFontSize to allow for more content to be shown. - *
If the text box is in inline input style, - * the font size in the editing state is different from that in the non-editing state. - *

- * - * @param { TextHeightAdaptivePolicy } value - The height adaptive policy.Default value is TextHeightAdaptivePolicy.MAX_LINES_FIRST. + * @param { TextHeightAdaptivePolicy } value - The height adaptive policy. * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ heightAdaptivePolicy(value: TextHeightAdaptivePolicy): TextInputAttribute; @@ -3013,66 +2752,51 @@ declare class TextInputAttribute extends CommonMethod { /** * Sets whether enable auto fill or not. * - * @param { boolean } value - Indicates the flag whether autofill is enabled.Default value is rue.True: enable, false: disable. + * @param { boolean } value - Indicates the flag whether autofill is enabled. * @returns { TextInputAttribute } Returns the instance of the TextInputAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableAutoFill(value: boolean): TextInputAttribute; /** * Called when the text decoration of the text is set. * - *

NOTE: - *
This attribute does not take effect for the password input mode. - *

- * - * @param { TextDecorationOptions } value - Default value is { type: TextDecorationType.None, color: Color.Black, style: TextDecorationStyle.SOLID }. + * @param { TextDecorationOptions } value * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ decoration(value: TextDecorationOptions): TextInputAttribute; /** * Called when the distance between text fonts is set. * - *

NOTE: - *
If the value specified is a percentage or 0, the default value is used. - *
For the string type, numeric string values with optional units, - * for example, "10" or "10fp", are supported. - *
If the value specified is a negative value, the text is compressed. - *
A negative value too small may result in the text being compressed to 0 - * and no content being displayed. - *

- * - * @param { number | string | Resource } value - The unit is fp. + * @param { number | string | Resource } value * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ letterSpacing(value: number | string | Resource): TextInputAttribute; /** * Called when the line height of the font is set. * - *

NOTE: - *
If the value is less than or equal to 0, the line height is not limited and the font size is adaptive. - *
If the value is of the number type, the unit fp is used. - *
For the string type, numeric string values with optional units, for example, "10" or "10fp", are supported. - *

- * * @param { number | string | Resource } value * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lineHeight(value: number | string | Resource): TextInputAttribute; @@ -3087,26 +2811,18 @@ declare class TextInputAttribute extends CommonMethod { /** * Define the password rules of the text input. * - *

NOTE: - *
When autofill is used, these rules are transparently transmitted to Password Vault for generating a new password. - *

- * * @param { string } value - Indicates the password rules. * @returns { TextInputAttribute } Returns the instance of the TextInputAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ passwordRules(value: string): TextInputAttribute; /** * Set font feature. * - *

NOTE: - *
This attribute is not available when type is set to an enum value that indicates the password input mode, - * such as Password, NEW_PASSWORD, or NUMBER_PASSWORD. - *

- * * @param { string } value - The fontFeature. * normal | , * where = [ | on | off ], like: "ss01" 0 @@ -3116,28 +2832,21 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontFeature(value: string): TextInputAttribute; /** * Define the password visible mode of the text input. * - *

NOTE: - *
This API has effect only when the input type is set to Password, NEWPASSWORD, or NUMBERPASSWORD mode. - *
It does not work in other modes. - *
When in password mode, there may be inconsistency between the backend state of the text box - * and the frontend application's state management variables. - *
This can cause issues with the icon at the end of the password text box. - *
To avoid such issues, use the onSecurityStateChange callback to sync the states. - *

- * - * @param { boolean } visible - Indicates the password visible mode. Default value is false. + * @param { boolean } visible - Indicates the password visible mode. * @returns { TextInputAttribute } Returns the instance of the TextInputAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ showPassword(visible: boolean): TextInputAttribute; @@ -3149,78 +2858,64 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onSecurityStateChange(callback: Callback): TextInputAttribute; /** * Get text value information when about to input. * - *

NOTE: - *
It returns true if the text is inserted; returns false otherwise. - *
This callback is not triggered for pre-edit or candidate word operations. - *
It is available only for system input methods. - *

- * * @param { Callback } callback - The triggered function when text content is about to insert. * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillInsert(callback: Callback): TextInputAttribute; /** * Get text value information when completed input. * - *

NOTE: - *
It is available only for system input methods. - *

- * * @param { Callback } callback - The triggered function when text content has been inserted. * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onDidInsert(callback: Callback): TextInputAttribute; /** * Get text value information when about to delete. * - *

NOTE: - *
It returns true if the text is deleted; returns false otherwise. - *
This callback is not called for text preview. - *
It is available only for system input methods. - *

- * * @param { Callback } callback - The triggered function when text content is about to delete. * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDelete(callback: Callback): TextInputAttribute; /** * Get text value information when the deletion has been completed * - *

NOTE: - *
It is available only for system input methods. - *

- * * @param { Callback } callback - The triggered function when text content has been deleted. * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onDidDelete(callback: Callback): TextInputAttribute; + /** * Called before the text input component attach the InputMethod. * @@ -3250,17 +2945,13 @@ declare class TextInputAttribute extends CommonMethod { /** * Define the preview text mode of the text input. * - *

NOTE: - *
Preview text is in a temporary state and does not support text interception. - *
As such, it does not trigger onWillInsert, onDidInsert, onWillDelete, or onDidDelete callbacks. - *

- * - * @param { boolean } enable - Indicates the preview text mode.Default value is true. + * @param { boolean } enable - Indicates the preview text mode. * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enablePreviewText(enable: boolean): TextInputAttribute; @@ -3272,7 +2963,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ enableHapticFeedback(isEnabled: boolean): TextInputAttribute; @@ -3284,7 +2976,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ autoCapitalizationMode(mode: AutoCapitalizationMode): TextInputAttribute; @@ -3296,19 +2989,21 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ halfLeading(halfLeading: Optional): TextInputAttribute; /** * Set the ellipsis mode. * - * @param { Optional } mode - The ellipsis mode. + * @param { EllipsisMode } mode - The ellipsis mode. * @returns { TextInputAttribute } The attribute of TextInput. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ellipsisMode(mode: Optional): TextInputAttribute; @@ -3319,7 +3014,8 @@ declare class TextInputAttribute extends CommonMethod { * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ stopBackPress(isStopped: Optional): TextInputAttribute; @@ -3331,7 +3027,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ onWillChange(callback: Callback): TextInputAttribute; @@ -3342,7 +3039,8 @@ declare class TextInputAttribute extends CommonMethod { * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ keyboardAppearance(appearance: Optional): TextInputAttribute; diff --git a/api/@internal/component/ets/text_picker.d.ts b/api/@internal/component/ets/text_picker.d.ts index 7ff3c71a6d42a4caba14433d049db9433b218d9e..d9f5311d5f4ffc16ad58d8a6033e2740875b0c7c 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 } from './common'; +import { DialogAlignment } from './alertDialog'; +import { CrownSensitivity, TextOverflow } from './enums'; +import { LengthMetrics } from './../Graphics'; +/*** endif */ + /** * Define the contents of each selector item. * @@ -33,56 +41,47 @@ * @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. - * + * Specifies the icon content. + * * @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. - * + * Specifies the icon content. + * * @type { string | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ icon: string | Resource; /** - * Text information. + * Specifies the text content. * - *

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. - *

+ * Specifies the text content. * * @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; } @@ -101,50 +100,45 @@ declare interface TextPickerRangeContent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextCascadePickerRangeContent { /** - * Text information. + * Specifies the text content. * - *

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. - *

+ * Specifies the text content. * * @type { string | Resource } * @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; /** - * Linkage data. + * Defines the text cascade picker children. * * @type { ?TextCascadePickerRangeContent[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** - * Linkage data. + * Defines the text cascade picker children. * * @type { ?TextCascadePickerRangeContent[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ children?: TextCascadePickerRangeContent[]; } @@ -171,18 +165,19 @@ declare interface 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. + * Specifies the range of the text selector. * * @type {string[] | Resource} * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Data selection range of the picker. + * Specifies the range of the selector. * Support the display of pictures, text and pictures plus text, or multi column plain text. * * @type {string[] | string[][] | Resource | TextPickerRangeContent[] | TextCascadePickerRangeContent[]} @@ -191,39 +186,28 @@ declare interface TextPickerOptions { * @since 10 */ /** - * Data selection range of the picker. + * Specifies the range of the selector. * 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 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ 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. - *

+ * Value of the current selection. * * @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. - *

+ * Value of the current selection. + * Only valid when only text is displayed. * * @type { ?(string | string[]) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -231,17 +215,10 @@ declare interface TextPickerOptions { * @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. - *

+ * Value of the current selection. + * Only valid when only text is displayed. * * @type { ?(string | string[]) } - * @default value of the first item * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -256,57 +233,46 @@ declare interface TextPickerOptions { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ value?: ResourceStr | ResourceStr[]; /** - * Index of the default selected item in the array. - * The index is zero-based. + * Current selected subscript. * * @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[]. + * Current selected subscript. * * @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[]. - * + * Current selected subscript. + * * @type { ?(number | number[]) } - * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selected?: number | number[]; /** - * Width of each column in the picker. - * - *

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

+ * Defines the column width of the text picker. * * @type { ?LengthMetrics[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ columnWidths?: LengthMetrics[]; } @@ -333,7 +299,8 @@ declare interface TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface TextPickerInterface { /** @@ -361,7 +328,8 @@ interface TextPickerInterface { * @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; } @@ -373,123 +341,104 @@ interface TextPickerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @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. + * The strokeWidth of Divider. * - *

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 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ strokeWidth?: Dimension; /** - * Color of the divider. + * The color of Divider. * * @type { ?ResourceColor } - * @default "#33000000" * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ 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. - *

+ * The startMargin of Divider. * * @type { ?Dimension } - * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ 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. - *

+ * The endMargin of Divider. * * @type { ?Dimension } - * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ endMargin?: Dimension; } /** - * Defines the text style options. + * Provide an interface for the text style of the text picker. * * @extends PickerTextStyle * @interface TextPickerTextStyle * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @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. - * + * Defines the minimum font size of the text. + * * @type { ?(number | string | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ minFontSize?: number | string | Resource; /** - * Maximum font size. + * Defines the maximum font size of the text. * * @type { ?(number | string | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ maxFontSize?: number | string | Resource; /** - * Display mode when the text is too long. - * - *

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

+ * Defines the overflow mode of the text. * * @type { ?TextOverflow } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ overflow?: TextOverflow; } @@ -536,7 +485,8 @@ declare interface PickerBackgroundStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare type TextPickerScrollStopCallback = (value: string | string[], index: number | number[]) => void; @@ -549,7 +499,8 @@ declare type TextPickerScrollStopCallback = (value: string | string[], index: nu * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnTextPickerChangeCallback = (selectItem: string | string[], index: number | number[]) => void; @@ -562,7 +513,8 @@ declare type OnTextPickerChangeCallback = (selectItem: string | string[], index: * @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; @@ -588,11 +540,12 @@ declare type TextPickerEnterSelectedAreaCallback = (value: string | string[], in * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TextPickerAttribute extends CommonMethod { /** - * Sets the height of each item in the picker. + * Called when the default height of the selected element is set. * * @param { number | string } value * @returns { TextPickerAttribute } @@ -600,7 +553,7 @@ declare class TextPickerAttribute extends CommonMethod { * @since 8 */ /** - * Sets the height of each item in the picker. + * Called when the default height of the selected element is set. * * @param { number | string } value * @returns { TextPickerAttribute } @@ -609,202 +562,198 @@ declare class TextPickerAttribute extends CommonMethod { * @since 10 */ /** - * Sets the height of each item in the picker. + * Called when the default height of the selected element is set. * - * @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. + * @param { number | string } value * @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 */ defaultPickerItemHeight(value: number | string): TextPickerAttribute; /** - * Sets the height of each item in the picker. + * Called when the default height of the selected element is set. * - * @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). + * @param { Optional } height * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ defaultPickerItemHeight(height: Optional): TextPickerAttribute; /** - * Sets whether scrolling is loopable. + * Can scroll loop if true is set, on the contrary it can not. * - * @param { boolean } value - Whether scrolling is loopable. true: loopable; false: not loopable. - * @default true + * @param { boolean } value * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** - * Sets whether scrolling is loopable. + * Can scroll loop if true is set, on the contrary it can not. * - * @param { boolean } value - Whether scrolling is loopable. true: loopable; false: not loopable. - * @default true + * @param { boolean } value * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ 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. - * @default true + * @param { Optional } isLoop * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @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. + * Sets the text style of disappearing items * - * @param { PickerTextStyle } value - Font color, font size, and font weight of the top and bottom items. + * @param { PickerTextStyle } value - indicates the text style of disappearing 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. + * Sets the text style of disappearing items * - * @param { PickerTextStyle } value - Font color, font size, and font weight of the top and bottom items. + * @param { PickerTextStyle } value - indicates the text style of disappearing 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 */ 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. + * Sets the text style of disappearing items * - * @param { Optional } style - Font color, font size, and font weight of the top and bottom items. + * @param { Optional } style - indicates the text style of disappearing items. * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @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. + * Sets the text style of normal items * - * @param { PickerTextStyle } value - Font color, font size, and font weight of 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 * @since 10 */ /** - * Sets the font color, font size, and font weight for all items except the top, bottom, and selected items. + * Sets the text style of normal 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 */ 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. + * Sets the text style of normal items * - * @param { Optional } style - Font color, font size, and font weight of all - *
items except the top, bottom, and selected items. + * @param { Optional } style - indicates the text style of normal items. * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @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. + * Sets the text style of selected items * - * @param { PickerTextStyle } value - Font color, font size, and font weight of the selected item.. + * @param { PickerTextStyle } value - indicates the text style of selected items. * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Sets the font color, font size, and font weight for the selected item. + * Sets the text style of selected items * - * @param { PickerTextStyle } value - Font color, font size, and font weight of the selected item. + * @param { PickerTextStyle } value - indicates the text style of selected 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 */ 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. + * Sets the text style of selected items * - * @param { Optional } style - Font color, font size, and font weight of the selected item. + * @param { Optional } style - indicates the text style of selected items. * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @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. + * Defines whether to disable the text style animation. * * @param { boolean } disabled - * @default false * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @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. + * Defines to set the default text style for options. * * @param { TextPickerTextStyle } style * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @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. + * Called when the pop-up value is returned. * * @param { function } callback * @returns { TextPickerAttribute } @@ -815,7 +764,7 @@ declare class TextPickerAttribute extends CommonMethod { onAccept(callback: (value: string, index: number) => void): TextPickerAttribute; /** - * Triggered when the Cancel button in the dialog box is clicked. + * Called when the Cancel button in the pop-up window is clicked. * * @param { function } callback * @returns { TextPickerAttribute } @@ -826,7 +775,7 @@ declare class TextPickerAttribute extends CommonMethod { onCancel(callback: () => void): TextPickerAttribute; /** - * Triggered when an item in the picker is selected. + * Called when the OK button in the pop-up window is clicked. * * @param { function } callback - the callback of onChange. * @returns { TextPickerAttribute } @@ -834,10 +783,8 @@ declare class TextPickerAttribute extends CommonMethod { * @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. + * This event is triggered when a TextPicker item is selected. + * Only valid when only text is displayed. When picture or picture plus text is displayed, the value is "". * * @param { function } callback - the callback of onChange. * @returns { TextPickerAttribute } @@ -846,10 +793,8 @@ declare class TextPickerAttribute extends CommonMethod { * @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. + * This event is triggered when a TextPicker item is selected. + * Only valid when only text is displayed. When picture or picture plus text is displayed, the value is "". * * @param { function } callback - the callback of onChange. * @returns { TextPickerAttribute } @@ -861,194 +806,173 @@ declare class TextPickerAttribute extends CommonMethod { 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. + * This event is triggered when a TextPicker item is selected. + * Only valid when only text is displayed. When picture or picture plus text is displayed, the value is "". * * @param { Optional } callback - the callback of onChange. * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @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. + * This event is triggered when a TextPicker item is selected and scrolling has stopped. + * Only valid when only text is displayed. When picture or picture plus text is displayed, the value is "". * - * @param { TextPickerScrollStopCallback } callback - Triggered when the scrolling - *
in the text picker stops. + * @param { TextPickerScrollStopCallback } callback - the callback of onScrollStop. * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @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. + * This event is triggered when a TextPicker item is selected and scrolling has stopped. + * Only valid when only text is displayed. When picture or picture plus text is displayed, the value is "". * - * @param { Optional } callback - Triggered when the scrolling - *
in the text picker stops. + * @param { Optional } callback - the callback of onScrollStop. * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @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. + * This event is triggered when an item enters the selected area. + * Only valid when only text is displayed. When picture or picture plus text is displayed, the value is "". * - * @param { TextPickerEnterSelectedAreaCallback } callback - Triggered during the scrolling of - *
the text picker when an item enters the divider area. + * @param { TextPickerEnterSelectedAreaCallback } callback - the callback of onEnterSelectedArea. * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @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. + * Set the selected indices. + * The array size is the total number of columns. * - * @param { number | number[] } value - Index of the default selected item in the array. - * @default 0 + * @param { number | number[] } value - the selected indices. * @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. + * Set the selected indices. + * The array size is the total number of columns. * - * @param { number | number[] } value - Index of the default selected item in the array. - * @default 0 + * @param { number | number[] } value - the selected indices. * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @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. + * Set the selected indices. + * The array size is the total number of columns. * - * @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 + * @param { Optional } index - the selected indices. * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ selectedIndex(index: Optional): TextPickerAttribute; /** - * Sets the divider style. + * Set the divider of TextPicker * * @param { DividerOptions | null } value * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ divider(value: DividerOptions | null): TextPickerAttribute; /** - * Sets the divider style. + * Set the divider of TextPicker * * @param { Optional } textDivider * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @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. - *

+ * Called when set the height of gradient * - * @param { Dimension } value - Height of the fade effect at the top and bottom edges of the content area. - * @default 36vp + * @param { Dimension } value - The value the gradient height * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ gradientHeight(value: Dimension): TextPickerAttribute; /** - * Specifies whether to enable haptic feedback. + * Enable or disable haptic feedback. * - * @param { Optional } enable - Whether to enable haptic feedback. - * @default true + * @param { Optional } enable - Default value is true, set false to disable haptic feedback. * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @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. + * Called when set the height of gradient * - *

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 + * @param { Optional } height - The value the gradient height * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @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. + * If the attribute is set, the crown rotation sensitivity can be changed. * - * @param { Optional } sensitivity - Sensitivity to the digital crown rotation. - * @default CrownSensitivity.MEDIUM + * @param { Optional } sensitivity * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ digitalCrownSensitivity(sensitivity: Optional): TextPickerAttribute; @@ -1087,7 +1011,8 @@ declare class TextPickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextPickerResult { /** @@ -1114,7 +1039,8 @@ declare interface TextPickerResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ value: string | string[]; @@ -1140,7 +1066,8 @@ declare interface TextPickerResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ index: number | number[]; } @@ -1170,7 +1097,8 @@ declare interface TextPickerResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextPickerDialogOptions extends TextPickerOptions { /** @@ -1189,14 +1117,14 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @since 10 */ /** - * Height of the picker item. + * Called when the default height of the selected element is set. * * @type { ?(number | string) } - * @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 */ defaultPickerItemHeight?: number | string; @@ -1209,15 +1137,15 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @since 10 */ /** - * Whether to support scroll looping. - * The value true means to support scroll looping, and false means the opposite. + * 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 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ canLoop?: boolean; @@ -1230,13 +1158,14 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @since 10 */ /** - * Font color, font size, and font weight of the top and bottom items. + * Text style of disappearing items * * @type { ?PickerTextStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ disappearTextStyle?: PickerTextStyle; @@ -1249,47 +1178,38 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @since 10 */ /** - * Font color, font size, and font weight of all items except the top, bottom, and selected items. + * Text style of normal items * * @type { ?PickerTextStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @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 12 + * @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 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ cancelButtonStyle?: PickerDialogButtonStyle; @@ -1302,42 +1222,38 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @since 10 */ /** - * Font color, font size, and font weight of the selected item. + * Text style of selected items * * @type { ?PickerTextStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @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. + * Defines whether to disable the text style animation. * * @type { ?boolean } - * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @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. - *

+ * Defines to set the default text style for options. * * @type { ?TextPickerTextStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ defaultTextStyle?: TextPickerTextStyle; @@ -1357,13 +1273,14 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @since 10 */ /** - * Callback invoked when the OK button in the dialog box is clicked. + * Called when the OK button in the dialog is clicked. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onAccept?: (value: TextPickerResult) => void; @@ -1383,13 +1300,14 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @since 10 */ /** - * Callback invoked when the Cancel button in the dialog box is clicked. + * Called when the Cancel button in the dialog is clicked. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onCancel?: () => void; @@ -1409,47 +1327,38 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @since 10 */ /** - * Callback invoked when the text picker in the dialog box snaps to the selected item. + * This event is triggered when a TextPicker text is selected in dialog. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @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. + * 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 14 + * @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. - *

+ * This event is triggered when an item enters the selected area in dialog. * * @type { ?Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onEnterSelectedArea?: Callback; @@ -1462,15 +1371,14 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @since 10 */ /** - * Mask area of the dialog box. - * Events outside the mask area are transparently transmitted, and events within the mask area are not. + * Mask Region of dialog. The size cannot exceed the main window. * * @type { ?Rectangle } - * @default { x: 0, y: 0, width: '100%', height: '100%' } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maskRect?: Rectangle; @@ -1483,14 +1391,14 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @since 10 */ /** - * Alignment mode of the dialog box in the vertical direction. + * Defines the dialog alignment of the screen. * * @type { ?DialogAlignment } - * @default DialogAlignment.Default * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ alignment?: DialogAlignment; @@ -1503,14 +1411,14 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @since 10 */ /** - * Offset of the dialog box based on the alignment settings. + * Defines the dialog offset. * * @type { ?Offset } - * @default { dx: 0 , dy: 0 } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: Offset; @@ -1524,14 +1432,15 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @since 11 */ /** - * Backplane color of the dialog box. + * Defines the textPickerDialog's background color * * @type { ?ResourceColor } * @default Color.Transparent * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor?: ResourceColor; @@ -1545,179 +1454,139 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @since 11 */ /** - * Background blur style of the dialog box. + * Defines the textPickerDialog's background blur Style * * @type { ?BlurStyle } * @default BlurStyle.COMPONENT_ULTRA_THICK * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyle?: BlurStyle; /** - * Options for customizing the background blur style. + * Defines the textPickerDialog's background blur style with options * * @type { ?BackgroundBlurStyleOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; /** - * Options for customizing the background effect. + * Defines the textPickerDialog's background effect with options * * @type { ?BackgroundEffectOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @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. - *

+ * Callback function when the dialog appears. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @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. - *

+ * Callback function when the dialog disappears. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @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. + * Callback function before the dialog openAnimation starts. * - *

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 + * @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. + * Callback function before the dialog closeAnimation starts. * - *

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 + * @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. + * Defines the dialog's shadow. * * @type { ?(ShadowOptions | ShadowStyle) } * @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; /** - * Whether to enable the hover mode. + * Defines whether to respond to the hover mode. * * @type { ?boolean } - * @default false - meaning not to enable the hover mode. + * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enableHoverMode?: boolean; /** - * Display area of the dialog box in hover mode. + * Defines the dialog's display area in hover mode. * * @type { ?HoverModeAreaType } * @default HoverModeAreaType.BOTTOM_SCREEN * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @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"}]. - *

+ * Enable or disable haptic feedback. * * @type { ?boolean } * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @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; } /** @@ -1734,12 +1603,13 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @since 10 */ /** - * A text picker dialog box is a dialog box that allows users to select text from the given range. + * Defines TextPickerDialog which uses show method to show TextPicker dialog. * * @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 { /** @@ -1758,9 +1628,9 @@ declare class TextPickerDialog { * @since 10 */ /** - * Shows a text picker in the given settings. + * Invoking method display. * - * @param { TextPickerDialogOptions } options - Parameters of the text picker dialog box. + * @param { TextPickerDialogOptions } options * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -1785,7 +1655,7 @@ declare class TextPickerDialog { * @since 10 */ /** - * Creates a text picker based on the selection range specified by range. + * Defines TextPicker Component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform diff --git a/api/@internal/component/ets/text_timer.d.ts b/api/@internal/component/ets/text_timer.d.ts index 561aae84168e89608a2054a3e48df4ca3a357538..39893b633bb28df9c52759a0018cff5b1e605622 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,7 +44,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TextTimerController { /** @@ -57,13 +64,13 @@ declare class TextTimerController { */ /** * constructor. - * A constructor used to create a TextTimerController object. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -82,7 +89,7 @@ declare class TextTimerController { * @since 10 */ /** - * Starts the timer. + * Provides a start event for timer. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -92,6 +99,18 @@ declare class TextTimerController { */ start(); + /** + * 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. * @@ -107,7 +126,7 @@ declare class TextTimerController { * @since 10 */ /** - * Pauses the timer. + * Provides a pause event for timer. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -117,6 +136,18 @@ declare class TextTimerController { */ pause(); + /** + * Provides a pause event for timer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + pause():void; + /** * Provides an event to reset timer. * @@ -132,7 +163,7 @@ declare class TextTimerController { * @since 10 */ /** - * Resets the timer. + * Provides an event to reset timer. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -141,6 +172,18 @@ declare class TextTimerController { * @since 11 */ reset(); + + /** + * Provides an event to reset timer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + reset():void; } /** @@ -151,61 +194,58 @@ declare class TextTimerController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @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. - *

+ * 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 } - * @default 60000 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @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. + * Texttimer is isCountDown or not. * * @type { boolean } - * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isCountDown: boolean; /** - * Whether the timer has already started. + * Texttimer is started or not. * * @type { boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ started: boolean; /** - * Elapsed time of the timer, in the minimum unit of the format. + * Elapsed time of the timer, readonly. + * The unit is millisecond. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ elapsedTime: number; } @@ -227,14 +267,15 @@ declare interface TextTimerConfiguration extends CommonConfigurationNOTE: - *
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. - *

+ * 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 } - Default value: 60000 + * @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 */ count?: number; @@ -323,14 +359,15 @@ interface TextTimerOptions { * @since 10 */ /** - * TextTimer controller. + * Controller of Texttimer. * * @type { ?TextTimerController } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ controller?: TextTimerController; } @@ -359,7 +396,8 @@ interface TextTimerOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface TextTimerInterface { /** @@ -381,7 +419,7 @@ interface TextTimerInterface { * @since 10 */ /** - * A constructor used to create a TextTimerController object. + * Defines the TextTimer constructor. * * @param { TextTimerOptions } options * @returns { TextTimerAttribute } @@ -389,7 +427,8 @@ interface TextTimerInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (options?: TextTimerOptions): TextTimerAttribute; } @@ -417,7 +456,8 @@ interface TextTimerInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TextTimerAttribute extends CommonMethod { /** @@ -441,20 +481,17 @@ declare class TextTimerAttribute extends CommonMethod { * @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. - *

+ * 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 - Custom format.Default value: 'HH:mm:ss.SS' + * @param { string } value * @returns { TextTimerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ format(value: string): TextTimerAttribute; @@ -477,7 +514,7 @@ declare class TextTimerAttribute extends CommonMethod { * @since 10 */ /** - * Sets the font color. + * Called when the font color is set. * * @param { ResourceColor } value * @returns { TextTimerAttribute } @@ -485,7 +522,8 @@ declare class TextTimerAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor(value: ResourceColor): TextTimerAttribute; @@ -508,17 +546,16 @@ declare class TextTimerAttribute extends CommonMethod { * @since 10 */ /** - * Sets the font size. + * Called when the font size is set. * - * @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. + * @param { Length } value * @returns { TextTimerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize(value: Length): TextTimerAttribute; @@ -541,15 +578,16 @@ declare class TextTimerAttribute extends CommonMethod { * @since 10 */ /** - * Sets the font style. + * Called when the fontStyle is set * - * @param { FontStyle } value - Font style.Default value: FontStyle.Normal + * @param { FontStyle } value * @returns { TextTimerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontStyle(value: FontStyle): TextTimerAttribute; @@ -621,15 +659,16 @@ declare class TextTimerAttribute extends CommonMethod { * @since 10 */ /** - * Sets the font family. + * Called when the fontFamily is set * - * @param { ResourceStr } value - Font family. Default font: 'HarmonyOS Sans' + * @param { ResourceStr } value * @returns { TextTimerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontFamily(value: ResourceStr): TextTimerAttribute; @@ -652,9 +691,7 @@ declare class TextTimerAttribute extends CommonMethod { * @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. + * Called when the timer value is returned. * * @param { function } event * @returns { TextTimerAttribute } @@ -662,7 +699,8 @@ declare class TextTimerAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onTimer(event: (utc: number, elapsedTime: number) => void): TextTimerAttribute; @@ -676,28 +714,28 @@ declare class TextTimerAttribute extends CommonMethod { * @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. + * Called when the text shadow is set. * * @param { ShadowOptions | Array } value - The shadow options. * @returns { TextTimerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textShadow(value: ShadowOptions | Array): TextTimerAttribute; /** - * Creates a content modifier. + * Set the content modifier of texttimer. * * @param { ContentModifier } modifier - The content modifier of texttimer. * @returns { TextTimerAttribute } * @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): TextTimerAttribute; } diff --git a/api/@internal/component/ets/time_picker.d.ts b/api/@internal/component/ets/time_picker.d.ts index 7e0e922eff63c71e862104e4d556c3e7c69415e7..bf39d113a52256de4bd250d8921a87aebcfba55c 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 } from './common'; +import { DialogAlignment } from './alertDialog'; +import { CrownSensitivity } from './enums'; +/*** endif */ + /** * Defines the struct of TimePickerResult. * @@ -40,7 +48,8 @@ * @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 { /** @@ -65,7 +74,8 @@ declare interface TimePickerResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ hour: number; @@ -91,7 +101,8 @@ declare interface TimePickerResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ minute: number; @@ -102,7 +113,8 @@ declare interface TimePickerResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ second: number; } @@ -120,7 +132,8 @@ declare interface TimePickerResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TimePickerFormat { /** @@ -134,9 +147,10 @@ declare enum TimePickerFormat { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - HOUR_MINUTE, + HOUR_MINUTE = 0, /** * Hour and minute and second @@ -149,9 +163,10 @@ declare enum TimePickerFormat { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - HOUR_MINUTE_SECOND, + HOUR_MINUTE_SECOND = 1, } /** @@ -176,7 +191,8 @@ declare enum TimePickerFormat { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TimePickerOptions { /** @@ -201,7 +217,8 @@ declare interface TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selected?: Date; @@ -222,7 +239,8 @@ declare interface TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ format?: TimePickerFormat; @@ -233,7 +251,8 @@ declare interface TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ start?: Date; @@ -244,7 +263,8 @@ declare interface TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ end?: Date; } @@ -271,7 +291,8 @@ declare interface TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface TimePickerInterface { /** @@ -299,7 +320,8 @@ interface TimePickerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (options?: TimePickerOptions): TimePickerAttribute; } @@ -321,7 +343,8 @@ declare type DateTimeOptions = import('../api/@ohos.intl').default.DateTimeOptio * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnTimePickerChangeCallback = (result: TimePickerResult) => void; @@ -347,7 +370,8 @@ declare type OnTimePickerChangeCallback = (result: TimePickerResult) => void; * @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 { /** @@ -375,7 +399,8 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ useMilitaryTime(value: boolean): TimePickerAttribute; @@ -387,7 +412,8 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ useMilitaryTime(isMilitaryTime: Optional): TimePickerAttribute; @@ -406,7 +432,8 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ loop(value: boolean): TimePickerAttribute; @@ -417,7 +444,8 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ loop(isLoop: Optional): TimePickerAttribute; @@ -438,7 +466,8 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ disappearTextStyle(value: PickerTextStyle): TimePickerAttribute; @@ -450,7 +479,8 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ disappearTextStyle(style: Optional): TimePickerAttribute; @@ -471,7 +501,8 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ textStyle(value: PickerTextStyle): TimePickerAttribute; @@ -483,7 +514,8 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ textStyle(style: Optional): TimePickerAttribute; @@ -504,7 +536,8 @@ declare class TimePickerAttribute extends CommonMethod { * @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; @@ -516,7 +549,8 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ selectedTextStyle(style: Optional): TimePickerAttribute; @@ -528,8 +562,9 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 - */ + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ dateTimeOptions(value: DateTimeOptions): TimePickerAttribute; /** @@ -540,8 +575,9 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 - */ + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ dateTimeOptions(timeFormat: Optional): TimePickerAttribute; /** @@ -581,7 +617,8 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onChange(callback: Optional): TimePickerAttribute; @@ -593,7 +630,8 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onEnterSelectedArea(callback: Callback): TimePickerAttribute; @@ -604,7 +642,8 @@ declare class TimePickerAttribute extends CommonMethod { * @returns { TimePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableHapticFeedback(enable: boolean): TimePickerAttribute; @@ -615,7 +654,8 @@ declare class TimePickerAttribute extends CommonMethod { * @returns { TimePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableHapticFeedback(enable: Optional): TimePickerAttribute; @@ -627,7 +667,8 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ digitalCrownSensitivity(sensitivity: Optional): TimePickerAttribute; @@ -639,7 +680,8 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableCascade(enabled: boolean): TimePickerAttribute; } @@ -669,7 +711,8 @@ declare class TimePickerAttribute extends CommonMethod { * @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 { /** @@ -694,7 +737,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ useMilitaryTime?: boolean; @@ -713,7 +757,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ disappearTextStyle?: PickerTextStyle; @@ -732,7 +777,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ textStyle?: PickerTextStyle; @@ -743,7 +789,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ acceptButtonStyle?: PickerDialogButtonStyle; @@ -754,7 +801,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ cancelButtonStyle?: PickerDialogButtonStyle; @@ -773,7 +821,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedTextStyle?: PickerTextStyle; @@ -792,7 +841,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maskRect?: Rectangle; @@ -811,7 +861,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ alignment?: DialogAlignment; @@ -830,7 +881,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: Offset; @@ -856,7 +908,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onAccept?: (value: TimePickerResult) => void; @@ -882,7 +935,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onCancel?: () => void; @@ -908,7 +962,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onChange?: (value: TimePickerResult) => void; @@ -919,7 +974,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onEnterSelectedArea?: Callback; @@ -940,7 +996,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor?: ResourceColor; @@ -961,7 +1018,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyle?: BlurStyle; @@ -972,7 +1030,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; @@ -983,7 +1042,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundEffect?: BackgroundEffectOptions; @@ -995,7 +1055,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableCascade?: boolean; @@ -1006,7 +1067,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onDidAppear?: () => void; @@ -1017,7 +1079,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onDidDisappear?: () => void; @@ -1028,7 +1091,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillAppear?: () => void; @@ -1039,7 +1103,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDisappear?: () => void; @@ -1050,7 +1115,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @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; @@ -1061,7 +1127,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dateTimeOptions?: DateTimeOptions; @@ -1073,7 +1140,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enableHoverMode?: boolean; @@ -1085,7 +1153,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ hoverModeArea?: HoverModeAreaType; @@ -1096,7 +1165,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableHapticFeedback?: boolean; } @@ -1120,7 +1190,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @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 { /** diff --git a/api/@internal/component/ets/toggle.d.ts b/api/@internal/component/ets/toggle.d.ts index 85c27baa49cae0c6d55796cf581bbe6418b043fa..baf3b9207f76c3e87cd5367b4e2677c9f1d48850 100644 --- a/api/@internal/component/ets/toggle.d.ts +++ b/api/@internal/component/ets/toggle.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource } from '../../global/resource'; +import { ResourceColor } from './units'; +import { CommonConfiguration, Callback, CommonMethod, ContentModifier } from './common'; +/*** endif */ + /** * Declare the type of status button * @@ -50,7 +56,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ToggleType { /** @@ -81,7 +88,8 @@ declare enum ToggleType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Checkbox, @@ -113,7 +121,8 @@ declare enum ToggleType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Switch, @@ -145,7 +154,8 @@ declare enum ToggleType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Button, } @@ -157,7 +167,8 @@ declare enum ToggleType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SwitchStyle { /** @@ -167,7 +178,8 @@ declare interface SwitchStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pointRadius?: number | Resource; @@ -178,7 +190,8 @@ declare interface SwitchStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ unselectedColor?: ResourceColor; @@ -189,7 +202,8 @@ declare interface SwitchStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pointColor?: ResourceColor; @@ -200,7 +214,8 @@ declare interface SwitchStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ trackBorderRadius?: number | Resource; } @@ -213,7 +228,8 @@ declare interface SwitchStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ToggleConfiguration extends CommonConfiguration { @@ -224,7 +240,8 @@ declare interface ToggleConfiguration extends CommonConfiguration; } @@ -259,7 +278,8 @@ declare interface ToggleConfiguration extends CommonConfiguration { /** @@ -516,7 +519,8 @@ declare class ToggleAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onChange(callback: (isOn: boolean) => void): ToggleAttribute; @@ -528,7 +532,8 @@ declare class ToggleAttribute 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): ToggleAttribute; @@ -568,7 +573,8 @@ declare class ToggleAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedColor(value: ResourceColor): ToggleAttribute; @@ -608,7 +614,8 @@ declare class ToggleAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ switchPointColor(color: ResourceColor): ToggleAttribute; @@ -620,7 +627,8 @@ declare class ToggleAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ switchStyle(value: SwitchStyle): ToggleAttribute; } diff --git a/api/@internal/component/ets/ui_extension_component.d.ts b/api/@internal/component/ets/ui_extension_component.d.ts index d3b85e3b247da9e8b788d09dc8573e8e123cf2a7..a9dac614b885e5d37f96b5a2cb2b720bc013231e 100644 --- a/api/@internal/component/ets/ui_extension_component.d.ts +++ b/api/@internal/component/ets/ui_extension_component.d.ts @@ -18,13 +18,21 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import Want from '../../@ohos.app.ability.Want' +import { Callback, ErrorCallback,BusinessError } from '../../@ohos.base' +import { CommonMethod, TerminationInfo } from './common' +import { ComponentContent } from '../ComponentContent' +/*** endif */ + /** * Enumeration of different types of DpiFollowStrategy. * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum DpiFollowStrategy { /** @@ -32,7 +40,8 @@ declare enum DpiFollowStrategy { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FOLLOW_HOST_DPI = 0, @@ -41,7 +50,8 @@ declare enum DpiFollowStrategy { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FOLLOW_UI_EXTENSION_ABILITY_DPI = 1, } @@ -68,7 +78,7 @@ declare enum WindowModeFollowStrategy { * @systemapi * @since 18 */ - FOLLOW_UI_EXTENSION_ABILITY_WINDOW_MODE = 1, + FOLLOW_UI_EXTENSION_ABILITY_WINDOW_MODE = 1 } /** @@ -77,7 +87,8 @@ declare enum WindowModeFollowStrategy { * @interface UIExtensionOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface UIExtensionOptions { /** @@ -88,7 +99,8 @@ declare interface UIExtensionOptions { * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ isTransferringCaller?: boolean; @@ -99,7 +111,8 @@ declare interface UIExtensionOptions { * @type { ?ComponentContent } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ placeholder?: ComponentContent; @@ -111,7 +124,8 @@ declare interface UIExtensionOptions { * @type { ?Record } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ areaChangePlaceholder?: Record; @@ -122,7 +136,8 @@ declare interface UIExtensionOptions { * @default DpiFollowStrategy.FOLLOW_UI_EXTENSION_ABILITY_DPI * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dpiFollowStrategy?: DpiFollowStrategy; @@ -178,6 +193,17 @@ declare interface TerminationInfo { */ declare type ReceiveCallback = import('../api/@ohos.base').Callback>; +/** + * Get Callback from @ohos.base. + * + * @typedef { Callback> } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + * @arkts 1.2 + */ +type ReceiveCallback = Callback>; + /** * This interface is used for send data to the UIExtensionAbility.
* It is returned from onRemoteReady callback of UIExtensionComponent
@@ -186,7 +212,8 @@ declare type ReceiveCallback = import('../api/@ohos.base').Callback } data * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ send(data: Record): void; @@ -229,7 +257,8 @@ declare interface UIExtensionProxy { * @throws { BusinessError } 100012 - Transferring data failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ sendSync(data: Record): Record; @@ -250,7 +279,8 @@ declare interface UIExtensionProxy { * @param { Callback } callback - Callback of the listened event. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'asyncReceiverRegister', callback: Callback): void; @@ -271,7 +301,8 @@ declare interface UIExtensionProxy { * @param { Callback } callback - Callback of the listened event. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'syncReceiverRegister', callback: Callback): void; @@ -292,7 +323,8 @@ declare interface UIExtensionProxy { * @param { Callback } [callback] - Callback of the listened event. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'asyncReceiverRegister', callback?: Callback): void; @@ -313,7 +345,8 @@ declare interface UIExtensionProxy { * @param { Callback } [callback] - Callback of the listened event. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'syncReceiverRegister', callback?: Callback): void; } @@ -325,7 +358,8 @@ declare interface UIExtensionProxy { * @interface UIExtensionComponentInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ interface UIExtensionComponentInterface { /** @@ -353,6 +387,24 @@ interface UIExtensionComponentInterface { want: import('../api/@ohos.app.ability.Want').default, options?: UIExtensionOptions ): UIExtensionComponentAttribute; + + /** + * Construct the UIExtensionComponent.
+ * Called when the UIExtensionComponent is used. + * + * @param { Want } want - indicates the want of UIExtensionAbility + * @param { UIExtensionOptions } [options] - Construction configuration of UIExtensionComponentAttribute + * @returns { UIExtensionComponentAttribute } + * @throws { BusinessError } 202 - Non-system applications are not allowed to use system APIs. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + * @arkts 1.2 + */ + ( + want: Want, + options?: UIExtensionOptions + ): UIExtensionComponentAttribute; } /** @@ -361,7 +413,8 @@ interface UIExtensionComponentInterface { * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ declare class UIExtensionComponentAttribute extends CommonMethod { /** @@ -376,6 +429,21 @@ declare class UIExtensionComponentAttribute extends CommonMethod ): UIExtensionComponentAttribute; + + /** + * callback called when remote UIExtensionAbility object is ready for receive data + * + * @param { Callback } callback + * @returns { UIExtensionComponentAttribute } + * @throws { BusinessError } 202 - Non-system applications are not allowed to use system APIs. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onRemoteReady( + callback: Callback + ): UIExtensionComponentAttribute; /** * @param { import('../api/@ohos.base').Callback<{ [key: string]: Object }> } callback @@ -387,12 +455,13 @@ declare class UIExtensionComponentAttribute extends CommonMethod } callback + * @returns { UIExtensionComponentAttribute } + * @throws { BusinessError } 202 - Non-system applications are not allowed to use system APIs. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onError( + callback: ErrorCallback + ): UIExtensionComponentAttribute; /** * Called when the provider of the embedded UI is terminated. @@ -447,7 +531,8 @@ declare class UIExtensionComponentAttribute extends CommonMethod): UIExtensionComponentAttribute; @@ -479,3 +564,4 @@ declare const UIExtensionComponent: UIExtensionComponentInterface; * @since 10 */ declare const UIExtensionComponentInstance: UIExtensionComponentAttribute; + diff --git a/api/@internal/component/ets/units.d.ts b/api/@internal/component/ets/units.d.ts index 13660a7d9124b7eaa9f893f136c0fa2d85effc18..b21576e908b373aad1a08250b33366649c24dc4a 100644 --- a/api/@internal/component/ets/units.d.ts +++ b/api/@internal/component/ets/units.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource as _Resource } from '../../global/resource'; +import { Color, BorderStyle, FontWeight, FontStyle, DividerMode} from './enums'; +import { OutlineStyle } from './common'; +import { LengthMetricsUnit as _LengthMetricsUnit, LengthMetrics as _LengthMetrics, ColorMetrics as _ColorMetrics } from '../Graphics'; +/*** endif */ + /** * Defines the data type of the interface restriction. * @@ -56,6 +63,19 @@ */ declare type Resource = import('../api/global/resource').Resource; +/** + * Defines the data type of the interface restriction. + * + * @typedef { import('../api/global/resource').Resource } Resource + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type Resource = _Resource; + /** * Defines the length property with string, number and resource unit. * @@ -88,7 +108,8 @@ declare type Resource = import('../api/global/resource').Resource; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare type Length = string | number | Resource; @@ -118,6 +139,17 @@ declare type Length = string | number | Resource; */ declare type PX = `${number}px`; + +/** + * Defines the length property with number in units of px. + * + * @typedef { string } PX + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type PX = string; /** * Defines the length property with number or number in units of vp. * @@ -144,6 +176,17 @@ declare type PX = `${number}px`; */ declare type VP = `${number}vp` | number; +/** + * Defines the length property with number or number in units of vp. + * + * @typedef { string | number } VP + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type VP = string | number; + /** * Defines the length property with number in units of fp. * @@ -170,6 +213,17 @@ declare type VP = `${number}vp` | number; */ declare type FP = `${number}fp`; +/** + * Defines the length property with number in units of fp. + * + * @typedef { string } FP + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type FP = string; + /** * Defines the length property with number in units of lpx. * @@ -196,6 +250,17 @@ declare type FP = `${number}fp`; */ declare type LPX = `${number}lpx`; +/** + * Defines the length property with number in units of lpx. + * + * @typedef { string } LPX + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type LPX = string; + /** * Defines the length property with number in units of Percentage. * @@ -222,6 +287,17 @@ declare type LPX = `${number}lpx`; */ declare type Percentage = `${number}%`; +/** + * Defines the length property with number in units of Percentage. + * + * @typedef { string } Percentage + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type Percentage = string; + /** * Defines the angle property with number in units of deg. * @@ -239,6 +315,17 @@ declare type Percentage = `${number}%`; */ declare type Degree = `${number}deg`; +/** + * Defines the angle property with number in units of deg. + * + * @typedef { string } Degree + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type Degree = string; + /** * Defines the dimension property with number with units(vp|px|fp|lpx|%), and resource. * @@ -261,7 +348,8 @@ declare type Degree = `${number}deg`; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type Dimension = PX | VP | FP | LPX | Percentage | Resource; @@ -297,7 +385,8 @@ declare type Dimension = PX | VP | FP | LPX | Percentage | Resource; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare type ResourceStr = string | Resource; @@ -330,9 +419,10 @@ declare type ResourceStr = string | Resource; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ -declare type Padding = { +declare interface Padding { /** * top property. * @@ -363,9 +453,10 @@ declare type Padding = { * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since 11 * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ top?: Length; @@ -399,9 +490,10 @@ declare type Padding = { * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since 11 * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ right?: Length; @@ -435,9 +527,10 @@ declare type Padding = { * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since 11 * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bottom?: Length; @@ -471,12 +564,13 @@ declare type Padding = { * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since 11 * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ left?: Length; -}; +} /** * Defines the localized padding property. @@ -486,7 +580,8 @@ declare type Padding = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LocalizedPadding { /** @@ -497,7 +592,8 @@ declare interface LocalizedPadding { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ top?: LengthMetrics; @@ -509,7 +605,8 @@ declare interface LocalizedPadding { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ end?: LengthMetrics; @@ -521,7 +618,8 @@ declare interface LocalizedPadding { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bottom?: LengthMetrics; @@ -533,10 +631,11 @@ declare interface LocalizedPadding { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start?: LengthMetrics; -}; +} /** * Defines the margin property. @@ -570,7 +669,8 @@ declare interface LocalizedPadding { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare type Margin = Padding; @@ -589,7 +689,8 @@ declare type Margin = Padding; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare type EdgeWidth = EdgeWidths; @@ -618,9 +719,10 @@ declare type EdgeWidth = EdgeWidths; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ -declare type EdgeWidths = { +declare interface EdgeWidths { /** * top property. * @@ -644,9 +746,10 @@ declare type EdgeWidths = { * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since 11 * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ top?: Length; @@ -673,9 +776,10 @@ declare type EdgeWidths = { * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since 11 * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ right?: Length; @@ -702,9 +806,10 @@ declare type EdgeWidths = { * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since 11 * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bottom?: Length; @@ -731,12 +836,13 @@ declare type EdgeWidths = { * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since 11 * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ left?: Length; -}; +} /** * Defines the localized border width property. @@ -746,7 +852,8 @@ declare type EdgeWidths = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LocalizedEdgeWidths { /** @@ -757,7 +864,8 @@ declare interface LocalizedEdgeWidths { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ top?: LengthMetrics; @@ -769,7 +877,8 @@ declare interface LocalizedEdgeWidths { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ end?: LengthMetrics; @@ -781,7 +890,8 @@ declare interface LocalizedEdgeWidths { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bottom?: LengthMetrics; @@ -793,7 +903,8 @@ declare interface LocalizedEdgeWidths { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start?: LengthMetrics; }; @@ -816,7 +927,18 @@ declare interface LocalizedEdgeWidths { * @atomicservice * @since 12 */ -declare type EdgeOutlineWidths = { +/** + * Defines the outline width property. + * + * @interface EdgeOutlineWidths + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +declare interface EdgeOutlineWidths { /** * top outline width property. * @@ -834,7 +956,8 @@ declare type EdgeOutlineWidths = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ top?: Dimension; @@ -855,7 +978,8 @@ declare type EdgeOutlineWidths = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ right?: Dimension; @@ -876,7 +1000,8 @@ declare type EdgeOutlineWidths = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bottom?: Dimension; @@ -897,10 +1022,11 @@ declare type EdgeOutlineWidths = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ left?: Dimension; -}; +} /** * Defines the border radius property. @@ -927,9 +1053,10 @@ declare type EdgeOutlineWidths = { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ -declare type BorderRadiuses = { +declare interface BorderRadiuses { /** * top-left property. * @@ -953,9 +1080,10 @@ declare type BorderRadiuses = { * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since 11 * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ topLeft?: Length; @@ -982,9 +1110,10 @@ declare type BorderRadiuses = { * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since 11 * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ topRight?: Length; @@ -1011,9 +1140,10 @@ declare type BorderRadiuses = { * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since 11 * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bottomLeft?: Length; @@ -1040,12 +1170,13 @@ declare type BorderRadiuses = { * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since 11 * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bottomRight?: Length; -}; +} /** * Defines the localized border radius property. @@ -1055,7 +1186,8 @@ declare type BorderRadiuses = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LocalizedBorderRadiuses { /** @@ -1066,7 +1198,8 @@ declare interface LocalizedBorderRadiuses { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ topStart?: LengthMetrics; @@ -1078,7 +1211,8 @@ declare interface LocalizedBorderRadiuses { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ topEnd?: LengthMetrics; @@ -1090,7 +1224,8 @@ declare interface LocalizedBorderRadiuses { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bottomStart?: LengthMetrics; @@ -1102,7 +1237,8 @@ declare interface LocalizedBorderRadiuses { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bottomEnd?: LengthMetrics; }; @@ -1126,7 +1262,18 @@ declare interface LocalizedBorderRadiuses { * @atomicservice * @since 12 */ -declare type OutlineRadiuses = { +/** + * Defines the outline radius property. + * + * @interface OutlineRadiuses + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +declare interface OutlineRadiuses { /** * top-left property. * @@ -1144,7 +1291,8 @@ declare type OutlineRadiuses = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ topLeft?: Dimension; @@ -1165,7 +1313,8 @@ declare type OutlineRadiuses = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ topRight?: Dimension; @@ -1186,7 +1335,8 @@ declare type OutlineRadiuses = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bottomLeft?: Dimension; @@ -1207,7 +1357,8 @@ declare type OutlineRadiuses = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bottomRight?: Dimension; }; @@ -1237,9 +1388,10 @@ declare type OutlineRadiuses = { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ -declare type EdgeColors = { +declare interface EdgeColors { /** * top property. * @@ -1263,9 +1415,10 @@ declare type EdgeColors = { * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since 11 * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ top?: ResourceColor; @@ -1292,9 +1445,10 @@ declare type EdgeColors = { * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since 11 * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ right?: ResourceColor; @@ -1321,9 +1475,10 @@ declare type EdgeColors = { * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since 11 * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bottom?: ResourceColor; @@ -1350,12 +1505,13 @@ declare type EdgeColors = { * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since 11 * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ left?: ResourceColor; -}; +} /** * Defines the localized border color property. @@ -1365,7 +1521,8 @@ declare type EdgeColors = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LocalizedEdgeColors { /** @@ -1376,7 +1533,8 @@ declare interface LocalizedEdgeColors { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ top?: ResourceColor; @@ -1388,7 +1546,8 @@ declare interface LocalizedEdgeColors { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ end?: ResourceColor; @@ -1400,7 +1559,8 @@ declare interface LocalizedEdgeColors { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bottom?: ResourceColor; @@ -1412,7 +1572,8 @@ declare interface LocalizedEdgeColors { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start?: ResourceColor; }; @@ -1425,7 +1586,8 @@ declare interface LocalizedEdgeColors { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type LocalizedMargin = LocalizedPadding; @@ -1454,9 +1616,10 @@ declare type LocalizedMargin = LocalizedPadding; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ -declare type EdgeStyles = { +declare interface EdgeStyles { /** * top property. * @@ -1480,9 +1643,10 @@ declare type EdgeStyles = { * @type { ?BorderStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since 11 * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ top?: BorderStyle; @@ -1509,9 +1673,10 @@ declare type EdgeStyles = { * @type { ?BorderStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since 11 * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ right?: BorderStyle; @@ -1538,9 +1703,10 @@ declare type EdgeStyles = { * @type { ?BorderStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since 11 * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bottom?: BorderStyle; @@ -1567,12 +1733,13 @@ declare type EdgeStyles = { * @type { ?BorderStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since 11 * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ left?: BorderStyle; -}; +} /** * Defines the outline style property. @@ -1593,7 +1760,18 @@ declare type EdgeStyles = { * @atomicservice * @since 12 */ -declare type EdgeOutlineStyles = { +/** + * Defines the outline style property. + * + * @interface EdgeOutlineStyles + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +declare interface EdgeOutlineStyles { /** * top property. * @@ -1611,7 +1789,8 @@ declare type EdgeOutlineStyles = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ top?: OutlineStyle; @@ -1632,7 +1811,8 @@ declare type EdgeOutlineStyles = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ right?: OutlineStyle; @@ -1653,7 +1833,8 @@ declare type EdgeOutlineStyles = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bottom?: OutlineStyle; @@ -1674,10 +1855,11 @@ declare type EdgeOutlineStyles = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ left?: OutlineStyle; -}; +} /** * Defines the offset property. @@ -1701,9 +1883,10 @@ declare type EdgeOutlineStyles = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ -declare type Offset = { +declare interface Offset { /** * dx property. * @@ -1726,7 +1909,8 @@ declare type Offset = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ dx: Length; @@ -1752,10 +1936,11 @@ declare type Offset = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ dy: Length; -}; +} /** * Defines the color which can use resource. @@ -1789,7 +1974,8 @@ declare type Offset = { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare type ResourceColor = Color | number | string | Resource; @@ -1818,9 +2004,10 @@ declare type ResourceColor = Color | number | string | Resource; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ -declare type LengthConstrain = { +declare interface LengthConstrain { /** * minimum length. * @@ -1844,9 +2031,10 @@ declare type LengthConstrain = { * @type { Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since 11 * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ minLength: Length; @@ -1873,12 +2061,13 @@ declare type LengthConstrain = { * @type { Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since 11 * @form + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maxLength: Length; -}; +} /** * Defines VoidCallback. @@ -1887,7 +2076,8 @@ declare type LengthConstrain = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type VoidCallback = () => void; @@ -1903,6 +2093,19 @@ declare type VoidCallback = () => void; */ declare type LengthMetricsUnit = import('../api/arkui/Graphics').LengthMetricsUnit; +/** + * Defines length metrics unit. + * + * @typedef { _LengthMetricsUnit } LengthMetricsUnit + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type LengthMetricsUnit = _LengthMetricsUnit; + /** * Defines LengthMetrics. * @@ -1914,6 +2117,18 @@ declare type LengthMetricsUnit = import('../api/arkui/Graphics').LengthMetricsUn */ declare type LengthMetrics = import('../api/arkui/Graphics').LengthMetrics; +/** + * Defines LengthMetrics. + * + * @typedef { _LengthMetrics } LengthMetrics + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type LengthMetrics = _LengthMetrics; + /** * Defines ColorMetrics. * @@ -1925,6 +2140,18 @@ declare type LengthMetrics = import('../api/arkui/Graphics').LengthMetrics; */ declare type ColorMetrics = import('../api/arkui/Graphics').ColorMetrics; +/** + * Defines ColorMetrics. + * + * @typedef { _ColorMetrics } ColorMetrics + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type ColorMetrics = _ColorMetrics; + /** * Defines the font used for text. * @@ -1947,7 +2174,8 @@ declare type ColorMetrics = import('../api/arkui/Graphics').ColorMetrics; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface Font { /** @@ -1972,7 +2200,8 @@ declare interface Font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ size?: Length; @@ -1998,7 +2227,8 @@ declare interface Font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ weight?: FontWeight | number | string; @@ -2024,7 +2254,8 @@ declare interface Font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ family?: string | Resource; @@ -2050,7 +2281,8 @@ declare interface Font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ style?: FontStyle; } @@ -2087,7 +2319,8 @@ declare interface Font { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface Area { /** @@ -2122,7 +2355,8 @@ declare interface Area { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ width: Length; @@ -2158,7 +2392,8 @@ declare interface Area { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ height: Length; @@ -2194,7 +2429,8 @@ declare interface Area { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ position: Position; @@ -2230,7 +2466,8 @@ declare interface Area { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ globalPosition: Position; } @@ -2267,7 +2504,8 @@ declare interface Area { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface Position { /** @@ -2302,7 +2540,8 @@ declare interface Position { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ x?: Length; @@ -2338,7 +2577,8 @@ declare interface Position { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ y?: Length; } @@ -2350,7 +2590,8 @@ declare interface Position { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LocalizedPosition { /** @@ -2360,7 +2601,8 @@ declare interface LocalizedPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start?: LengthMetrics; @@ -2371,7 +2613,8 @@ declare interface LocalizedPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ top?: LengthMetrics; } @@ -2384,7 +2627,8 @@ declare interface LocalizedPosition { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface Edges { /** @@ -2395,7 +2639,8 @@ declare interface Edges { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ top?: Dimension; @@ -2407,7 +2652,8 @@ declare interface Edges { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ left?: Dimension; @@ -2419,7 +2665,8 @@ declare interface Edges { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bottom?: Dimension; @@ -2431,7 +2678,8 @@ declare interface Edges { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ right?: Dimension; } @@ -2443,7 +2691,8 @@ declare interface Edges { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LocalizedEdges { /** @@ -2453,7 +2702,8 @@ declare interface LocalizedEdges { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ top?: LengthMetrics; @@ -2464,7 +2714,8 @@ declare interface LocalizedEdges { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start?: LengthMetrics; @@ -2475,7 +2726,8 @@ declare interface LocalizedEdges { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bottom?: LengthMetrics; @@ -2486,7 +2738,8 @@ declare interface LocalizedEdges { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ end?: LengthMetrics; } @@ -2508,7 +2761,8 @@ declare interface LocalizedEdges { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface Bias { /** @@ -2530,7 +2784,8 @@ declare interface Bias { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ horizontal?: number; @@ -2553,7 +2808,8 @@ declare interface Bias { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ vertical?: number; } @@ -2590,7 +2846,8 @@ declare interface Bias { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ConstraintSizeOptions { /** @@ -2625,7 +2882,8 @@ declare interface ConstraintSizeOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ minWidth?: Length; @@ -2661,7 +2919,8 @@ declare interface ConstraintSizeOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maxWidth?: Length; @@ -2697,7 +2956,8 @@ declare interface ConstraintSizeOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ minHeight?: Length; @@ -2733,7 +2993,8 @@ declare interface ConstraintSizeOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maxHeight?: Length; } @@ -2770,7 +3031,8 @@ declare interface ConstraintSizeOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SizeOptions { /** @@ -2805,7 +3067,8 @@ declare interface SizeOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ width?: Length; @@ -2841,7 +3104,8 @@ declare interface SizeOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ height?: Length; } @@ -2888,7 +3152,8 @@ declare interface SizeOptions { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface BorderOptions { /** @@ -2933,7 +3198,8 @@ declare interface BorderOptions { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width?: EdgeWidths | Length | LocalizedEdgeWidths; @@ -2979,7 +3245,8 @@ declare interface BorderOptions { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ color?: EdgeColors | ResourceColor | LocalizedEdgeColors; @@ -3025,7 +3292,8 @@ declare interface BorderOptions { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radius?: BorderRadiuses | Length | LocalizedBorderRadiuses; @@ -3061,7 +3329,8 @@ declare interface BorderOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ style?: EdgeStyles | BorderStyle; @@ -3072,7 +3341,8 @@ declare interface BorderOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dashGap?: EdgeWidths | LengthMetrics | LocalizedEdgeWidths; @@ -3083,7 +3353,8 @@ declare interface BorderOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dashWidth?: EdgeWidths | LengthMetrics | LocalizedEdgeWidths; } @@ -3105,7 +3376,8 @@ declare interface BorderOptions { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OutlineOptions { /** @@ -3125,7 +3397,8 @@ declare interface OutlineOptions { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width?: EdgeOutlineWidths | Dimension; @@ -3146,7 +3419,8 @@ declare interface OutlineOptions { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ color?: EdgeColors | ResourceColor | LocalizedEdgeColors; @@ -3167,7 +3441,8 @@ declare interface OutlineOptions { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radius?: OutlineRadiuses | Dimension; @@ -3188,7 +3463,8 @@ declare interface OutlineOptions { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ style?: EdgeOutlineStyles | OutlineStyle; } @@ -3208,7 +3484,8 @@ declare interface OutlineOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface MarkStyle { /** @@ -3226,7 +3503,8 @@ declare interface MarkStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeColor?: ResourceColor; @@ -3245,7 +3523,8 @@ declare interface MarkStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ size?: Length; @@ -3264,7 +3543,8 @@ declare interface MarkStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeWidth?: Length; } @@ -3291,7 +3571,8 @@ declare interface MarkStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ColorFilter { /** @@ -3319,7 +3600,8 @@ declare class ColorFilter { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(value: number[]); } @@ -3346,7 +3628,8 @@ declare class ColorFilter { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TouchPoint { /** @@ -3371,7 +3654,8 @@ declare interface TouchPoint { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ x: Dimension; @@ -3397,7 +3681,8 @@ declare interface TouchPoint { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ y: Dimension; } @@ -3410,54 +3695,59 @@ declare interface TouchPoint { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DirectionalEdgesT { /** - * Start edge. + * Start property. * * @type { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start: T; /** - * End edge. + * End property. * * @type { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ end: T; /** - * Top edge. + * Top property. * * @type { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ top: T; /** - * Bottom edge. + * Bottom property. * * @type { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bottom: T; } @@ -3469,7 +3759,8 @@ declare interface DirectionalEdgesT { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DividerStyleOptions { /** @@ -3479,7 +3770,8 @@ declare interface DividerStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ strokeWidth?: LengthMetrics; @@ -3490,7 +3782,8 @@ declare interface DividerStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ color?: ResourceColor; @@ -3501,7 +3794,8 @@ declare interface DividerStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ startMargin?: LengthMetrics; @@ -3512,7 +3806,8 @@ declare interface DividerStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ endMargin?: LengthMetrics; @@ -3523,7 +3818,8 @@ declare interface DividerStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ mode?: DividerMode; } @@ -3535,7 +3831,8 @@ declare interface DividerStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ChainWeightOptions { /** @@ -3545,7 +3842,8 @@ declare interface ChainWeightOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ horizontal?: number; @@ -3556,7 +3854,8 @@ declare interface ChainWeightOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ vertical?: number; } @@ -3568,7 +3867,8 @@ declare interface ChainWeightOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface AccessibilityOptions { /** @@ -3578,7 +3878,8 @@ declare interface AccessibilityOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityPreferred?: boolean; } diff --git a/api/@internal/component/ets/video.d.ts b/api/@internal/component/ets/video.d.ts index 36dc4bd16b815f143a39c2fd3d01397f271e1a79..5b4d67191c1e54487df96e75aba255dd3a170786 100644 --- a/api/@internal/component/ets/video.d.ts +++ b/api/@internal/component/ets/video.d.ts @@ -18,6 +18,14 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource } from '../../global/resource'; +import { ImageAIOptions, ImageAnalyzerConfig } from './imageCommon'; +import { ImageFit } from './enums'; +import { CommonMethod, Callback, PixelMap } from './common'; +import { VoidCallback, ColorMetrics } from './units'; +/*** endif */ + /** * Seek mode. * @@ -40,7 +48,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 SeekMode { /** @@ -62,7 +71,8 @@ declare enum SeekMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ PreviousKeyframe, @@ -85,7 +95,8 @@ declare enum SeekMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NextKeyframe, @@ -108,7 +119,8 @@ declare enum SeekMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ClosestKeyframe, @@ -131,7 +143,8 @@ declare enum SeekMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Accurate, } @@ -158,7 +171,8 @@ declare enum SeekMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum PlaybackSpeed { /** @@ -180,7 +194,8 @@ declare enum PlaybackSpeed { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Speed_Forward_0_75_X, @@ -203,7 +218,8 @@ declare enum PlaybackSpeed { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Speed_Forward_1_00_X, @@ -226,7 +242,8 @@ declare enum PlaybackSpeed { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Speed_Forward_1_25_X, @@ -249,7 +266,8 @@ declare enum PlaybackSpeed { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Speed_Forward_1_75_X, @@ -272,7 +290,8 @@ declare enum PlaybackSpeed { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Speed_Forward_2_00_X, } @@ -284,7 +303,8 @@ declare enum PlaybackSpeed { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface FullscreenInfo { /** @@ -311,7 +331,8 @@ interface FullscreenInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fullscreen: boolean; } @@ -323,7 +344,8 @@ interface FullscreenInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface PreparedInfo { /** @@ -350,7 +372,8 @@ interface PreparedInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ duration: number; } @@ -362,7 +385,8 @@ interface PreparedInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface PlaybackInfo { /** @@ -389,7 +413,8 @@ interface PlaybackInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ time: number; } @@ -400,7 +425,8 @@ interface PlaybackInfo { * @interface PosterOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PosterOptions { /** @@ -410,7 +436,8 @@ declare interface PosterOptions { * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ showFirstFrame?: boolean; } @@ -446,7 +473,8 @@ declare interface PosterOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface VideoOptions { /** @@ -471,7 +499,8 @@ declare interface VideoOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ src?: string | Resource; @@ -497,7 +526,8 @@ declare interface VideoOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ currentProgressRate?: number | string | PlaybackSpeed; @@ -523,7 +553,8 @@ declare interface VideoOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ previewUri?: string | PixelMap | Resource; @@ -549,7 +580,8 @@ declare interface VideoOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ controller?: VideoController; @@ -559,7 +591,8 @@ declare interface VideoOptions { * @type { ?ImageAIOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ imageAIOptions?: ImageAIOptions; @@ -569,7 +602,8 @@ declare interface VideoOptions { * @type { ?PosterOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ posterOptions?: PosterOptions; } @@ -593,7 +627,8 @@ declare interface VideoOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class VideoController { /** @@ -615,7 +650,8 @@ declare class VideoController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -642,6 +678,17 @@ declare class VideoController { */ start(); + /** + * Provides events to play. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + start(): void; + /** * Provides a pause event for playback. * @@ -665,6 +712,17 @@ declare class VideoController { */ pause(); + /** + * Provides a pause event for playback. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + pause(): void; + /** * Provides an event to stop playback. * @@ -688,6 +746,17 @@ declare class VideoController { */ stop(); + /** + * Provides an event to stop playback. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + stop(): void; + /** * Provide the progress method of video playback. * @@ -714,6 +783,18 @@ declare class VideoController { */ setCurrentTime(value: number); + /** + * Provide the progress method of video playback. + * + * @param { number } value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + setCurrentTime(value: number): void; + /** * Provides a full screen playback method. * @@ -740,6 +821,18 @@ declare class VideoController { */ requestFullscreen(value: boolean); + /** + * Provides a full screen playback method. + * + * @param { boolean } value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + requestFullscreen(value: boolean): void; + /** * Provides a method to exit full screen playback. * @@ -763,6 +856,17 @@ declare class VideoController { */ exitFullscreen(); + /** + * Provides a method to exit full screen playback. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + exitFullscreen(): void; + /** * Provide the progress method of video playback. * @@ -792,12 +896,26 @@ declare class VideoController { */ setCurrentTime(value: number, seekMode: SeekMode); + /** + * Provide the progress method of video playback. + * + * @param { number } value + * @param { SeekMode } seekMode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + setCurrentTime(value: number, seekMode: SeekMode): void; + /** * Provide the reset method of video playback. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ reset(): void; } @@ -824,7 +942,8 @@ declare class VideoController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface VideoInterface { /** @@ -852,7 +971,8 @@ interface VideoInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (value: VideoOptions): VideoAttribute; } @@ -879,7 +999,8 @@ interface VideoInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class VideoAttribute extends CommonMethod { /** @@ -907,7 +1028,8 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ muted(value: boolean): VideoAttribute; @@ -936,7 +1058,8 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ autoPlay(value: boolean): VideoAttribute; @@ -965,7 +1088,8 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ controls(value: boolean): VideoAttribute; @@ -994,7 +1118,8 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ loop(value: boolean): VideoAttribute; @@ -1023,7 +1148,8 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ objectFit(value: ImageFit): VideoAttribute; @@ -1063,7 +1189,8 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onStart(event: VoidCallback): VideoAttribute; @@ -1103,7 +1230,8 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onPause(event: VoidCallback): VideoAttribute; @@ -1143,7 +1271,8 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onFinish(event: VoidCallback): VideoAttribute; @@ -1183,7 +1312,8 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onFullscreenChange(callback: Callback): VideoAttribute; @@ -1223,7 +1353,8 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onPrepared(callback: Callback): VideoAttribute; @@ -1263,7 +1394,8 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onSeeking(callback: Callback): VideoAttribute; @@ -1303,7 +1435,8 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onSeeked(callback: Callback): VideoAttribute; @@ -1343,7 +1476,8 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onUpdate(callback: Callback): VideoAttribute; @@ -1372,19 +1506,10 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 - */ - /** - * Called when playback fails. - * - * @param { VoidCallback | import('../api/@ohos.base').ErrorCallback } event - * @returns { VideoAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - onError(event: VoidCallback | import('../api/@ohos.base').ErrorCallback): VideoAttribute; + onError(event: () => void): VideoAttribute; /** * Called when the video is stopped. @@ -1394,7 +1519,8 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onStop(event: Callback): VideoAttribute; @@ -1405,7 +1531,8 @@ declare class VideoAttribute extends CommonMethod { * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableAnalyzer(enable: boolean): VideoAttribute; @@ -1416,7 +1543,8 @@ declare class VideoAttribute extends CommonMethod { * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ analyzerConfig(config: ImageAnalyzerConfig): VideoAttribute; @@ -1427,7 +1555,8 @@ declare class VideoAttribute extends CommonMethod { * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ surfaceBackgroundColor(color: ColorMetrics): VideoAttribute; @@ -1442,7 +1571,8 @@ declare class VideoAttribute extends CommonMethod { * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ enableShortcutKey(enabled: boolean): VideoAttribute; } diff --git a/api/@internal/component/ets/water_flow.d.ts b/api/@internal/component/ets/water_flow.d.ts index 6bb9e242a5ca65ccbc179991481b55175b594a1e..d6872bb78a625005abe06265914f8dfc3318401a 100644 --- a/api/@internal/component/ets/water_flow.d.ts +++ b/api/@internal/component/ets/water_flow.d.ts @@ -18,203 +18,202 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ScrollableCommonMethod, NestedScrollOptions, CommonMethod, Optional, OnWillScrollCallback, OnScrollCallback } from './common'; +import { CustomBuilder } from './builder' +import { Length, Dimension, Margin, ConstraintSizeOptions, Resource } from './units'; +import { Scroller, OnScrollFrameBeginCallback } from './scroll'; +import { ScrollState } from './list' +import { FlexDirection } from './enums' +import { ComponentContent } from '../../arkui/ComponentContent' +/*** endif */ + /** * function that returns item main size by index. * * @typedef { function } GetItemMainSizeByIndex - * @param { number } index - Index of the target water flow item.
Value range: [0, total number of child nodes - 1]. + * @param { number } index - the index of FlowItem * @returns { number } main size of the FlowItem at index * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type GetItemMainSizeByIndex = (index: number) => number; /** - * Describes the configuration of the water flow item section. + * Defines the water flow section options. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class SectionOptions { /** * The number of FlowItems in this section. * - * @type { number } itemsCount - Number of water flow items in the section. The value must be a positive integer. - * If the splice, push, or update APIs receive a section where the itemsCount value is less than 0, these APIs will not be executed. + * @type { number } itemsCount - the number of FlowItems in this section * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ itemsCount: number; /** * The columns of this section in vertical layout, or rows in horizontal layout. * - * @type { ?number } crossCount - Number of columns (in vertical layout) or rows (in horizontal layout). - *
If the value is less than 1, the default value is used. + * @type { ?number } crossCount - cross count of this section * @default 1 one column in vertical layout, or one row in horizontal layout * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ crossCount?: number; /** - * Callback used to obtain the main axis size,in vp, of the water flow item at a specified index during - * the layout process of the WaterFlow component. - * - *

NOTE - *
1. When both onGetItemMainSizeByIndex and the width or height attribute of the water flow item are used, - * the main axis size is determined by the return value of onGetItemMainSizeByIndex, - * which will override the main axis length of water flow item. - *
2. Using onGetItemMainSizeByIndex can improve the efficiency of jumping to a specific position or index in the WaterFlow component. - * Avoid mixing the use of onGetItemMainSizeByIndex with sections that do not have it set, as this can cause layout exceptions. - *
3. If onGetItemMainSizeByIndex returns a negative number, the height of the water flow item is 0. - *

+ * Asks the developer for the main size in vp of the flow item with the specified index. + * The water flow layout uses the size measured after the flow item is created if not set. * * @type { ?GetItemMainSizeByIndex } onGetItemMainSizeByIndex - function that returns item main size by index * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onGetItemMainSizeByIndex?: GetItemMainSizeByIndex; /** - * Gap between columns. If this parameter is not set, the value of columnsGap for the water flow is used. - * If this parameter is set to an invalid value, 0 vp is used. - * + * Set the spacing between columns of this section. + * * @type { ?Dimension } columnsGap - column gap of this section * same with columnsGap of WaterFlow if not set * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ columnsGap?: Dimension; /** - * Gap between rows. If this parameter is not set, the value of rowsGap for the water flow is used. - * If this parameter is set to an invalid value, 0 vp is used. + * Set the spacing between rows of this section. * * @type { ?Dimension } rowsGap - row gap of this section * same with rowsGap of WaterFlow if not set * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ rowsGap?: Dimension; /** - * Padding of the section. A value of the Length type specifies the margin for all the four sides. + * Outer margin of this section. * * @type { ?(Margin | Dimension) } margin - outer margin of this section * @default {top: 0, right: 0, bottom: 0, left: 0} * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ margin?: Margin | Dimension; } /** - * Describes the water flow item sections. + * Indicates the sections of WaterFlow. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class WaterFlowSections { /** - * A constructor used to create a WaterFlowSections object. + * Creates an instance of WaterFlowSections. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); /** - * Changes sections by removing or replacing an existing section and/or adding a section. - * - * @param { number } start - Zero-based index at which the changing starts. The value is converted to an integer. - *
NOTE - *
1. A negative index counts back from the end of the section list. If -WaterFlowSections.length() <= start < 0, start + array.length is used. - *
2. If start < -WaterFlowSections.length(), 0 is used. - *
3. If start >= WaterFlowSections.length(), a new section is added at the end. - * @param { number } [deleteCount] - Number of sections to be deleted from the position specified by start. - *
NOTE - *
1. If deleteCount is omitted, or if its value is greater than or equal to the number of sections from - * the position specified by start to the end of the WaterFlowSections, - * then all sections from the position specified by start to the end of the WaterFlowSections will be deleted. - *
2. If deleteCount is 0 or a negative number, no sections are deleted. - * @param { Array } [sections] - Sections to add to the section list, beginning from the position specified by start. - * If no section is specified, splice() will only delete sections from the WaterFlow component. + * Changes sections in the WaterFlow by removing or replacing existing elements and/or adding new elements in place. + * + * @param { number } start - Zero-based index at which to start changing the sections. + * @param { number } [deleteCount] - Indicating the number of sections in the WaterFlow to remove from start. + * @param { Array } [sections] - The new sections to add to the WaterFlow, beginning from start. * @returns { boolean } Whether the splice was successful. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ splice(start: number, deleteCount?: number, sections?: Array): boolean; /** - * Adds the specified sections to the end of the WaterFlow component. + * Pushes a new section to the end of WaterFlow. * - * @param { SectionOptions } section - Sections to add to the end of the WaterFlow component. + * @param { SectionOptions } section - new section options. * @returns { boolean } Whether the push was successful. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ push(section: SectionOptions): boolean; /** - * Updates the configuration of a specified water flow item section. + * Updates section at specified section index. * - * @param { number } sectionIndex - Zero-based index of the water flow item section to update. The value is converted to an integer. - *
NOTE - *
1. A negative index counts back from the end of the section list. If -WaterFlowSections.length() <= sectionIndex < 0, sectionIndex + array.length is used. - *
2. If sectionIndex < -WaterFlowSections.length(), 0 is used.
3. If sectionIndex >= WaterFlowSections.length(), a new section is added at the end. - * @param { SectionOptions } section - New section configuration. + * @param { number } sectionIndex - index of section to be updated. + * @param { SectionOptions } section - new section options. * @returns { boolean } Whether the update was successful. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ update(sectionIndex:number, section: SectionOptions): boolean; /** - * Obtains the configuration of all sections in the WaterFlow component. + * Obtains all the section options in the WaterFlow. * * @returns { Array } Returns all the section options in the WaterFlow. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ values(): Array; /** - * Obtains the number of sections in the WaterFlow component. + * Obtains the section counts in the WaterFlow. * * @returns { number } Returns section counts in the WaterFlow. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ length(): number; } @@ -226,41 +225,29 @@ declare class WaterFlowSections { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum WaterFlowLayoutMode { /** - * Default layout mode where water flow items are arranged from top to bottom. Items in the viewport depend on the layout of all items above them. - * As such, in cases of redirection or switching the number of columns, the layout of all items above the viewport must be recalculated. + * Top-down Layout mode. Positions of new items depend on items above. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ALWAYS_TOP_DOWN = 0, /** - * Sliding window mode. This mode only takes into account the layout in the viewport, - * without depending on water flow items above the viewport. - * - *

NOTE - *
1. During a non-animated redirection to a distant location, water flow items are laid out forward or backward based on the target position. - * If the user then swipes back to the position prior to the redirection, the layout of the content may not be consistent with its previous state. - * This can lead to misalignment of the top nodes when the user swipes back to the top after the redirection. - * To counteract this issue, in this layout mode, the layout will be automatically adjusted after reaching the top of the viewport to ensure that the top is aligned. - * If there are multiple sections, adjustments will be made to the sections within the viewport when scrolling ends. - *
2. The total offset returned by the currentOffset API of scroller is inaccurate after a redirection or data update. This offset will be recalibrated when the user swipes back to the top. - *
3. If a jump action (for example, by calling scrollToIndex without animation or scrollEdge) and - * an input offset (such as from a swipe gesture or a scrolling animation) are both initiated within the same frame, both will be executed. - *
4. If the scrollToIndex API is called without animation to jump to a distant position (beyond the range of visible water flow items in the window), - * the total offset is calculated in the sliding window mode. - *

+ * Sliding window mode. Only maintains layout information of items currently in viewport. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SLIDING_WINDOW = 1, } @@ -281,13 +268,14 @@ declare enum WaterFlowLayoutMode { * @since 10 */ /** - * Provides parameters of the WaterFlow component. + * Defines the water flow options. * * @interface WaterFlowOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface WaterFlowOptions { /** @@ -306,24 +294,26 @@ declare interface WaterFlowOptions { * @since 10 */ /** - * Footer of the WaterFlow component. + * Describes the water flow footer. * * @type { ?CustomBuilder } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ footer?: CustomBuilder; /** - * Footer of the WaterFlow component. + * Describes the water flow footer. * * @type { ?ComponentContent } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ footerContent?: ComponentContent; @@ -343,45 +333,39 @@ declare interface WaterFlowOptions { * @since 10 */ /** - * Controller of the scrollable component, bound to the scrollable component. - * - *

NOTE - *
The scroller cannot be bound to other scrollable components, such as ArcList, List, Grid, or Scroll. - *

+ * Describes the water flow scroller. * * @type { ?Scroller } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scroller?: Scroller; /** - * Water flow item sections. Different sections can have different numbers of columns. - * - *

NOTE - *
1. When sections is used, the columnsTemplate and rowsTemplate attributes are ignored. - *
2. When sections is used, the footer cannot be set separately. The last section can function as the footer. - *

+ * Describes the sections with different cross count that compose the water flow. * - * @type { ?WaterFlowSections } sections - sections with different cross count + * @type { ?WaterFlowSections } sections - sections with different cross count * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ sections?: WaterFlowSections; /** - * Layout mode of the WaterFlow component. + * Describes the layout mode. * * @type { ?WaterFlowLayoutMode } * @default ALWAYS_TOP_DOWN * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ layoutMode?: WaterFlowLayoutMode; } @@ -467,7 +451,8 @@ declare type OnWaterFlowScrollIndexCallback = (first: number, last: number) => v * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface WaterFlowInterface { /** @@ -495,7 +480,8 @@ interface WaterFlowInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (options?: WaterFlowOptions): WaterFlowAttribute; } @@ -522,7 +508,8 @@ interface WaterFlowInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class WaterFlowAttribute extends ScrollableCommonMethod { /** @@ -543,14 +530,15 @@ declare class WaterFlowAttribute extends ScrollableCommonMethodDefault value: '1fr' + * @param { string } value * @returns { WaterFlowAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ columnsTemplate(value: string): WaterFlowAttribute; @@ -572,15 +560,15 @@ declare class WaterFlowAttribute extends ScrollableCommonMethodDefault value: '1fr' + * @param { string } value * @returns { WaterFlowAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ rowsTemplate(value: string): WaterFlowAttribute; @@ -631,15 +620,15 @@ declare class WaterFlowAttribute extends ScrollableCommonMethodDefault value: 0 - *
Value range: [0, +∞). + * @param { Length } value * @returns { WaterFlowAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ columnsGap(value: Length): WaterFlowAttribute; @@ -661,14 +650,15 @@ declare class WaterFlowAttribute extends ScrollableCommonMethodDefault value: 0 + * @param { Length } value * @returns { WaterFlowAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ rowsGap(value: Length): WaterFlowAttribute; @@ -690,14 +680,15 @@ declare class WaterFlowAttribute extends ScrollableCommonMethodDefault value: FlexDirection.Column + * @param { FlexDirection } value * @returns { WaterFlowAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ layoutDirection(value: FlexDirection): WaterFlowAttribute; @@ -710,9 +701,9 @@ declare class WaterFlowAttribute extends ScrollableCommonMethodDefault value: true + * Called when setting whether to enable scroll by gesture or mouse. + * @param { boolean } value * @returns { WaterFlowAttribute } The attribute of the waterflow * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -750,14 +740,8 @@ declare class WaterFlowAttribute extends ScrollableCommonMethodDefault value: 0.9 for wearable devices and 0.6 for non-wearable devices. - *
Since API version 11, the default value for non-wearable devices is 0.7. - *
Since API version 12, the default value for non-wearable devices is 0.75. - *
Value range: (0, +∞). - *
If the value is less than or equal to 0, the default value is used. + * Called to setting the friction. + * @param { number | Resource } value - options for scrolling friction. * @returns { WaterFlowAttribute } the attribute of the water flow. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -767,7 +751,7 @@ declare class WaterFlowAttribute extends ScrollableCommonMethodDefault value: number of nodes visible on the screen, with the maximum value of 16 - *
Value range: [0, +∞). - *
Values less than 0 are treated as 1. + * Called to set number of flow items to be preloaded (cached) in LazyForEach. + * @param { number } value - number of flow items to be preloaded (cached). * @returns { WaterFlowAttribute } the attribute of the water flow. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ cachedCount(value: number): WaterFlowAttribute; /** - * Sets the number of water flow items to be cached (preloaded) and specifies whether to display the cached nodes. - * - * @param { number } count - Number of water flow items to be preloaded (cached). - *
Default value: number of nodes visible on the screen, with the maximum value of 16 - *
Value range: [0, +∞). - *
Values less than 0 are treated as 1. - * @param { boolean } show - Whether to display the cached water flow items. + * Called to set number of flow items to be preloaded (cached) in LazyForEach / Repeat. + * @param { number } count - number of flow items to be preloaded (cached). + * @param { boolean } show - if true, cached items are displayed when clip is disabled. * @returns { WaterFlowAttribute } the attribute of the water flow. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ cachedCount(count: number, show: boolean): WaterFlowAttribute; @@ -835,7 +813,7 @@ declare class WaterFlowAttribute extends ScrollableCommonMethod { offsetRemain: number }): WaterFlowAttribute; /** - * Triggered when the first or last item displayed in the component changes. - * It is triggered once when the component is initialized. + * Called when scrolling begin each frame. + * + * @param { OnScrollFrameBeginCallback } event + * @returns { WaterFlowAttribute } the attribute of the water flow. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onScrollFrameBegin(event: OnScrollFrameBeginCallback): WaterFlowAttribute; + + /** + * Called when the first or last item displayed in the waterflow changes. * - * @param { function } event - Callback function, triggered when the first or last item + * @param { function } event - Callback function, triggered when the first or last item * displayed in the waterflow changes. - * "first": the index of the first item displayed in the waterflow, + * "first": the index of the first item displayed in the waterflow, * "last": the index of the last item displayed in the waterflow. * @returns { WaterFlowAttribute } the attribute of the water flow. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onScrollIndex(event: (first: number, last: number) => void): WaterFlowAttribute; + + /** + * Called when the scrollable will scroll. + * + * @param { Optional } handler - callback of scrollable. + * @returns { WaterFlowAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onWillScroll(handler: Optional): WaterFlowAttribute; + + /** + * Called when the scrollable did scroll. + * + * @param { OnScrollCallback } handler - callback of scrollable, + * scrollOffset is offset this frame did scroll, scrollState is current scroll state. + * @returns { WaterFlowAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onDidScroll(handler: OnScrollCallback): WaterFlowAttribute; } /** diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts index c905bb910f16eef71ac44b4596c2a8866afb0a7c..422616f3f24f3135d3759ef9e25ae11b6dd3392b 100644 --- a/api/@internal/component/ets/web.d.ts +++ b/api/@internal/component/ets/web.d.ts @@ -18,6 +18,28 @@ * @kit ArkWeb */ +/*** if arkts 1.2 */ +import webview from '../../@ohos.web.webview'; +import image from '../../@ohos.multimedia.image'; +import { CommonMethod, Callback, TouchEvent, NestedScrollOptions, KeyEvent } from './common'; +import { CustomBuilder } from './builder' +import { Resource } from '../../global/resource'; +import { Position, ResourceStr } from './units'; +import { MenuType, EditMenuOptions } from './textCommon'; +import { CopyOptions, NestedScrollMode } from './enums'; +/*** endif */ + +/** + * Provides methods for controlling the web controller. + * + * @typedef { webview.WebviewController } + * @syscap SystemCapability.Web.Webview.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ +type WebviewController = webview.WebviewController; + /** * Provides methods for controlling the web controller. * @@ -49,7 +71,8 @@ declare type WebviewController = import('../api/@ohos.web.webview').default.Webv * @param { LoadCommittedDetails } loadCommittedDetails - callback information of onNavigationEntryCommitted. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ type OnNavigationEntryCommittedCallback = (loadCommittedDetails: LoadCommittedDetails) => void; @@ -60,22 +83,11 @@ type OnNavigationEntryCommittedCallback = (loadCommittedDetails: LoadCommittedDe * @param { SslErrorEvent } sslErrorEvent - callback information of onSslErrorEvent. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type OnSslErrorEventCallback = (sslErrorEvent: SslErrorEvent) => void; -/** - * The callback of onOverrideErrorPage. - * - * @typedef { function } OnOverrideErrorpageCallback - * @param { WebResourceRequest } webResourceRequest - Information about the failed request. - * @param { error } WebResourceError - The information of error. - * @returns { string } - Return an HTML text content encoded in Base64. - * @syscap SystemCapability.Web.Webview.Core - * @since 20 - */ -type OnOverrideErrorPageCallback= (webResourceRequest: WebResourceRequest, error: WebResourceError) => string; - /** * The callback of largestContentfulPaint. * @@ -83,7 +95,8 @@ type OnOverrideErrorPageCallback= (webResourceRequest: WebResourceRequest, error * @param { LargestContentfulPaint } largestContentfulPaint - callback information of onLargestContentfulPaint. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type OnLargestContentfulPaintCallback = (largestContentfulPaint: LargestContentfulPaint) => void; @@ -94,7 +107,8 @@ type OnLargestContentfulPaintCallback = (largestContentfulPaint: LargestContentf * @param { FirstMeaningfulPaint } firstMeaningfulPaint - callback information of onFirstMeaningfulPaint. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type OnFirstMeaningfulPaintCallback = (firstMeaningfulPaint: FirstMeaningfulPaint) => void; @@ -108,7 +122,8 @@ type OnFirstMeaningfulPaintCallback = (firstMeaningfulPaint: FirstMeaningfulPain * false causes the Web to continue loading the url as usual. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type OnOverrideUrlLoadingCallback = (webResourceRequest: WebResourceRequest) => boolean; @@ -119,7 +134,8 @@ type OnOverrideUrlLoadingCallback = (webResourceRequest: WebResourceRequest) => * @param { IntelligentTrackingPreventionDetails } details - callback information of onIntelligentTrackingPrevention. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type OnIntelligentTrackingPreventionCallback = (details: IntelligentTrackingPreventionDetails) => void; @@ -129,7 +145,8 @@ type OnIntelligentTrackingPreventionCallback = (details: IntelligentTrackingPrev * @typedef { function } OnNativeEmbedVisibilityChangeCallback * @param { NativeEmbedVisibilityInfo } nativeEmbedVisibilityInfo - callback information of onNativeEmbedVisibilityChange. * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type OnNativeEmbedVisibilityChangeCallback = (nativeEmbedVisibilityInfo: NativeEmbedVisibilityInfo) => void; @@ -139,30 +156,29 @@ type OnNativeEmbedVisibilityChangeCallback = (nativeEmbedVisibilityInfo: NativeE * @typedef NativeMediaPlayerConfig * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NativeMediaPlayerConfig { /** - * Whether to enable the application to take over the webpage media playback function. + * Should playing web media by native application instead of web player. * * @type { boolean } - * {@code true} means to enable the application to take over the web media playback function, {@code false} otherwise. - * Deflault value: false. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enable: boolean; /** - * Whether the video player's display overlays the web page content when the application takes over the web page's video player. + * The contents painted by native media player should overlay web page. * * @type { boolean } - * {@code true} means changing the height of the video layer to cover the content of the webpage, {@code false} otherwise. - * Deflault value: false. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ shouldOverlay: boolean; } @@ -173,7 +189,8 @@ declare interface NativeMediaPlayerConfig { * @typedef { function } OnRenderProcessNotRespondingCallback * @param { RenderProcessNotRespondingData } data - details of onRenderProcessNotResponding. * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type OnRenderProcessNotRespondingCallback = (data : RenderProcessNotRespondingData) => void; @@ -182,18 +199,20 @@ type OnRenderProcessNotRespondingCallback = (data : RenderProcessNotRespondingDa * * @typedef { function } OnRenderProcessRespondingCallback * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type OnRenderProcessRespondingCallback = () => void; /** - * The callback of ViewportFit Changed. +* The callback of ViewportFit Changed. * * @typedef { function } OnViewportFitChangedCallback * @param { ViewportFit } viewportFit - details of OnViewportFitChangedCallback. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type OnViewportFitChangedCallback = (viewportFit: ViewportFit) => void; @@ -204,7 +223,8 @@ type OnViewportFitChangedCallback = (viewportFit: ViewportFit) => void; * @param { AdsBlockedDetails } details - details of OnAdsBlockedCallback. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type OnAdsBlockedCallback = (details: AdsBlockedDetails) => void; @@ -214,7 +234,8 @@ type OnAdsBlockedCallback = (details: AdsBlockedDetails) => void; * @interface AdsBlockedDetails * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface AdsBlockedDetails { /** @@ -223,7 +244,8 @@ declare interface AdsBlockedDetails { * @type { string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ url: string; @@ -233,7 +255,8 @@ declare interface AdsBlockedDetails { * @type { Array } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ adsBlocked: Array; } @@ -244,7 +267,8 @@ declare interface AdsBlockedDetails { * @interface WebKeyboardOptions * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface WebKeyboardOptions { /** @@ -253,27 +277,28 @@ declare interface WebKeyboardOptions { * @type { boolean } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ useSystemKeyboard: boolean; - /** * Set the enter key type when the system keyboard is used, the "enter" key related to the {@link inputMethodEngine}. * * @type { ?number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enterKeyType?: number; - /** * Set the custom keyboard builder when the custom keyboard is used. * * @type { ?CustomBuilder } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ customKeyboard?: CustomBuilder; } @@ -283,7 +308,8 @@ declare interface WebKeyboardOptions { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class WebKeyboardController { /** @@ -291,51 +317,53 @@ declare class WebKeyboardController { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); /** - * Insert characters in the Web input field. + * Insert text into Editor. * * @param { string } text - text which will be inserted. * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ insertText(text: string): void; - /** - * Deletes the specified length of characters from the back to the front in the Web input field. + * Delete text from back to front. * * @param { number } length - length of text, which will be deleted from back to front. * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ deleteForward(length: number): void; - /** - * Delete the specified length of characters in the Web input field from the beginning to the end. + * Delete text from front to back. * * @param { number } length - length of text, which will be deleted from front to back. * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ deleteBackward(length: number): void; - /** * Send the function of the key. * * @param { number } key - action indicates the "enter" key related to the {@link inputMethodEngine} * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ sendFunctionKey(key: number): void; - /** * Close the custom keyboard. * * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ close(): void; } @@ -346,7 +374,8 @@ declare class WebKeyboardController { * @interface WebKeyboardCallbackInfo * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface WebKeyboardCallbackInfo { /** @@ -355,17 +384,18 @@ declare interface WebKeyboardCallbackInfo { * @type { WebKeyboardController } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ controller: WebKeyboardController; - /** * The attributes of web input element. * * @type { Record } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ attributes: Record; } @@ -378,7 +408,8 @@ declare interface WebKeyboardCallbackInfo { * @returns { WebKeyboardOptions } Return the web keyboard options of this web component. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type WebKeyboardCallback = (keyboardCallbackInfo: WebKeyboardCallbackInfo) => WebKeyboardOptions; @@ -396,7 +427,8 @@ type WebKeyboardCallback = (keyboardCallbackInfo: WebKeyboardCallbackInfo) => We * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum MessageLevel { /** @@ -411,9 +443,10 @@ declare enum MessageLevel { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - Debug, + Debug = 0, /** * Error level. @@ -427,9 +460,10 @@ declare enum MessageLevel { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - Error, + Error = 1, /** * Info level. @@ -443,9 +477,10 @@ declare enum MessageLevel { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - Info, + Info = 2, /** * Log level. @@ -459,9 +494,10 @@ declare enum MessageLevel { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - Log, + Log = 3, /** * Warn level. @@ -475,9 +511,10 @@ declare enum MessageLevel { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - Warn + Warn = 4 } /** @@ -502,7 +539,8 @@ declare enum MessageLevel { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum MixedMode { /** @@ -519,12 +557,13 @@ declare enum MixedMode { * @since 11 */ /** - * Loose Mode: HTTP and HTTPS hybrid content can be loaded. This means that all insecure content can be loaded. + * Allows all sources. * * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ All = 0, @@ -542,12 +581,13 @@ declare enum MixedMode { * @since 11 */ /** - * Compatibility Modes: HTTP and HTTPS hybrid content can be loaded in compatibility mode. This means that some insecure content may be loaded. + * Allows sources Compatibly. * * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ Compatible = 1, @@ -565,12 +605,13 @@ declare enum MixedMode { * @since 11 */ /** - * Strict Mode: HTTP and HTTPS hybrid content cannot be loaded. + * Don't allow unsecure sources from a secure origin. * * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ None = 2 } @@ -582,7 +623,8 @@ declare enum MixedMode { * @param { ThreatType } threatType - callback information of onSafeBrowsingCheckResult. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ type OnSafeBrowsingCheckResultCallback = (threatType: ThreatType) => void; @@ -599,7 +641,8 @@ type OnSafeBrowsingCheckResultCallback = (threatType: ThreatType) => void; * @enum { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum HitTestType { /** @@ -613,7 +656,8 @@ declare enum HitTestType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ EditText = 0, @@ -628,7 +672,8 @@ declare enum HitTestType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Email = 1, @@ -643,7 +688,8 @@ declare enum HitTestType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ HttpAnchor = 2, @@ -658,7 +704,8 @@ declare enum HitTestType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ HttpAnchorImg = 3, @@ -673,7 +720,8 @@ declare enum HitTestType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Img = 4, @@ -688,7 +736,8 @@ declare enum HitTestType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Map = 5, @@ -703,7 +752,8 @@ declare enum HitTestType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Phone = 6, @@ -718,7 +768,8 @@ declare enum HitTestType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Unknown = 7 } @@ -745,7 +796,8 @@ declare enum HitTestType { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum CacheMode { /** @@ -767,7 +819,8 @@ declare enum CacheMode { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ Default = 0, @@ -790,7 +843,8 @@ declare enum CacheMode { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ None = 1, @@ -813,7 +867,8 @@ declare enum CacheMode { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ Online = 2, @@ -836,7 +891,8 @@ declare enum CacheMode { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ Only = 3 } @@ -847,7 +903,8 @@ declare enum CacheMode { * @enum { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum OverScrollMode { /** @@ -855,7 +912,8 @@ declare enum OverScrollMode { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ NEVER = 0, @@ -864,7 +922,8 @@ declare enum OverScrollMode { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ ALWAYS = 1 } @@ -875,7 +934,8 @@ declare enum OverScrollMode { * @enum { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum BlurOnKeyboardHideMode { /** @@ -883,7 +943,8 @@ declare enum BlurOnKeyboardHideMode { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ SILENT = 0, @@ -892,7 +953,8 @@ declare enum BlurOnKeyboardHideMode { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ BLUR = 1 } @@ -910,7 +972,8 @@ declare enum BlurOnKeyboardHideMode { * @enum { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum WebDarkMode { /** @@ -924,7 +987,8 @@ declare enum WebDarkMode { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Off = 0, @@ -939,7 +1003,8 @@ declare enum WebDarkMode { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ On = 1, @@ -954,7 +1019,8 @@ declare enum WebDarkMode { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Auto = 2 } @@ -972,7 +1038,8 @@ declare enum WebDarkMode { * @enum { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum WebCaptureMode { /** @@ -981,10 +1048,11 @@ declare enum WebCaptureMode { * @since 10 */ /** - * Capture of the home screen. + * The home screen. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ HOME_SCREEN = 0 } @@ -995,7 +1063,8 @@ declare enum WebCaptureMode { * @enum { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ThreatType { /** @@ -1003,7 +1072,8 @@ declare enum ThreatType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ THREAT_ILLEGAL = 0, @@ -1012,7 +1082,8 @@ declare enum ThreatType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ THREAT_FRAUD = 1, @@ -1021,7 +1092,8 @@ declare enum ThreatType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ THREAT_RISK = 2, @@ -1031,7 +1103,8 @@ declare enum ThreatType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ THREAT_WARNING = 3 } @@ -1057,7 +1130,8 @@ declare enum ThreatType { * @typedef WebMediaOptions * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface WebMediaOptions { /** @@ -1068,17 +1142,15 @@ declare interface WebMediaOptions { * @since 10 */ /** - * Validity period for automatically resuming a paused web audio, in seconds. - * The maximum validity period is 60 seconds. Due to the approximate value, - * the validity period may have a deviation of less than 1 second. + * The time interval for audio playback to resume. * * @type { ?number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ resumeInterval?: number; - /** * Whether the audio of each web is exclusive. * @@ -1087,24 +1159,15 @@ declare interface WebMediaOptions { * @since 10 */ /** - * Whether the audio of multiple Web instances in an application is exclusive. + * Whether the audio of each web is exclusive. * * @type { ?boolean } - * {@code true} means audio exclusivity for multiple web instances within the application, {@code false} otherwise. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ audioExclusive?: boolean; - - /** - * The type for audio sessions. - * - * @type { ?AudioSessionType } - * @syscap SystemCapability.Web.Webview.Core - * @since 20 - */ - audioSessionType?: AudioSessionType; } /** @@ -1128,7 +1191,8 @@ declare interface WebMediaOptions { * @typedef ScreenCaptureConfig * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ScreenCaptureConfig { /** @@ -1144,7 +1208,8 @@ declare interface ScreenCaptureConfig { * @type { WebCaptureMode } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ captureMode: WebCaptureMode; } @@ -1168,7 +1233,8 @@ declare interface ScreenCaptureConfig { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class FullScreenExitHandler { /** @@ -1190,7 +1256,8 @@ declare class FullScreenExitHandler { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -1208,12 +1275,13 @@ declare class FullScreenExitHandler { * @since 11 */ /** - * Called when the Web component exits full screen mode. + * Exit the full screen mode. * * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ exitFullScreen(): void; } @@ -1233,7 +1301,8 @@ declare class FullScreenExitHandler { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface FullScreenEnterEvent { /** @@ -1251,10 +1320,10 @@ declare interface FullScreenEnterEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ handler: FullScreenExitHandler; - /** * The intrinsic width of the video if the fullscreen element contains video element, expressed in CSS pixels. * @@ -1270,10 +1339,10 @@ declare interface FullScreenEnterEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ videoWidth?: number; - /** * The intrinsic height of the video if the fullscreen element contains video element, expressed in CSS pixels. * @@ -1289,7 +1358,8 @@ declare interface FullScreenEnterEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ videoHeight?: number; } @@ -1311,7 +1381,8 @@ declare interface FullScreenEnterEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ type OnFullScreenEnterCallback = (event: FullScreenEnterEvent) => void; @@ -1339,7 +1410,8 @@ type MouseInfoCallback = (event: NativeEmbedMouseInfo) => void; * @enum { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum RenderExitReason { /** @@ -1353,7 +1425,8 @@ declare enum RenderExitReason { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ ProcessAbnormalTermination = 0, @@ -1368,7 +1441,8 @@ declare enum RenderExitReason { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ ProcessWasKilled = 1, @@ -1379,11 +1453,12 @@ declare enum RenderExitReason { * @since 9 */ /** - * The rendering process crashes and exits, such as a segment error. + * Segmentation fault. * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ ProcessCrashed = 2, @@ -1398,7 +1473,8 @@ declare enum RenderExitReason { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ ProcessOom = 3, @@ -1413,7 +1489,8 @@ declare enum RenderExitReason { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ ProcessExitUnknown = 4 } @@ -1424,7 +1501,8 @@ declare enum RenderExitReason { * @typedef { function } OnContextMenuHideCallback * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ type OnContextMenuHideCallback = () => void; @@ -1441,7 +1519,8 @@ type OnContextMenuHideCallback = () => void; * @enum { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SslError { /** @@ -1455,7 +1534,8 @@ declare enum SslError { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Invalid = 0, @@ -1470,7 +1550,8 @@ declare enum SslError { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ HostMismatch = 1, @@ -1485,7 +1566,8 @@ declare enum SslError { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ DateInvalid = 2, @@ -1500,7 +1582,8 @@ declare enum SslError { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Untrusted = 3 } @@ -1519,7 +1602,8 @@ declare enum SslError { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FileSelectorMode { /** @@ -1534,7 +1618,8 @@ declare enum FileSelectorMode { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ FileOpenMode = 0, @@ -1550,7 +1635,8 @@ declare enum FileSelectorMode { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ FileOpenMultipleMode = 1, @@ -1566,7 +1652,8 @@ declare enum FileSelectorMode { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ FileOpenFolderMode = 2, @@ -1582,7 +1669,8 @@ declare enum FileSelectorMode { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ FileSaveMode = 3 } @@ -1593,7 +1681,8 @@ declare enum FileSelectorMode { * @enum { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum WebLayoutMode { /** @@ -1601,7 +1690,8 @@ declare enum WebLayoutMode { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -1610,7 +1700,8 @@ declare enum WebLayoutMode { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ FIT_CONTENT = 1 } @@ -1620,22 +1711,25 @@ declare enum WebLayoutMode { * * @enum { number } * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum RenderProcessNotRespondingReason { /** * Timeout for input sent to render process. * * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ INPUT_TIMEOUT = 0, /** - * The new webpage loading navigation response timed out. + * Timeout for navigation commit. * * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NAVIGATION_COMMIT_TIMEOUT = 1 } @@ -1652,7 +1746,8 @@ declare enum RenderProcessNotRespondingReason { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class FileSelectorParam { /** @@ -1667,7 +1762,8 @@ declare class FileSelectorParam { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -1683,7 +1779,8 @@ declare class FileSelectorParam { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getTitle(): string; @@ -1699,7 +1796,8 @@ declare class FileSelectorParam { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getMode(): FileSelectorMode; @@ -1715,7 +1813,8 @@ declare class FileSelectorParam { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getAcceptType(): Array; @@ -1733,7 +1832,8 @@ declare class FileSelectorParam { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ isCapture(): boolean; @@ -1741,7 +1841,8 @@ declare class FileSelectorParam { * Gets an array of raw acceptable MIME type. * @returns { Array } Return an array of raw acceptable MIME type. * @syscap SystemCapability.Web.Webview.Core - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ getMimeTypes(): Array; } @@ -1758,7 +1859,8 @@ declare class FileSelectorParam { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class JsResult { /** @@ -1773,7 +1875,8 @@ declare class JsResult { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -1789,7 +1892,8 @@ declare class JsResult { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ handleCancel(): void; @@ -1805,7 +1909,8 @@ declare class JsResult { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ handleConfirm(): void; @@ -1819,11 +1924,12 @@ declare class JsResult { /** * Handle the user's JavaScript result if confirm the prompt dialog. * - * @param { string } result - The content of the dialog box entered by the user. + * @param { string } result * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ handlePromptConfirm(result: string): void; } @@ -1840,7 +1946,8 @@ declare class JsResult { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class FileSelectorResult { /** @@ -1855,7 +1962,8 @@ declare class FileSelectorResult { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -1869,11 +1977,12 @@ declare class FileSelectorResult { /** * select a list of files. * - * @param { Array } fileList - List of files that need to be operated. + * @param { Array } fileList * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ handleFileList(fileList: Array): void; } @@ -1890,7 +1999,8 @@ declare class FileSelectorResult { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class HttpAuthHandler { /** @@ -1905,7 +2015,8 @@ declare class HttpAuthHandler { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -1927,7 +2038,8 @@ declare class HttpAuthHandler { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ confirm(userName: string, password: string): boolean; @@ -1943,7 +2055,8 @@ declare class HttpAuthHandler { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ cancel(): void; @@ -1961,7 +2074,8 @@ declare class HttpAuthHandler { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ isHttpAuthInfoSaved(): boolean; } @@ -1977,7 +2091,8 @@ declare class HttpAuthHandler { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class SslErrorHandler { /** @@ -1991,7 +2106,8 @@ declare class SslErrorHandler { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -2006,7 +2122,8 @@ declare class SslErrorHandler { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ handleConfirm(): void; @@ -2021,7 +2138,8 @@ declare class SslErrorHandler { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ handleCancel(): void; @@ -2051,7 +2169,8 @@ declare class SslErrorHandler { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class ClientAuthenticationHandler { /** @@ -2065,7 +2184,8 @@ declare class ClientAuthenticationHandler { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -2084,7 +2204,8 @@ declare class ClientAuthenticationHandler { * @param { string } certChainFile - The file that store client certificate chain. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ confirm(priKeyFile: string, certChainFile: string): void; @@ -2101,7 +2222,8 @@ declare class ClientAuthenticationHandler { * @param { string } authUri is the key of credentials.The credentials contain sign info and client certificates info. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ confirm(authUri: string): void; @@ -2116,7 +2238,8 @@ declare class ClientAuthenticationHandler { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ cancel(): void; @@ -2131,7 +2254,8 @@ declare class ClientAuthenticationHandler { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ ignore(): void; } @@ -2150,7 +2274,8 @@ declare class ClientAuthenticationHandler { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ProtectedResourceType { /** @@ -2160,11 +2285,12 @@ declare enum ProtectedResourceType { * @since 9 */ /** - * The MidiSysex resource. Currently, only permission events can be reported. MIDI devices are not yet supported. + * The MidiSysex resource. * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ MidiSysex = 'TYPE_MIDI_SYSEX', @@ -2180,7 +2306,8 @@ declare enum ProtectedResourceType { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO_CAPTURE = 'TYPE_VIDEO_CAPTURE', @@ -2196,7 +2323,8 @@ declare enum ProtectedResourceType { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_CAPTURE = 'TYPE_AUDIO_CAPTURE', @@ -2205,7 +2333,8 @@ declare enum ProtectedResourceType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ SENSOR = 'TYPE_SENSOR' } @@ -2217,12 +2346,13 @@ declare enum ProtectedResourceType { * @since 9 */ /** - * Implements the PermissionRequest object, related to {@link onPermissionRequest} method. + * Defines the onPermissionRequest callback, related to {@link onPermissionRequest} method. * * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class PermissionRequest { /** @@ -2237,7 +2367,8 @@ declare class PermissionRequest { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -2253,7 +2384,8 @@ declare class PermissionRequest { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ deny(): void; @@ -2271,7 +2403,8 @@ declare class PermissionRequest { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getOrigin(): string; @@ -2283,13 +2416,14 @@ declare class PermissionRequest { * @since 9 */ /** - * Obtains the list of accessible resources requested for the web page. + * Gets the resource that the webpage is trying to access. * - * @returns { Array } List of accessible resources requested by the web page. + * @returns { Array } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getAccessibleResource(): Array; @@ -2307,7 +2441,8 @@ declare class PermissionRequest { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ grant(resources: Array): void; } @@ -2321,7 +2456,8 @@ declare class PermissionRequest { * Defines the onScreenCapture callback, related to {@link onScreenCapture} method. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class ScreenCaptureHandler { /** @@ -2333,7 +2469,8 @@ declare class ScreenCaptureHandler { * Constructor. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -2345,12 +2482,13 @@ declare class ScreenCaptureHandler { * @since 10 */ /** - * Obtains the origin of this web page. + * Gets the source of the webpage that attempted to access the restricted resource. * * @returns { string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getOrigin(): string; @@ -2361,11 +2499,12 @@ declare class ScreenCaptureHandler { * @since 10 */ /** - * Grants the screen capture permission. + * Grant origin access to a given resource. * @param { ScreenCaptureConfig } config The screen capture configuration. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ grant(config: ScreenCaptureConfig): void; @@ -2375,10 +2514,11 @@ declare class ScreenCaptureHandler { * @since 10 */ /** - * Rejects this screen capture request. + * Reject the request. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ deny(): void; } @@ -2394,7 +2534,8 @@ declare class ScreenCaptureHandler { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class DataResubmissionHandler { /** @@ -2408,7 +2549,8 @@ declare class DataResubmissionHandler { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -2423,7 +2565,8 @@ declare class DataResubmissionHandler { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ resend(): void; @@ -2438,7 +2581,8 @@ declare class DataResubmissionHandler { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ cancel(): void; } @@ -2454,7 +2598,8 @@ declare class DataResubmissionHandler { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class ControllerHandler { /** @@ -2468,7 +2613,8 @@ declare class ControllerHandler { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -2481,11 +2627,12 @@ declare class ControllerHandler { */ /** * Set WebController object. - * Set to null if you don't need to open a new window. + * * @param { WebviewController } controller * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ setWebController(controller: WebviewController): void; } @@ -2503,7 +2650,8 @@ declare class ControllerHandler { * @enum { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ContextMenuSourceType { /** @@ -2517,7 +2665,8 @@ declare enum ContextMenuSourceType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ None = 0, @@ -2532,7 +2681,8 @@ declare enum ContextMenuSourceType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Mouse = 1, @@ -2547,7 +2697,8 @@ declare enum ContextMenuSourceType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ LongPress = 2 } @@ -2565,7 +2716,8 @@ declare enum ContextMenuSourceType { * @enum { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ContextMenuMediaType { /** @@ -2579,7 +2731,8 @@ declare enum ContextMenuMediaType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ None = 0, @@ -2594,7 +2747,8 @@ declare enum ContextMenuMediaType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Image = 1, @@ -2628,7 +2782,8 @@ declare enum ContextMenuMediaType { * @enum { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ContextMenuInputFieldType { /** @@ -2642,7 +2797,8 @@ declare enum ContextMenuInputFieldType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ None = 0, @@ -2657,7 +2813,8 @@ declare enum ContextMenuInputFieldType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ PlainText = 1, @@ -2672,7 +2829,8 @@ declare enum ContextMenuInputFieldType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Password = 2, @@ -2687,7 +2845,8 @@ declare enum ContextMenuInputFieldType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Number = 3, @@ -2702,7 +2861,8 @@ declare enum ContextMenuInputFieldType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Telephone = 4, @@ -2717,65 +2877,69 @@ declare enum ContextMenuInputFieldType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Other = 5 } /** - * Defines the lifecycle of the same-layer tag. - * When the same-layer tag exists on the loaded page, - * CREATE is triggered. When the same-layer tag is moved or is enlarged, - * **UPDATE **is triggered. When the page exits, DESTROY is triggered. + * Defines the embed status, related to {@link NativeEmbedDataInfo}. * * @enum { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum NativeEmbedStatus { /** - * The same-layer tag is created. + * The embed tag create. * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ CREATE = 0, /** - * The same-layer tag is updated. + * The embed tag update. * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ UPDATE = 1, /** - *The same-layer tag is destroyed. + * The embed tag destroy. * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ DESTROY = 2, /** - * The same-layer tag enters the BFCache. + * The embed tag enter backforward cache. * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ ENTER_BFCACHE = 3, /** - * The same-layer tag leaves the BFCache. + * The embed tag leave backforward cache. * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ LEAVE_BFCACHE = 4 } @@ -2793,7 +2957,8 @@ declare enum NativeEmbedStatus { * @enum { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ContextMenuEditStateFlags { /** @@ -2807,7 +2972,8 @@ declare enum ContextMenuEditStateFlags { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -2822,7 +2988,8 @@ declare enum ContextMenuEditStateFlags { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ CAN_CUT = 1 << 0, @@ -2837,7 +3004,8 @@ declare enum ContextMenuEditStateFlags { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ CAN_COPY = 1 << 1, @@ -2848,11 +3016,12 @@ declare enum ContextMenuEditStateFlags { * @since 9 */ /** - * Pasting is supported. + * Support for pasting. * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ CAN_PASTE = 1 << 2, @@ -2867,7 +3036,8 @@ declare enum ContextMenuEditStateFlags { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ CAN_SELECT_ALL = 1 << 3 } @@ -2878,7 +3048,8 @@ declare enum ContextMenuEditStateFlags { * @enum { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum WebNavigationType { /** @@ -2886,7 +3057,8 @@ declare enum WebNavigationType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ UNKNOWN = 0, @@ -2898,7 +3070,8 @@ declare enum WebNavigationType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ MAIN_FRAME_NEW_ENTRY = 1, @@ -2911,7 +3084,8 @@ declare enum WebNavigationType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ MAIN_FRAME_EXISTING_ENTRY = 2, @@ -2920,7 +3094,8 @@ declare enum WebNavigationType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ NAVIGATION_TYPE_NEW_SUBFRAME = 4, @@ -2929,40 +3104,39 @@ declare enum WebNavigationType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ NAVIGATION_TYPE_AUTO_SUBFRAME = 5 } /** - * Enumerates the rendering mode of Web components. By default, the asynchronous rendering mode is used. - * The asynchronous rendering mode is recommended because it has better performance and lower power consumption. + * Defines the web render mode, related to {@link RenderMode}. * * @enum { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum RenderMode { /** - * The Web component is rendered asynchronously. - * The ArkWeb component as a graphic surface node is displayed independently. - * The maximum width of the Web component is 7,680 px (physical pixel). + * Web and arkui render asynchronously * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ ASYNC_RENDER = 0, /** - * The Web component is rendered synchronously. - * The ArkWeb component as a graphic canvas node is displayed together with the system component. - * The maximum width of the Web component is 500,000 px (physical pixel). + * Web and arkui render synchronously * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ SYNC_RENDER = 1 } @@ -2973,7 +3147,8 @@ declare enum RenderMode { * @enum { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ViewportFit { /** @@ -2981,7 +3156,8 @@ declare enum ViewportFit { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ AUTO = 0, @@ -2991,7 +3167,8 @@ declare enum ViewportFit { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ CONTAINS = 1, @@ -3001,7 +3178,8 @@ declare enum ViewportFit { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ COVER = 2 } @@ -3017,7 +3195,8 @@ declare enum ViewportFit { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class WebContextMenuParam { /** @@ -3031,7 +3210,8 @@ declare class WebContextMenuParam { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -3046,11 +3226,10 @@ declare class WebContextMenuParam { * Horizontal offset coordinates of the menu within the Web component. * * @returns { number } The context menu x coordinate. - * Returns a non-negative integer if normal, otherwise returns -1. - * Unit: vp. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ x(): number; @@ -3065,11 +3244,10 @@ declare class WebContextMenuParam { * Vertical offset coordinates for the menu within the Web component. * * @returns { number } The context menu y coordinate. - * Returns a non-negative integer if normal, otherwise returns -1. - * Unit: vp. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ y(): number; @@ -3086,7 +3264,8 @@ declare class WebContextMenuParam { * @returns { string } If relate to a link return link url, else return null. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getLinkUrl(): string; @@ -3103,7 +3282,8 @@ declare class WebContextMenuParam { * @returns { string } If relate to a link return unfiltered link url, else return null. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getUnfilteredLinkUrl(): string; @@ -3120,7 +3300,8 @@ declare class WebContextMenuParam { * @returns { string } If this context menu is "src" attribute, return link url, else return null. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getSourceUrl(): string; @@ -3137,7 +3318,8 @@ declare class WebContextMenuParam { * @returns { boolean } Return whether this context menu has image content. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ existsImageContents(): boolean; @@ -3154,7 +3336,8 @@ declare class WebContextMenuParam { * @returns { ContextMenuMediaType } Returns the type of context node. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getMediaType(): ContextMenuMediaType; @@ -3168,10 +3351,11 @@ declare class WebContextMenuParam { /** * Returns the text of the selection. * - * @returns { string } Returns the text of the selection, or return null if no text is selected. + * @returns { string } Returns the text of the selection. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getSelectionText(): string; @@ -3188,7 +3372,8 @@ declare class WebContextMenuParam { * @returns { ContextMenuSourceType } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getSourceType(): ContextMenuSourceType; @@ -3205,7 +3390,8 @@ declare class WebContextMenuParam { * @returns { ContextMenuInputFieldType } Input field type if the context menu was invoked on an input field. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getInputFieldType(): ContextMenuInputFieldType; @@ -3222,7 +3408,8 @@ declare class WebContextMenuParam { * @returns { boolean } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ isEditable(): boolean; @@ -3239,7 +3426,8 @@ declare class WebContextMenuParam { * @returns { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getEditStateFlags(): number; @@ -3248,7 +3436,8 @@ declare class WebContextMenuParam { * * @returns { number } The preview menu width. * @syscap SystemCapability.Web.Webview.Core - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ getPreviewWidth(): number; @@ -3257,7 +3446,8 @@ declare class WebContextMenuParam { * * @returns { number } The preview menu height. * @syscap SystemCapability.Web.Webview.Core - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ getPreviewHeight(): number; } @@ -3273,7 +3463,8 @@ declare class WebContextMenuParam { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class WebContextMenuResult { /** @@ -3287,7 +3478,8 @@ declare class WebContextMenuResult { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -3304,7 +3496,8 @@ declare class WebContextMenuResult { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ closeContextMenu(): void; @@ -3321,7 +3514,8 @@ declare class WebContextMenuResult { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ copyImage(): void; @@ -3336,7 +3530,8 @@ declare class WebContextMenuResult { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ copy(): void; @@ -3349,13 +3544,10 @@ declare class WebContextMenuResult { /** * Executes the paste operation related to this context menu. * - *

API Note:
- * Permissions need to be configured: ohos.permission.READ_PASTEBOARD. - *

- * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ paste(): void; @@ -3370,7 +3562,8 @@ declare class WebContextMenuResult { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ cut(): void; @@ -3385,7 +3578,8 @@ declare class WebContextMenuResult { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ selectAll(): void; @@ -3426,7 +3620,8 @@ declare class WebContextMenuResult { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class ConsoleMessage { /** @@ -3455,7 +3650,8 @@ declare class ConsoleMessage { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -3473,7 +3669,8 @@ declare class ConsoleMessage { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getMessage(): string; @@ -3499,7 +3696,8 @@ declare class ConsoleMessage { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ getSourceId(): string; @@ -3525,7 +3723,8 @@ declare class ConsoleMessage { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ getLineNumber(): number; @@ -3543,7 +3742,8 @@ declare class ConsoleMessage { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getMessageLevel(): MessageLevel; } @@ -3573,7 +3773,8 @@ declare class ConsoleMessage { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class WebResourceRequest { /** @@ -3595,7 +3796,8 @@ declare class WebResourceRequest { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -3621,7 +3823,8 @@ declare class WebResourceRequest { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ getRequestHeader(): Array
; @@ -3647,7 +3850,8 @@ declare class WebResourceRequest { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getRequestUrl(): string; @@ -3673,7 +3877,8 @@ declare class WebResourceRequest { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ isRequestGesture(): boolean; @@ -3699,7 +3904,8 @@ declare class WebResourceRequest { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ isMainFrame(): boolean; @@ -3725,7 +3931,8 @@ declare class WebResourceRequest { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ isRedirect(): boolean; @@ -3751,7 +3958,8 @@ declare class WebResourceRequest { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ getRequestMethod(): string; } @@ -3768,7 +3976,8 @@ declare class WebResourceRequest { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class WebResourceResponse { /** @@ -3783,7 +3992,8 @@ declare class WebResourceResponse { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -3809,7 +4019,8 @@ declare class WebResourceResponse { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ getResponseData(): string; @@ -3834,7 +4045,8 @@ declare class WebResourceResponse { * ArrayBuffer type indicate binary data. * @syscap SystemCapability.Web.Webview.Core * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ getResponseDataEx(): string | number | ArrayBuffer | Resource | undefined; @@ -3852,7 +4064,8 @@ declare class WebResourceResponse { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getResponseEncoding(): string; @@ -3870,7 +4083,8 @@ declare class WebResourceResponse { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getResponseMimeType(): string; @@ -3896,7 +4110,8 @@ declare class WebResourceResponse { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ getReasonMessage(): string; @@ -3922,7 +4137,8 @@ declare class WebResourceResponse { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ getResponseHeader(): Array
; @@ -3940,7 +4156,8 @@ declare class WebResourceResponse { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getResponseCode(): number; @@ -3971,7 +4188,8 @@ declare class WebResourceResponse { * ArrayBuffer type indicate binary data. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ setResponseData(data: string | number | Resource | ArrayBuffer): void; @@ -3996,7 +4214,8 @@ declare class WebResourceResponse { * @param { string } encoding the response encoding. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ setResponseEncoding(encoding: string): void; @@ -4021,7 +4240,8 @@ declare class WebResourceResponse { * @param { string } mimeType the response MIME type. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ setResponseMimeType(mimeType: string): void; @@ -4046,7 +4266,8 @@ declare class WebResourceResponse { * @param { string } reason the reason message. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ setReasonMessage(reason: string): void; @@ -4071,7 +4292,8 @@ declare class WebResourceResponse { * @param { Array
} header the response headers. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ setResponseHeader(header: Array
): void; @@ -4096,7 +4318,8 @@ declare class WebResourceResponse { * @param { number } code the response code. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ setResponseCode(code: number): void; @@ -4121,7 +4344,8 @@ declare class WebResourceResponse { * @param { boolean } IsReady whether the response is ready. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ setResponseIsReady(IsReady: boolean): void; @@ -4138,7 +4362,8 @@ declare class WebResourceResponse { * @returns { boolean } True indicates the response data is ready and false is not ready. * @syscap SystemCapability.Web.Webview.Core * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ getResponseIsReady(): boolean; } @@ -4173,7 +4398,8 @@ declare class WebResourceResponse { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface Header { /** @@ -4198,7 +4424,8 @@ declare interface Header { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ headerKey: string; @@ -4224,7 +4451,8 @@ declare interface Header { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ headerValue: string; } @@ -4248,7 +4476,8 @@ declare interface Header { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class WebResourceError { /** @@ -4270,7 +4499,8 @@ declare class WebResourceError { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -4296,7 +4526,8 @@ declare class WebResourceError { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getErrorInfo(): string; @@ -4322,7 +4553,8 @@ declare class WebResourceError { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getErrorCode(): number; } @@ -4339,7 +4571,8 @@ declare class WebResourceError { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class JsGeolocation { /** @@ -4354,7 +4587,8 @@ declare class JsGeolocation { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -4368,7 +4602,7 @@ declare class JsGeolocation { * @since 8 */ /** - * Sets the geolocation permission status of a web page. + * Report the geolocation permission status from users. * * @param { string } origin - Index of the origin. * @param { boolean } allow - Geolocation permission status. {@code true} means to allow geolocation permission; @@ -4381,7 +4615,8 @@ declare class JsGeolocation { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ invoke(origin: string, allow: boolean, retain: boolean): void; } @@ -4437,15 +4672,12 @@ declare class WebCookie { } /** - * Represents the event consumption result sent to the Web component. - * For details about the supported events, see TouchEvent/MouseEvent. - * If the application does not consume the event, set this parameter to false, - * and the event will be consumed by the Web component. If the application has consumed the event, - * set this parameter to true, and the event will not be consumed by the Web component. + * Defines the touch event result. * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class EventResult { /** @@ -4453,20 +4685,19 @@ declare class EventResult { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); /** * Set whether the event is consumed. * - * @param { boolean } result - Whether to consume the gesture event. - * {@code true} Indicates the consumption of the gesture event. - * {@code false} Indicates the non-consumption of the gesture event. - * Default value: true. + * @param { boolean } result - True if the event is consumed. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ setGestureEventResult(result: boolean): void; @@ -4494,9 +4725,10 @@ declare class EventResult { * @param { boolean } [stopPropagation] - {@code true} means to prevent mouse events from bubbling up * {code false} otherwise, The default value is true. * @syscap SystemCapability.Web.Webview.Core - * @since 20 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - setMouseEventResult(result: boolean, stopPropagation?: boolean): void; + setGestureEventResult(result: boolean, stopPropagation: boolean): void; } /** @@ -4519,7 +4751,6 @@ declare class WebController { /** * Let the Web inactive. - * It is no longer maintained since API version 9, and it is recommended to use {@link onInactive} instead. * * @syscap SystemCapability.Web.Webview.Core * @since 8 @@ -4530,7 +4761,6 @@ declare class WebController { /** * Let the Web active. - * It is no longer maintained since API version 9, and it is recommended to use {@link onActive} instead. * * @syscap SystemCapability.Web.Webview.Core * @since 8 @@ -4561,14 +4791,7 @@ declare class WebController { clearHistory(): void; /** - * Asynchronously execute JavaScript in the context of the currently displayed page. - * The result of the script execution will be returned through an asynchronous callback. - * This method must be used on the UI thread, and the callback will also be invoked on the UI thread. - *

API Note:
- * The state of JavaScript is no longer persisted across navigations like loadUrl. - * For example, global variables and functions defined before calling loadUrl will not exist in the loaded page. - * It is recommended that applications use registerJavaScriptProxy to ensure that the JavaScript state can be persisted across page navigations. - *

+ * Loads a piece of code and execute JS code in the context of the currently displayed page. * * @param { object } options The options with a piece of code and a callback. * @syscap SystemCapability.Web.Webview.Core @@ -4760,7 +4983,8 @@ declare class WebController { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface WebOptions { /** @@ -4779,17 +5003,14 @@ declare interface WebOptions { * @since 10 */ /** - * Web resource address. If accessing local resource files, please use $rawfile or resource protocol. - * If you load a local resource file that applies the sandbox path outside the package (files support html and txt types), - * please use the file:// sandbox file path. - * Src cannot dynamically change the address through state variables (for example: @State). - * If you need to change it, please reload it through {@link loadUrl}. + * Sets the address of the web page to be displayed. * * @type { string | Resource } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ src: string | Resource; @@ -4816,9 +5037,8 @@ declare interface WebOptions { * @since 10 */ /** - * Controller, through which you can control various behaviors of Web components - * (including page navigation, declaring cycle state, JavaScript interaction and other behaviors). - * Since API Version 9, WebController is no longer maintained, so it is recommended to use WebviewController instead. + * Sets the controller of the Web. + * * @type { WebController | WebviewController } * @syscap SystemCapability.Web.Webview.Core * @crossplatform @@ -4828,14 +5048,24 @@ declare interface WebOptions { controller: WebController | WebviewController; /** - * Rendering mode. - * RenderMode.ASYNC_RENDER (default, cannot be dynamically adjusted): The Web component is rendered asynchronously. - * RenderMode.SYNC_RENDER: The Web component is rendered synchronously within the current execution context. + * Sets the controller of the Web. + * + * @type { WebviewController } + * @syscap SystemCapability.Web.Webview.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + controller: WebviewController; + + /** + * Sets the render mode of the web. * * @type { ?RenderMode } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ renderMode? : RenderMode; @@ -4858,20 +5088,22 @@ declare interface WebOptions { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ incognitoMode? : boolean; /** - * A token indicating that the current Web component specifies a shared rendering process. - * In the multi-rendering process mode, Web components with the same token will preferentially try to reuse - * the rendering process bound to the token. - * The binding of token to the rendering process occurs in the initialization stage of the rendering process. - * When the rendering process has no associated Web component, its binding relationship with token will be removed. + * Sets the shared render process token of the web. + * When the web is in multiprocess mode, web with the same + * sharedRenderProcessToken will attempt to reuse the same render process. + * The shared render process will remain active until all associated + * web are destroyed. * * @type { ?string } * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ sharedRenderProcessToken? : string; } @@ -4890,7 +5122,8 @@ declare interface WebOptions { * @typedef ScriptItem * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ScriptItem { /** @@ -4899,7 +5132,8 @@ declare interface ScriptItem { * @type { string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ script: string; @@ -4909,7 +5143,8 @@ declare interface ScriptItem { * @type { Array } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ scriptRules: Array; } @@ -4928,7 +5163,8 @@ declare interface ScriptItem { * @typedef LoadCommittedDetails * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LoadCommittedDetails { /** @@ -4937,7 +5173,8 @@ declare interface LoadCommittedDetails { * @type { boolean } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ isMainFrame: boolean; @@ -4951,7 +5188,8 @@ declare interface LoadCommittedDetails { * @type { boolean } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ isSameDocument: boolean; @@ -4963,7 +5201,8 @@ declare interface LoadCommittedDetails { * @type { boolean } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ didReplaceEntry: boolean; @@ -4973,7 +5212,8 @@ declare interface LoadCommittedDetails { * @type { WebNavigationType } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ navigationType: WebNavigationType; @@ -4983,7 +5223,8 @@ declare interface LoadCommittedDetails { * @type { string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ url: string; } @@ -4994,7 +5235,8 @@ declare interface LoadCommittedDetails { * @typedef IntelligentTrackingPreventionDetails * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface IntelligentTrackingPreventionDetails { /** @@ -5003,7 +5245,8 @@ declare interface IntelligentTrackingPreventionDetails { * @type { string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ host: string; @@ -5013,7 +5256,8 @@ declare interface IntelligentTrackingPreventionDetails { * @type { string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ trackerHost: string; } @@ -5049,36 +5293,38 @@ declare interface IntelligentTrackingPreventionDetails { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface WebInterface { /** - * Sets Value. - * - * @param { WebOptions } value - * @returns { WebAttribute } - * @syscap SystemCapability.Web.Webview.Core - * @since 8 - */ - /** - * Sets Value. - * - * @param { WebOptions } value - * @returns { WebAttribute } - * @syscap SystemCapability.Web.Webview.Core - * @crossplatform - * @since 10 - */ - /** - * Sets Value. - * - * @param { WebOptions } value - * @returns { WebAttribute } - * @syscap SystemCapability.Web.Webview.Core - * @crossplatform - * @atomicservice - * @since 11 - */ + * Sets Value. + * + * @param { WebOptions } value + * @returns { WebAttribute } + * @syscap SystemCapability.Web.Webview.Core + * @since 8 + */ + /** + * Sets Value. + * + * @param { WebOptions } value + * @returns { WebAttribute } + * @syscap SystemCapability.Web.Webview.Core + * @crossplatform + * @since 10 + */ + /** + * Sets Value. + * + * @param { WebOptions } value + * @returns { WebAttribute } + * @syscap SystemCapability.Web.Webview.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ (value: WebOptions): WebAttribute; } @@ -5096,7 +5342,8 @@ interface WebInterface { * @typedef NativeEmbedInfo * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NativeEmbedInfo { /** @@ -5105,7 +5352,8 @@ declare interface NativeEmbedInfo { * @type { ?string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ id?: string; @@ -5115,7 +5363,8 @@ declare interface NativeEmbedInfo { * @type { ?string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ type?: string; @@ -5125,7 +5374,8 @@ declare interface NativeEmbedInfo { * @type { ?string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ src?: string; @@ -5135,7 +5385,8 @@ declare interface NativeEmbedInfo { * @type { ?Position } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ position?: Position; @@ -5145,7 +5396,8 @@ declare interface NativeEmbedInfo { * @type { ?number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ width?: number; @@ -5155,7 +5407,8 @@ declare interface NativeEmbedInfo { * @type { ?number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ height?: number; @@ -5165,7 +5418,8 @@ declare interface NativeEmbedInfo { * @type { ?string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ url?: string; @@ -5175,7 +5429,8 @@ declare interface NativeEmbedInfo { * @type { ?string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ tag?: string; @@ -5185,7 +5440,8 @@ declare interface NativeEmbedInfo { * @type { ?Map } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ params?: Map; } @@ -5204,7 +5460,8 @@ declare interface NativeEmbedInfo { * @typedef NativeEmbedDataInfo * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NativeEmbedDataInfo { /** @@ -5213,7 +5470,8 @@ declare interface NativeEmbedDataInfo { * @type { ?NativeEmbedStatus } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ status?: NativeEmbedStatus; @@ -5223,7 +5481,8 @@ declare interface NativeEmbedDataInfo { * @type { ?string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ surfaceId?: string; @@ -5233,7 +5492,8 @@ declare interface NativeEmbedDataInfo { * @type { ?string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ embedId?: string; @@ -5243,7 +5503,8 @@ declare interface NativeEmbedDataInfo { * @type { ?NativeEmbedInfo } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ info?: NativeEmbedInfo; } @@ -5253,7 +5514,8 @@ declare interface NativeEmbedDataInfo { * * @typedef NativeEmbedVisibilityInfo * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NativeEmbedVisibilityInfo { /** @@ -5261,7 +5523,8 @@ declare interface NativeEmbedVisibilityInfo { * * @type { boolean } * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ visibility: boolean; @@ -5270,7 +5533,8 @@ declare interface NativeEmbedVisibilityInfo { * * @type { string } * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ embedId: string; } @@ -5289,7 +5553,8 @@ declare interface NativeEmbedVisibilityInfo { * @typedef NativeEmbedTouchInfo * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NativeEmbedTouchInfo { /** @@ -5298,7 +5563,8 @@ declare interface NativeEmbedTouchInfo { * @type { ?string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ embedId?: string; @@ -5308,7 +5574,8 @@ declare interface NativeEmbedTouchInfo { * @type { ?TouchEvent } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ touchEvent?: TouchEvent; @@ -5365,7 +5632,8 @@ declare interface NativeEmbedMouseInfo { * @typedef FirstMeaningfulPaint * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface FirstMeaningfulPaint { /** @@ -5374,7 +5642,8 @@ declare interface FirstMeaningfulPaint { * @type { ?number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ navigationStartTime?: number; @@ -5384,7 +5653,8 @@ declare interface FirstMeaningfulPaint { * @type { ?number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ firstMeaningfulPaintTime?: number; } @@ -5395,7 +5665,8 @@ declare interface FirstMeaningfulPaint { * @typedef LargestContentfulPaint * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LargestContentfulPaint { /** @@ -5404,7 +5675,8 @@ declare interface LargestContentfulPaint { * @type { ?number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ navigationStartTime?: number; @@ -5414,7 +5686,8 @@ declare interface LargestContentfulPaint { * @type { ?number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ largestImagePaintTime?: number; @@ -5424,7 +5697,8 @@ declare interface LargestContentfulPaint { * @type { ?number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ largestTextPaintTime?: number; @@ -5434,7 +5708,8 @@ declare interface LargestContentfulPaint { * @type { ?number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ imageBPP?: number; @@ -5444,7 +5719,8 @@ declare interface LargestContentfulPaint { * @type { ?number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ largestImageLoadStartTime?: number; @@ -5454,7 +5730,8 @@ declare interface LargestContentfulPaint { * @type { ?number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ largestImageLoadEndTime?: number; } @@ -5464,7 +5741,8 @@ declare interface LargestContentfulPaint { * * @interface RenderProcessNotRespondingData * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RenderProcessNotRespondingData { /** @@ -5472,7 +5750,8 @@ declare interface RenderProcessNotRespondingData { * * @type { string } * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ jsStack: string; @@ -5481,7 +5760,8 @@ declare interface RenderProcessNotRespondingData { * * @type { number } * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ pid: number; @@ -5490,7 +5770,8 @@ declare interface RenderProcessNotRespondingData { * * @type { RenderProcessNotRespondingReason } * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ reason: RenderProcessNotRespondingReason; } @@ -5502,7 +5783,8 @@ declare interface RenderProcessNotRespondingData { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnPageEndEvent { /** @@ -5512,7 +5794,8 @@ declare interface OnPageEndEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ url: string; } @@ -5524,7 +5807,8 @@ declare interface OnPageEndEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnPageBeginEvent { /** @@ -5582,7 +5866,8 @@ declare interface OnLoadFinishedEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnProgressChangeEvent { /** @@ -5592,7 +5877,8 @@ declare interface OnProgressChangeEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ newProgress: number; } @@ -5604,7 +5890,8 @@ declare interface OnProgressChangeEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnTitleReceiveEvent { /** @@ -5614,7 +5901,8 @@ declare interface OnTitleReceiveEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ title: string; @@ -5636,7 +5924,8 @@ declare interface OnTitleReceiveEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnGeolocationShowEvent { /** @@ -5646,7 +5935,8 @@ declare interface OnGeolocationShowEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ origin: string; @@ -5657,7 +5947,8 @@ declare interface OnGeolocationShowEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ geolocation: JsGeolocation; } @@ -5669,7 +5960,8 @@ declare interface OnGeolocationShowEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnAlertEvent { /** @@ -5679,7 +5971,8 @@ declare interface OnAlertEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ url: string; @@ -5690,7 +5983,8 @@ declare interface OnAlertEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ message: string; @@ -5701,7 +5995,8 @@ declare interface OnAlertEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ result: JsResult; } @@ -5721,7 +6016,8 @@ declare interface OnAlertEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnBeforeUnloadEvent { /** @@ -5739,7 +6035,8 @@ declare interface OnBeforeUnloadEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ url: string; @@ -5758,7 +6055,8 @@ declare interface OnBeforeUnloadEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ message: string; @@ -5777,7 +6075,8 @@ declare interface OnBeforeUnloadEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ result: JsResult; @@ -5799,7 +6098,8 @@ declare interface OnBeforeUnloadEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnConfirmEvent { /** @@ -5809,7 +6109,8 @@ declare interface OnConfirmEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ url: string; @@ -5820,7 +6121,8 @@ declare interface OnConfirmEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ message: string; @@ -5831,7 +6133,8 @@ declare interface OnConfirmEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ result: JsResult; } @@ -5843,7 +6146,8 @@ declare interface OnConfirmEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnPromptEvent { /** @@ -5853,7 +6157,8 @@ declare interface OnPromptEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ url: string; @@ -5864,7 +6169,8 @@ declare interface OnPromptEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ message: string; @@ -5875,7 +6181,8 @@ declare interface OnPromptEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ value: string; @@ -5886,7 +6193,8 @@ declare interface OnPromptEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ result: JsResult; } @@ -5898,7 +6206,8 @@ declare interface OnPromptEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnConsoleEvent { /** @@ -5908,7 +6217,8 @@ declare interface OnConsoleEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ message: ConsoleMessage; } @@ -5920,7 +6230,8 @@ declare interface OnConsoleEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnErrorReceiveEvent { /** @@ -5930,7 +6241,8 @@ declare interface OnErrorReceiveEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ request: WebResourceRequest; @@ -5941,7 +6253,8 @@ declare interface OnErrorReceiveEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ error: WebResourceError; } @@ -5953,7 +6266,8 @@ declare interface OnErrorReceiveEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnHttpErrorReceiveEvent { /** @@ -5963,7 +6277,8 @@ declare interface OnHttpErrorReceiveEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ request: WebResourceRequest; @@ -5974,7 +6289,8 @@ declare interface OnHttpErrorReceiveEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ response: WebResourceResponse; } @@ -5986,7 +6302,8 @@ declare interface OnHttpErrorReceiveEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnDownloadStartEvent { /** @@ -5996,7 +6313,8 @@ declare interface OnDownloadStartEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ url: string; @@ -6007,7 +6325,8 @@ declare interface OnDownloadStartEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ userAgent: string; @@ -6026,7 +6345,8 @@ declare interface OnDownloadStartEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ contentDisposition: string; @@ -6037,7 +6357,8 @@ declare interface OnDownloadStartEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ mimetype: string; @@ -6048,7 +6369,8 @@ declare interface OnDownloadStartEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ contentLength: number; } @@ -6068,7 +6390,8 @@ declare interface OnDownloadStartEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnRefreshAccessedHistoryEvent { /** @@ -6086,7 +6409,8 @@ declare interface OnRefreshAccessedHistoryEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ url: string; @@ -6105,7 +6429,8 @@ declare interface OnRefreshAccessedHistoryEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ isRefreshed: boolean; } @@ -6116,7 +6441,8 @@ declare interface OnRefreshAccessedHistoryEvent { * @typedef OnRenderExitedEvent * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnRenderExitedEvent { /** @@ -6125,7 +6451,8 @@ declare interface OnRenderExitedEvent { * @type { RenderExitReason } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ renderExitReason: RenderExitReason; } @@ -6137,7 +6464,8 @@ declare interface OnRenderExitedEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnShowFileSelectorEvent { /** @@ -6147,7 +6475,8 @@ declare interface OnShowFileSelectorEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ result: FileSelectorResult; @@ -6158,7 +6487,8 @@ declare interface OnShowFileSelectorEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ fileSelector: FileSelectorParam; } @@ -6169,7 +6499,8 @@ declare interface OnShowFileSelectorEvent { * @typedef OnResourceLoadEvent * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnResourceLoadEvent { /** @@ -6178,7 +6509,8 @@ declare interface OnResourceLoadEvent { * @type { string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ url: string; } @@ -6190,7 +6522,8 @@ declare interface OnResourceLoadEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnScaleChangeEvent { /** @@ -6200,7 +6533,8 @@ declare interface OnScaleChangeEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ oldScale: number; @@ -6211,7 +6545,8 @@ declare interface OnScaleChangeEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ newScale: number; } @@ -6223,7 +6558,8 @@ declare interface OnScaleChangeEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnHttpAuthRequestEvent { /** @@ -6233,7 +6569,8 @@ declare interface OnHttpAuthRequestEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ handler: HttpAuthHandler; @@ -6244,7 +6581,8 @@ declare interface OnHttpAuthRequestEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ host: string; @@ -6255,7 +6593,8 @@ declare interface OnHttpAuthRequestEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ realm: string; } @@ -6266,7 +6605,8 @@ declare interface OnHttpAuthRequestEvent { * @typedef OnInterceptRequestEvent * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnInterceptRequestEvent { /** @@ -6275,7 +6615,8 @@ declare interface OnInterceptRequestEvent { * @type { WebResourceRequest } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ request: WebResourceRequest; } @@ -6288,7 +6629,8 @@ declare interface OnInterceptRequestEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnPermissionRequestEvent { /** @@ -6298,7 +6640,8 @@ declare interface OnPermissionRequestEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ request: PermissionRequest; } @@ -6310,7 +6653,8 @@ declare interface OnPermissionRequestEvent { * @typedef OnScreenCaptureRequestEvent * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnScreenCaptureRequestEvent { /** @@ -6319,7 +6663,8 @@ declare interface OnScreenCaptureRequestEvent { * @type { ScreenCaptureHandler } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ handler: ScreenCaptureHandler; } @@ -6330,7 +6675,8 @@ declare interface OnScreenCaptureRequestEvent { * @typedef OnContextMenuShowEvent * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnContextMenuShowEvent { /** @@ -6339,7 +6685,8 @@ declare interface OnContextMenuShowEvent { * @type { WebContextMenuParam } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ param: WebContextMenuParam; @@ -6349,7 +6696,8 @@ declare interface OnContextMenuShowEvent { * @type { WebContextMenuResult } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ result: WebContextMenuResult; } @@ -6360,7 +6708,8 @@ declare interface OnContextMenuShowEvent { * @typedef OnSearchResultReceiveEvent * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnSearchResultReceiveEvent { /** @@ -6369,7 +6718,8 @@ declare interface OnSearchResultReceiveEvent { * @type { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ activeMatchOrdinal: number; @@ -6379,7 +6729,8 @@ declare interface OnSearchResultReceiveEvent { * @type { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ numberOfMatches: number; @@ -6389,7 +6740,8 @@ declare interface OnSearchResultReceiveEvent { * @type { boolean } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ isDoneCounting: boolean; } @@ -6401,7 +6753,8 @@ declare interface OnSearchResultReceiveEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnScrollEvent { /** @@ -6411,7 +6764,8 @@ declare interface OnScrollEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ xOffset: number; @@ -6422,7 +6776,8 @@ declare interface OnScrollEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ yOffset: number; } @@ -6433,7 +6788,8 @@ declare interface OnScrollEvent { * @typedef OnSslErrorEventReceiveEvent * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnSslErrorEventReceiveEvent { /** @@ -6442,7 +6798,8 @@ declare interface OnSslErrorEventReceiveEvent { * @type { SslErrorHandler } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ handler: SslErrorHandler; @@ -6452,7 +6809,8 @@ declare interface OnSslErrorEventReceiveEvent { * @type { SslError } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ error: SslError; @@ -6461,7 +6819,8 @@ declare interface OnSslErrorEventReceiveEvent { * * @type { ?Array } * @syscap SystemCapability.Web.Webview.Core - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ certChainData?: Array; } @@ -6472,7 +6831,8 @@ declare interface OnSslErrorEventReceiveEvent { * @typedef OnClientAuthenticationEvent * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnClientAuthenticationEvent { /** @@ -6481,7 +6841,8 @@ declare interface OnClientAuthenticationEvent { * @type { ClientAuthenticationHandler } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ handler : ClientAuthenticationHandler; @@ -6491,7 +6852,8 @@ declare interface OnClientAuthenticationEvent { * @type { string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ host : string; @@ -6501,7 +6863,8 @@ declare interface OnClientAuthenticationEvent { * @type { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ port : number; @@ -6511,7 +6874,8 @@ declare interface OnClientAuthenticationEvent { * @type { Array } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ keyTypes : Array; @@ -6521,7 +6885,8 @@ declare interface OnClientAuthenticationEvent { * @type { Array } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ issuers : Array; } @@ -6532,7 +6897,8 @@ declare interface OnClientAuthenticationEvent { * @typedef OnWindowNewEvent * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnWindowNewEvent { /** @@ -6541,7 +6907,8 @@ declare interface OnWindowNewEvent { * @type { boolean } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ isAlert: boolean; @@ -6551,7 +6918,8 @@ declare interface OnWindowNewEvent { * @type { boolean } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ isUserTrigger: boolean; @@ -6561,7 +6929,8 @@ declare interface OnWindowNewEvent { * @type { string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ targetUrl: string; @@ -6571,7 +6940,8 @@ declare interface OnWindowNewEvent { * @type { ControllerHandler } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ handler: ControllerHandler; } @@ -6582,7 +6952,8 @@ declare interface OnWindowNewEvent { * @typedef OnTouchIconUrlReceivedEvent * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnTouchIconUrlReceivedEvent { /** @@ -6591,7 +6962,8 @@ declare interface OnTouchIconUrlReceivedEvent { * @type { string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ url: string; @@ -6601,7 +6973,8 @@ declare interface OnTouchIconUrlReceivedEvent { * @type { boolean } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ precomposed: boolean; } @@ -6612,7 +6985,8 @@ declare interface OnTouchIconUrlReceivedEvent { * @typedef OnFaviconReceivedEvent * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnFaviconReceivedEvent { /** @@ -6624,6 +6998,16 @@ declare interface OnFaviconReceivedEvent { * @since 12 */ favicon: PixelMap; + + /** + * Received the Favicon icon for the image.PixelMap object. + * + * @type { image.PixelMap } + * @syscap SystemCapability.Web.Webview.Core + * @since 20 + * @arkts 1.2 + */ + favicon: image.PixelMap; } /** @@ -6633,7 +7017,8 @@ declare interface OnFaviconReceivedEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnPageVisibleEvent { /** @@ -6643,7 +7028,8 @@ declare interface OnPageVisibleEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ url: string; } @@ -6654,7 +7040,8 @@ declare interface OnPageVisibleEvent { * @typedef OnDataResubmittedEvent * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnDataResubmittedEvent { /** @@ -6663,7 +7050,8 @@ declare interface OnDataResubmittedEvent { * @type { DataResubmissionHandler } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ handler: DataResubmissionHandler; } @@ -6674,7 +7062,8 @@ declare interface OnDataResubmittedEvent { * @typedef OnAudioStateChangedEvent * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnAudioStateChangedEvent { /** @@ -6683,7 +7072,8 @@ declare interface OnAudioStateChangedEvent { * @type { boolean } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ playing: boolean; } @@ -6694,7 +7084,8 @@ declare interface OnAudioStateChangedEvent { * @typedef OnFirstContentfulPaintEvent * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnFirstContentfulPaintEvent { /** @@ -6703,7 +7094,8 @@ declare interface OnFirstContentfulPaintEvent { * @type { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ navigationStartTick: number; @@ -6713,7 +7105,8 @@ declare interface OnFirstContentfulPaintEvent { * @type { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ firstContentfulPaintMs: number; } @@ -6725,7 +7118,8 @@ declare interface OnFirstContentfulPaintEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnLoadInterceptEvent { /** @@ -6735,7 +7129,8 @@ declare interface OnLoadInterceptEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ data: WebResourceRequest; } @@ -6746,28 +7141,29 @@ declare interface OnLoadInterceptEvent { * @typedef OnOverScrollEvent * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnOverScrollEvent { /** * Based on the leftmost part of the page, the horizontal scroll offset is over. - * Unit: vp. * * @type { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ xOffset: number; /** * Based on the top of the page, the vertical scroll offset is over. - * Unit: vp. * * @type { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ yOffset: number; } @@ -6788,6 +7184,7 @@ declare interface OnOverScrollEvent { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ declare interface JavaScriptProxy { /** @@ -6806,6 +7203,7 @@ declare interface JavaScriptProxy { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ object: object; @@ -6827,6 +7225,7 @@ declare interface JavaScriptProxy { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ name: string; @@ -6848,6 +7247,7 @@ declare interface JavaScriptProxy { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ methodList: Array; @@ -6870,6 +7270,17 @@ declare interface JavaScriptProxy { */ controller: WebController | WebviewController; + /** + * Controller. + * + * @type { WebviewController } + * @syscap SystemCapability.Web.Webview.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + controller: WebviewController; + /** * The async method of the application side JavaScript object participating in the registration. * @@ -6886,6 +7297,7 @@ declare interface JavaScriptProxy { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ asyncMethodList?: Array; @@ -6896,7 +7308,8 @@ declare interface JavaScriptProxy { * @type { ?string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ permission?: string; } @@ -6907,34 +7320,37 @@ declare interface JavaScriptProxy { * @enum { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum WebKeyboardAvoidMode { /** - * When the soft keyboard avoids, only the size of the visual viewport is adjusted, not the size of the layout viewport. + * Resize the visual viewport when keyboard avoidance occurs. * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ RESIZE_VISUAL = 0, /** - * By default, when the soft keyboard avoids, - * the sizes of the visual viewport and the layout viewport are adjusted at the same time. + * Resize the visual and layout viewport when keyboard avoidance occurs. * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ RESIZE_CONTENT = 1, /** - * Without adjusting any viewport size, soft keyboard avoidance will not be triggered. + * Do not resize any viewport when keyboard avoidance occurs. * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ OVERLAYS_CONTENT = 2 } @@ -6944,14 +7360,16 @@ declare enum WebKeyboardAvoidMode { * * @enum { number } * @syscap SystemCapability.Web.Webview.Core - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum WebElementType { /** * Image,corresponding HTML image type. * * @syscap SystemCapability.Web.Webview.Core - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE = 1, @@ -6969,14 +7387,16 @@ declare enum WebElementType { * * @enum { number } * @syscap SystemCapability.Web.Webview.Core - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum WebResponseType { /** * Long press. * * @syscap SystemCapability.Web.Webview.Core - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ LONG_PRESS = 1 } @@ -7047,7 +7467,8 @@ declare interface PreviewMenuOptions { * * @typedef SelectionMenuOptionsExt * @syscap SystemCapability.Web.Webview.Core - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SelectionMenuOptionsExt { /** @@ -7055,7 +7476,8 @@ declare interface SelectionMenuOptionsExt { * * @type { ?Callback } * @syscap SystemCapability.Web.Webview.Core - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ onAppear?: Callback; @@ -7064,7 +7486,8 @@ declare interface SelectionMenuOptionsExt { * * @type { ?Callback } * @syscap SystemCapability.Web.Webview.Core - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ onDisappear?: Callback; @@ -7073,7 +7496,8 @@ declare interface SelectionMenuOptionsExt { * * @type { ?CustomBuilder } * @syscap SystemCapability.Web.Webview.Core - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ preview?: CustomBuilder; @@ -7082,7 +7506,8 @@ declare interface SelectionMenuOptionsExt { * * @type { ?MenuType } * @syscap SystemCapability.Web.Webview.Core - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ menuType?: MenuType; @@ -7118,7 +7543,8 @@ declare interface SelectionMenuOptionsExt { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class WebAttribute extends CommonMethod { /** @@ -7149,12 +7575,13 @@ declare class WebAttribute extends CommonMethod { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ javaScriptAccess(javaScriptAccess: boolean): WebAttribute; /** - * Sets whether enable local file system access in web. + * Sets whether enable local file system access in Web. * * @param { boolean } fileAccess - {@code true} means enable local file system access in Web; {@code false} otherwise. * The default value is true. @@ -7163,7 +7590,7 @@ declare class WebAttribute extends CommonMethod { * @since 8 */ /** - * Sets whether enable local file system access in web. + * Sets whether enable local file system access in Web. * * @param { boolean } fileAccess - {@code true} means enable local file system access in Web; {@code false} otherwise. * The default value is true. @@ -7173,20 +7600,15 @@ declare class WebAttribute extends CommonMethod { * @since 11 */ /** - * Sets whether to enable access to the file system in the application. - * This setting dose not affect the access to the files specified though $rawfile(filepath/filename). - *

API Note:
- * fileAccess is disabled by default since API version 12. - * When fileAccess is set to false, files in the read-only /data/storage/el1/bundle/entry/resources/resfile
- * directory can still be accessed through the file protocol. - *

+ * Sets whether enable local file system access in Web. * * @param { boolean } fileAccess - {@code true} means enable local file system access in Web; {@code false} otherwise. * The default value is false. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ fileAccess(fileAccess: boolean): WebAttribute; @@ -7201,27 +7623,27 @@ declare class WebAttribute extends CommonMethod { * @since 8 */ /** - * Sets whether to enable access to online images through HTTP and HTTPS. + * Sets whether to allow image resources to be loaded from the network. * - * @param { boolean } onlineImageAccess - Sets whether to enable access to online images. - * {@code true} means means setting to allow loading image resources from the network, {@code false} otherwise. - * Default value: true. + * @param { boolean } onlineImageAccess - {@code true} means the Web can allow image resources to be loaded from the network; + * The default value is true. + * {@code false} otherwise. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice * @since 11 */ /** - * Sets whether to enable access to online images through HTTP and HTTPS. - * - * @param { boolean } onlineImageAccess - Sets whether to enable access to online images. - * {@code true} means means setting to allow loading image resources from the network, {@code false} otherwise. - * Default value: true. + * Sets whether to allow image resources to be loaded from the network. + * The default value is true. + * @param { boolean } onlineImageAccess - {@code true} means the Web can allow image resources to be loaded from the network; + * {@code false} otherwise. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ onlineImageAccess(onlineImageAccess: boolean): WebAttribute; @@ -7245,15 +7667,15 @@ declare class WebAttribute extends CommonMethod { * @since 11 */ /** - * Sets whether to enable the DOM Storage API. By default, this feature is disabled. - * @param { boolean } domStorageAccess - Whether to enable the DOM Storage API. {@code true} means to enable - * the DOM Storage API; {@code false} means to disable the DOM Storage API. - * The default value is false. + * Sets whether to enable the DOM Storage API permission. + * The default value is false. + * @param { boolean } domStorageAccess - {@code true} means enable the DOM Storage API permission in Web; {@code false} otherwise. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ domStorageAccess(domStorageAccess: boolean): WebAttribute; @@ -7277,16 +7699,15 @@ declare class WebAttribute extends CommonMethod { * @since 11 */ /** - * Sets whether to enable automatic image loading. - * - * @param { boolean } imageAccess - Sets whether to enable automatic image loading. - * {@code true} means the Web can automatically load image resources, {@code false} otherwise. - * Default value: true. + * Sets whether the Web can automatically load image resources. + * The default value is true. + * @param { boolean } imageAccess - {@code true} means the Web can automatically load image resources; {@code false} otherwise. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ imageAccess(imageAccess: boolean): WebAttribute; @@ -7308,16 +7729,15 @@ declare class WebAttribute extends CommonMethod { * @since 11 */ /** - * Sets the behavior when a secure origin attempts to load a resource from an insecure origin. - * The default is MixedMode.None, meaning not allow a secure origin to load content from an insecure origin. + * Sets how to load HTTP and HTTPS content. * * @param { MixedMode } mixedMode - The mixed mode, which can be {@link MixedMode}. - * Default value: MixedMode.None, which means that secure origin is not allowed to load content from insecure origin. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ mixedMode(mixedMode: MixedMode): WebAttribute; @@ -7349,7 +7769,8 @@ declare class WebAttribute extends CommonMethod { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ zoomAccess(zoomAccess: boolean): WebAttribute; @@ -7363,17 +7784,16 @@ declare class WebAttribute extends CommonMethod { * @since 8 */ /** - * Set whether to enable geolocation access. By default, this feature is enabled. - * For details, see Managing Location Permissions. + * Sets whether to allow access to geographical locations. * - * @param { boolean } geolocationAccess - Whether to enable geolocation access. {@code true} means the Web - * allows access to geographical locations; {@code false} means the - * Web disallows access to geographical locations. The default value is true. + * @param { boolean } geolocationAccess - {@code true} means the Web allows access to geographical locations; {@code false} otherwise. + * The default value is true. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ geolocationAccess(geolocationAccess: boolean): WebAttribute; @@ -7403,42 +7823,24 @@ declare class WebAttribute extends CommonMethod { * @since 11 */ /** - * Registers the supplied ArkTS object in javaScriptProxy into this Web component. - * The object is registered into all frames of the web page, including all frames, using the specified name in javaScriptProxy. - * This allows the methods of the ArkTS object in javaScriptProxy to be accessed from JavaScript. - * - *

API Note: - * Performance Note: - *

For details about the arkweb rendering framework adaptation solution, - * see [ArkWeb Rendering Framework Adaptation]{@link https://developer.huawei.com/consumer/en/doc/best-practices/bpta-arkweb_rendering_framework} - *

+ * Injects the JavaScript object into window and invoke the function in window. * - * @param { JavaScriptProxy } javaScriptProxy - The ArkTS object in javaScriptProxy will be registered into this Web component, - * and the methods within the methodList of the injected ArkTS object declared in javaScriptProxy can be accessed by JavaScript. + * @param { JavaScriptProxy } javaScriptProxy - The JavaScript object to be injected. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice * @since 12 */ /** - * Registers the supplied ArkTS object in javaScriptProxy into this Web component. - * The object is registered into all frames of the web page, including all frames, using the specified name in javaScriptProxy. - * This allows the methods of the ArkTS object in javaScriptProxy to be accessed from JavaScript. - * - *

API Note: - * Performance Note: - *

For details about how to arkWeb rendering framework adaptation solution, - * see [ArkWeb Rendering Framework Adaptation] - * {@link https://developer.huawei.com/consumer/en/doc/best-practices/bpta-arkweb_rendering_framework} - *

+ * Injects the JavaScript object into window and invoke the function in window. * - * @param { JavaScriptProxy } javaScriptProxy - The ArkTS object in javaScriptProxy will be registered into this Web component, - * and the methods within the methodList of the injected ArkTS object declared in javaScriptProxy can be accessed by JavaScript. + * @param { JavaScriptProxy } javaScriptProxy - The JavaScript object to be injected. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ javaScriptProxy(javaScriptProxy: JavaScriptProxy): WebAttribute; @@ -7478,7 +7880,8 @@ declare class WebAttribute extends CommonMethod { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ cacheMode(cacheMode: CacheMode): WebAttribute; @@ -7491,17 +7894,14 @@ declare class WebAttribute extends CommonMethod { * @since 9 */ /** - * Sets the web dark mode. By default, web dark mode is disabled. When it is enabled, - * the Web component enables the dark theme defined for web pages - * if the theme has been defined in prefers-color-scheme of a media query, - * and remains unchanged otherwise. To enable the forcible dark mode, use this API with forceDarkAccess. + * Sets the dark mode of Web. * - * @param { WebDarkMode } mode - Web dark mode to set. - * Default value: WebDarkMode.Off. + * @param { WebDarkMode } mode - The dark mode, which can be {@link WebDarkMode}. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ darkMode(mode: WebDarkMode): WebAttribute; @@ -7514,17 +7914,14 @@ declare class WebAttribute extends CommonMethod { * @since 9 */ /** - * Sets whether to enable forcible dark mode for the web page. - * This API is applicable only when dark mode is enabled in {@link darkMode}. + * Sets whether to enable forced dark algorithm when the web is in dark mode * - * @param { boolean } access Sets whether to enable forcible dark mode for the web page. - * {@code true} means enable forcible dark mode for the web page. ; - * {@code false} means not enable forcible dark mode for the web page. - * The default value is false. + * @param { boolean } access {@code true} means enable the force dark algorithm; {@code false} otherwise. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ forceDarkAccess(access: boolean): WebAttribute; @@ -7537,23 +7934,14 @@ declare class WebAttribute extends CommonMethod { * @since 10 */ /** - * Sets the web-based media playback policy, including the validity period for automatically resuming a paused web audio, - * and whether the audio of multiple Web instances in an application is exclusive. - *

API Note:
- * Audios in the same Web instance are considered as the same audio. - * The media playback policy controls videos with an audio track. - * After the parameter settings are updated, the playback must be started again for the settings to take effect. - * It is recommended that you set the same audioExclusive value for all Web components. - * Audio and video interruption takes effect within an app and between apps, and playback resumption takes effect only between apps. - *

+ * Sets the media options. * - * @param { WebMediaOptions } options Set the media policy for the web. - * After updating the attribute parameters, the audio needs to be replayed for it to take effect. - * Default value: {resumeInterval: 0, audioExclusive: true} + * @param { WebMediaOptions } options The media options, which can be {@link WebMediaOptions}. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ mediaOptions(options: WebMediaOptions): WebAttribute; @@ -7589,32 +7977,28 @@ declare class WebAttribute extends CommonMethod { * @since 8 */ /** - * Sets whether to load web pages by using the overview mode, which means reducing the content to fit the screen width. - * Currently, only mobile devices are supported. + * Sets whether the Web access overview mode. * - * @param { boolean } overviewModeAccess Whether to load web pages by using the overview mode. - * {@code true} means the Web access overview mode; - * {@code false} means the Web not access overview mode. - * Default value: true. + * @param { boolean } overviewModeAccess {@code true} means the Web access overview mode; {@code false} otherwise. + * The default value is true. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ overviewModeAccess(overviewModeAccess: boolean): WebAttribute; /** - * Sets the over-scroll mode for web - * When the scrolling mode is enabled, when the user slides to the edge on the web root page, the web will bounce back - * the interface through elastic animation, and the internal pages on the root page will not trigger the bounce back. - * - * @param { OverScrollMode } mode - The over-scroll mode, which can be {@link OverScrollMode}. - * The default value is OverScrollMode.NEVER. - * @returns { WebAttribute } - * @syscap SystemCapability.Web.Webview.Core - * @atomicservice - * @since 11 - */ + * Sets the over-scroll mode for web + * + * @param { OverScrollMode } mode - The over-scroll mode, which can be {@link OverScrollMode}. + * @returns { WebAttribute } + * @syscap SystemCapability.Web.Webview.Core + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ overScrollMode(mode: OverScrollMode): WebAttribute; /** @@ -7624,7 +8008,8 @@ declare class WebAttribute extends CommonMethod { * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ blurOnKeyboardHideMode(mode: BlurOnKeyboardHideMode): WebAttribute; @@ -7655,7 +8040,8 @@ declare class WebAttribute extends CommonMethod { * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ textZoomRatio(textZoomRatio: number): WebAttribute; @@ -7669,16 +8055,15 @@ declare class WebAttribute extends CommonMethod { * @since 8 */ /** - * Sets whether to enable database access. By default, this feature is disabled. - * + * Sets whether the Web access the database. * - * @param { boolean } databaseAccess - Whether to enable database access. {@code true} means to enable - * database access; {@code false} means to disable database access. - * The default value is false. + * @param { boolean } databaseAccess {@code true} means the Web access the database; {@code false} otherwise. + * The default value is false. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ databaseAccess(databaseAccess: boolean): WebAttribute; @@ -7694,12 +8079,11 @@ declare class WebAttribute extends CommonMethod { * Sets the initial scale for the Web. * * @param { number } percent the initial scale for the Web. - * Value range: (0, 1000]. - * Default value: 100. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ initialScale(percent: number): WebAttribute; @@ -7716,61 +8100,39 @@ declare class WebAttribute extends CommonMethod { userAgent(userAgent: string): WebAttribute; /** - * Sets whether the viewport property of the meta tag is enabled. - * - *

API Note:
- * If the device is 2-in-1, the viewport property is not supported. This means that, - * regardless of whether this parameter is set to true or false, - * the viewport property will not be parsed and a default layout will be used.
- * If the device is a tablet, the viewport-fit property of the meta tag is parsed regardless of - * whether this parameter is set to true or false. When viewport-fit is set to cover, - * the size of the safe area can be obtained through the CSS attribute.
- * The viewport parameter of the meta tag on the frontend HTML page is enabled or - * disabled based on whether User-Agent contains the Mobile field. - * If a User-Agent does not contain the Mobile field, the viewport property in the meta tag is disabled by default. - * In this case, you can explicitly set the metaViewport property to true to overwrite the disabled state. - *

+ * Set whether to support the viewport attribute of the meta tag in the frontend page. * - * @param { boolean } enabled Whether the viewport property of the meta tag is enabled. - * {@code true} means support the viewport attribute of the meta tag, - * the viewport property of the meta tag is not enabled. - * This means that the property will not be parsed and a default layout will be used.; - * {@code false} means not support the viewport attribute of the meta tag, - * the viewport property of the meta tag is enabled. - * This means that the property will be parsed and used for the layout. - * Default value: true. + * @param { boolean } enabled {@code true} means support the viewport attribute of the meta tag; {@code false} otherwise. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ metaViewport(enabled: boolean): WebAttribute; /** * Triggered at the end of web page loading. - * This callback is only invoked for the main frame and not for subframes. * * @param { function } callback The triggered function at the end of web page loading. - * @returns { WebAttribute } The WebAttribute object representing the attributes of the web page. + * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @since 8 */ /** * Triggered at the end of web page loading. - * This callback is only invoked for the main frame and not for subframes. * * @param { function } callback The triggered function at the end of web page loading. - * @returns { WebAttribute } The WebAttribute object representing the attributes of the web page. + * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @since 10 */ /** * Triggered at the end of web page loading. - * This callback is only invoked for the main frame and not for subframes. * * @param { function } callback The triggered function at the end of web page loading. - * @returns { WebAttribute } The WebAttribute object representing the attributes of the web page. + * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice @@ -7778,14 +8140,14 @@ declare class WebAttribute extends CommonMethod { */ /** * Triggered at the end of web page loading. - * This callback is only invoked for the main frame and not for subframes. * * @param { Callback } callback The triggered function at the end of web page loading. - * @returns { WebAttribute } The WebAttribute object representing the attributes of the web page. + * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onPageEnd(callback: Callback): WebAttribute; @@ -7817,15 +8179,15 @@ declare class WebAttribute extends CommonMethod { * @since 11 */ /** - * Called when the web page starts to be loaded. - * This API is called only for the main frame, and not for the iframe or frameset content. + * Triggered at the begin of web page loading. * * @param { Callback } callback The triggered function at the begin of web page loading. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onPageBegin(callback: Callback): WebAttribute; @@ -7886,7 +8248,8 @@ declare class WebAttribute extends CommonMethod { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onProgressChange(callback: Callback): WebAttribute; @@ -7909,16 +8272,15 @@ declare class WebAttribute extends CommonMethod { * @since 11 */ /** - * Notifies the application that the title has changed. - * If the page being loaded does not specify a title via the element, - * ArkWeb will generate a title baseed on the URL and return it to the application. + * Triggered when the title of the main application document changes. * * @param { Callback<OnTitleReceiveEvent> } callback The triggered function when the title of the main application document changes. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onTitleReceive(callback: Callback<OnTitleReceiveEvent>): WebAttribute; @@ -7931,15 +8293,15 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @since 8 */ /** - * Called to notify the user that the request for obtaining the geolocation information received - * when {@link onGeolocationShow} is called has been canceled. + * Triggered when requesting to hide the geolocation. * - * @param { function } callback - Callback invoked when the request for obtaining geolocation information has been canceled. + * @param { function } callback The triggered function when requesting to hide the geolocation permission. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onGeolocationHide(callback: () => void): WebAttribute; @@ -7962,14 +8324,15 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @since 11 */ /** - * Called when a request to obtain the geolocation information is received. - * @param { Callback<OnGeolocationShowEvent> } callback - Callback invoked when a request to obtain the geolocation - * information is received. + * Triggered when requesting to show the geolocation permission. + * + * @param { Callback<OnGeolocationShowEvent> } callback The triggered function when requesting to show the geolocation permission. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onGeolocationShow(callback: Callback<OnGeolocationShowEvent>): WebAttribute; @@ -7988,7 +8351,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onRequestSelected(callback: () => void): WebAttribute; @@ -8014,15 +8378,12 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * Triggered when the Web wants to display a JavaScript alert() dialog. * * @param { Callback<OnAlertEvent, boolean> } callback The triggered function when the web page wants to display a JavaScript alert() dialog. - * {@code true} means the application can invoke custom pop-up dialog capabilities (with confirmation and cancellation buttons). - * Developers need to use the JsResult interface to notify the web component whether to leave the current page - * according to the user's choice. - * {@code false} means the pop-up processing result is considered as cancelled. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onAlert(callback: Callback<OnAlertEvent, boolean>): WebAttribute; @@ -8060,7 +8421,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ onBeforeUnload(callback: Callback<OnBeforeUnloadEvent, boolean>): WebAttribute; @@ -8086,14 +8448,12 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * Triggered when the web page wants to display a JavaScript confirm() dialog. * * @param { Callback<OnConfirmEvent, boolean> } callback The triggered function when the web page wants to display a JavaScript confirm() dialog. - * {@code true} means the application can call the custom pop-up capability (including confirmation and cancellation), and needs to call JsResult - * to notify the Web component whether to leave the current page based on the user's confirmation or cancellation operation. - * {@code false} means the custom pop-up drawn in the function is invalid. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onConfirm(callback: Callback<OnConfirmEvent, boolean>): WebAttribute; @@ -8119,14 +8479,12 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * Triggered when the web page wants to display a JavaScript prompt() dialog. * * @param { Callback<OnPromptEvent, boolean> } callback The triggered function when the web page wants to display a JavaScript prompt() dialog. - * {@code true} means the application can call the custom pop-up window capability (including confirmation, cancellation, and input),and needs to - * call JsResult to notify the Web component of the final processing result based on the user's confirmation or cancellation operation. - * {@code false} means the pop-up window processing result is considered as a cancellation. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onPrompt(callback: Callback<OnPromptEvent, boolean>): WebAttribute; @@ -8152,13 +8510,12 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * Triggered when the web page receives a JavaScript console message. * * @param { Callback<OnConsoleEvent, boolean> } callback The triggered function when the web page receives a JavaScript console message. - * {@code true} means the message will no longer be printed to the console. - * {@code false} means it will still be printed to the console. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onConsole(callback: Callback<OnConsoleEvent, boolean>): WebAttribute; @@ -8197,7 +8554,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onErrorReceive(callback: Callback<OnErrorReceiveEvent>): WebAttribute; @@ -8227,7 +8585,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onHttpErrorReceive(callback: Callback<OnHttpErrorReceiveEvent>): WebAttribute; @@ -8271,7 +8630,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onDownloadStart(callback: Callback<OnDownloadStartEvent>): WebAttribute; @@ -8309,7 +8669,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ onRefreshAccessedHistory(callback: Callback<OnRefreshAccessedHistoryEvent>): WebAttribute; @@ -8356,15 +8717,13 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { */ /** * Triggered when the render process exits. - * Multiple Web components may share a single rendering process, and each affected Web component will trigger the callback. - * When the application handles this callback, it can call the related interface of the bound webviewController to - * restore the page. Such as {@link refresh}, {@link loadUrl}, etc. - * For details of component lifecycle callback, please refer to the lifecycle of Web components. + * * @param { Callback<OnRenderExitedEvent> } callback The triggered when the render process exits. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onRenderExited(callback: Callback<OnRenderExitedEvent>): WebAttribute; @@ -8388,18 +8747,14 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { */ /** * Triggered when the file selector shows. - * Call this function to handle HTML forms with a "file" input type. If this function is not called or returns false, - * the web component provides the default "select file" handling interface. If it returns true, the application can customize - * the "select file" response behavior. * * @param { Callback<OnShowFileSelectorEvent, boolean> } callback The triggered when the file selector shows. - * {@code true} means the user can call the system-provided pop-up window capability. - * {@code false} means the custom pop-up window drawn in the function is invalid. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onShowFileSelector(callback: Callback<OnShowFileSelectorEvent, boolean>): WebAttribute; @@ -8451,7 +8806,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onResourceLoad(callback: Callback<OnResourceLoadEvent>): WebAttribute; @@ -8480,7 +8836,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ onFullScreenExit(callback: () => void): WebAttribute; @@ -8518,7 +8875,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ onFullScreenEnter(callback: OnFullScreenEnterCallback): WebAttribute; @@ -8548,7 +8906,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onScaleChange(callback: Callback<OnScaleChangeEvent>): WebAttribute; @@ -8578,7 +8937,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onHttpAuthRequest(callback: Callback<OnHttpAuthRequestEvent, boolean>): WebAttribute; @@ -8606,7 +8966,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @returns { WebAttribute } If the response value is null, the Web will continue to load the resources. Otherwise, the response value will be used * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onInterceptRequest(callback: Callback<OnInterceptRequestEvent, WebResourceResponse>): WebAttribute; @@ -8631,14 +8992,16 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @since 11 */ /** - * Called when a permission request is received. To call this API, you need to declare the ohos.permission.CAMERA and ohos.permission.MICROPHONE permissions. + * Triggered when the host application that web content from the specified origin is attempting to access the resources. * - * @param { Callback<OnPermissionRequestEvent> } callback Callback invoked when a permission request is received. + * @param { Callback<OnPermissionRequestEvent> } callback The triggered callback when the host application that web content from the specified origin is + * attempting to access the resources. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onPermissionRequest(callback: Callback<OnPermissionRequestEvent>): WebAttribute; @@ -8660,13 +9023,14 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @since 11 */ /** - * Called when a screen capture request is received. - * - * @param { Callback<OnScreenCaptureRequestEvent> } callback Called when a screen capture request is received. + * Triggered when the host application that web content from the specified origin is requesting to capture screen. + * @param { Callback<OnScreenCaptureRequestEvent> } callback The triggered callback when the host application that web content from the specified origin is + * requesting to capture screen. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onScreenCaptureRequest(callback: Callback<OnScreenCaptureRequestEvent>): WebAttribute; @@ -8691,12 +9055,11 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * Triggered when called to allow custom display of the context menu. * * @param { Callback<OnContextMenuShowEvent, boolean> } callback The triggered callback when called to allow custom display of the context menu. - * {@code true} means the custom menu is triggered. - * {@code false} means the custom menu is invalid. * @returns { WebAttribute } If custom display return true.Otherwise, default display return false. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onContextMenuShow(callback: Callback<OnContextMenuShowEvent, boolean>): WebAttribute; @@ -8707,7 +9070,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onContextMenuHide(callback: OnContextMenuHideCallback): WebAttribute; @@ -8721,16 +9085,16 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @since 9 */ /** - * Set whether to manually play audio-only videos. The playback of muted videos is not controlled by this interface. + * Set whether media playback needs to be triggered by user gestures. * - * @param { boolean } access Set whether to manually play audio-only videos. - * {@code true}True means setting up automatic playback of audio videos requires users to manually click, {@code false} otherwise. - * Default value: true. + * @param { boolean } access True if it needs to be triggered manually by the user else false. + * The default value is true. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ mediaPlayGestureAccess(access: boolean): WebAttribute; @@ -8761,7 +9125,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onSearchResultReceive(callback: Callback<OnSearchResultReceiveEvent>): WebAttribute; @@ -8791,13 +9156,13 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onScroll(callback: Callback<OnScrollEvent>): WebAttribute; /** - * Called to notify users when an SSL error occurs with a request for the main frame. - * To include errors with requests for subframes, use the OnSslErrorEvent API. + * Triggered when the Web page receives an ssl Error. * * @param { function } callback The triggered callback when the Web page receives an ssl Error. * @returns { WebAttribute } @@ -8805,8 +9170,7 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @since 9 */ /** - * Called to notify users when an SSL error occurs with a request for the main frame. - * To include errors with requests for subframes, use the OnSslErrorEvent API. + * Triggered when the Web page receives an ssl Error. * * @param { function } callback The triggered callback when the Web page receives an ssl Error. * @returns { WebAttribute } @@ -8815,26 +9179,26 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @since 11 */ /** - * Called to notify users when an SSL error occurs with a request for the main frame. - * To include errors with requests for subframes, use the OnSslErrorEvent API. + * Triggered when the Web page receives an ssl Error. * * @param { Callback<OnSslErrorEventReceiveEvent> } callback The triggered callback when the Web page receives an ssl Error. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onSslErrorEventReceive(callback: Callback<OnSslErrorEventReceiveEvent>): WebAttribute; /** - * Called to notify users when an SSL error occurs during the loading of resources (for the main frame and subframes). - * To handle SSL errors for requests for the main frame, use the isMainFrame field to distinguish. + * Triggered when the Web page receives an ssl Error. * * @param { OnSslErrorEventCallback } callback The triggered callback when the Web page receives an ssl Error. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onSslErrorEvent(callback: OnSslErrorEventCallback): WebAttribute; @@ -8862,7 +9226,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onClientAuthenticationRequest(callback: Callback<OnClientAuthenticationEvent>): WebAttribute; @@ -8885,21 +9250,13 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { */ /** * Triggered when web page requires the user to create a window. - * If the {@link setWebController} interface is not called, the render process will be blocked. - * If no new window is created, it is set to null when calling the {@link setWebController} interface, - * informing the Web that no new window is created. - * The new window should avoid being directly overlaid on the original Web component, - * and its URL (such as address bar) should be clearly displayed in the same form as the main page to - * prevent users from being confused. If credible URL visualization management cannot be achieved, - * it is necessary to consider prohibiting the creation of new windows. It should be noted that the source of - * the new window request cannot be traced reliably, and it may be initiated by a third party iframe. - * The application needs to take defensive measures such as sandbox isolation and permission restriction - * by default to ensure security. + * * @param { Callback<OnWindowNewEvent> } callback The triggered callback when web page requires the user to create a window. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onWindowNew(callback: Callback<OnWindowNewEvent>): WebAttribute; @@ -8912,14 +9269,14 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @since 9 */ /** - * Notifies the user of the window closing request. - * Like {@link onWindowNew}, from a security perspective, applications should ensure that users can know that - * the page they interact with is closed. + * Triggered when web page requires the user to close a window. + * * @param { function } callback The triggered callback when web page requires the user to close a window. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onWindowExit(callback: () => void): WebAttribute; @@ -8934,13 +9291,14 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { */ /** * Set whether multiple windows are supported. - * When multiple windows permissions are enabled, the {@link onWindowNew} event needs to be implemented. + * * @param { boolean } multiWindow True if it needs to be triggered manually by the user else false. * The default value is false. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ multiWindowAccess(multiWindow: boolean): WebAttribute; @@ -8959,7 +9317,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @returns { WebAttribute } True if the application consumes key events else false. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onInterceptKeyEvent(callback: (event: KeyEvent) => boolean): WebAttribute; @@ -8972,14 +9331,14 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @since 9 */ /** - * Sets the standard font family for the web page. + * Set the font of webview standard font library. The default font is "sans serif". * - * @param { string } family Sets the standard font family for the web page. - * Default value: sans-serif. + * @param { string } family Standard font set series. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ webStandardFont(family: string): WebAttribute; @@ -8992,14 +9351,14 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @since 9 */ /** - * Sets the standard font family for the web page. + * Set the font of webview serif font library. The default font is "serif". * - * @param { string } family Sets the standard font family for the web page. - * Default value: sans-serif. + * @param { string } family Serif font set series. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ webSerifFont(family: string): WebAttribute; @@ -9012,14 +9371,14 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @since 9 */ /** - * Sets the sans serif font family for the web page. + * Set the font of webview sans serif font library. The default font is "sans-serif". * - * @param { string } family Sets the sans serif font family for the web page. - * Default value: sans-serif. + * @param { string } family Sans serif font set series. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ webSansSerifFont(family: string): WebAttribute; @@ -9032,14 +9391,14 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @since 9 */ /** - * Sets the fixed font family for the web page. + * Set the font of webview fixed font library. The default font is "monospace". * - * @param { string } family Sets the fixed font family for the web page. - * Default value: monospace. + * @param { string } family Fixed font set series. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ webFixedFont(family: string): WebAttribute; @@ -9052,14 +9411,14 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @since 9 */ /** - * Sets the fantasy font family for the web page. + * Set the font of webview fantasy font library. The default font is "fantasy". * - * @param { string } family Sets the fantasy font family for the web page. - * Default value: fantasy. + * @param { string } family fantasy font set series. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ webFantasyFont(family: string): WebAttribute; @@ -9072,14 +9431,14 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @since 9 */ /** - * Sets the cursive font family for the web page. + * Set the font of webview cursive font library. The default font is "cursive". * - * @param { string } family Sets the cursive font family for the web page. - * Default value: cursive. + * @param { string } family Cursive font set series. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ webCursiveFont(family: string): WebAttribute; @@ -9092,16 +9451,14 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @since 9 */ /** - * Sets the default font size for the web page. + * Set the default fixed font value of webview. The default value is 13, ranging from 1 to 72. * - * @param { number } size Default fixed font size to set, in px. - * The value ranges from -2^31 to 2^31-1. In actual rendering, - * values greater than 72 are handled as 72, and values less than 1 are handled as 1. - * Default value: 13. + * @param { number } size Font size. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ defaultFixedFontSize(size: number): WebAttribute; @@ -9114,15 +9471,14 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @since 9 */ /** - * Sets the default font size for the web page. + * Set the default font value of webview. The default value is 16, ranging from 1 to 72. * - * @param { number } size Default font size to set, in px. - * The value ranges from -2^31 to 2^31-1. In actual rendering, values greater than 72 are handled as 72, - * and values less than 1 are handled as 1. Default value: 16. + * @param { number } size Font size. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ defaultFontSize(size: number): WebAttribute; @@ -9135,17 +9491,15 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @since 9 */ /** - * Sets the minimum font size for the web page. + * Set the minimum value of webview font. The default value is 8, ranging from 1 to 72. * - * @param { number } size Minimum font size to set, in px. - * The value ranges from -2^31 to 2^31-1. In actual rendering, - * values greater than 72 are handled as 72, and values less than 1 are handled as 1. - * Default value: 8 + * @param { number } size Font size. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ minFontSize(size: number): WebAttribute; @@ -9158,16 +9512,14 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @since 9 */ /** - * Sets the minimum logical font size for the web page. + * Set the logical minimum value of webview font. The default value is 8, ranging from 1 to 72. * - * @param { number } size Minimum logical font size to set, in px. - * The value ranges from -2^31 to 2^31-1. In actual rendering, - * values greater than 72 are handled as 72, and values less than 1 are handled as 1. - * Default value: 8 + * @param { number } size Font size. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ minLogicalFontSize(size: number): WebAttribute; @@ -9178,7 +9530,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ defaultTextEncodingFormat(textEncodingFormat: string): WebAttribute; @@ -9189,7 +9542,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ forceDisplayScrollBar(enabled: boolean): WebAttribute; @@ -9218,7 +9572,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ blockNetwork(block: boolean): WebAttribute; @@ -9234,18 +9589,14 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { /** * Set whether paint horizontal scroll bar. * - * <p><strong>API Note</strong>:<br> - * After controlling the horizontal scrollbar's visibility through the @State variable, you need to call controller.refresh() to take effect.<br> - * When frequently changing the @State variable dynamically, it is recommended to match the toggle variable with the Web component one-to-one. - * </p> - * * @param { boolean } horizontalScrollBar True if it needs to paint horizontal scroll bar. * The default value is true. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ horizontalScrollBarAccess(horizontalScrollBar: boolean): WebAttribute; @@ -9259,12 +9610,7 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @since 9 */ /** - * Set whether paint vertical scroll bar, including the system default scrollbar and user-defined scrollbar. - * - * <p><strong>API Note</strong>:<br> - * After controlling the vertical scrollbar's visibility through the @State variable, you need to call controller.refresh() to take effect.<br> - * When frequently changing the @State variable dynamically, it is recommended to match the toggle variable with the Web component one-to-one. - * </p> + * Set whether paint vertical scroll bar. * * @param { boolean } verticalScrollBar True if it needs to paint vertical scroll bar. * The default value is true. @@ -9272,7 +9618,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ verticalScrollBarAccess(verticalScrollBar: boolean): WebAttribute; @@ -9303,7 +9650,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onTouchIconUrlReceived(callback: Callback<OnTouchIconUrlReceivedEvent>): WebAttribute; @@ -9334,7 +9682,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onFaviconReceived(callback: Callback<OnFaviconReceivedEvent>): WebAttribute; @@ -9367,7 +9716,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onPageVisible(callback: Callback<OnPageVisibleEvent>): WebAttribute; @@ -9395,7 +9745,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onDataResubmitted(callback: Callback<OnDataResubmittedEvent>): WebAttribute; @@ -9408,16 +9759,14 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @since 9 */ /** - * Sets whether to enable smooth pinch mode for the web page. + * Set whether enable pinch smooth mode. * - * @param { boolean } isEnabled Whether to enable smooth pinch mode for the web page. - * {@code true} means to enable smooth pinch mode for the web page; - * {@code false} means not to enable smooth pinch mode for the web page. - * The default value is false. + * @param { boolean } isEnabled True if it needs to enable smooth mode. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ pinchSmooth(isEnabled: boolean): WebAttribute; @@ -9433,31 +9782,15 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { */ /** * Whether the window can be open automatically through JavaScript. - * <p><strong>API Note</strong>:<br> - * This API takes effect only when {@link JavaScript} is enabled. - * This API opens a new window when {@link multiWindowAccess} is enabled and opens a local window - * when {@link multiWindowAccess} is disabled. - * The default value of **flag** is subject to the settings of the **persist.web.allowWindowOpenMethod.enabled** system attribute. - * If this attribute is not set, the default value of **flag** is **false**. - * To check the settings of **persist.web.allowWindowOpenMethod.enabled**, - * run the **hdc shell param get persist.web.allowWindowOpenMethod.enabled** command. - * If the attribute value is 1, it means the system attribute is enabled; - * If the attribute value is 0 or does not exist, it means that the system attribute has not been enabled. - * you can run the **hdc shell param set persist.web.allowWindowOpenMethod.enabled 1** command to enable it. - * </p> * * @param { boolean } flag If it is true, the window can be opened automatically through JavaScript. * If it is false and user behavior, the window can be opened automatically through JavaScript. * Otherwise, the window cannot be opened. - * The user behavior here refers to the behavior of requesting to open a new window (window. open) within 5 seconds after - * the user clicks or performs other operations on the web component. - * The default value is associated with system properties. - * When the system property **persist.web.allowWindowOpenMethod.enabled** is set to true, the default value is true. - * If the system property is not set, the default value is false. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ allowWindowOpenMethod(flag: boolean): WebAttribute; @@ -9479,13 +9812,14 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @since 11 */ /** - * Set the callback function when the audio playback status on the webpage changes. + * Triggered when the playing state of audio on web page changed. * - * @param { Callback<OnAudioStateChangedEvent> } callback Callback invoked when the audio playback status on the webpage changes. + * @param { Callback<OnAudioStateChangedEvent> } callback The playing state of audio on web page. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onAudioStateChanged(callback: Callback<OnAudioStateChangedEvent>): WebAttribute; @@ -9513,7 +9847,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onFirstContentfulPaint(callback: Callback<OnFirstContentfulPaintEvent>): WebAttribute; @@ -9524,7 +9859,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onFirstMeaningfulPaint(callback: OnFirstMeaningfulPaintCallback): WebAttribute; @@ -9535,7 +9871,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onLargestContentfulPaint(callback: OnLargestContentfulPaintCallback): WebAttribute; @@ -9565,7 +9902,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onLoadIntercept(callback: Callback<OnLoadInterceptEvent, boolean>): WebAttribute; @@ -9578,18 +9916,15 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @since 10 */ /** - * The callback is triggered when the Controller is successfully bound to the Web component, - * and the Controller must be a WebviewController, and it is forbidden to call the interface related to - * the Web component before the event callback, otherwise a js-error exception will be thrown. - * Because the webpage has not been loaded when the callback is called, it is impossible to use interfaces related to - * operating webpages in the callback, such as {@link zoomIn} and {@link zoomOut}, and you can use interfaces unrelated to - * operating webpages such as {@link loadUrl} and {@link getWebId}. + * Triggered when The controller is bound to the web component, this controller must be a WebviewController. + * This callback can not use the interface about manipulating web pages. * @param { function } callback The triggered callback when web controller initialization success. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onControllerAttached(callback: () => void): WebAttribute; @@ -9614,7 +9949,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onOverScroll(callback: Callback<OnOverScrollEvent>): WebAttribute; @@ -9625,7 +9961,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onSafeBrowsingCheckResult(callback: OnSafeBrowsingCheckResultCallback): WebAttribute; @@ -9636,7 +9973,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onNavigationEntryCommitted(callback: OnNavigationEntryCommittedCallback): WebAttribute; @@ -9647,77 +9985,41 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onIntelligentTrackingPreventionResult(callback: OnIntelligentTrackingPreventionCallback): WebAttribute; /** - * Injects the JavaScripts script into the Web component. - * When the specified page or document starts to be loaded, the script is executed on any page whose source matches scriptRules. - * <p><strong>API Note</strong>:<br> - * The script runs before any JavaScript code of the page, when the DOM tree may not have been loaded or rendered. - * The script is executed in the lexicographic order, not array order. - * If the array order is required, you are advised to use the runJavaScriptOnDocumentStart interface. - * You are not advised to use this API together with runJavaScriptOnDocumentStart. - * When scripts with identical content are injected multiple times, - * silent deduplication will be performed: repeated scripts will neither be displayed nor prompted, - * and the scriptRules used during the first injection will be adopted. - * </p> - * + * Injects the JavaScripts before Webview creates the DOM tree, and then the JavaScript snippet will run after the document has been created. * @param { Array<ScriptItem> } scripts - The array of the JavaScripts to be injected. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ javaScriptOnDocumentStart(scripts: Array<ScriptItem>): WebAttribute; /** - * Injects the JavaScripts script into the Web component. - * When the specified page or document has been loaded, the script is executed on any page whose source matches scriptRules. - * <p><strong>API NOTE</strong>:<br> - * The script runs after any JavaScript code of the page, when the DOM tree has been loaded and rendered. - * The script is excuted in the lexicographic order, not array order. - * If the array order is required, you are advised to use the runJavaScriptOnDocumentEnd interface. - * You are not advised to use this API together with runJavaScriptOnDocumentEnd. - * When scripts with identical content are injected multiple times, - * silent deduplication will be performed: repeated scripts will neither be displayed nor prompted, - * and the scriptRules used during the first injection will be adopted. - * <p> - * + * Injects the JavaScripts before Webview creates the DOM tree, and then the JavaScript snippet will run after the document has been created. * @param { Array<ScriptItem> } scripts - The array of the JavaScripts to be injected. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ javaScriptOnDocumentEnd(scripts: Array<ScriptItem>): WebAttribute; /** - * Sets the web layout mode. - * - * <p><strong>API Note</strong>:<br> - * Currently, only two web layout modes are supported: WebLayoutMode.NONE and WebLayoutMode.FIT_CONTENT. - * The following restrictions apply with the usage of WebLayoutMode.FIT_CONTENT: - * - If the Web component is wider or longer than 7680 px, specify the RenderMode.SYNC_RENDER mode - * when creating the Web component; otherwise, the screen may be blank. - * - After the Web component is created, dynamic switching of the layoutMode is not supported. - * - The width and height of a Web component cannot exceed 500,000 px when the RenderMode.SYNC_RENDER mode is specified, - * and cannot exceed 7680 px when the RenderMode.ASYNC_RENDER mode is specified. - * - Frequent changes to the page width and height will trigger a re-layout of the Web component, - * which can affect the user experience. - * - Waterfall web pages are not supported (drop down to the bottom to load more). - * - Only height adaptation is supported(VH units are not supported). Width adaptation is not supported. - * - Because the height is adaptive to the web page height, - * the component height cannot be changed by modifying the component height attribute. - * </p> - * - * @param { WebLayoutMode } mode - The web layout mode, follow the system or adaptive layout. - * The default value is WebLayoutMode.NONE. + * Set web layout Mode. + * @param { WebLayoutMode } mode - The web layout mode, which can be {@link WebLayoutMode}. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ layoutMode(mode: WebLayoutMode): WebAttribute; @@ -9733,131 +10035,85 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { /** * Called to setting the nested scroll options. * - * <p><strong>API Note</strong>:<br> - * You can set four directions: up, down, left, and right, or set nested scrolling modes for forward and backward directions - * to achieve scrolling linkage with the parent component.<br> - * When value is of type NestedScrollOptionsExt (four directions: up, down, left, and right), the default scrolling options - * for scrollUp, scrollDown, scrollLeft, and scrollRight are NestedScrollMode.SELF_FIRST.<br> - * When value is of type NestedScrollOptions (two directions: forward and backward), the default scrolling options for scrollForward - * and scrollBackward are NestedScrollMode.SELF_FIRST.<br> - * Supported nested scrolling containers: Grid, List, Scroll, Swiper, Tabs, WaterFlow, Refresh, bindSheet.<br> - * Supported nested scrolling input events: gestures, mouse, and trackpad.<br> - * In nested scrolling scenarios, since web scrolling to the edge will prioritize triggering the overscroll bounce effect, - * it is recommended to set overScrollMode to OverScrollMode.NEVER to avoid affecting the user experience in this scenario. - * </p> - * * @param { NestedScrollOptions | NestedScrollOptionsExt } value - options for * nested scrolling. * @returns { WebAttribute } the attribute of the scroll. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ nestedScroll(value: NestedScrollOptions | NestedScrollOptionsExt): WebAttribute; /** * Sets the enable native embed mode for web. * - * <p><strong>API Note</strong>: - * <strong>Performance Note</strong>: - * <p>For details about how to rendering native components on the Web using same-layer rendering, - * see [Rendering Native Components on the Web Using Same-Layer Rendering]{@link https://developer.huawei.com/consumer/en/doc/best-practices/bpta-render-web-using-same-layer-render} - * </p> - * * @param { boolean } mode - True if it needs to enable native embed mode. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enableNativeEmbedMode(mode: boolean): WebAttribute; /** - * Registers the HTML tag name and type for same-layer rendering. - * The tag name only supports object and embed. - * The tag type only supports visible ASCII characters.<br> - * If the specified type is the same as the W3C standard object or embed type, - * the ArkWeb kernel identifies the type as a non-same-layer tag.<br> - * This API is also controlled by the enableNativeEmbedMode API and - * does not take effect if same-layer rendering is not enabled. When this API is not used, - * the ArkWeb engine recognizes the embed tags with the "native/" prefix as same-layer tags. + * Register native pattern with specific tag and type. * - * @param { string } tag - Tag name. - * @param { string } type - Type of the tag, The kernel matches this parameter with a prefix. + * @param { string } tag - Tag name used by html webpage. + * @param { string } type - Type of the tag. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ registerNativeEmbedRule(tag: string, type:string): WebAttribute; /** * Triggered when embed lifecycle changes. * - * <p><strong>API Note</strong>: - * <strong>Performance Note</strong>: - * <p>For details about how to rendering native components on the Web using same-layer rendering, - * see [Rendering Native Components on the Web Using Same-Layer Rendering]{@link https://developer.huawei.com/consumer/en/doc/best-practices/bpta-render-web-using-same-layer-render} - * </p> - * * @param { function } callback - Function Triggered when embed lifecycle changes. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onNativeEmbedLifecycleChange(callback: (event: NativeEmbedDataInfo) => void): WebAttribute; /** - * Called when the visibility of a same-layer tag (such as an Embed tag or an Object tag) on a web page changes in the viewport. - * By default, the same-layer tag is invisible. If the rendering tag is visible when you access the page for the first time, - * the callback is triggered; otherwise, it is not triggered. That is, if the same-layer tag changes from a non-zero value to 0 x 0, - * the callback is triggered. If the rendering tag size changes from 0 x 0 to a non-zero value, the callback is not triggered. - * If all the same-layer tags are invisible, they are reported as invisible. If all the same-layer rendering tags or part of them are visible, - * they are reported as invisible. + * Triggered when embed visibility changes. * * @param { OnNativeEmbedVisibilityChangeCallback } callback - Callback triggered when embed visibility changes. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onNativeEmbedVisibilityChange(callback: OnNativeEmbedVisibilityChangeCallback): WebAttribute; /** * Triggered when gesture effect on embed tag. * - * <p><strong>API Note</strong>: - * <strong>Performance Note</strong>: - * <p>For details about how to rendering native components on the Web using same-layer rendering, - * see [Rendering Native Components on the Web Using Same-Layer Rendering]{@link https://developer.huawei.com/consumer/en/doc/best-practices/bpta-render-web-using-same-layer-render} - * </p> - * * @param { function } callback - Function Triggered when gesture effect on embed tag. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onNativeEmbedGestureEvent(callback: (event: NativeEmbedTouchInfo) => void): WebAttribute; - /** - * Triggered when mouse effect on embed tag. - * - * @param { MouseInfoCallback } callback - callback Triggered when mouse effect on embed tag. - * @returns { WebAttribute } - * @syscap SystemCapability.Web.Webview.Core - * @since 20 - */ - onNativeEmbedMouseEvent(callback: MouseInfoCallback): WebAttribute; - /** * Called to set copy option * - * @param { CopyOptions } value - copy option.The default value is CopyOptions.LocalDevice. + * @param { CopyOptions } value - copy option. * @returns { WebAttribute } the attribute of the scroll. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ copyOptions(value: CopyOptions): WebAttribute; @@ -9869,61 +10125,54 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onOverrideUrlLoading(callback: OnOverrideUrlLoadingCallback): WebAttribute; /** - * Sets whether automatic text resizing is enabled. + * Enable whether to automatically resize text. The default value is true. * - * @param { boolean } textAutosizing - Whether automatic text resizing is enabled. - * {@code true} means enable text autosizing; - * {@code false} means disable text autosizing. - * Default value: true. + * @param { boolean } textAutosizing - Whether to enable text autosizing. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ textAutosizing(textAutosizing: boolean): WebAttribute; /** - * Enable the application takeover of web media playback feature. + * Enable app creates native media player to play web page media source. * * @param { NativeMediaPlayerConfig } config - The configuration of native media player. - * enable: whether to enable the feature, shouldOverlay: whether the image of the video player - * taken over by the application will overlay the web page content, if this feature is enabled. - * Default value: {enable: false, shouldOverlay: false}. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enableNativeMediaPlayer(config: NativeMediaPlayerConfig): WebAttribute; /** * Triggered when render process not responding. - * If the Web component can't handle the input event, or can't navigate to the new URL within a reasonable time range, - * the Web page process is considered unresponsive and the callback will be triggered. - * As long as the web process has been unresponsive, this callback may continue to trigger until - * the web process responds again, at which time {@link onRenderProcessResponding} will trigger. - * Applications can terminate the associated rendering process through the WebviewController interface {@link terminateRenderProcess}, - * which may affect other Web components in the same rendering process. + * * @param { OnRenderProcessNotRespondingCallback } callback The triggered function when render process not responding. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onRenderProcessNotResponding(callback: OnRenderProcessNotRespondingCallback): WebAttribute; /** - * This callback function is triggered when the rendering process changes from unresponsive state to normal operation state, - * which indicates that the webpage is not really stuck. + * Triggered when the unresponsive render process becomes responsive. * * @param { OnRenderProcessRespondingCallback } callback The triggered function when the unresponsive render process becomes responsive. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onRenderProcessResponding(callback: OnRenderProcessRespondingCallback): WebAttribute; @@ -9948,29 +10197,29 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { selectionMenuOptions(expandedMenuOptions: Array<ExpandedMenuItemOptions>): WebAttribute; /** - * Called when the viewport-fit configuration in the web page's <meta> tag changes. - * The application can adapt its layout to the viewport within this callback. + * Triggered when the viewport-fit meta is detected for web page. * - * @param { OnViewportFitChangedCallback } callback - Callback invoked when the viewport-fit configuration in the web page's <meta> tag changes. + * @param { OnViewportFitChangedCallback } callback - The callback for onViewportFitChanged. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onViewportFitChanged(callback: OnViewportFitChangedCallback): WebAttribute; /** - * Editable elements (such as input labels) in web pages will call back to this interface before pulling up - * the soft keyboard. Applications can use this interface to intercept the pop-up of the system soft keyboard - * and configure the application-customized soft keyboard (according to this interface, - * the application can decide to use the system default soft keyboard/the system soft keyboard with - * the enter key customized/all the soft keyboards customized by the application). + * When the soft keyboard is about to be displayed on the current Web, + * it gives the application the opportunity to intercept the system keyboard attachment. + * The application can return the keyboard options to control the web to + * pull up the soft keyboard of the different type. * * @param { WebKeyboardCallback } callback - The callback for onInterceptKeyboardAttach. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onInterceptKeyboardAttach(callback: WebKeyboardCallback): WebAttribute; @@ -9983,46 +10232,31 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onAdsBlocked(callback: OnAdsBlockedCallback): WebAttribute; /** - * When the keyboard avoidance mode set by UIContext is {@link KeyboardAvoidMode.RESIZE} mode, - * the interface function will not take effect. + * Set web avoidance keyboard mode. The default value is WebKeyboardAvoidMode.RESIZE_CONTENT. + * * @param { WebKeyboardAvoidMode } mode - The web keyboard avoid mode, which can be {@link WebKeyboardAvoidMode}. - * Web soft keyboard avoidance is not recommended in nested scrolling scenes, - * including RESIZE_VISUAL and RESIZE_CONTENT. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ keyboardAvoidMode(mode: WebKeyboardAvoidMode): WebAttribute; /** * Set the custom text menu. * - * <p><strong>API Note</strong>:<br> - * The onCreateMenu interface is used to modify, add, and delete menu options.If you want to hide the text menu, - * you need to return an empty array.<br> - * The onMenuItemClick interface allows you to define the callback function for menu options.This function is - * triggered when a menu option is clicked, and it determines whether to execute the system's default callback - * based on the return value. Returning true prevents the system callback from executing, while returning false - * continues with the system callback.<br> - * The editMenuOptions interface makes the selectionMenuOptions (deprecated) not work when used at the same time. - * </p> - * * @param { EditMenuOptions } editMenu - Customize text menu options. - * The number of menu items, as well as the content size and icon size of the menu, - * should be consistent with the ArkUI Menu component. - * The system-provided id enumeration values (TextMenuItemId) in the menu are only - * supportedfor CUT, COPY, PASTE, and SELECT_ALL in the web. - * The textRange parameter in the onMenuItemClick function is meaningless in the web, - * and the input value is -1. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ editMenuOptions(editMenu: EditMenuOptions): WebAttribute; @@ -10032,7 +10266,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @param { boolean } enabled - Default value is true, set false to disable haptic feedback. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ enableHapticFeedback(enabled: boolean): WebAttribute; @@ -10045,7 +10280,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @param { SelectionMenuOptionsExt } [options] - Indicates the options of selection menu. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ bindSelectionMenu(elementType: WebElementType, content: CustomBuilder, responseType: WebResponseType, options?: SelectionMenuOptionsExt): WebAttribute; @@ -10056,7 +10292,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @param { boolean} optimizeParserBudget Default value is false, set true to enable optimize parser budget. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ optimizeParserBudget(optimizeParserBudget: boolean): WebAttribute; @@ -10066,7 +10303,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @param { boolean } follow The value true means to follow the system font weight, and false means the opposite. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ enableFollowSystemFontWeight(follow: boolean): WebAttribute; @@ -10076,7 +10314,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @param { boolean } enabled Whether to enable AVSession. The value true means to enable AVSession, and false means the opposite. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ enableWebAVSession(enabled: boolean): WebAttribute; @@ -10086,7 +10325,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @param { Array<ScriptItem> } scripts - The JavaScripts executed in array order. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ runJavaScriptOnDocumentStart(scripts: Array<ScriptItem>): WebAttribute; @@ -10096,7 +10336,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @param { Array<ScriptItem> } scripts - The JavaScripts executed in array order. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ runJavaScriptOnDocumentEnd(scripts: Array<ScriptItem>): WebAttribute; @@ -10106,7 +10347,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @param { Array<ScriptItem> } scripts - The JavaScripts executed in array order. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ runJavaScriptOnHeadEnd(scripts: Array<ScriptItem>): WebAttribute; @@ -10116,7 +10358,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @param { EmbedOptions } options The embed options, which can be {@link EmbedOptions}. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core - * @since 16 + * @since arkts {'1.1':'16', '1.2':'20'} + * @arkts 1.1&1.2 */ nativeEmbedOptions(options?: EmbedOptions): WebAttribute; @@ -10195,15 +10438,6 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { /** * Defines Web Component. * - * <p><strong>API Note</strong>: - * - * <strong>Performance Note</strong>: - * <p>For details about how to optimize the compilation, resource loading, and JSBridge performance, - * see [Optimizing Web Page Loading]{@link https://developer.huawei.com/consumer/en/doc/best-practices/bpta-web-develop-optimization} - * <p>When the white screen duration is long due to complex web page parsing, - * you can enable [optimizeParserBudget]{@link WebAttribute.optimizeParserBudget} to reduce the first frame rendering content.</p> - * </p> - * * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice @@ -10232,7 +10466,8 @@ declare const WebInstance: WebAttribute; * @typedef SslErrorEvent * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SslErrorEvent { /** @@ -10241,7 +10476,8 @@ declare interface SslErrorEvent { * @type { SslErrorHandler } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ handler: SslErrorHandler; @@ -10251,7 +10487,8 @@ declare interface SslErrorEvent { * @type { SslError } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ error: SslError; @@ -10261,7 +10498,8 @@ declare interface SslErrorEvent { * @type { string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ url: string; @@ -10271,7 +10509,8 @@ declare interface SslErrorEvent { * @type { string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ originalUrl: string; @@ -10281,7 +10520,8 @@ declare interface SslErrorEvent { * @type { string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ referrer: string; @@ -10291,7 +10531,8 @@ declare interface SslErrorEvent { * @type { boolean } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ isFatalError: boolean; @@ -10301,7 +10542,8 @@ declare interface SslErrorEvent { * @type { boolean } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ isMainFrame: boolean; @@ -10364,7 +10606,8 @@ declare interface ExpandedMenuItemOptions { * * @interface NestedScrollOptionsExt * @syscap SystemCapability.Web.Webview.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NestedScrollOptionsExt { /** @@ -10372,7 +10615,8 @@ declare interface NestedScrollOptionsExt { * * @type { ?NestedScrollMode } * @syscap SystemCapability.Web.Webview.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ scrollUp?: NestedScrollMode; @@ -10381,7 +10625,8 @@ declare interface NestedScrollOptionsExt { * * @type { ?NestedScrollMode } * @syscap SystemCapability.Web.Webview.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ scrollDown?: NestedScrollMode; @@ -10390,7 +10635,8 @@ declare interface NestedScrollOptionsExt { * * @type { ?NestedScrollMode } * @syscap SystemCapability.Web.Webview.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ scrollRight?: NestedScrollMode; @@ -10399,7 +10645,8 @@ declare interface NestedScrollOptionsExt { * * @type { ?NestedScrollMode } * @syscap SystemCapability.Web.Webview.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ scrollLeft?: NestedScrollMode; } @@ -10409,19 +10656,19 @@ declare interface NestedScrollOptionsExt { * * @typedef EmbedOptions * @syscap SystemCapability.Web.Webview.Core - * @since 16 + * @since arkts {'1.1':'16', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface EmbedOptions { /** - * Whether the embed element support the default intrinsic size of 300 * 150, expressed in CSS pixels. - * <br>When CSS size is set, the embed element size is CSS size, otherwise it is intrinsic size. - * <br>If true, then the intrinsic size is 300 * 150. - * <br>If false, the embed element will not be rendered when the CSS size is not set. + * Whether the embed element support the default intrinsic size of 300 * 150. + * <br>Default value is false. If false, then the intrinsic size is 0 * 0. * * @type { ?boolean } * @default false * @syscap SystemCapability.Web.Webview.Core - * @since 16 + * @since arkts {'1.1':'16', '1.2':'20'} + * @arkts 1.1&1.2 */ supportDefaultIntrinsicSize?: boolean; diff --git a/api/@internal/component/ets/window_scene.d.ts b/api/@internal/component/ets/window_scene.d.ts index 2505dfdb6eebf245e1056fa29e679556ca8b6ae6..032103b5187f7a1f71d7e0030ae7e7eaefeb4961 100644 --- a/api/@internal/component/ets/window_scene.d.ts +++ b/api/@internal/component/ets/window_scene.d.ts @@ -18,13 +18,19 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Position } from './units' +import { CommonMethod } from './common' +/*** endif */ + /** * Defines the interface of WindowScene. * * @interface WindowSceneInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ interface WindowSceneInterface { /** @@ -34,7 +40,8 @@ interface WindowSceneInterface { * @returns { WindowSceneAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ (persistentId: number): WindowSceneAttribute; } @@ -45,7 +52,8 @@ interface WindowSceneInterface { * @extends CommonMethod<WindowSceneAttribute> * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ declare class WindowSceneAttribute extends CommonMethod<WindowSceneAttribute> { /** @@ -58,7 +66,8 @@ declare class WindowSceneAttribute extends CommonMethod<WindowSceneAttribute> { * @returns { WindowSceneAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ attractionEffect(destination: Position, fraction: number): WindowSceneAttribute; } diff --git a/api/@internal/component/ets/with_theme.d.ts b/api/@internal/component/ets/with_theme.d.ts index 2de31a46ac690350406b37cf98c9e0a22e9e0ce6..7d1f2ce37928f907c6b9e6de7ca722a14637655f 100644 --- a/api/@internal/component/ets/with_theme.d.ts +++ b/api/@internal/component/ets/with_theme.d.ts @@ -18,6 +18,10 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CustomTheme } from '../../@ohos.arkui.theme'; +import { ThemeColorMode } from './common'; +/*** endif */ /** * CustomTheme. @@ -37,7 +41,8 @@ declare type CustomTheme = import('../api/@ohos.arkui.theme').CustomTheme; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface WithThemeOptions { /** @@ -47,7 +52,8 @@ declare interface WithThemeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ theme?: CustomTheme; @@ -58,7 +64,8 @@ declare interface WithThemeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ colorMode?: ThemeColorMode; } @@ -82,7 +89,8 @@ declare type WithThemeInterface = (options: WithThemeOptions) => WithThemeAttrib * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice -* @since 12 +* @since arkts {'1.1':'12','1.2':'20'} +* @arkts 1.1&1.2 */ declare class WithThemeAttribute { } diff --git a/api/@ohos.InputMethodSubtype.d.ts b/api/@ohos.InputMethodSubtype.d.ts index c86eeccd74ef19225e46894ee3987fa19f6eccd7..1cb08c348e1ec6b7b5718af3078f771ad76c11c0 100644 --- a/api/@ohos.InputMethodSubtype.d.ts +++ b/api/@ohos.InputMethodSubtype.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-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 @@ -23,7 +23,8 @@ * * @interface InputMethodSubtype * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export default interface InputMethodSubtype { /** @@ -32,19 +33,21 @@ export default interface InputMethodSubtype { * @type { ?string } * @readonly * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly label?: string; /** * The label id of input method subtype. * - * @type { ?number } + * @type { ?double } * @readonly * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - readonly labelId?: number; + readonly labelId?: double; /** * The name of input method. @@ -52,7 +55,8 @@ export default interface InputMethodSubtype { * @type { string } * @readonly * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly name: string; @@ -62,7 +66,8 @@ export default interface InputMethodSubtype { * @type { string } * @readonly * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly id: string; @@ -72,7 +77,8 @@ export default interface InputMethodSubtype { * @type { ?('upper' | 'lower') } * @readonly * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly mode?: 'upper' | 'lower'; @@ -82,7 +88,8 @@ export default interface InputMethodSubtype { * @type { string } * @readonly * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly locale: string; @@ -92,7 +99,8 @@ export default interface InputMethodSubtype { * @type { string } * @readonly * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly language: string; @@ -102,19 +110,21 @@ export default interface InputMethodSubtype { * @type { ?string } * @readonly * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly icon?: string; /** * The icon id of input method subtype. * - * @type { ?number } + * @type { ?double } * @readonly * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - readonly iconId?: number; + readonly iconId?: double; /** * The extra info of input method subtype. @@ -128,7 +138,8 @@ export default interface InputMethodSubtype { * * @type { ?object } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ extra?: object; } \ No newline at end of file diff --git a/api/@ohos.PiPWindow.d.ts b/api/@ohos.PiPWindow.d.ts index 7ed8033f3377114695523a55dce5ae7c0dd1c5b0..2aa01f2664b2e720c5059d600d004c3e2fa80b4f 100644 --- a/api/@ohos.PiPWindow.d.ts +++ b/api/@ohos.PiPWindow.d.ts @@ -21,7 +21,12 @@ import type BaseContext from './application/BaseContext'; import type { Callback } from './@ohos.base'; import { NodeController } from './arkui/NodeController'; +/*** if arkts 1.1 */ import { typeNode } from './arkui/FrameNode'; +/*** endif */ +/*** if arkts 1.2 */ +import { XComponentController } from './arkui/component/xcomponent'; +/*** endif */ /** * Picture In Picture Window Manager @@ -36,7 +41,8 @@ import { typeNode } from './arkui/FrameNode'; * @namespace PiPWindow * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace PiPWindow { /** @@ -52,7 +58,8 @@ declare namespace PiPWindow { * @returns { boolean } true if PictureInPicture enabled, otherwise false * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function isPiPEnabled(): boolean; @@ -83,7 +90,8 @@ declare namespace PiPWindow { * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function create(config: PiPConfiguration): Promise<PiPController>; @@ -93,7 +101,7 @@ declare namespace PiPWindow { * @param { PiPConfiguration } config - Params for picture-in-picture controller creation. The config must be valid, * the context and componentController in config should not be null. If templateType is specified, make sure * it's type of PiPTemplateType. If controlGroups is specified, make sure it correspond to the templateType. - * @param { typeNode.XComponent } contentNode - Params for picture-in-picture controller creation. + * @param { typeNode.XComponent } contentNode - Params for picture-in-picture controller creation. * Indicates the node which display the content of pip window. * @returns { Promise<PiPController> } - The promise returned by the function * @throws { BusinessError } 401 - Params error. Possible causes: 1. Mandatory parameters are left unspecified. @@ -103,6 +111,7 @@ declare namespace PiPWindow { * @syscap SystemCapability.Window.SessionManager * @atomicservice * @since 12 + * @arkts 1.1 */ function create(config: PiPConfiguration, contentNode: typeNode.XComponent): Promise<PiPController>; @@ -119,7 +128,8 @@ declare namespace PiPWindow { * @interface PiPConfiguration * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface PiPConfiguration { /** @@ -135,7 +145,8 @@ declare namespace PiPWindow { * @type { BaseContext } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ context: BaseContext; @@ -152,7 +163,8 @@ declare namespace PiPWindow { * @type { XComponentController } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ componentController: XComponentController; @@ -169,7 +181,8 @@ declare namespace PiPWindow { * @type { ?string } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ navigationId?: string; @@ -186,7 +199,8 @@ declare namespace PiPWindow { * @type { ?PiPTemplateType } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ templateType?: PiPTemplateType; @@ -203,7 +217,8 @@ declare namespace PiPWindow { * @type { ?number } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ contentWidth?: number; @@ -220,7 +235,8 @@ declare namespace PiPWindow { * @type { ?number } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ contentHeight?: number; @@ -230,7 +246,8 @@ declare namespace PiPWindow { * @type { ?Array<PiPControlGroup> } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ controlGroups?: Array<PiPControlGroup>; @@ -240,7 +257,8 @@ declare namespace PiPWindow { * @type { ?NodeController } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ customUIController?: NodeController; @@ -272,16 +290,18 @@ declare namespace PiPWindow { * @interface PiPWindowSize * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ - interface PiPWindowSize { + interface PiPWindowSize { /** * The width of the picture-in-picture window. * * @type { number } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ width: number; @@ -291,7 +311,8 @@ declare namespace PiPWindow { * @type { number } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ height: number; @@ -301,7 +322,8 @@ declare namespace PiPWindow { * @type { number } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ scale: number; } @@ -312,7 +334,8 @@ declare namespace PiPWindow { * @interface PiPWindowInfo * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ interface PiPWindowInfo { /** @@ -321,7 +344,8 @@ declare namespace PiPWindow { * @type { number } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ windowId: number; @@ -331,7 +355,8 @@ declare namespace PiPWindow { * @type { PiPWindowSize } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ size: PiPWindowSize; } @@ -349,7 +374,8 @@ declare namespace PiPWindow { * @enum { number }. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enum PiPTemplateType { /** @@ -361,7 +387,8 @@ declare namespace PiPWindow { * Indicates the content to show in picture-in-picture window is video play * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO_PLAY, @@ -374,7 +401,8 @@ declare namespace PiPWindow { * Indicates the content to show in picture-in-picture window is video call * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO_CALL, @@ -387,7 +415,8 @@ declare namespace PiPWindow { * Indicates the content to show in picture-in-picture window is video meeting * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO_MEETING, @@ -400,7 +429,8 @@ declare namespace PiPWindow { * Indicates the content to show in picture-in-picture window is video live * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO_LIVE, } @@ -418,7 +448,8 @@ declare namespace PiPWindow { * @enum { number }. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enum PiPState { /** @@ -432,7 +463,8 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ ABOUT_TO_START = 1, @@ -447,7 +479,8 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ STARTED = 2, @@ -462,7 +495,8 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ ABOUT_TO_STOP = 3, @@ -477,7 +511,8 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ STOPPED = 4, @@ -492,43 +527,47 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ ABOUT_TO_RESTORE = 5, /** - * Error occurs during the lifecycle of PiP window. + * Error message during start/stop. * * @syscap SystemCapability.Window.SessionManager * @since 11 */ /** - * Error occurs during the lifecycle of PiP window. + * Error message during start/stop. * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ ERROR = 6, } /** - * Describe optional component groups of PiP window. + * Describe PiP window custom controls. * * @typedef { VideoPlayControlGroup | VideoCallControlGroup | VideoMeetingControlGroup | VideoLiveControlGroup } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type PiPControlGroup = VideoPlayControlGroup | VideoCallControlGroup | VideoMeetingControlGroup | VideoLiveControlGroup; /** - * Enum for video play component groups of PiP window. + * Enum for video play PiP window custom controls. * * @enum { number }. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enum VideoPlayControlGroup { /** @@ -536,7 +575,8 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO_PREVIOUS_NEXT = 101, @@ -545,18 +585,20 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ FAST_FORWARD_BACKWARD = 102, } /** - * Enum for video call component groups of PiP window. + * Enum for video call PiP window custom controls. * * @enum { number }. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enum VideoCallControlGroup { /** @@ -564,7 +606,8 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ MICROPHONE_SWITCH = 201, @@ -573,7 +616,8 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ HANG_UP_BUTTON = 202, @@ -582,7 +626,8 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_SWITCH = 203, @@ -591,18 +636,20 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ MUTE_SWITCH = 204, } /** - * Enum for video meeting component groups of PiP window. + * Enum for video meeting PiP window custom controls. * * @enum { number }. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enum VideoMeetingControlGroup { /** @@ -610,7 +657,8 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ HANG_UP_BUTTON = 301, @@ -619,7 +667,8 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_SWITCH = 302, @@ -628,7 +677,8 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ MUTE_SWITCH = 303, @@ -637,18 +687,20 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ MICROPHONE_SWITCH = 304, } /** - * Enum for video Live component groups of PiP window. + * Enum for video Live PiP window custom controls. * * @enum { number }. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enum VideoLiveControlGroup { /** @@ -656,7 +708,8 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO_PLAY_PAUSE = 401, @@ -665,7 +718,8 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ MUTE_SWITCH = 402, } @@ -676,7 +730,8 @@ declare namespace PiPWindow { * @enum { number }. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enum PiPControlStatus { /** @@ -684,7 +739,8 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ PLAY = 1, @@ -693,7 +749,8 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ PAUSE = 0, @@ -702,7 +759,8 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ OPEN = 1, @@ -711,7 +769,8 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ CLOSE = 0, } @@ -722,7 +781,8 @@ declare namespace PiPWindow { * @enum { number }. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enum PiPControlType { /** @@ -730,7 +790,8 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO_PLAY_PAUSE = 0, @@ -739,7 +800,8 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO_PREVIOUS = 1, @@ -748,7 +810,8 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO_NEXT = 2, @@ -757,7 +820,8 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ FAST_FORWARD = 3, @@ -766,7 +830,8 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ FAST_BACKWARD = 4, @@ -775,7 +840,8 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ HANG_UP_BUTTON = 5, @@ -784,7 +850,8 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ MICROPHONE_SWITCH = 6, @@ -793,7 +860,8 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_SWITCH = 7, @@ -802,7 +870,8 @@ declare namespace PiPWindow { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ MUTE_SWITCH = 8, } @@ -821,7 +890,8 @@ declare namespace PiPWindow { * @typedef { PiPVideoActionEvent | PiPCallActionEvent | PiPMeetingActionEvent | PiPLiveActionEvent } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type PiPActionEventType = PiPVideoActionEvent | PiPCallActionEvent | PiPMeetingActionEvent | PiPLiveActionEvent; @@ -838,7 +908,8 @@ declare namespace PiPWindow { * @typedef { 'playbackStateChanged' | 'nextVideo' | 'previousVideo' | 'fastForward' | 'fastBackward' } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type PiPVideoActionEvent = 'playbackStateChanged' | 'nextVideo' | 'previousVideo' | 'fastForward' | 'fastBackward'; @@ -855,7 +926,8 @@ declare namespace PiPWindow { * @typedef { 'hangUp' | 'micStateChanged' | 'videoStateChanged' | 'voiceStateChanged' } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type PiPCallActionEvent = 'hangUp' | 'micStateChanged' | 'videoStateChanged' | 'voiceStateChanged'; @@ -872,7 +944,8 @@ declare namespace PiPWindow { * @typedef { 'hangUp' | 'voiceStateChanged' | 'videoStateChanged' | 'micStateChanged' } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type PiPMeetingActionEvent = 'hangUp' | 'voiceStateChanged' | 'videoStateChanged' | 'micStateChanged'; @@ -889,7 +962,8 @@ declare namespace PiPWindow { * @typedef { 'playbackStateChanged' | 'voiceStateChanged' } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type PiPLiveActionEvent = 'playbackStateChanged' | 'voiceStateChanged'; @@ -901,7 +975,8 @@ declare namespace PiPWindow { * @param { number } [status] - the status of control button * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type ControlPanelActionEventCallback = (event: PiPActionEventType, status?: number) => void; @@ -911,7 +986,8 @@ declare namespace PiPWindow { * @interface ControlEventParam * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface ControlEventParam { /** @@ -920,7 +996,8 @@ declare namespace PiPWindow { * @type { PiPControlType } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ controlType: PiPControlType; @@ -930,7 +1007,8 @@ declare namespace PiPWindow { * @type { ?PiPControlStatus } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ status?: PiPControlStatus; } @@ -948,7 +1026,8 @@ declare namespace PiPWindow { * @interface PiPController * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface PiPController { @@ -971,7 +1050,8 @@ declare namespace PiPWindow { * @throws { BusinessError } 1300015 - Repeated PiP operation. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ startPiP(): Promise<void>; @@ -992,7 +1072,8 @@ declare namespace PiPWindow { * @throws { BusinessError } 1300015 - Repeated PiP operation. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ stopPiP(): Promise<void>; @@ -1007,7 +1088,8 @@ declare namespace PiPWindow { * @param { boolean } enable - Enable auto start picture-in-picture when back home * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ setAutoStartEnabled(enable: boolean): void; @@ -1028,7 +1110,8 @@ declare namespace PiPWindow { * 2. Incorrect parameter types. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ updateContentSize(width: number, height: number): void; @@ -1041,7 +1124,8 @@ declare namespace PiPWindow { * 3. Parameter verification failed * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ updatePiPControlStatus(controlType: PiPControlType, status: PiPControlStatus): void; @@ -1057,6 +1141,7 @@ declare namespace PiPWindow { * @syscap SystemCapability.Window.SessionManager * @atomicservice * @since 18 + * @arkts 1.1 */ updateContentNode(contentNode: typeNode.XComponent): Promise<void>; @@ -1069,7 +1154,8 @@ declare namespace PiPWindow { * 3. Parameter verification failed * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ setPiPControlEnabled(controlType: PiPControlType, enabled: boolean): void; @@ -1080,7 +1166,8 @@ declare namespace PiPWindow { * @throws { BusinessError } 1300014 - PiP internal error. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ getPiPWindowInfo(): Promise<PiPWindowInfo>; @@ -1108,7 +1195,8 @@ declare namespace PiPWindow { * @param { function } callback - Used to handle {'stateChange'} command * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'stateChange', callback: (state: PiPState, reason: string) => void): void; @@ -1123,7 +1211,8 @@ declare namespace PiPWindow { * @param { 'stateChange' } type - Used to unregister listener for {'stateChange'} command * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'stateChange'): void; @@ -1141,7 +1230,8 @@ declare namespace PiPWindow { * @param { ControlPanelActionEventCallback } callback - Used to handle {'controlPanelActionEvent'} command. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'controlPanelActionEvent', callback: ControlPanelActionEventCallback): void; @@ -1156,7 +1246,8 @@ declare namespace PiPWindow { * @param { 'controlPanelActionEvent' } type - Used to unregister listener for {'controlPanelActionEvent'} command * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'controlPanelActionEvent'): void; @@ -1167,7 +1258,8 @@ declare namespace PiPWindow { * @param { Callback<ControlEventParam> } callback - Used to handle {'controlEvent'} command. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'controlEvent', callback: Callback<ControlEventParam>): void; @@ -1177,7 +1269,8 @@ declare namespace PiPWindow { * @param { Callback<ControlEventParam> } callback - Used to handle {'controlEvent'} command. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'controlEvent', callback?: Callback<ControlEventParam>): void; @@ -1194,7 +1287,8 @@ declare namespace PiPWindow { * @throws { BusinessError } 1300014 - PiP internal error. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'pipWindowSizeChange', callback: Callback<PiPWindowSize>): void; @@ -1208,9 +1302,11 @@ declare namespace PiPWindow { * 2. Incorrect parameter types. * 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. + * @throws { BusinessError } 1300014 - PiP internal error. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'pipWindowSizeChange', callback?: Callback<PiPWindowSize>): void; @@ -1222,7 +1318,8 @@ declare namespace PiPWindow { * @throws { BusinessError } 1300014 - PiP internal error. * @syscap SystemCapability.Window.SessionManager * @systemapi Hide this for inner system use - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 * @test */ isPiPSupported(): boolean; diff --git a/api/@ohos.ability.ability.d.ts b/api/@ohos.ability.ability.d.ts index f09a89c82806750927739c6e190b8dd64f31f89f..f3493daf919a87c824cf16ddbbc7227e99866fa0 100644 --- a/api/@ohos.ability.ability.d.ts +++ b/api/@ohos.ability.ability.d.ts @@ -19,12 +19,12 @@ */ import { DataAbilityHelper as _DataAbilityHelper } from './ability/dataAbilityHelper'; -import { PacMap as _PacMap } from './ability/dataAbilityHelper'; import { DataAbilityOperation as _DataAbilityOperation } from './ability/dataAbilityOperation'; import { DataAbilityResult as _DataAbilityResult } from './ability/dataAbilityResult'; import { AbilityResult as _AbilityResult } from './ability/abilityResult'; import { ConnectOptions as _ConnectOptions } from './ability/connectOptions'; import { StartAbilityParameter as _StartAbilityParameter } from './ability/startAbilityParameter'; +import { PacMap as _PacMap } from './ability/dataAbilityHelper'; /** * The class of an ability. diff --git a/api/@ohos.abilityAccessCtrl.d.ts b/api/@ohos.abilityAccessCtrl.d.ts index 120ed8b2b59e6beeaa9bda60f4eecb4e3918c50f..29194eaa475fd876b78258ca0b0beb27ce56f8f6 100644 --- a/api/@ohos.abilityAccessCtrl.d.ts +++ b/api/@ohos.abilityAccessCtrl.d.ts @@ -22,6 +22,9 @@ import { AsyncCallback, Callback } from './@ohos.base'; import { Permissions } from './permissions'; import type _Context from './application/Context'; import type _PermissionRequestResult from './security/PermissionRequestResult'; +/*** if arkts 1.1 */ +import { int } from '@ohos.base'; +/*** endif */ /** * @namespace abilityAccessCtrl @@ -39,7 +42,8 @@ import type _PermissionRequestResult from './security/PermissionRequestResult'; * @syscap SystemCapability.Security.AccessToken * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace abilityAccessCtrl { /** @@ -64,7 +68,8 @@ declare namespace abilityAccessCtrl { * @syscap SystemCapability.Security.AccessToken * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function createAtManager(): AtManager; @@ -81,7 +86,8 @@ declare namespace abilityAccessCtrl { * @interface AtManager * @syscap SystemCapability.Security.AccessToken * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface AtManager { /** @@ -111,20 +117,21 @@ declare namespace abilityAccessCtrl { /** * Checks whether a specified application has been granted the given permission synchronously. * - * @param { number } tokenID - Token ID of the application. + * @param { int } tokenID - Token ID of the application. * @param { Permissions } permissionName - Name of the permission to be verified. * @returns { GrantStatus } Returns permission verify result. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. * @throws { BusinessError } 12100001 - Invalid parameter. The tokenID is 0, or the permissionName exceeds 256 characters. * @syscap SystemCapability.Security.AccessToken - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - verifyAccessTokenSync(tokenID: number, permissionName: Permissions): GrantStatus; + verifyAccessTokenSync(tokenID: int, permissionName: Permissions): GrantStatus; /** * Checks whether a specified application has been granted the given permission. * - * @param { number } tokenID - Token ID of the application. + * @param { int } tokenID - Token ID of the application. * @param { Permissions } permissionName - Name of the permission to be verified. * @returns { Promise<GrantStatus> } Returns permission verify result. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. @@ -136,7 +143,7 @@ declare namespace abilityAccessCtrl { * Checks whether a specified application has been granted the given permission. * On the cross-platform, this function can be used to check the permission grant status for the current application only. * - * @param { number } tokenID - Token ID of the application. + * @param { int } tokenID - Token ID of the application. * @param { Permissions } permissionName - Name of the permission to be verified. * @returns { Promise<GrantStatus> } Returns permission verify result. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. @@ -149,7 +156,7 @@ declare namespace abilityAccessCtrl { * Checks whether a specified application has been granted the given permission. * On the cross-platform, this function can be used to check the permission grant status for the current application only. * - * @param { number } tokenID - Token ID of the application. + * @param { int } tokenID - Token ID of the application. * @param { Permissions } permissionName - Name of the permission to be verified. * @returns { Promise<GrantStatus> } Returns permission verify result. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. @@ -157,15 +164,16 @@ declare namespace abilityAccessCtrl { * @syscap SystemCapability.Security.AccessToken * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - checkAccessToken(tokenID: number, permissionName: Permissions): Promise<GrantStatus>; + checkAccessToken(tokenID: int, permissionName: Permissions): Promise<GrantStatus>; /** * Checks whether a specified application has been granted the given permission. * On the cross-platform, this function can be used to check the permission grant status for the current application only. * - * @param { number } tokenID - Token ID of the application. + * @param { int } tokenID - Token ID of the application. * @param { Permissions } permissionName - Name of the permission to be verified. * @returns { GrantStatus } Returns permission verify result. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. @@ -178,7 +186,7 @@ declare namespace abilityAccessCtrl { * Checks whether a specified application has been granted the given permission. * On the cross-platform, this function can be used to check the permission grant status for the current application only. * - * @param { number } tokenID - Token ID of the application. + * @param { int } tokenID - Token ID of the application. * @param { Permissions } permissionName - Name of the permission to be verified. * @returns { GrantStatus } Returns permission verify result. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. @@ -186,9 +194,10 @@ declare namespace abilityAccessCtrl { * @syscap SystemCapability.Security.AccessToken * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - checkAccessTokenSync(tokenID: number, permissionName: Permissions): GrantStatus; + checkAccessTokenSync(tokenID: int, permissionName: Permissions): GrantStatus; /** * Requests certain permissions from the user. @@ -230,7 +239,8 @@ declare namespace abilityAccessCtrl { * @stagemodelonly * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ requestPermissionsFromUser( context: Context, @@ -278,7 +288,8 @@ declare namespace abilityAccessCtrl { * @stagemodelonly * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ requestPermissionsFromUser(context: Context, permissionList: Array<Permissions>): Promise<PermissionRequestResult>; @@ -602,7 +613,8 @@ declare namespace abilityAccessCtrl { * @syscap SystemCapability.Security.AccessToken * @stagemodelonly * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ requestPermissionOnSetting(context: Context, permissionList: Array<Permissions>): Promise<Array<GrantStatus>>; @@ -656,14 +668,14 @@ declare namespace abilityAccessCtrl { /** * GrantStatus. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Security.AccessToken * @since 8 */ /** * GrantStatus. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Security.AccessToken * @crossplatform * @since 10 @@ -671,11 +683,12 @@ declare namespace abilityAccessCtrl { /** * GrantStatus. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Security.AccessToken * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum GrantStatus { /** @@ -697,7 +710,8 @@ declare namespace abilityAccessCtrl { * @syscap SystemCapability.Security.AccessToken * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ PERMISSION_DENIED = -1, /** @@ -719,7 +733,8 @@ declare namespace abilityAccessCtrl { * @syscap SystemCapability.Security.AccessToken * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ PERMISSION_GRANTED = 0 } @@ -925,7 +940,8 @@ export { Permissions }; * @stagemodelonly * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export type PermissionRequestResult = _PermissionRequestResult; /** @@ -945,6 +961,7 @@ export type PermissionRequestResult = _PermissionRequestResult; * @stagemodelonly * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export type Context = _Context; diff --git a/api/@ohos.accessibility.GesturePoint.d.ts b/api/@ohos.accessibility.GesturePoint.d.ts index c6d9afb51dcf7c3b45516a428989955991f59e53..500b61d3638b2d0e12ef6c1f2d1386b258a23632 100644 --- a/api/@ohos.accessibility.GesturePoint.d.ts +++ b/api/@ohos.accessibility.GesturePoint.d.ts @@ -25,6 +25,7 @@ * @since 9 */ export declare class GesturePoint { + /*** if arkts 1.1 */ /** * A constructor used to create a GesturePoint object. * @@ -35,6 +36,7 @@ export declare class GesturePoint { * @deprecated since 12 */ constructor(positionX: number, positionY: number); + /*** endif */ /** * Indicates the X coordinate of point. * diff --git a/api/@ohos.accessibility.config.d.ts b/api/@ohos.accessibility.config.d.ts index 1bd8be5a5ddd0f7764c2c77cc7347f29b34a1435..45a5ff46c8b557a681328a61e60985ee8ad9ee31 100644 --- a/api/@ohos.accessibility.config.d.ts +++ b/api/@ohos.accessibility.config.d.ts @@ -27,7 +27,8 @@ import type { AsyncCallback, Callback } from './@ohos.base'; * @namespace config * @syscap SystemCapability.BarrierFree.Accessibility.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace config { /** @@ -57,11 +58,13 @@ declare namespace config { /** * Indicates the configuration of high-contrast text. * + * @type { Config<boolean> } * @syscap SystemCapability.BarrierFree.Accessibility.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - var highContrastText: Config<boolean>; + let highContrastText: Config<boolean>; /** * Indicates the configuration of invert color. * @@ -375,7 +378,8 @@ declare namespace config { * @typedef Config<T> * @syscap SystemCapability.BarrierFree.Accessibility.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ interface Config<T> { /** @@ -393,7 +397,8 @@ declare namespace config { * 3. Parameter verification failed. * @syscap SystemCapability.BarrierFree.Accessibility.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ set(value: T): Promise<void>; @@ -412,7 +417,8 @@ declare namespace config { * 3. Parameter verification failed. * @syscap SystemCapability.BarrierFree.Accessibility.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ set(value: T, callback: AsyncCallback<void>): void; @@ -425,7 +431,8 @@ declare namespace config { * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @syscap SystemCapability.BarrierFree.Accessibility.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ get(): Promise<T>; @@ -436,7 +443,8 @@ declare namespace config { * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @syscap SystemCapability.BarrierFree.Accessibility.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ get(callback: AsyncCallback<T>): void; diff --git a/api/@ohos.accessibility.d.ts b/api/@ohos.accessibility.d.ts index e818965817b56fe0eead3133806d1e780340c262..f0b97f0402496e5a3d9fe5d62c3305256fa6c192 100644 --- a/api/@ohos.accessibility.d.ts +++ b/api/@ohos.accessibility.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2025 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 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 @@ -22,851 +22,6 @@ import type { AsyncCallback } from './@ohos.base'; import type { Callback } from './@ohos.base'; import { Resource } from './global/resource'; -/** - * Accessibility action that the ability can execute. - * - * @enum { number } - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ -export enum AccessibilityAction { - /** - * AccessibilityFocus - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - ACCESSIBILITY_FOCUS = 0, - - /** - * ClearAccessibilityFocus - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - CLEAR_ACCESSIBILITY_FOCUS = 1, - - /** - * Focus - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - FOCUS = 2, - - /** - * ClearFocus - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - CLEAR_FOCUS = 3, - - /** - * Click - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - CLICK = 4, - - /** - * LongClick - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - LONG_CLICK = 5, - - /** - * Cut - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - CUT = 6, - - /** - * Copy - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - COPY = 7, - - /** - * Paste - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - PASTE = 8, - - /** - * Select - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - SELECT = 9, - - /** - * SetText - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - SET_TEXT = 10, - - /** - * ScrollForward - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - SCROLL_FORWARD = 11, - - /** - * ScrollBackward - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - SCROLL_BACKWARD = 12, - - /** - * SetSelection - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - SET_SELECTION = 13, - - /** - * SetCursorPosition - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - SET_CURSOR_POSITION = 14, - - /** - * Home - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - HOME = 15, - - /** - * Back - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - BACK = 16, - - /** - * RecentTask - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - RECENT_TASK = 17, - - /** - * NotificationCenter - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - NOTIFICATION_CENTER = 18, - - /** - * ControlCenter - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - CONTROL_CENTER = 19, - - /** - * Common - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - COMMON = 20, - - /** - * SpanClick - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - SPAN_CLICK = 21 -} - - -/** - * AccessibilityEvent type - * - * @enum { number } - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ -export enum AccessibilityEventType { - //EventType - /** - * AccessibilityFocus type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_ACCESSIBILITY_FOCUS = 0, - - /** - * AccessibilityFocusClear type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_ACCESSIBILITY_FOCUS_CLEAR = 1, - - /** - * Click type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_CLICK = 2, - - /** - * LongClick type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_LONG_CLICK = 3, - - /** - * Select type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_SELECT = 4, - - /** - * HoverEnter type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_HOVER_ENTER = 5, - - /** - * HoverExit type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_HOVER_EXIT = 6, - - /** - * Focus type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_FOCUS = 7, - - /** - * TextUpdate type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_TEXT_UPDATE = 8, - - /** - * TextSelectionUpdate type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_TEXT_SELECTION_UPDATE = 9, - - /** - * Scroll type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_SCROLL = 10, - - /** - * RequestFocusForAccessibility type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_REQUEST_FOCUS_FOR_ACCESSIBILITY = 11, - - /** - * AnnounceForAccessibility type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_ANNOUNCE_FOR_ACCESSIBILITY = 12, - - /** - * RequestFocusForAccessibilityNotInterrupt type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_REQUEST_FOCUS_FOR_ACCESSIBILITY_NOT_INTERRUPT = 13, - - /** - * AnnounceForAccessibilityNotInterrupt type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_ANNOUNCE_FOR_ACCESSIBILITY_NOT_INTERRUPT = 14, - - /** - * ElementInfoChange type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_ELEMENT_INFO_CHANGE = 15, - - /** - * Scrolling type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_SCROLLING = 16, - - // WindowUpdateType - /** - * Window add type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_WINDOW_ADD = 17, - - /** - * Window remove type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_WINDOW_REMOVE = 18, - - /** - * Window bounds type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_WINDOW_BOUNDS = 19, - - /** - * Window active type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_WINDOW_ACTIVE = 20, - - /** - * Window focus type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_WINDOW_FOCUS = 21, - - /** - * Window property type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_WINDOW_PROPERTY = 22, - - /** - * Window layer type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_WINDOW_LAYER = 23, - - //TouchGuideType - /** - * TouchBegin type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_TOUCH_BEGIN = 24, - - /** - * TouchEnd type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_TOUCH_END = 25, - - //PageUpdateType - /** - * PageContentUpdate type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_PAGE_CONTENT_UPDATE = 26, - - /** - * PageStateUpdate type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_PAGE_STATE_UPDATE = 27, - - /** - * PageOpen type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_PAGE_OPEN = 28, - - /** - * PageClose type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_PAGE_CLOSE = 29, - - //GestureType - /** - * left type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_SWIPE_LEFT = 30, - - /** - * leftThenRight type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_SWIPE_LEFT_THEN_RIGHT = 31, - - /** - * leftThenUp type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_SWIPE_LEFT_THEN_UP = 32, - - /** - * leftThenDown type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_SWIPE_LEFT_THEN_DOWN = 33, - - /** - * right type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_SWIPE_RIGHT = 34, - - /** - * rightThenLeft type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_SWIPE_RIGHT_THEN_LEFT = 35, - - /** - * rightThenUp type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_SWIPE_RIGHT_THEN_UP = 36, - - /** - * rightThenDown type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_SWIPE_RIGHT_THEN_DOWN = 37, - - /** - * up type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_SWIPE_UP = 38, - - /** - * upThenLeft type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_SWIPE_UP_THEN_LEFT = 39, - - /** - * upThenRight type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_SWIPE_UP_THEN_RIGHT = 40, - - /** - * upThenDown type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_SWIPE_UP_THEN_DOWN = 41, - - /** - * down type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_SWIPE_DOWN = 42, - - /** - * downThenLeft type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_SWIPE_DOWN_THEN_LEFT = 43, - - /** - * downThenRight type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_SWIPE_DOWN_THEN_RIGHT = 44, - - /** - * downThenUp type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_SWIPE_DOWN_THEN_UP = 45, - - /** - * twoFingerSingleTap type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_TWO_FINGER_SINGLE_TAP = 46, - - /** - * twoFingerDoubleTap type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_TWO_FINGER_DOUBLE_TAP = 47, - - /** - * twoFingerDoubleTapAndHold type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_TWO_FINGER_DOUBLE_TAP_AND_HOLD = 48, - - /** - * twoFingerTripleTap type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_TWO_FINGER_TRIPLE_TAP = 49, - - /** - * twoFingerTripleTapAndHold type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_TWO_FINGER_TRIPLE_TAP_AND_HOLD = 50, - - /** - * threeFingerSingleTap type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_THREE_FINGER_SINGLE_TAP = 51, - - /** - * threeFingerDoubleTap type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_THREE_FINGER_DOUBLE_TAP = 52, - - /** - * threeFingerDoubleTapAndHold type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_THREE_FINGER_DOUBLE_TAP_AND_HOLD = 53, - - /** - * threeFingerTripleTap type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_THREE_FINGER_TRIPLE_TAP = 54, - - /** - * threeFingerTripleTapAndHold type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_THREE_FINGER_TRIPLE_TAP_AND_HOLD = 55, - - /** - * fourFingerSingleTap type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_FOUR_FINGER_SINGLE_TAP = 56, - - /** - * fourFingerDoubleTap type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_FOUR_FINGER_DOUBLE_TAP = 57, - - /** - * fourFingerDoubleTapAndHold type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_FOUR_FINGER_DOUBLE_TAP_AND_HOLD = 58, - - /** - * fourFingerTripleTap type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_FOUR_FINGER_TRIPLE_TAP = 59, - - /** - * fourFingerTripleTapAndHold type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_FOUR_FINGER_TRIPLE_TAP_AND_HOLD = 60, - - /** - * threeFingerSwipeUp type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_THREE_FINGER_SWIPE_UP = 61, - - /** - * threeFingerSwipeDown type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_THREE_FINGER_SWIPE_DOWN = 62, - - /** - * threeFingerSwipeLeft type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_THREE_FINGER_SWIPE_LEFT = 63, - - /** - * threeFingerSwipeRight type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_THREE_FINGER_SWIPE_RIGHT = 64, - - /** - * fourFingerSwipeUp type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_FOUR_FINGER_SWIPE_UP = 65, - - /** - * fourFingerSwipeDown type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_FOUR_FINGER_SWIPE_DOWN = 66, - - /** - * fourFingerSwipeLeft type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_FOUR_FINGER_SWIPE_LEFT = 67, - - /** - * fourFingerSwipeRight type - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - TYPE_FOUR_FINGER_SWIPE_RIGHT = 68 -} - /** * Accessibility * @@ -880,16 +35,7 @@ export enum AccessibilityEventType { * @namespace accessibility * @syscap SystemCapability.BarrierFree.Accessibility.Core * @atomicservice - * @since 11 - */ -/** - * Accessibility - * - * @namespace accessibility - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @crossplatform - * @atomicservice - * @since 20 + * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ declare namespace accessibility { @@ -1058,16 +204,7 @@ declare namespace accessibility { * @returns { boolean } Returns true if the accessibility is enabled; returns false otherwise. * @syscap SystemCapability.BarrierFree.Accessibility.Core * @atomicservice - * @since 11 - */ - /** - * Checks whether accessibility ability is enabled. - * - * @returns { boolean } Returns true if the accessibility is enabled; returns false otherwise. - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @crossplatform - * @atomicservice - * @since 20 + * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ function isOpenAccessibilitySync(): boolean; @@ -1116,7 +253,6 @@ declare namespace accessibility { * Checks screen reader ability (which is used by talkback) is enabled. * @returns { boolean } Returns true if the screen reader is enabled; return false otherwise. * @syscap SystemCapability.BarrierFree.Accessibility.Vision - * @atomicservice * @since 18 */ function isScreenReaderOpenSync(): boolean; @@ -1316,7 +452,8 @@ declare namespace accessibility { * 2. Incorrect parameter types; * 3. Parameter verification failed. * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'screenReaderStateChange', callback: Callback<boolean>): void; @@ -1385,7 +522,8 @@ declare namespace accessibility { * 2. Incorrect parameter types; * 3. Parameter verification failed. * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'screenReaderStateChange', callback?: Callback<boolean>): void; @@ -1733,8 +871,7 @@ declare namespace accessibility { * The page id of the event source. * @type { ?number } * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @since arkts {'1.1':'7', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 7 */ pageId?: number; @@ -1787,8 +924,7 @@ declare namespace accessibility { * The start index of listed items on the screen. * @type { ?number } * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @since arkts {'1.1':'7', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 7 */ beginIndex?: number; @@ -1796,8 +932,7 @@ declare namespace accessibility { * The index of the current item on the screen. * @type { ?number } * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @since arkts {'1.1':'7', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 7 */ currentIndex?: number; @@ -1805,8 +940,7 @@ declare namespace accessibility { * The end index of listed items on the screen. * @type { ?number } * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @since arkts {'1.1':'7', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 7 */ endIndex?: number; @@ -1814,8 +948,7 @@ declare namespace accessibility { * The total of the items, talkback used it when scroll. * @type { ?number } * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @since arkts {'1.1':'7', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 7 */ itemCount?: number; @@ -1823,8 +956,7 @@ declare namespace accessibility { * The id of element. * @type { ?number } * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ elementId?: number; diff --git a/api/@ohos.account.appAccount.d.ts b/api/@ohos.account.appAccount.d.ts index d814c3546f1dac2d7251f74f572a4eebfa5d610f..95092b2b9f1e6426bc6e6c7f756fbcfd64e5354c 100644 --- a/api/@ohos.account.appAccount.d.ts +++ b/api/@ohos.account.appAccount.d.ts @@ -21,13 +21,18 @@ import type { AsyncCallback, Callback } from './@ohos.base'; import type Want from './@ohos.app.ability.Want'; import type rpc from './@ohos.rpc'; +/*** if arkts 1.1 */ +import { int } from './@ohos.base'; +/*** endif */ + /** * This module provides the capability to manage application accounts. * * @namespace appAccount * @syscap SystemCapability.Account.AppAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace appAccount { /** @@ -35,7 +40,8 @@ declare namespace appAccount { * * @returns { AppAccountManager } Returns the instance of the AppAccountManager. * @syscap SystemCapability.Account.AppAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ function createAppAccountManager(): AppAccountManager; @@ -44,7 +50,8 @@ declare namespace appAccount { * * @interface AppAccountManager * @syscap SystemCapability.Account.AppAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ interface AppAccountManager { /** @@ -107,7 +114,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300004 - Account already exists. * @throws { BusinessError } 12300007 - The number of accounts reaches the upper limit. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ createAccount(name: string, callback: AsyncCallback<void>): void; @@ -127,7 +135,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300004 - Account already exists. * @throws { BusinessError } 12300007 - The number of accounts reaches the upper limit. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ createAccount(name: string, options: CreateAccountOptions, callback: AsyncCallback<void>): void; @@ -147,7 +156,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300004 - Account already exists. * @throws { BusinessError } 12300007 - The number of accounts reaches the upper limit. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ createAccount(name: string, options?: CreateAccountOptions): Promise<void>; @@ -184,7 +194,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300113 - Authenticator service not found. * @throws { BusinessError } 12300114 - Authenticator service exception. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ createAccountImplicitly(owner: string, callback: AuthCallback): void; @@ -203,7 +214,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300113 - Authenticator service not found. * @throws { BusinessError } 12300114 - Authenticator service exception. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ createAccountImplicitly(owner: string, options: CreateAccountImplicitlyOptions, callback: AuthCallback): void; @@ -248,7 +260,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300002 - Invalid name. * @throws { BusinessError } 12300003 - Account not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ removeAccount(name: string, callback: AsyncCallback<void>): void; @@ -265,7 +278,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300002 - Invalid name. * @throws { BusinessError } 12300003 - Account not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ removeAccount(name: string): Promise<void>; @@ -342,7 +356,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300003 - Account not found. * @throws { BusinessError } 12400001 - Application not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ /** * Sets a third-party application with the specified bundle name to access the given application @@ -359,7 +374,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300003 - Account not found. * @throws { BusinessError } 12400005 - The size of authorization list reaches the upper limit. * @syscap SystemCapability.Account.AppAccount - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ setAppAccess(name: string, bundleName: string, isAccessible: boolean, callback: AsyncCallback<void>): void; @@ -378,7 +394,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300003 - Account not found. * @throws { BusinessError } 12400001 - Application not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ /** * Sets a third-party application with the specified bundle name to access the given application @@ -395,7 +412,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300003 - Account not found. * @throws { BusinessError } 12400005 - The size of authorization list reaches the upper limit. * @syscap SystemCapability.Account.AppAccount - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ setAppAccess(name: string, bundleName: string, isAccessible: boolean): Promise<void>; @@ -412,7 +430,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300002 - Invalid name or bundleName. * @throws { BusinessError } 12300003 - Account not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ checkAppAccess(name: string, bundleName: string, callback: AsyncCallback<boolean>): void; @@ -429,7 +448,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300002 - Invalid name or bundleName. * @throws { BusinessError } 12300003 - Account not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ checkAppAccess(name: string, bundleName: string): Promise<boolean>; @@ -487,7 +507,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300002 - Invalid name. * @throws { BusinessError } 12300003 - Account not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ checkDataSyncEnabled(name: string, callback: AsyncCallback<boolean>): void; @@ -509,7 +530,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300002 - Invalid name. * @throws { BusinessError } 12300003 - Account not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ checkDataSyncEnabled(name: string): Promise<boolean>; @@ -554,7 +576,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300002 - Invalid name, credentialType or credential. * @throws { BusinessError } 12300003 - Account not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ setCredential(name: string, credentialType: string, credential: string, callback: AsyncCallback<void>): void; @@ -571,7 +594,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300002 - Invalid name, credentialType or credential. * @throws { BusinessError } 12300003 - Account not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ setCredential(name: string, credentialType: string, credential: string): Promise<void>; @@ -688,7 +712,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300002 - Invalid name. * @throws { BusinessError } 12300003 - Account not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ setDataSyncEnabled(name: string, isEnabled: boolean, callback: AsyncCallback<void>): void; @@ -719,7 +744,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300002 - Invalid name. * @throws { BusinessError } 12300003 - Account not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ setDataSyncEnabled(name: string, isEnabled: boolean): Promise<void>; @@ -765,7 +791,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300003 - Account not found. * @throws { BusinessError } 12400003 - The number of custom data reaches the upper limit. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ setCustomData(name: string, key: string, value: string, callback: AsyncCallback<void>): void; @@ -783,7 +810,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300003 - Account not found. * @throws { BusinessError } 12400003 - The number of custom data reaches the upper limit. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ setCustomData(name: string, key: string, value: string): Promise<void>; @@ -832,7 +860,8 @@ declare namespace appAccount { * <br> 2. Incorrect parameter types. * @throws { BusinessError } 12300001 - System service exception. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ getAllAccounts(callback: AsyncCallback<Array<AppAccountInfo>>): void; @@ -847,7 +876,8 @@ declare namespace appAccount { * @returns { Promise<Array<AppAccountInfo>> } Returns a list of application accounts. * @throws { BusinessError } 12300001 - System service exception. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ getAllAccounts(): Promise<Array<AppAccountInfo>>; @@ -901,7 +931,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300002 - Invalid owner. * @throws { BusinessError } 12400001 - Application not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ /** * Gets information about all accounts of a specified account owner. @@ -918,7 +949,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300001 - System service exception. * @throws { BusinessError } 12300002 - Invalid owner. * @syscap SystemCapability.Account.AppAccount - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ getAccountsByOwner(owner: string, callback: AsyncCallback<Array<AppAccountInfo>>): void; @@ -938,7 +970,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300002 - Invalid owner. * @throws { BusinessError } 12400001 - Application not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ /** * Gets information about all accounts of a specified account owner. @@ -955,7 +988,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300001 - System service exception. * @throws { BusinessError } 12300002 - Invalid owner. * @syscap SystemCapability.Account.AppAccount - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ getAccountsByOwner(owner: string): Promise<Array<AppAccountInfo>>; @@ -998,7 +1032,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300003 - Account not found. * @throws { BusinessError } 12300102 - Credential not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ getCredential(name: string, credentialType: string, callback: AsyncCallback<string>): void; @@ -1015,7 +1050,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300003 - Account not found. * @throws { BusinessError } 12300102 - Credential not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ getCredential(name: string, credentialType: string): Promise<string>; @@ -1085,7 +1121,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300003 - Account not found. * @throws { BusinessError } 12400002 - Custom data not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ getCustomData(name: string, key: string, callback: AsyncCallback<string>): void; @@ -1102,7 +1139,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300003 - Account not found. * @throws { BusinessError } 12400002 - Custom data not found * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ getCustomData(name: string, key: string): Promise<string>; @@ -1119,7 +1157,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300003 - Account not found. * @throws { BusinessError } 12400002 - Custom data not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ getCustomDataSync(name: string, key: string): string; @@ -1156,7 +1195,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300002 - Invalid type or owners. * @throws { BusinessError } 12400001 - Application not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ /** * Subscribes to the change events of accounts of the specified owners. @@ -1173,7 +1213,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300001 - System service exception. * @throws { BusinessError } 12300002 - Invalid type or owners. * @syscap SystemCapability.Account.AppAccount - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'accountChange', owners: Array<string>, callback: Callback<Array<AppAccountInfo>>): void; @@ -1199,7 +1240,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300001 - System service exception. * @throws { BusinessError } 12300002 - Invalid type. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'accountChange', callback?: Callback<Array<AppAccountInfo>>): void; @@ -1240,7 +1282,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300113 - Authenticator service not found. * @throws { BusinessError } 12300114 - Authenticator service exception. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ auth(name: string, owner: string, authType: string, callback: AuthCallback): void; @@ -1261,7 +1304,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300113 - Authenticator service not found. * @throws { BusinessError } 12300114 - Authenticator service exception. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ auth( name: string, @@ -1313,7 +1357,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300003 - Account not found. * @throws { BusinessError } 12300107 - AuthType not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ getAuthToken(name: string, owner: string, authType: string, callback: AsyncCallback<string>): void; @@ -1331,7 +1376,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300003 - Account not found. * @throws { BusinessError } 12300107 - AuthType not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ getAuthToken(name: string, owner: string, authType: string): Promise<string>; @@ -1383,7 +1429,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300003 - Account not found. * @throws { BusinessError } 12400004 - The number of tokens reaches the upper limit. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ setAuthToken(name: string, authType: string, token: string, callback: AsyncCallback<void>): void; @@ -1403,7 +1450,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300003 - Account not found. * @throws { BusinessError } 12400004 - The number of tokens reaches the upper limit. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ setAuthToken(name: string, authType: string, token: string): Promise<void>; @@ -1458,7 +1506,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300003 - Account not found. * @throws { BusinessError } 12300107 - AuthType not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ deleteAuthToken(name: string, owner: string, authType: string, token: string, callback: AsyncCallback<void>): void; @@ -1479,7 +1528,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300003 - Account not found. * @throws { BusinessError } 12300107 - AuthType not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ deleteAuthToken(name: string, owner: string, authType: string, token: string): Promise<void>; @@ -1542,7 +1592,8 @@ declare namespace appAccount { * @throws { BusinessError } 12400001 - Application not found. * @throws { BusinessError } 12400005 - The size of authorization list reaches the upper limit. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ /** * Sets the auth token visibility of the specified authentication type to a third-party application. @@ -1562,7 +1613,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300107 - AuthType not found. * @throws { BusinessError } 12400005 - The size of authorization list reaches the upper limit. * @syscap SystemCapability.Account.AppAccount - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ setAuthTokenVisibility( name: string, @@ -1591,7 +1643,8 @@ declare namespace appAccount { * @throws { BusinessError } 12400001 - Application not found. * @throws { BusinessError } 12400005 - The size of authorization list reaches the upper limit. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ /** * Sets the auth token visibility of the specified authentication type to a third-party application. @@ -1611,7 +1664,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300107 - AuthType not found. * @throws { BusinessError } 12400005 - The size of authorization list reaches the upper limit. * @syscap SystemCapability.Account.AppAccount - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ setAuthTokenVisibility(name: string, authType: string, bundleName: string, isVisible: boolean): Promise<void>; @@ -1668,7 +1722,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300003 - Account not found. * @throws { BusinessError } 12300107 - AuthType not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ checkAuthTokenVisibility( name: string, @@ -1693,7 +1748,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300003 - Account not found. * @throws { BusinessError } 12300107 - AuthType not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ checkAuthTokenVisibility(name: string, authType: string, bundleName: string): Promise<boolean>; @@ -1736,7 +1792,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300002 - Invalid name or owner. * @throws { BusinessError } 12300003 - Account not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ getAllAuthTokens(name: string, owner: string, callback: AsyncCallback<Array<AuthTokenInfo>>): void; @@ -1752,7 +1809,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300002 - Invalid name or owner. * @throws { BusinessError } 12300003 - Account not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ getAllAuthTokens(name: string, owner: string): Promise<Array<AuthTokenInfo>>; @@ -1803,7 +1861,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300003 - Account not found. * @throws { BusinessError } 12300107 - AuthType not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ getAuthList(name: string, authType: string, callback: AsyncCallback<Array<string>>): void; @@ -1822,7 +1881,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300003 - Account not found. * @throws { BusinessError } 12300107 - AuthType not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ getAuthList(name: string, authType: string): Promise<Array<string>>; @@ -1869,7 +1929,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300002 - Invalid sessionId. * @throws { BusinessError } 12300108 - Session not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ getAuthCallback(sessionId: string, callback: AsyncCallback<AuthCallback>): void; @@ -1886,7 +1947,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300002 - Invalid sessionId. * @throws { BusinessError } 12300108 - Session not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ getAuthCallback(sessionId: string): Promise<AuthCallback>; @@ -1927,7 +1989,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300002 - Invalid owner. * @throws { BusinessError } 12300113 - Authenticator service not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ queryAuthenticatorInfo(owner: string, callback: AsyncCallback<AuthenticatorInfo>): void; @@ -1942,7 +2005,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300002 - Invalid owner. * @throws { BusinessError } 12300113 - Authenticator service not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ queryAuthenticatorInfo(owner: string): Promise<AuthenticatorInfo>; @@ -1962,7 +2026,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300113 - Authenticator service not found. * @throws { BusinessError } 12300114 - Authenticator service exception. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ checkAccountLabels(name: string, owner: string, labels: Array<string>, callback: AsyncCallback<boolean>): void; @@ -1982,7 +2047,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300113 - Authenticator service not found. * @throws { BusinessError } 12300114 - Authenticator service exception. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ checkAccountLabels(name: string, owner: string, labels: Array<string>): Promise<boolean>; @@ -1999,7 +2065,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300003 - Account not found. * @throws { BusinessError } 12300102 - Credential not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ deleteCredential(name: string, credentialType: string, callback: AsyncCallback<void>): void; @@ -2016,7 +2083,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300003 - Account not found. * @throws { BusinessError } 12300102 - Credential not found. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ deleteCredential(name: string, credentialType: string): Promise<void>; @@ -2032,7 +2100,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300010 - Account service busy. * @throws { BusinessError } 12300114 - Authenticator service exception. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ selectAccountsByOptions(options: SelectAccountsOptions, callback: AsyncCallback<Array<AppAccountInfo>>): void; @@ -2048,7 +2117,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300010 - Account service busy. * @throws { BusinessError } 12300114 - Authenticator service exception. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ selectAccountsByOptions(options: SelectAccountsOptions): Promise<Array<AppAccountInfo>>; @@ -2067,7 +2137,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300113 - Authenticator service not found. * @throws { BusinessError } 12300114 - Authenticator service exception. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ verifyCredential(name: string, owner: string, callback: AuthCallback): void; /** @@ -2086,7 +2157,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300113 - Authenticator service not found. * @throws { BusinessError } 12300114 - Authenticator service exception. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ verifyCredential(name: string, owner: string, options: VerifyCredentialOptions, callback: AuthCallback): void; @@ -2106,7 +2178,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300113 - Authenticator service not found. * @throws { BusinessError } 12300114 - Authenticator service exception. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ setAuthenticatorProperties(owner: string, callback: AuthCallback): void; /** @@ -2126,7 +2199,8 @@ declare namespace appAccount { * @throws { BusinessError } 12300113 - Authenticator service not found. * @throws { BusinessError } 12300114 - Authenticator service exception. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ setAuthenticatorProperties(owner: string, options: SetPropertiesOptions, callback: AuthCallback): void; } @@ -2136,7 +2210,8 @@ declare namespace appAccount { * * @interface AppAccountInfo * @syscap SystemCapability.Account.AppAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ interface AppAccountInfo { /** @@ -2144,7 +2219,8 @@ declare namespace appAccount { * * @type { string } * @syscap SystemCapability.Account.AppAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ owner: string; @@ -2153,7 +2229,8 @@ declare namespace appAccount { * * @type { string } * @syscap SystemCapability.Account.AppAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ name: string; } @@ -2194,7 +2271,8 @@ declare namespace appAccount { * * @interface AuthTokenInfo * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ interface AuthTokenInfo { /** @@ -2202,7 +2280,8 @@ declare namespace appAccount { * * @type { string } * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ authType: string; @@ -2211,7 +2290,8 @@ declare namespace appAccount { * * @type { string } * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ token: string; @@ -2220,7 +2300,8 @@ declare namespace appAccount { * * @type { ?AppAccountInfo } * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ account?: AppAccountInfo; } @@ -2230,7 +2311,8 @@ declare namespace appAccount { * * @interface AuthenticatorInfo * @syscap SystemCapability.Account.AppAccount - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ interface AuthenticatorInfo { /** @@ -2238,27 +2320,30 @@ declare namespace appAccount { * * @type { string } * @syscap SystemCapability.Account.AppAccount - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ owner: string; /** * The icon id of an authenticator. * - * @type { number } + * @type { int } * @syscap SystemCapability.Account.AppAccount - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ - iconId: number; + iconId: int; /** * The label id of an authenticator. * - * @type { number } + * @type { int } * @syscap SystemCapability.Account.AppAccount - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ - labelId: number; + labelId: int; } /** @@ -2266,7 +2351,8 @@ declare namespace appAccount { * * @interface AuthResult * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ interface AuthResult { /** @@ -2274,7 +2360,8 @@ declare namespace appAccount { * * @type { ?AppAccountInfo } * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ account?: AppAccountInfo; @@ -2283,7 +2370,8 @@ declare namespace appAccount { * * @type { ?AuthTokenInfo } * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ tokenInfo?: AuthTokenInfo; } @@ -2293,7 +2381,8 @@ declare namespace appAccount { * * @interface CreateAccountOptions * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ interface CreateAccountOptions { /** @@ -2302,7 +2391,8 @@ declare namespace appAccount { * * @type { ?Record<string, string> } * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ customData?: Record<string, string>; } @@ -2312,7 +2402,8 @@ declare namespace appAccount { * * @interface CreateAccountImplicitlyOptions * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ interface CreateAccountImplicitlyOptions { /** @@ -2320,7 +2411,8 @@ declare namespace appAccount { * * @type { ?Array<string> } * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ requiredLabels?: Array<string>; @@ -2329,7 +2421,8 @@ declare namespace appAccount { * * @type { ?string } * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ authType?: string; @@ -2341,7 +2434,8 @@ declare namespace appAccount { * * @type { ?Record<string, Object> } * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ parameters?: Record<string, Object>; } @@ -2351,7 +2445,8 @@ declare namespace appAccount { * * @interface SelectAccountsOptions * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ interface SelectAccountsOptions { /** @@ -2359,7 +2454,8 @@ declare namespace appAccount { * * @type { ?Array<AppAccountInfo> } * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ allowedAccounts?: Array<AppAccountInfo>; @@ -2368,7 +2464,8 @@ declare namespace appAccount { * * @type { ?Array<string> } * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ allowedOwners?: Array<string>; @@ -2377,7 +2474,8 @@ declare namespace appAccount { * * @type { ?Array<string> } * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ requiredLabels?: Array<string>; } @@ -2387,7 +2485,8 @@ declare namespace appAccount { * * @interface VerifyCredentialOptions * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ interface VerifyCredentialOptions { /** @@ -2395,7 +2494,8 @@ declare namespace appAccount { * * @type { ?string } * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ credentialType?: string; @@ -2404,7 +2504,8 @@ declare namespace appAccount { * * @type { ?string } * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ credential?: string; @@ -2416,7 +2517,8 @@ declare namespace appAccount { * * @type { ?Record<string, Object> } * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ parameters?: Record<string, Object>; } @@ -2426,7 +2528,8 @@ declare namespace appAccount { * * @interface SetPropertiesOptions * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ interface SetPropertiesOptions { /** @@ -2434,7 +2537,8 @@ declare namespace appAccount { * * @type { ?Record<string, Object> } * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ properties?: Record<string, Object>; @@ -2446,7 +2550,8 @@ declare namespace appAccount { * * @type { ?Record<string, Object> } * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ parameters?: Record<string, Object>; } @@ -2456,7 +2561,8 @@ declare namespace appAccount { * * @enum { string } Constants * @syscap SystemCapability.Account.AppAccount - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ enum Constants { /** @@ -2483,7 +2589,8 @@ declare namespace appAccount { * Indicates the action for creating account implicitly. * * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ ACTION_CREATE_ACCOUNT_IMPLICITLY = 'createAccountImplicitly', @@ -2491,7 +2598,8 @@ declare namespace appAccount { * Indicates the action for authenticating. * * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ ACTION_AUTH = 'auth', @@ -2499,7 +2607,8 @@ declare namespace appAccount { * Indicates the action for verifying credential. * * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ ACTION_VERIFY_CREDENTIAL = 'verifyCredential', @@ -2507,7 +2616,8 @@ declare namespace appAccount { * Indicates the action for set authenticator properties. * * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ ACTION_SET_AUTHENTICATOR_PROPERTIES = 'setAuthenticatorProperties', @@ -2515,7 +2625,8 @@ declare namespace appAccount { * Indicates the key of name. * * @syscap SystemCapability.Account.AppAccount - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ KEY_NAME = 'name', @@ -2523,7 +2634,8 @@ declare namespace appAccount { * Indicates the key of owner. * * @syscap SystemCapability.Account.AppAccount - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ KEY_OWNER = 'owner', @@ -2531,7 +2643,8 @@ declare namespace appAccount { * Indicates the key of token. * * @syscap SystemCapability.Account.AppAccount - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ KEY_TOKEN = 'token', @@ -2539,7 +2652,8 @@ declare namespace appAccount { * Indicates the key of action. * * @syscap SystemCapability.Account.AppAccount - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ KEY_ACTION = 'action', @@ -2547,7 +2661,8 @@ declare namespace appAccount { * Indicates the key of authentication type. * * @syscap SystemCapability.Account.AppAccount - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ KEY_AUTH_TYPE = 'authType', @@ -2555,7 +2670,8 @@ declare namespace appAccount { * Indicates the key of session id. * * @syscap SystemCapability.Account.AppAccount - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ KEY_SESSION_ID = 'sessionId', @@ -2563,7 +2679,8 @@ declare namespace appAccount { * Indicates the key of caller pid. * * @syscap SystemCapability.Account.AppAccount - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ KEY_CALLER_PID = 'callerPid', @@ -2571,7 +2688,8 @@ declare namespace appAccount { * Indicates the key of caller uid. * * @syscap SystemCapability.Account.AppAccount - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ KEY_CALLER_UID = 'callerUid', @@ -2579,7 +2697,8 @@ declare namespace appAccount { * Indicates the key of caller bundle name. * * @syscap SystemCapability.Account.AppAccount - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ KEY_CALLER_BUNDLE_NAME = 'callerBundleName', @@ -2587,7 +2706,8 @@ declare namespace appAccount { * Indicates the key of required labels. * * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEY_REQUIRED_LABELS = 'requiredLabels', @@ -2595,7 +2715,8 @@ declare namespace appAccount { * Indicates the key of boolean result. * * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEY_BOOLEAN_RESULT = 'booleanResult' } @@ -2603,7 +2724,7 @@ declare namespace appAccount { /** * Provides result code definition. * - * @enum { number } ResultCode + * @enum { int } ResultCode * @syscap SystemCapability.Account.AppAccount * @since 8 * @deprecated since 9 @@ -2799,7 +2920,7 @@ declare namespace appAccount { * @since 8 * @deprecated since 9 */ - onResult: (code: number, result: { [key: string]: any }) => void; + onResult: (code: int, result: { [key: string]: any }) => void; /** * Notifies the client that the authentication request need to be redirected. @@ -2817,7 +2938,8 @@ declare namespace appAccount { * * @interface AuthCallback * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ interface AuthCallback { /** @@ -2825,16 +2947,18 @@ declare namespace appAccount { * * @type { function } * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - onResult: (code: number, result?: AuthResult) => void; + onResult: (code: int, result?: AuthResult) => void; /** * Notifies the client that the authentication request need to be redirected. * * @type { function } * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ onRequestRedirected: (request: Want) => void; @@ -2843,7 +2967,8 @@ declare namespace appAccount { * * @type { ?function } * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ onRequestContinued?: () => void; } @@ -2852,7 +2977,8 @@ declare namespace appAccount { * Provides methods for authenticator. * * @syscap SystemCapability.Account.AppAccount - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 * @name Authenticator */ class Authenticator { @@ -2881,7 +3007,8 @@ declare namespace appAccount { * @param { CreateAccountImplicitlyOptions } options - Indicates the authenticator-specific options for the request. * @param { AuthCallback } callback - Indicates the authenticator callback. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ createAccountImplicitly(options: CreateAccountImplicitlyOptions, callback: AuthCallback): void; @@ -2914,7 +3041,8 @@ declare namespace appAccount { * @param { Record<string, Object> } options - Indicates the authenticator-specific options for the request. * @param { AuthCallback } callback - Indicates the authenticator callback. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ auth(name: string, authType: string, options: Record<string, Object>, callback: AuthCallback): void; @@ -2928,7 +3056,8 @@ declare namespace appAccount { * @param { VerifyCredentialOptions } options - Indicates the options for verifying credential. * @param { AuthCallback } callback - Indicates the authenticator callback. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ verifyCredential(name: string, options: VerifyCredentialOptions, callback: AuthCallback): void; @@ -2938,7 +3067,8 @@ declare namespace appAccount { * @param { SetPropertiesOptions } options - Indicates the options for setting properties. * @param { AuthCallback } callback - Indicates the authenticator callback. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ setProperties(options: SetPropertiesOptions, callback: AuthCallback): void; @@ -2949,7 +3079,8 @@ declare namespace appAccount { * @param { Array<string> } labels - Indicates an array of labels to check. * @param { AuthCallback } callback - Indicates the authenticator callback. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ checkAccountLabels(name: string, labels: Array<string>, callback: AuthCallback): void; @@ -2959,7 +3090,8 @@ declare namespace appAccount { * @param { string } name - Indicates the account name. * @param { AuthCallback } callback - Indicates the authenticator callback. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ checkAccountRemovable(name: string, callback: AuthCallback): void; @@ -2968,7 +3100,8 @@ declare namespace appAccount { * * @returns { rpc.RemoteObject } Returns a remote object. * @syscap SystemCapability.Account.AppAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ getRemoteObject(): rpc.RemoteObject; } diff --git a/api/@ohos.account.distributedAccount.d.ts b/api/@ohos.account.distributedAccount.d.ts index f114ba51a95de44cc302c8b59ba7ea1ad3073844..537fe9f9fdb5b7eb0c4d956930a3bfe5c761de22 100644 --- a/api/@ohos.account.distributedAccount.d.ts +++ b/api/@ohos.account.distributedAccount.d.ts @@ -19,13 +19,18 @@ */ import type { AsyncCallback } from './@ohos.base'; +/*** if arkts 1.1 */ +import { int } from './@ohos.base'; +/*** endif */ + /** * This module provides the capability to manage distributed accounts. * * @namespace distributedAccount * @syscap SystemCapability.Account.OsAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace distributedAccount { /** @@ -33,7 +38,8 @@ declare namespace distributedAccount { * * @returns { DistributedAccountAbility } Ability to manage operations of distributed account. * @syscap SystemCapability.Account.OsAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ function getDistributedAccountAbility(): DistributedAccountAbility; @@ -42,7 +48,8 @@ declare namespace distributedAccount { * * @interface DistributedAccountAbility * @syscap SystemCapability.Account.OsAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ interface DistributedAccountAbility { /** @@ -79,7 +86,8 @@ declare namespace distributedAccount { * <br> 2. Incorrect parameter types. * @throws { BusinessError } 12300001 - System service exception. * @syscap SystemCapability.Account.OsAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ getOsAccountDistributedInfo(callback: AsyncCallback<DistributedInfo>): void; @@ -91,7 +99,8 @@ declare namespace distributedAccount { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 12300001 - System service exception. * @syscap SystemCapability.Account.OsAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ getOsAccountDistributedInfo(): Promise<DistributedInfo>; @@ -99,7 +108,7 @@ declare namespace distributedAccount { * Gets the distributed information of the specified OS account. * * @permission ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS - * @param { number } localId - Indicates the local ID of the specified OS account. + * @param { int } localId - Indicates the local ID of the specified OS account. * @param { AsyncCallback<DistributedInfo> } callback - Asynchronous callback interface. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -126,13 +135,13 @@ declare namespace distributedAccount { * @systemapi * @since 20 */ - getOsAccountDistributedInfoByLocalId(localId: number, callback: AsyncCallback<DistributedInfo>): void; + getOsAccountDistributedInfoByLocalId(localId: int, callback: AsyncCallback<DistributedInfo>): void; /** * Gets the distributed information of the specified OS account. * * @permission ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS - * @param { number } localId - Indicates the local ID of the specified OS account. + * @param { int } localId - Indicates the local ID of the specified OS account. * @returns { Promise<DistributedInfo> } The distributed information of the specified OS account. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -159,7 +168,7 @@ declare namespace distributedAccount { * @systemapi * @since 20 */ - getOsAccountDistributedInfoByLocalId(localId: number): Promise<DistributedInfo>; + getOsAccountDistributedInfoByLocalId(localId: int): Promise<DistributedInfo>; /** * Updates the distributed information of the OS account. @@ -201,7 +210,8 @@ declare namespace distributedAccount { * @throws { BusinessError } 12300003 - Account not found. * @syscap SystemCapability.Account.OsAccount * This API can be called only by system applications. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ setOsAccountDistributedInfo(accountInfo: DistributedInfo, callback: AsyncCallback<void>): void; @@ -219,7 +229,8 @@ declare namespace distributedAccount { * @throws { BusinessError } 12300003 - Account not found. * @syscap SystemCapability.Account.OsAccount * This API can be called only by system applications. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ setOsAccountDistributedInfo(accountInfo: DistributedInfo): Promise<void>; @@ -227,7 +238,7 @@ declare namespace distributedAccount { * Sets the distributed information of the specified OS account. * * @permission ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS - * @param { number } localId - Indicates the local ID of the OS account. + * @param { int } localId - Indicates the local ID of the OS account. * @param { DistributedInfo } distributedInfo - Indicates the distributed information. * @param { AsyncCallback<void> } callback - Asynchronous callback interface. * @throws { BusinessError } 201 - Permission denied. @@ -240,10 +251,11 @@ declare namespace distributedAccount { * @throws { BusinessError } 12300008 - Restricted OS account. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ setOsAccountDistributedInfoByLocalId( - localId: number, + localId: int, distributedInfo: DistributedInfo, callback: AsyncCallback<void> ): void; @@ -252,7 +264,7 @@ declare namespace distributedAccount { * Sets the distributed information of the specified OS account. * * @permission ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS - * @param { number } localId - Indicates the local ID of the OS account. + * @param { int } localId - Indicates the local ID of the OS account. * @param { DistributedInfo } distributedInfo - Indicates the distributed information. * @returns { Promise<void> } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. @@ -265,24 +277,27 @@ declare namespace distributedAccount { * @throws { BusinessError } 12300008 - Restricted OS account. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - setOsAccountDistributedInfoByLocalId(localId: number, distributedInfo: DistributedInfo): Promise<void>; + setOsAccountDistributedInfoByLocalId(localId: int, distributedInfo: DistributedInfo): Promise<void>; } /** * Enum for distributed account status. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Account.OsAccount - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ enum DistributedAccountStatus { /** * Indicates that the account is not logged in. * * @syscap SystemCapability.Account.OsAccount - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ NOT_LOGGED_IN = 0, @@ -290,7 +305,8 @@ declare namespace distributedAccount { * Indicates that the account is logged in. * * @syscap SystemCapability.Account.OsAccount - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ LOGGED_IN = 1 } @@ -300,7 +316,8 @@ declare namespace distributedAccount { * * @interface DistributedInfo * @syscap SystemCapability.Account.OsAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ interface DistributedInfo { /** @@ -308,7 +325,8 @@ declare namespace distributedAccount { * * @type { string } * @syscap SystemCapability.Account.OsAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -317,7 +335,8 @@ declare namespace distributedAccount { * * @type { string } * @syscap SystemCapability.Account.OsAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ id: string; @@ -326,7 +345,8 @@ declare namespace distributedAccount { * * @type { string } * @syscap SystemCapability.Account.OsAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ event: string; @@ -335,7 +355,8 @@ declare namespace distributedAccount { * * @type { ?string } * @syscap SystemCapability.Account.OsAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ nickname?: string; @@ -344,7 +365,8 @@ declare namespace distributedAccount { * * @type { ?string } * @syscap SystemCapability.Account.OsAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ avatar?: string; @@ -354,7 +376,8 @@ declare namespace distributedAccount { * @type { ?DistributedAccountStatus } * @readonly * @syscap SystemCapability.Account.OsAccount - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly status?: DistributedAccountStatus; @@ -363,7 +386,8 @@ declare namespace distributedAccount { * * @type { ?object } * @syscap SystemCapability.Account.OsAccount - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ scalableData?: object; } diff --git a/api/@ohos.app.ability.Ability.d.ts b/api/@ohos.app.ability.Ability.d.ts index 5c7161352dc0b708532ac2df525341ce198b56bd..bd866f61ab48acc9cf7cc6716b52891fd14ff1fe 100644 --- a/api/@ohos.app.ability.Ability.d.ts +++ b/api/@ohos.app.ability.Ability.d.ts @@ -39,7 +39,8 @@ import { Configuration } from './@ohos.app.ability.Configuration'; * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ -export default class Ability { +declare class Ability { + /** * Called when the system configuration is updated. * @@ -82,3 +83,5 @@ export default class Ability { */ onMemoryLevel(level: AbilityConstant.MemoryLevel): void; } + +export default Ability; diff --git a/api/@ohos.app.ability.AbilityConstant.d.ts b/api/@ohos.app.ability.AbilityConstant.d.ts index 1f7273212581ebc63d42829b88f39347446b1b35..da5d3996040a24de8b9b2609d0256c584ba85a65 100644 --- a/api/@ohos.app.ability.AbilityConstant.d.ts +++ b/api/@ohos.app.ability.AbilityConstant.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-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 @@ -40,8 +40,7 @@ import type appManager from './@ohos.app.ability.appManager'; * @since 10 */ /** - * The <code>AbilityConstant</code> module defines the UIAbility-related enums, including the initial launch reasons, - * reasons for the last exit, ability continuation results, and window modes. + * The definition of AbilityConstant. * * @namespace AbilityConstant * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -80,9 +79,7 @@ declare namespace AbilityConstant { * @since 10 */ /** - * Defines the parameters for starting an ability. - * The parameter values are automatically passed in by the system when the ability is started. You do not need to - * change the values. + * Interface of launch param. * * @typedef LaunchParam * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -111,7 +108,7 @@ declare namespace AbilityConstant { * @since 10 */ /** - * Ability launch reason, which is an enumerated type. + * Indicates launch reason. * * @type { LaunchReason } * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -124,7 +121,7 @@ declare namespace AbilityConstant { launchReason: LaunchReason; /** - * Detailed message that describes the ability launch reason. + * Indicates launch detailed reason. * * @type { string } * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -153,7 +150,7 @@ declare namespace AbilityConstant { * @since 10 */ /** - * Reason for the last exit, which is an enumerated type. + * Indicates last exit reason. * * @type { LastExitReason } * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -166,123 +163,134 @@ declare namespace AbilityConstant { lastExitReason: LastExitReason; /** - * Reason for the last exit. + * Indicates last exit detailed reason. * * @type { string } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ lastExitMessage: string; /** - * Detailed information about the last exit. + * Indicates process last exit details. * * @type { LastExitDetailInfo } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ lastExitDetailInfo?: LastExitDetailInfo; } /** - * Describes the detailed information about the last exit. + * The definition of detailed information of process exits * * @typedef LastExitDetailInfo * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface LastExitDetailInfo { /** - * ID of the process where the ability is running when it exits last time. + * Indicates the exited process id * * @type { number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ pid: number; /** - * Name of the process. + * Indicates the exited process name * * @type { string } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ processName: string; /** - * UID of the application. + * Indicates the uid of exited process * * @type { number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ uid: number; /** - * Specific reason for the last exit of the ability. + * Indicates the exit sub-reason * * @type { number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ exitSubReason: number; /** - * Reason why the process was killed. + * Indicates the exit detailed reason * * @type { string } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ exitMsg: string; /** - * RSS value of the process. + * Indicates the rss value when process exit * * @type { number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ rss: number; /** - * PSS value of the process. + * Indicates the pss value when process exit * * @type { number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ pss: number; /** - * Exact time when the ability last exits. + * Indicates the timestamp when process exit * * @type { number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ timestamp: number; @@ -316,9 +324,7 @@ declare namespace AbilityConstant { * @since 10 */ /** - * Enumerates the initial ability launch reasons. - * You can use it together with the value of <code>launchParam.launchReason</code> in - * <code>onCreate(want, launchParam)</code> of the UIAbility to complete different operations. + * Type of launch reason. * * @enum { number } * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -343,8 +349,6 @@ declare namespace AbilityConstant { * @since 10 */ /** - * Unknown reason. - * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @crossplatform @@ -362,7 +366,7 @@ declare namespace AbilityConstant { * @since 9 */ /** - * The ability is started by calling <code>startAbility</code>. + * Start ability through the startAbility interface. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -380,7 +384,7 @@ declare namespace AbilityConstant { * @since 9 */ /** - * The ability is started by calling <code>startAbilityByCall</code>. + * Start ability through the startAbilityByCall interface. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -398,7 +402,7 @@ declare namespace AbilityConstant { * @since 9 */ /** - * The ability is started by means of cross-device migration. + * Start ability through cross-end device migration. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -416,7 +420,7 @@ declare namespace AbilityConstant { * @since 9 */ /** - * The ability is automatically started when the application is restored from a fault. + * After the application is restored, the ability is automatically restored and started when the application fails. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -434,7 +438,7 @@ declare namespace AbilityConstant { * @since 10 */ /** - * The ability is started by means of atomic service sharing. + * Start ability through the acquireShareData interface. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -445,7 +449,7 @@ declare namespace AbilityConstant { SHARE = 5, /** - * The ability is automatically started upon system boot. + * Start ability by booting it up. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -455,7 +459,7 @@ declare namespace AbilityConstant { AUTO_STARTUP = 8, /** - * The ability is started by the InsightIntent framework. + * Start ability through the insight intent interface. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -466,7 +470,7 @@ declare namespace AbilityConstant { INSIGHT_INTENT = 9, /** - * The ability is started in advance during cross-device migration. + * Prepare start ability through cross-end device migration. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -495,9 +499,7 @@ declare namespace AbilityConstant { * @since 10 */ /** - * Enumerates the reasons for the last exit. - * You can use it together with the value of <code>launchParam.lastExitReason</code> in - * <code>onCreate(want, launchParam)</code> of the UIAbility to complete different operations. + * Type of last exit reason. * * @enum { number } * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -526,7 +528,8 @@ declare namespace AbilityConstant { * @since 10 */ /** - * Unknown reason. + * Exit reason : Unknown. The reason for the last exit of the target application is not recorded in the application + * framework. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -538,7 +541,7 @@ declare namespace AbilityConstant { UNKNOWN = 0, /** - * The ability does not respond. + * Exit reason : Ability is not responding. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -556,7 +559,7 @@ declare namespace AbilityConstant { * @since 9 */ /** - * The ability exits normally because the user closes the application. + * Exit reason : normally. App exit due to user active close. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -574,7 +577,7 @@ declare namespace AbilityConstant { * @since 10 */ /** - * The ability exits due to abnormal signals on the local host. + * Exit reason : cpp crash. The app exit due to native exception signal. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -592,8 +595,7 @@ declare namespace AbilityConstant { * @since 10 */ /** - * The ability exits due to a JS_ERROR fault triggered when an application has a JS syntax error that is not - * captured by developers. + * Exit reason : js error. App exit due to js error. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -611,7 +613,7 @@ declare namespace AbilityConstant { * @since 10 */ /** - * The ability exits because watchdog detects that the application is frozen. + * Exit reason : app freeze. App exit due to appFreeze error. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -629,7 +631,7 @@ declare namespace AbilityConstant { * @since 10 */ /** - * The ability exits due to system performance problems, for example, insufficient device memory. + * Exit reason : performance control. App exit due to system performance issues, such as device low memory. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -647,14 +649,7 @@ declare namespace AbilityConstant { * @since 10 */ /** - * The ability exits due to improper use of system resources. The specific error cause can be obtained through - * LaunchParam.lastExitMessage. The possible causes are as follows: - * - CPU Highload: The CPU load is high. - * - CPU_EXT Highload: A fast CPU load detection is carried out. - * - IO Manage Control: An I/O management and control operation is carried out. - * - App Memory Deterioration: The application memory usage exceeds the threshold. - * - Temperature Control: The temperature is too high or too low. - * - Memory Pressure: The system is low on memory, triggering ability exiting in ascending order of priority. + * Exit reason : resource control. App exit due to resource usage violation, such as exceed cpu/io/memory usage. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -672,7 +667,7 @@ declare namespace AbilityConstant { * @since 10 */ /** - * The ability exits due to an update. + * Exit reason : upgrade. App exit due to upgrade. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -683,8 +678,7 @@ declare namespace AbilityConstant { UPGRADE = 8, /** - * The ability exits because of an action in the multitasking center, for example, when users swipe up or hit the - * one-click clean button in the multitasking view. + * Exit reason : USER_REQUEST. App exit due to user request. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -695,7 +689,7 @@ declare namespace AbilityConstant { USER_REQUEST = 9, /** - * The ability exits because it receives a kill signal from the system. + * Exit reason : SIGNAL. App exit due to system signal. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -715,9 +709,7 @@ declare namespace AbilityConstant { * @since 9 */ /** - * Enumerates the ability continuation results. - * You can use it together with <code>onContinue(wantParam)</code> of the UIAbility to complete different - * operations. + * Type of onContinue result. * * @enum { number } * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -735,7 +727,7 @@ declare namespace AbilityConstant { * @since 9 */ /** - * The ability continuation is accepted. + * Agree to the result of Ability migration. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -753,9 +745,7 @@ declare namespace AbilityConstant { * @since 9 */ /** - * The ability continuation is rejected. - * If the application is abnormal in onContinue, which results in abnormal display during data restoration, this - * error code is returned. + * Reject to the result of Ability migration. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -773,9 +763,7 @@ declare namespace AbilityConstant { * @since 9 */ /** - * The version does not match. - * The application on the initiator can obtain the version of the target application from onContinue. If the - * ability continuation cannot be performed due to version mismatch, this error code is returned. + * Mismatch to the result of Ability migration. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -795,8 +783,7 @@ declare namespace AbilityConstant { * @since 9 */ /** - * Enumerates the memory levels. You can use it in <code>onMemoryLevel(level)</code> of the UIAbility to complete - * different operations. + * Type of memory level. * * @enum { number } * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -814,7 +801,7 @@ declare namespace AbilityConstant { * @since 9 */ /** - * Moderate memory usage. + * Memory footprint is moderate. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -832,7 +819,7 @@ declare namespace AbilityConstant { * @since 9 */ /** - * Low memory usage. + * Low memory footprint. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -850,7 +837,7 @@ declare namespace AbilityConstant { * @since 9 */ /** - * High memory usage. + * High memory footprint. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -862,8 +849,7 @@ declare namespace AbilityConstant { } /** - * Enumerates the window mode when the ability is started. - * It can be used together with <code>startAbility</code> to specify the window mode for starting the ability. + * Type of window mode. * * @enum { number } * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -873,7 +859,7 @@ declare namespace AbilityConstant { */ export enum WindowMode { /** - * Undefined window mode. + * The window mode is not defined. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi @@ -884,7 +870,7 @@ declare namespace AbilityConstant { WINDOW_MODE_UNDEFINED = 0, /** - * Full screen mode. It takes effect only on 2-in-1 devices and tablets. + * Full screen mode. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -894,9 +880,8 @@ declare namespace AbilityConstant { WINDOW_MODE_FULLSCREEN = 1, /** - * Primary screen (left screen in the case of horizontal orientation) in split-screen mode. It is valid only in - * intra-app redirection scenarios. - * It takes effect only on foldable devices and tablets. + * Primary screen in split-screen mode. If the screen is horizontal, it means the left split screen. + * It is valid only in intra-app redirection scenarios. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -906,9 +891,8 @@ declare namespace AbilityConstant { WINDOW_MODE_SPLIT_PRIMARY = 100, /** - * Secondary screen (right screen in the case of horizontal orientation) in split-screen mode. It is valid only in - * intra-app redirection scenarios. - * It takes effect only on foldable devices and tablets. + * Secondary screen in split-screen mode. If the screen is horizontal, it means the right split screen. + * It is valid only in intra-app redirection scenarios. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -918,7 +902,7 @@ declare namespace AbilityConstant { WINDOW_MODE_SPLIT_SECONDARY = 101, /** - * The ability is displayed in a floating window. + * Free floating window mode. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi @@ -938,8 +922,7 @@ declare namespace AbilityConstant { * @since 9 */ /** - * Enumerates the result types for the operation of saving application data. You can use it in - * <code>onSaveState(reason, wantParam)</code> of the UIAbility to complete different operations. + * Type of onSave result. * * @enum { number } * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -957,7 +940,7 @@ declare namespace AbilityConstant { * @since 9 */ /** - * Always agreed to save the status. + * Always agree to save the state. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -975,7 +958,7 @@ declare namespace AbilityConstant { * @since 9 */ /** - * Rejected to save the status in continuation. + * Refuse to migrate the saved state. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -993,7 +976,7 @@ declare namespace AbilityConstant { * @since 9 */ /** - * Continuation mismatch. + * Migration mismatch. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -1011,7 +994,7 @@ declare namespace AbilityConstant { * @since 9 */ /** - * Agreed to restore the saved status. + * Agree to restore the saved state. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -1029,7 +1012,7 @@ declare namespace AbilityConstant { * @since 9 */ /** - * Rejected to restore the saved status. + * Refuse to restore the saved state. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -1047,7 +1030,7 @@ declare namespace AbilityConstant { * @since 9 */ /** - * Always rejected to save the status. + * Always refuses to save the state. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -1067,8 +1050,7 @@ declare namespace AbilityConstant { * @since 9 */ /** - * Enumerates the scenarios for saving application data. You can use it in - * <code>onSaveState(reason, wantParam)</code> of the UIAbility to complete different operations. + * Type of save state. * * @enum { number } * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -1086,7 +1068,7 @@ declare namespace AbilityConstant { * @since 9 */ /** - * Saving the status in continuation. + * Migrate and save the state. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -1104,7 +1086,7 @@ declare namespace AbilityConstant { * @since 9 */ /** - * Saving the status in application recovery. + * App recovery to restore the saved state. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -1124,8 +1106,7 @@ declare namespace AbilityConstant { * @since 10 */ /** - * Enumerates the mission continuation states of the application. It is used in the - * <code>setMissionContinueState</code> API of UIAbilityContext. + * Continue state. * * @enum { number } * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -1143,7 +1124,7 @@ declare namespace AbilityConstant { * @since 10 */ /** - * Mission continuation is activated for the current application. + * Mission continuable inactive. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -1161,7 +1142,7 @@ declare namespace AbilityConstant { * @since 10 */ /** - * Mission continuation is not activated for the current application. + * Mission continuable inactive. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -1173,10 +1154,7 @@ declare namespace AbilityConstant { } /** - * Enumerates the collaboration request results. - * This enum is used in multi-device collaboration scenarios to specify whether the target application accepts the - * collaboration request from the caller application. - * It is used in <code>onCollaborate(wantParam)</code> of the UIAbility. + * Type of collaborate result. * * @enum { number } * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -1186,7 +1164,7 @@ declare namespace AbilityConstant { */ export enum CollaborateResult { /** - * Accepts the collaboration request. + * Accept to the result of Ability collaborate. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -1196,7 +1174,7 @@ declare namespace AbilityConstant { ACCEPT = 0, /** - * Rejects the collaboration request. + * Reject to the result of Ability collaborate. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -1207,8 +1185,7 @@ declare namespace AbilityConstant { } /** - * Enumerates the actions triggered when an application is closed by the user. It must be used together with - * <code>onPrepareTermination</code> or <code>onPrepareTerminationAsync</code> of AbilityStage. + * PrepareTerminateAction indicates what to do prior to terminating process. * * @enum { number } * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -1219,7 +1196,7 @@ declare namespace AbilityConstant { */ export enum PrepareTermination { /** - * Executes the termination action immediately. This is the default behavior. + * Terminate process immediately. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -1230,7 +1207,7 @@ declare namespace AbilityConstant { TERMINATE_IMMEDIATELY = 0, /** - * Cancels the termination action. + * Cancel terminate. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly diff --git a/api/@ohos.app.ability.AbilityLifecycleCallback.d.ts b/api/@ohos.app.ability.AbilityLifecycleCallback.d.ts index d7351fe2290935f0f2316d9c916208baf0251ecb..3385c6251ea0c3f06e11d82e759ab30354780f81 100644 --- a/api/@ohos.app.ability.AbilityLifecycleCallback.d.ts +++ b/api/@ohos.app.ability.AbilityLifecycleCallback.d.ts @@ -18,8 +18,8 @@ * @kit AbilityKit */ -import UIAbility from './@ohos.app.ability.UIAbility'; import dataAbility from './@ohos.data.dataAbility'; +import UIAbility from './@ohos.app.ability.UIAbility'; import window from './@ohos.window'; /** @@ -46,7 +46,7 @@ import window from './@ohos.window'; * @atomicservice * @since 11 */ -export default class AbilityLifecycleCallback { +declare class AbilityLifecycleCallback { /** * Called back when an ability is started for initialization. * @@ -435,3 +435,5 @@ export default class AbilityLifecycleCallback { */ onAbilitySaveState?(ability: UIAbility): void; } + +export default AbilityLifecycleCallback; \ No newline at end of file diff --git a/api/@ohos.app.ability.AbilityStage.d.ts b/api/@ohos.app.ability.AbilityStage.d.ts index efd9eb3ccfcc95621bc4aa14b15e47deeaa541e9..a2346942eb1c367501c78e03f5ea7164b468104c 100644 --- a/api/@ohos.app.ability.AbilityStage.d.ts +++ b/api/@ohos.app.ability.AbilityStage.d.ts @@ -39,9 +39,7 @@ import { Configuration } from './@ohos.app.ability.Configuration'; * @since 10 */ /** - * AbilityStage is a runtime class for HAP files. - * AbilityStage notifies you of when you can perform HAP initialization such as resource pre-loading and thread - * creation during the HAP loading. + * The class of an ability stage. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -69,8 +67,7 @@ declare class AbilityStage { * @since 10 */ /** - * Defines the context of AbilityStage. - * The context is obtained in the callback invoked when initialization is performed during ability startup. + * Indicates configuration information about context. * * @type { AbilityStageContext } * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -98,11 +95,7 @@ declare class AbilityStage { * @since 10 */ /** - * Called when the application is created. - * - * <p>**NOTE**: - * <br>This API returns the result synchronously and does not support asynchronous callbacks. - * </p> + * Called back when an ability stage is started for initialization. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -142,29 +135,11 @@ declare class AbilityStage { onAcceptWant(want: Want): string; /** - * Called back asynchronously upon starting specified ability. - * - * @param { Want } want - Indicates the want info of the started ability. - * @returns { Promise<string> } The user returns an ability string ID. If the ability of this ID has been started before, - * do not create a new instance and pull it back to the top of the stack. - * Otherwise, create a new instance and start it. - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @stagemodelonly - * @atomicservice - * @since 20 - */ - onAcceptWantAsync(want: Want): Promise<string>; - - /** - * Called when the UIAbility is started in the specified process. - * - * <p>**NOTE**: - * <br>This API returns the result synchronously and does not support asynchronous callbacks. - * </p> + * Called back when start UIAbility in specified process. * - * @param { Want } want - Want information about the target ability, such as the ability name and bundle name. - * @returns { string } Custom process identifier. If the process with this identifier has been created, the ability - * runs in the process. Otherwise, a new process is created and the ability runs in it. + * @param { Want } want - Indicates the want info of started ability. + * @returns { string } The user returns an process string ID. If the process of this ID has been created before, + * let the ability run in this process. Otherwise, create a new process. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @since 11 @@ -216,15 +191,9 @@ declare class AbilityStage { * @since 10 */ /** - * Called when the global configuration is updated. - * - * <p>**NOTE**: - * <br>This API returns the result synchronously and does not support asynchronous callbacks. - * </p> + * Called when the system configuration is updated. * - * @param { Configuration } newConfig - Callback invoked when the global configuration is updated. The global - * configuration indicates the configuration of the environment where the application is running and includes - * the language and color mode. + * @param { Configuration } newConfig - Indicates the updated configuration. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @crossplatform @@ -244,18 +213,10 @@ declare class AbilityStage { * @since 9 */ /** - * Listens for changes in the system memory level status. - * When the system detects low memory resources, it will proactively invoke this callback. - * You can implement this callback to promptly release non-essential resources (such as cached data or temporary - * objects) upon receiving a memory shortage event, thereby preventing the application process from being forcibly - * terminated by the system. - * - * <p>**NOTE**: - * <br>This API returns the result synchronously and does not support asynchronous callbacks. - * </p> + * Called when the system has determined to trim the memory, for example, when the ability is running in the + * background and there is no enough memory for running as many background processes as possible. * - * @param { AbilityConstant.MemoryLevel } level - Memory level that indicates the memory usage status. When the - * specified memory level is reached, a callback will be invoked and the system will start adjustment. + * @param { AbilityConstant.MemoryLevel } level - Indicates the memory trim level, which shows the current memory usage status. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice @@ -264,13 +225,9 @@ declare class AbilityStage { onMemoryLevel(level: AbilityConstant.MemoryLevel): void; /** - * Called when the application is destroyed. This API is called during the normal lifecycle. - * If the application exits abnormally or is terminated, this API is not called. + * Called back when an ability stage is Destroyed. + * Will not call the onDestroy function when killing a process or crashing abnormally. * - * <p>**NOTE**: - * <br>This API returns the result synchronously and does not support asynchronous callbacks. - * </p> - * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice @@ -280,19 +237,11 @@ declare class AbilityStage { onDestroy(): void; /** - * Called when the application is closed by the user, allowing the user to choose between immediate termination or - * cancellation. - * - * <p>**NOTE**: - * <br>This API returns the result synchronously and does not support asynchronous callbacks. - * <br>Currently, this API takes effect only on 2-in-1 devices. - * <br>This API is called only when the application exits normally. It is not called if the application is forcibly - * closed. - * <br>This API is not executed when {@link AbilityStage.onPrepareTerminationAsync} is implemented. - * </p> + * Called back before an ability stage is terminated. * * @permission ohos.permission.PREPARE_APP_TERMINATE - * @returns { AbilityConstant.PrepareTermination } The user's choice. + * @returns { AbilityConstant.PrepareTermination } The user returns an action indicating + * what the process should do prior to terminating. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice @@ -301,20 +250,12 @@ declare class AbilityStage { onPrepareTermination(): AbilityConstant.PrepareTermination; /** - * Called when the application is closed by the user, allowing the user to choose between immediate termination or - * cancellation. - * This API uses a promise to return the result. - * - * <p>**NOTE**: - * <br>Currently, this API takes effect only on 2-in-1 devices. - * <br>This API is called only when the application exits normally. It is not called if the application is forcibly - * closed. - * <br>If an asynchronous callback crashes, it will be handled as a timeout. If the application does not respond - * within 10 seconds, it will be terminated forcibly. - * </p> + * Called back asynchronously before an ability stage is terminated. + * If onPrepareTerminationAsync has been implemented then onPrepareTermination won't take effect * * @permission ohos.permission.PREPARE_APP_TERMINATE - * @returns { Promise<AbilityConstant.PrepareTermination> } Promise used to return the user's choice. + * @returns { Promise<AbilityConstant.PrepareTermination> } The user returns a promise of the action indicating + * what the process should do prior to terminating. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice @@ -323,5 +264,4 @@ declare class AbilityStage { onPrepareTerminationAsync(): Promise<AbilityConstant.PrepareTermination>; } - export default AbilityStage; \ No newline at end of file diff --git a/api/@ohos.app.ability.ApplicationStateChangeCallback.d.ts b/api/@ohos.app.ability.ApplicationStateChangeCallback.d.ts index 18504ab7ef9499cfcdad1748bbb21574adb66679..ec7e69fc20c40ab68c19a0b96c57d908974f1f59 100644 --- a/api/@ohos.app.ability.ApplicationStateChangeCallback.d.ts +++ b/api/@ohos.app.ability.ApplicationStateChangeCallback.d.ts @@ -40,9 +40,10 @@ * @StageModelOnly * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ -export default class ApplicationStateChangeCallback { +declare class ApplicationStateChangeCallback { /** * Called back when the state of the application changes to foreground. * @@ -95,3 +96,5 @@ export default class ApplicationStateChangeCallback { */ onApplicationBackground(): void; } + +export default ApplicationStateChangeCallback; \ No newline at end of file diff --git a/api/@ohos.app.ability.Configuration.d.ts b/api/@ohos.app.ability.Configuration.d.ts index b9a204339502a0fc993818ee22e94b00cb900ee5..50a18cd45ed2654a2a2d27ff75b750bd200a47cd 100644 --- a/api/@ohos.app.ability.Configuration.d.ts +++ b/api/@ohos.app.ability.Configuration.d.ts @@ -122,7 +122,8 @@ export interface Configuration { * @syscap SystemCapability.Ability.AbilityBase * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ direction?: ConfigurationConstant.Direction; @@ -148,7 +149,8 @@ export interface Configuration { * @syscap SystemCapability.Ability.AbilityBase * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ screenDensity?: ConfigurationConstant.ScreenDensity; @@ -165,7 +167,8 @@ export interface Configuration { * @type { ?number } * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ displayId?: number; @@ -182,7 +185,8 @@ export interface Configuration { * @type { ?boolean } * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ hasPointerDevice?: boolean; @@ -192,7 +196,8 @@ export interface Configuration { * @type { ?string } * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ fontId?: string; @@ -222,7 +227,8 @@ export interface Configuration { * @type { ?number } * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ fontWeightScale?: number; @@ -232,7 +238,8 @@ export interface Configuration { * @type { ?string } * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ mcc?: string; @@ -242,7 +249,8 @@ export interface Configuration { * @type { ?string } * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ mnc?: string; diff --git a/api/@ohos.app.ability.EnvironmentCallback.d.ts b/api/@ohos.app.ability.EnvironmentCallback.d.ts index 7eaea804e905e5eeac25c1362c9b40743843305f..a501cb6845a19e81305eded6777c15e7d44249a6 100644 --- a/api/@ohos.app.ability.EnvironmentCallback.d.ts +++ b/api/@ohos.app.ability.EnvironmentCallback.d.ts @@ -18,8 +18,10 @@ * @kit AbilityKit */ +/*** if arkts 1.1 */ import AbilityConstant from './@ohos.app.ability.AbilityConstant'; import { Configuration } from './@ohos.app.ability.Configuration'; +/*** endif */ /** * The environment callback. @@ -32,9 +34,10 @@ import { Configuration } from './@ohos.app.ability.Configuration'; * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ -export default class EnvironmentCallback { +declare class EnvironmentCallback { /** * Called when the system configuration is updated. * @@ -75,3 +78,4 @@ export default class EnvironmentCallback { */ onMemoryLevel(level: AbilityConstant.MemoryLevel): void; } +export default EnvironmentCallback; \ No newline at end of file diff --git a/api/@ohos.app.ability.InsightIntentContext.d.ts b/api/@ohos.app.ability.InsightIntentContext.d.ts index 9f2de2d357adb48adc035aba503fe59a6ee0f12c..5f8e20ab4d2162703d7ac9947882571b89488be8 100644 --- a/api/@ohos.app.ability.InsightIntentContext.d.ts +++ b/api/@ohos.app.ability.InsightIntentContext.d.ts @@ -27,9 +27,10 @@ import type Want from './@ohos.app.ability.Want'; * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ -export default class InsightIntentContext { +declare class InsightIntentContext { /** * Starts a new ability. * This interface only allows you to start abilities within the same bundle and specify the bundleName. @@ -40,7 +41,7 @@ export default class InsightIntentContext { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. * @throws { BusinessError } 16000001 - The specified ability does not exist. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -56,7 +57,8 @@ export default class InsightIntentContext { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ startAbility(want: Want, callback: AsyncCallback<void>): void; @@ -70,7 +72,7 @@ export default class InsightIntentContext { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. * @throws { BusinessError } 16000001 - The specified ability does not exist. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -86,7 +88,10 @@ export default class InsightIntentContext { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ startAbility(want: Want): Promise<void>; } + +export default InsightIntentContext; \ No newline at end of file diff --git a/api/@ohos.app.ability.InsightIntentExecutor.d.ts b/api/@ohos.app.ability.InsightIntentExecutor.d.ts index 69a71decc5906491b95e21bd8d0456cdfcacd261..c96abb0f0aba40a2000adcc5b70da206e728d947 100644 --- a/api/@ohos.app.ability.InsightIntentExecutor.d.ts +++ b/api/@ohos.app.ability.InsightIntentExecutor.d.ts @@ -29,9 +29,10 @@ import type UIExtensionContentSession from './@ohos.app.ability.UIExtensionConte * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ -export default class InsightIntentExecutor { +declare class InsightIntentExecutor { /** * Indicates context of insight intent. * @@ -39,7 +40,8 @@ export default class InsightIntentExecutor { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ context: InsightIntentContext; @@ -53,7 +55,8 @@ export default class InsightIntentExecutor { * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onExecuteInUIAbilityForegroundMode(name: string, param: Record<string, Object>, pageLoader: window.WindowStage): insightIntent.ExecuteResult | Promise<insightIntent.ExecuteResult>; @@ -67,7 +70,8 @@ export default class InsightIntentExecutor { * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onExecuteInUIAbilityBackgroundMode(name: string, param: Record<string, Object>): insightIntent.ExecuteResult | Promise<insightIntent.ExecuteResult>; @@ -81,7 +85,8 @@ export default class InsightIntentExecutor { * @returns { insightIntent.ExecuteResult | Promise<insightIntent.ExecuteResult> } The result of insight intent execution, support promise. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onExecuteInUIExtensionAbility(name: string, param: Record<string, Object>, pageLoader: UIExtensionContentSession): insightIntent.ExecuteResult | Promise<insightIntent.ExecuteResult>; @@ -94,8 +99,11 @@ export default class InsightIntentExecutor { * @returns { insightIntent.ExecuteResult | Promise<insightIntent.ExecuteResult> } The result of insight intent execution, support promise. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onExecuteInServiceExtensionAbility(name: string, param: Record<string, Object>): insightIntent.ExecuteResult | Promise<insightIntent.ExecuteResult>; } + +export default InsightIntentExecutor; \ No newline at end of file diff --git a/api/@ohos.app.ability.OpenLinkOptions.d.ts b/api/@ohos.app.ability.OpenLinkOptions.d.ts index e93d8ff2a737a88ceb1db1895ebff86469ef7dff..63873b4f2c5d3eedc833a89db84a6641e0c077fe 100644 --- a/api/@ohos.app.ability.OpenLinkOptions.d.ts +++ b/api/@ohos.app.ability.OpenLinkOptions.d.ts @@ -25,7 +25,8 @@ * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export default interface OpenLinkOptions { /** @@ -36,7 +37,8 @@ export default interface OpenLinkOptions { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ appLinkingOnly?: boolean; @@ -47,7 +49,8 @@ export default interface OpenLinkOptions { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ parameters?: Record<string, Object>; } diff --git a/api/@ohos.app.ability.ServiceExtensionAbility.d.ts b/api/@ohos.app.ability.ServiceExtensionAbility.d.ts index 0d678b9f424a7118b6f4df8de7b7f9f99ff24f80..addba9e4fa33ad529643d4ca29b88b718c08a29a 100644 --- a/api/@ohos.app.ability.ServiceExtensionAbility.d.ts +++ b/api/@ohos.app.ability.ServiceExtensionAbility.d.ts @@ -116,21 +116,20 @@ declare class ServiceExtensionAbility { * @returns { void } the promise returned by the function. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @StageModelOnly + * @stagemodelonly * @since 20 * @arkts 1.2 */ onDisconnect(want: Want): void; - /** - * Asynchronous callback when all abilities connected to a service extension are disconnected. - * The next lifecycle callback onDestroy() will be triggered when the returned Promise object resolves. + /** + * Called back when all abilities connected to a service extension are disconnected. * * @param { Want } want - Indicates disconnection information about the service extension. * @returns { Promise<void> } the promise returned by the function. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @StageModelOnly + * @stagemodelonly * @since 20 * @arkts 1.2 */ @@ -155,7 +154,8 @@ declare class ServiceExtensionAbility { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ onConfigurationUpdate(newConfig: Configuration): void; diff --git a/api/@ohos.app.ability.StartOptions.d.ts b/api/@ohos.app.ability.StartOptions.d.ts index 015958835cc30ff41bd6ef4dc840f18efb68ec7b..6a3f7883b3ca31ecb03baa383d7a91fb51c10ea3 100644 --- a/api/@ohos.app.ability.StartOptions.d.ts +++ b/api/@ohos.app.ability.StartOptions.d.ts @@ -52,7 +52,8 @@ export default class StartOptions { * @type { ?number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ windowMode?: number; @@ -82,7 +83,8 @@ export default class StartOptions { * @type { ?boolean } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ withAnimation?: boolean; @@ -92,7 +94,8 @@ export default class StartOptions { * @type { ?number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ windowLeft?: number; @@ -102,7 +105,8 @@ export default class StartOptions { * @type { ?number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ windowTop?: number; @@ -112,7 +116,8 @@ export default class StartOptions { * @type { ?number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ windowWidth?: number; @@ -122,7 +127,8 @@ export default class StartOptions { * @type { ?number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ windowHeight?: number; @@ -133,7 +139,8 @@ export default class StartOptions { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ windowFocused?: boolean; @@ -145,7 +152,8 @@ export default class StartOptions { * @type { ?contextConstant.ProcessMode } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ processMode?: contextConstant.ProcessMode; @@ -157,7 +165,8 @@ export default class StartOptions { * @type { ?contextConstant.StartupVisibility } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ startupVisibility?: contextConstant.StartupVisibility; @@ -167,7 +176,8 @@ export default class StartOptions { * @type { ?image.PixelMap } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ startWindowIcon?: image.PixelMap; @@ -177,7 +187,8 @@ export default class StartOptions { * @type { ?string } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ startWindowBackgroundColor?: string; @@ -187,7 +198,8 @@ export default class StartOptions { * @type { ?Array<bundleManager.SupportWindowMode> } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ supportWindowModes?: Array<bundleManager.SupportWindowMode>; @@ -197,7 +209,8 @@ export default class StartOptions { * @type { ?number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 17 + * @since arkts{ '1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ minWindowWidth?: number; @@ -207,7 +220,8 @@ export default class StartOptions { * @type { ?number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 17 + * @since arkts{ '1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ minWindowHeight?: number; @@ -217,7 +231,8 @@ export default class StartOptions { * @type { ?number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 17 + * @since arkts{ '1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ maxWindowWidth?: number; @@ -227,7 +242,8 @@ export default class StartOptions { * @type { ?number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 17 + * @since arkts{ '1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ maxWindowHeight?: number; diff --git a/api/@ohos.app.ability.UIExtensionAbility.d.ts b/api/@ohos.app.ability.UIExtensionAbility.d.ts index 4b7de8200f33f98922164bf11b34d6ebeef1321f..6b1b954bcb05915910be3a341ab7af1b6ccadc8e 100755 --- a/api/@ohos.app.ability.UIExtensionAbility.d.ts +++ b/api/@ohos.app.ability.UIExtensionAbility.d.ts @@ -19,10 +19,10 @@ */ import AbilityConstant from './@ohos.app.ability.AbilityConstant'; -import type Want from './@ohos.app.ability.Want'; import ExtensionAbility from './@ohos.app.ability.ExtensionAbility'; import type UIExtensionContentSession from './@ohos.app.ability.UIExtensionContentSession'; import type UIExtensionContext from './application/UIExtensionContext'; +import type Want from './@ohos.app.ability.Want'; /** * The class of UI extension ability. diff --git a/api/@ohos.app.ability.UIExtensionContentSession.d.ts b/api/@ohos.app.ability.UIExtensionContentSession.d.ts index 146c2971a77ebef44f36c72fb29ac472a2b4fb7d..6183515be3b3a2e88ab1df5a226fa31a76bf7043 100644 --- a/api/@ohos.app.ability.UIExtensionContentSession.d.ts +++ b/api/@ohos.app.ability.UIExtensionContentSession.d.ts @@ -18,18 +18,15 @@ * @kit AbilityKit */ -/*** if arkts 1.1 */ +import { AbilityResult } from './ability/abilityResult'; import type AbilityStartCallback from './application/AbilityStartCallback'; +import type { AsyncCallback } from './@ohos.base'; import type Want from './@ohos.app.ability.Want'; import type StartOptions from './@ohos.app.ability.StartOptions'; -import type uiExtension from './@ohos.arkui.uiExtension'; -import type { AbilityResult } from './ability/abilityResult'; -/*** endif */ -import type { AsyncCallback } from './@ohos.base'; import type uiExtensionHost from './@ohos.uiExtensionHost'; +import type uiExtension from './@ohos.arkui.uiExtension'; /*** if arkts 1.2 */ -import { AbilityResult } from './ability/abilityResult'; -import { LocalStorage } from '@ohos.arkui.stateManagement'; +import { LocalStorage } from './@ohos.arkui.stateManagement'; /*** endif */ /** @@ -97,7 +94,8 @@ declare class UIExtensionContentSession { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ setReceiveDataForResultCallback(callback: (data: Record<string, Object>) => Record<string, Object>): void; @@ -144,7 +142,7 @@ declare class UIExtensionContentSession { * 2. Incorrect parameter types. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -180,7 +178,7 @@ declare class UIExtensionContentSession { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. * @throws { BusinessError } 16000001 - The specified ability does not exist. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -216,7 +214,7 @@ declare class UIExtensionContentSession { * 2. Incorrect parameter types. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -252,7 +250,7 @@ declare class UIExtensionContentSession { * 2. Incorrect parameter types. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -288,7 +286,7 @@ declare class UIExtensionContentSession { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. * @throws { BusinessError } 16000001 - The specified ability does not exist. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -324,7 +322,7 @@ declare class UIExtensionContentSession { * 2. Incorrect parameter types. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -360,7 +358,7 @@ declare class UIExtensionContentSession { * 2. Incorrect parameter types. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -396,7 +394,7 @@ declare class UIExtensionContentSession { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. * @throws { BusinessError } 16000001 - The specified ability does not exist. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -432,7 +430,7 @@ declare class UIExtensionContentSession { * 2. Incorrect parameter types. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -566,7 +564,7 @@ declare class UIExtensionContentSession { * 2. Incorrect parameter types. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000050 - Internal error. * @throws { BusinessError } 16200001 - The caller has been released. * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -605,7 +603,7 @@ declare class UIExtensionContentSession { * 2. Incorrect parameter types. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000050 - Internal error. * @throws { BusinessError } 16200001 - The caller has been released. * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -651,7 +649,8 @@ declare class UIExtensionContentSession { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ getUIExtensionWindowProxy(): uiExtension.WindowProxy; } diff --git a/api/@ohos.app.ability.UIServiceExtensionAbility.d.ts b/api/@ohos.app.ability.UIServiceExtensionAbility.d.ts index 1371b622ce41701926527457f2319d57b8d3e5f2..77761bfbbb0c54013da6ba704178a2fae50ea126 100644 --- a/api/@ohos.app.ability.UIServiceExtensionAbility.d.ts +++ b/api/@ohos.app.ability.UIServiceExtensionAbility.d.ts @@ -137,4 +137,4 @@ export default class UIServiceExtensionAbility extends ExtensionAbility { * @since 14 */ onDestroy(): void; -} +} \ No newline at end of file diff --git a/api/@ohos.app.ability.UserAuthExtensionAbility.d.ts b/api/@ohos.app.ability.UserAuthExtensionAbility.d.ts index 7a8e808c03da3a0ac350f84532914d8a63e80bd2..0174219fb86c12a7b7e1f1f53dfc84802bc5b4ac 100644 --- a/api/@ohos.app.ability.UserAuthExtensionAbility.d.ts +++ b/api/@ohos.app.ability.UserAuthExtensionAbility.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-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 @@ -16,6 +16,7 @@ /** * @file * @kit UserAuthenticationKit + * @arkts 1.1&1.2 */ import UIExtensionAbility from './@ohos.app.ability.UIExtensionAbility'; @@ -27,7 +28,7 @@ import UIExtensionAbility from './@ohos.app.ability.UIExtensionAbility'; * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi Hide this for inner system use. * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} */ export default class UserAuthExtensionAbility extends UIExtensionAbility { } \ No newline at end of file diff --git a/api/@ohos.app.ability.abilityDelegatorRegistry.d.ts b/api/@ohos.app.ability.abilityDelegatorRegistry.d.ts index 3fa78db0916e5a06e03c695528b2b4be9592827e..4a4b96e87a07f5dcf1012a14109034de057923eb 100644 --- a/api/@ohos.app.ability.abilityDelegatorRegistry.d.ts +++ b/api/@ohos.app.ability.abilityDelegatorRegistry.d.ts @@ -21,11 +21,10 @@ import { AbilityDelegator as _AbilityDelegator } from './application/AbilityDelegator'; import { AbilityDelegatorArgs as _AbilityDelegatorArgs } from './application/abilityDelegatorArgs'; import { AbilityMonitor as _AbilityMonitor } from './application/AbilityMonitor'; +import { ShellCmdResult as _ShellCmdResult } from './application/shellCmdResult'; /*** if arkts 1.1 */ import { AbilityStageMonitor as _AbilityStageMonitor } from './application/AbilityStageMonitor'; -import { ShellCmdResult as _ShellCmdResult } from './application/shellCmdResult'; /*** endif */ - /** * A global register used to store the AbilityDelegator and AbilityDelegatorArgs objects registered * during application startup. @@ -104,7 +103,7 @@ declare namespace abilityDelegatorRegistry { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts { '1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ function getArguments(): AbilityDelegatorArgs; @@ -131,7 +130,8 @@ declare namespace abilityDelegatorRegistry { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum AbilityLifecycleState { /** @@ -340,7 +340,8 @@ declare namespace abilityDelegatorRegistry { * @typedef { _ShellCmdResult } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export type ShellCmdResult = _ShellCmdResult; diff --git a/api/@ohos.app.ability.abilityManager.d.ts b/api/@ohos.app.ability.abilityManager.d.ts index 1acdb5ed8168b6e4865100682d9962b741bce023..607e42d917c66c6de005923475993fff24e731ed 100644 --- a/api/@ohos.app.ability.abilityManager.d.ts +++ b/api/@ohos.app.ability.abilityManager.d.ts @@ -18,15 +18,21 @@ * @kit AbilityKit */ -import { AbilityResult } from './ability/abilityResult'; import { AsyncCallback } from './@ohos.base'; +import { ElementName } from './bundleManager/ElementName'; +/*** if arkts 1.1 */ +import { AbilityResult } from './ability/abilityResult'; import { Configuration } from './@ohos.app.ability.Configuration'; import Context from './application/Context'; import { AbilityRunningInfo as _AbilityRunningInfo } from './application/AbilityRunningInfo'; import { ExtensionRunningInfo as _ExtensionRunningInfo } from './application/ExtensionRunningInfo'; -import { ElementName } from './bundleManager/ElementName'; import * as _AbilityForegroundStateObserver from './application/AbilityForegroundStateObserver'; import * as _AbilityStateData from './application/AbilityStateData'; +/*** endif */ +/*** if arkts 1.2 */ +import _AbilityForegroundStateObserver from './application/AbilityForegroundStateObserver'; +import _AbilityStateData from './application/AbilityStateData'; +/*** endif */ /** * The class of an ability manager. @@ -42,6 +48,7 @@ import * as _AbilityStateData from './application/AbilityStateData'; * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ declare namespace abilityManager { /** @@ -313,7 +320,8 @@ declare namespace abilityManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getTopAbility(): Promise<ElementName>; @@ -327,7 +335,8 @@ declare namespace abilityManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getTopAbility(callback: AsyncCallback<ElementName>): void; @@ -435,7 +444,8 @@ declare namespace abilityManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getForegroundUIAbilities(callback: AsyncCallback<Array<AbilityStateData>>): void; @@ -449,7 +459,8 @@ declare namespace abilityManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getForegroundUIAbilities(): Promise<Array<AbilityStateData>>; @@ -543,7 +554,8 @@ declare namespace abilityManager { * * @typedef { _AbilityRunningInfo } * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 14 + * @systemapi + * @since 9 */ export type AbilityRunningInfo = _AbilityRunningInfo; @@ -556,6 +568,16 @@ declare namespace abilityManager { */ export type AbilityStateData = _AbilityStateData.default; + /** + * The ability state data. + * + * @typedef { _AbilityStateData } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @since 20 + * @arkts 1.2 + */ + export type AbilityStateData = _AbilityStateData; + /** * The class of an extension running information. * @@ -575,6 +597,17 @@ declare namespace abilityManager { * @since 11 */ export type AbilityForegroundStateObserver = _AbilityForegroundStateObserver.default; + + /** + * The ability foreground state observer. + * + * @typedef { _AbilityForegroundStateObserver } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + export type AbilityForegroundStateObserver = _AbilityForegroundStateObserver; } export default abilityManager; diff --git a/api/@ohos.app.ability.application.d.ts b/api/@ohos.app.ability.application.d.ts index 91e21e11e4ef3b2183eecc0086482d496f561983..2d36e7fcb330a1a2c69e473d1f8d8598fa880058 100644 --- a/api/@ohos.app.ability.application.d.ts +++ b/api/@ohos.app.ability.application.d.ts @@ -28,7 +28,8 @@ import Context from './application/Context'; * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace application { /** @@ -41,7 +42,8 @@ declare namespace application { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export function createModuleContext(context: Context, moduleName: string): Promise<Context>; @@ -59,7 +61,8 @@ declare namespace application { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export function createModuleContext(context: Context, bundleName: string, moduleName: string): Promise<Context>; @@ -107,7 +110,8 @@ declare namespace application { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export function createBundleContext(context: Context, bundleName: string): Promise<Context>; diff --git a/api/@ohos.app.ability.common.d.ts b/api/@ohos.app.ability.common.d.ts index f26a6a6e5fddb4f3e5bf38a447b585155274612e..e5f047431108ed49ad1b6e2b1289e261fbce8b23 100644 --- a/api/@ohos.app.ability.common.d.ts +++ b/api/@ohos.app.ability.common.d.ts @@ -42,7 +42,7 @@ import * as _UIServiceExtensionContext from './application/UIServiceExtensionCon import * as _UIServiceProxy from './application/UIServiceProxy'; import * as _UIServiceHostProxy from './application/UIServiceHostProxy'; import * as _UIServiceExtensionConnectCallback from './application/UIServiceExtensionConnectCallback'; -import * as _AppServiceExtensionContext from './application/AppServiceExtensionContext'; +import { PacMap as _PacMap } from './ability/dataAbilityHelper'; /*** endif */ import { AbilityResult as _AbilityResult } from './ability/abilityResult'; /*** if arkts 1.2 */ @@ -50,10 +50,17 @@ import _UIAbilityContext from './application/UIAbilityContext'; import type _UIExtensionContext from './application/UIExtensionContext'; import _AbilityStageContext from './application/AbilityStageContext'; import _ApplicationContext from './application/ApplicationContext'; +import _BaseContext from './application/BaseContext'; import _Context from './application/Context'; import _ExtensionContext from './application/ExtensionContext'; +import _FormExtensionContext from './application/FormExtensionContext'; import _ServiceExtensionContext from './application/ServiceExtensionContext'; +import _EventHub from './application/EventHub'; +import type _VpnExtensionContext from './application/VpnExtensionContext'; /*** endif */ +import { AbilityResult as _AbilityResult } from './ability/abilityResult'; +import type _AbilityStartCallback from './application/AbilityStartCallback'; +import { ConnectOptions as _ConnectOptions } from './ability/connectOptions'; /** * This module provides application context classes and common data structures. @@ -146,7 +153,7 @@ declare namespace common { * @stagemodelonly * @crossplatform * @atomicservice - * @since 11 + * @since 9 */ export type AbilityStageContext = _AbilityStageContext.default; @@ -230,6 +237,19 @@ declare namespace common { */ export type BaseContext = _BaseContext.default; + /** + * The base context of 'app.Context' for FA Mode or 'application.Context' for Stage Mode. + * + * @typedef { _BaseContext } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + export type BaseContext = _BaseContext; + /** * The base context of an ability or an application. It allows access to * application-specific resources. @@ -272,7 +292,7 @@ declare namespace common { * @since 20 * @arkts 1.2 */ - export type Context = _Context; + export type Context = _Context; /** * The context of an extension. It allows access to extension-specific resources. @@ -288,7 +308,7 @@ declare namespace common { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 11 + * @since 9 */ export type ExtensionContext = _ExtensionContext.default; @@ -324,6 +344,19 @@ declare namespace common { */ export type FormExtensionContext = _FormExtensionContext.default; + /** + * The context of form extension. It allows access to + * formExtension-specific resources. + * + * @typedef { _FormExtensionContext } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + export type FormExtensionContext = _FormExtensionContext; + /** * The context of service extension. It allows access to * serviceExtension-specific resources. @@ -376,6 +409,19 @@ declare namespace common { */ export type EventHub = _EventHub.default; + /** + * The event center of a context, support the subscription and publication of events. + * + * @typedef { _EventHub } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + export type EventHub = _EventHub; + /** * Defines a PacMap object for storing a series of values. * @@ -418,7 +464,8 @@ declare namespace common { * @typedef { _ConnectOptions } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export type ConnectOptions = _ConnectOptions; @@ -464,7 +511,8 @@ declare namespace common { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export type AbilityStartCallback = _AbilityStartCallback; @@ -502,6 +550,19 @@ declare namespace common { */ export type VpnExtensionContext = _VpnExtensionContext.default; + /** + * The context of vpn extension. It allows access to + * vpnExtension-specific resources. + * The class of auto startup info. + * + * @typedef { _VpnExtensionContext } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @since 20 + * @arkts 1.2 + */ + export type VpnExtensionContext = _VpnExtensionContext; + /** * The context of an embeddable UIAbility. * diff --git a/api/@ohos.app.ability.contextConstant.d.ts b/api/@ohos.app.ability.contextConstant.d.ts index 784bf67af7bf6f7b607bd12579882d9dcf84b088..251dcfc68ac314688878874ca10c35e68b87bf5f 100644 --- a/api/@ohos.app.ability.contextConstant.d.ts +++ b/api/@ohos.app.ability.contextConstant.d.ts @@ -125,7 +125,8 @@ declare namespace contextConstant { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ EL5 = 4 } diff --git a/api/@ohos.app.ability.dialogRequest.d.ts b/api/@ohos.app.ability.dialogRequest.d.ts index 275dc2f4173f94a9545c8bc955d6e3d6143af656..464970de30aeae927f6a96e556853d6468fa49dd 100644 --- a/api/@ohos.app.ability.dialogRequest.d.ts +++ b/api/@ohos.app.ability.dialogRequest.d.ts @@ -18,9 +18,7 @@ * @kit AbilityKit */ - /*** if arkts 1.1 */ import Want from './@ohos.app.ability.Want'; -/*** endif */ /** * Interface of request dialog. diff --git a/api/@ohos.app.ability.insightIntent.d.ts b/api/@ohos.app.ability.insightIntent.d.ts index 15573c0ef29db9410e5eebf11538039d6216eead..c8f75ce1d14eba4cf3b5c1c8ec002ac1902b6776 100644 --- a/api/@ohos.app.ability.insightIntent.d.ts +++ b/api/@ohos.app.ability.insightIntent.d.ts @@ -28,7 +28,8 @@ import type wantConstant from './@ohos.app.ability.wantConstant'; * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace insightIntent { /** @@ -38,7 +39,8 @@ declare namespace insightIntent { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum ExecuteMode { /** @@ -47,7 +49,8 @@ declare namespace insightIntent { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ UI_ABILITY_FOREGROUND = 0, @@ -57,7 +60,8 @@ declare namespace insightIntent { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ UI_ABILITY_BACKGROUND = 1, @@ -66,7 +70,8 @@ declare namespace insightIntent { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ UI_EXTENSION_ABILITY = 2, @@ -76,7 +81,8 @@ declare namespace insightIntent { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ SERVICE_EXTENSION_ABILITY = 3, } @@ -88,7 +94,8 @@ declare namespace insightIntent { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface ExecuteResult { /** @@ -98,7 +105,8 @@ declare namespace insightIntent { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ code: number; @@ -109,7 +117,8 @@ declare namespace insightIntent { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ result?: Record<string, Object>; @@ -120,7 +129,8 @@ declare namespace insightIntent { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ uris?: Array<string>; @@ -135,7 +145,8 @@ declare namespace insightIntent { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ flags?: number; } diff --git a/api/@ohos.app.ability.insightIntentDriver.d.ts b/api/@ohos.app.ability.insightIntentDriver.d.ts index df8657ac8f734fc3013c48cc0bc649ee2db3b102..993a1a9f326efdc9bd063813514ee072759d1d52 100644 --- a/api/@ohos.app.ability.insightIntentDriver.d.ts +++ b/api/@ohos.app.ability.insightIntentDriver.d.ts @@ -30,7 +30,8 @@ import type insightIntent from './@ohos.app.ability.insightIntent'; * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace insightIntentDriver { /** @@ -40,7 +41,8 @@ declare namespace insightIntentDriver { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface ExecuteParam { /** @@ -50,7 +52,8 @@ declare namespace insightIntentDriver { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ bundleName: string; @@ -61,7 +64,8 @@ declare namespace insightIntentDriver { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ moduleName: string; @@ -72,7 +76,8 @@ declare namespace insightIntentDriver { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ abilityName: string; @@ -83,7 +88,8 @@ declare namespace insightIntentDriver { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ insightIntentName: string; @@ -94,7 +100,8 @@ declare namespace insightIntentDriver { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ insightIntentParam: Record<string, Object>; @@ -105,7 +112,8 @@ declare namespace insightIntentDriver { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ executeMode: insightIntent.ExecuteMode; @@ -116,7 +124,8 @@ declare namespace insightIntentDriver { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ displayId?: number; @@ -127,7 +136,8 @@ declare namespace insightIntentDriver { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ uris?: Array<string>; @@ -142,7 +152,8 @@ declare namespace insightIntentDriver { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ flags?: number; } @@ -162,12 +173,12 @@ declare namespace insightIntentDriver { * 2. Incorrect parameter types. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode. - * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden. + * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden. * @throws { BusinessError } 16000011 - The context does not exist. * @throws { BusinessError } 16000012 - The application is controlled. * @throws { BusinessError } 16000013 - The application is controlled by EDM. @@ -177,7 +188,8 @@ declare namespace insightIntentDriver { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function execute(param: ExecuteParam, callback: AsyncCallback<insightIntent.ExecuteResult>): void; @@ -196,12 +208,12 @@ declare namespace insightIntentDriver { * 2. Incorrect parameter types. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode. - * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden. + * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden. * @throws { BusinessError } 16000011 - The context does not exist. * @throws { BusinessError } 16000012 - The application is controlled. * @throws { BusinessError } 16000013 - The application is controlled by EDM. @@ -211,7 +223,8 @@ declare namespace insightIntentDriver { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function execute(param: ExecuteParam): Promise<insightIntent.ExecuteResult>; diff --git a/api/@ohos.app.ability.wantConstant.d.ts b/api/@ohos.app.ability.wantConstant.d.ts index 93fd9775fb6c54b4b5d96f8df256c52ed85579f2..3d81cfacb4f5681852bcce9e84e4a5d57125b781 100644 --- a/api/@ohos.app.ability.wantConstant.d.ts +++ b/api/@ohos.app.ability.wantConstant.d.ts @@ -48,7 +48,8 @@ declare namespace wantConstant { * @enum { string } * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum Params { /** @@ -56,7 +57,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ DLP_PARAMS_SANDBOX = 'ohos.dlp.params.sandbox', @@ -65,7 +67,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ DLP_PARAMS_BUNDLE_NAME = 'ohos.dlp.params.bundleName', @@ -74,7 +77,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ DLP_PARAMS_MODULE_NAME = 'ohos.dlp.params.moduleName', @@ -83,7 +87,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ DLP_PARAMS_ABILITY_NAME = 'ohos.dlp.params.abilityName', @@ -92,7 +97,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ DLP_PARAMS_INDEX = 'ohos.dlp.params.index', @@ -101,7 +107,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @systemapi - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ HIDE_SENSITIVE_TYPE = 'ohos.media.params.hideSensitiveType', @@ -118,7 +125,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ ABILITY_BACK_TO_OTHER_MISSION_STACK = 'ability.params.backToOtherMissionStack', @@ -133,7 +141,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ ABILITY_RECOVERY_RESTART = 'ohos.ability.params.abilityRecoveryRestart', @@ -148,7 +157,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ CONTENT_TITLE_KEY = 'ohos.extra.param.key.contentTitle', @@ -163,7 +173,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ SHARE_ABSTRACT_KEY = 'ohos.extra.param.key.shareAbstract', @@ -178,7 +189,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ SHARE_URL_KEY = 'ohos.extra.param.key.shareUrl', @@ -197,7 +209,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ SUPPORT_CONTINUE_PAGE_STACK_KEY = 'ohos.extra.param.key.supportContinuePageStack', @@ -216,7 +229,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ SUPPORT_CONTINUE_SOURCE_EXIT_KEY = 'ohos.extra.param.key.supportContinueSourceExit', @@ -226,7 +240,8 @@ declare namespace wantConstant { * @syscap SystemCapability.Ability.AbilityBase * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ ASSERT_FAULT_SESSION_ID = 'ohos.ability.params.asssertFaultSessionId', @@ -235,7 +250,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ SHOW_MODE_KEY = 'ohos.extra.param.key.showMode', @@ -244,7 +260,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ PARAMS_STREAM = 'ability.params.stream', @@ -253,7 +270,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ APP_CLONE_INDEX_KEY = 'ohos.extra.param.key.appCloneIndex', @@ -262,7 +280,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ CALLER_REQUEST_CODE = 'ohos.extra.param.key.callerRequestCode', @@ -271,7 +290,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ PAGE_PATH = 'ohos.param.atomicservice.pagePath', @@ -280,7 +300,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ ROUTER_NAME = 'ohos.param.atomicservice.routerName', @@ -289,7 +310,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ PAGE_SOURCE_FILE = 'ohos.param.atomicservice.pageSourceFile', @@ -298,7 +320,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ BUILD_FUNCTION = 'ohos.param.atomicservice.buildFunction', @@ -307,7 +330,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ SUB_PACKAGE_NAME = 'ohos.param.atomicservice.subpackageName', @@ -315,7 +339,8 @@ declare namespace wantConstant { * Indicates the param of app instance key. * * @syscap SystemCapability.Ability.AbilityBase - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ APP_INSTANCE_KEY = 'ohos.extra.param.key.appInstance', @@ -323,7 +348,8 @@ declare namespace wantConstant { * Indicates the param of creating a new instance. * * @syscap SystemCapability.Ability.AbilityBase - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ CREATE_APP_INSTANCE_KEY = 'ohos.extra.param.key.createAppInstance', @@ -331,7 +357,8 @@ declare namespace wantConstant { * Indicates the app clone index of caller. * * @syscap SystemCapability.Ability.AbilityBase - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ CALLER_APP_CLONE_INDEX = 'ohos.param.callerAppCloneIndex', @@ -342,7 +369,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ LAUNCH_REASON_MESSAGE = 'ohos.params.launchReasonMessage', @@ -434,7 +462,8 @@ declare namespace wantConstant { /** * Indicates that the URI can be persisted by the callee. * @syscap SystemCapability.Ability.AbilityBase - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ FLAG_AUTH_PERSISTABLE_URI_PERMISSION = 0x00000040, @@ -449,7 +478,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ FLAG_INSTALL_ON_DEMAND = 0x00000800, @@ -457,7 +487,8 @@ declare namespace wantConstant { * Collaborative target applications in the distributed scheduling system can be pulled up. * * @syscap SystemCapability.Ability.AbilityBase - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ FLAG_ABILITY_ON_COLLABORATE = 0x00002000, @@ -465,7 +496,8 @@ declare namespace wantConstant { * Indicates that if implicit start ability couldn't match any application, no tip dialog will be pulled up. * * @syscap SystemCapability.Ability.AbilityBase - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ FLAG_START_WITHOUT_TIPS = 0x40000000 } @@ -476,7 +508,8 @@ declare namespace wantConstant { * @enum { number } * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum ShowMode { /** @@ -484,7 +517,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ WINDOW = 0, @@ -493,7 +527,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ EMBEDDED_FULL = 1 } diff --git a/api/@ohos.app.appstartup.StartupConfigEntry.d.ts b/api/@ohos.app.appstartup.StartupConfigEntry.d.ts index 4dddbdd888c764c9d9d17bc6c2edeb3e8c9e5ec9..26efb4f81cfc282663bc633c20d0cf57282600bc 100644 --- a/api/@ohos.app.appstartup.StartupConfigEntry.d.ts +++ b/api/@ohos.app.appstartup.StartupConfigEntry.d.ts @@ -19,7 +19,6 @@ */ import StartupConfig from './@ohos.app.appstartup.StartupConfig'; -import Want from './@ohos.app.ability.Want'; /** * The configuration entry for running startup tasks. diff --git a/api/@ohos.app.form.FormExtensionAbility.d.ts b/api/@ohos.app.form.FormExtensionAbility.d.ts index f106f0c109bdec3c311236b84e249dbbf4de4c99..45c4805d4ddcec60e0535672373d51f5e7066809 100644 --- a/api/@ohos.app.form.FormExtensionAbility.d.ts +++ b/api/@ohos.app.form.FormExtensionAbility.d.ts @@ -24,7 +24,21 @@ import formInfo from './@ohos.app.form.formInfo'; /*** endif */ import FormExtensionContext from './application/FormExtensionContext'; import Want from './@ohos.app.ability.Want'; +/*** if arkts 1.1 */ import { Configuration } from './@ohos.app.ability.Configuration'; +/*** endif */ + +/** + * Called when this ability breaks the last link, notifying the provider that the provider process is about to stop. + * + * @typedef { function } + * @syscap SystemCapability.Ability.Form + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +type OnStopFn = () => void; /** * class of form extension. @@ -159,7 +173,7 @@ declare class FormExtensionAbility { /** * Called when the form provider receives form events from the system. * - * @param { Record<string, number> } newStatus - Indicates the form events occurred. The key in the {@code Map} + * @param { Record<string, int> } newStatus - Indicates the form events occurred. The key in the {@code Map} * object indicates the form ID, and the value indicates the event * type, which can be either * {@link formInfo#VisibilityType#FORM_VISIBLE} or @@ -173,7 +187,7 @@ declare class FormExtensionAbility { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - onChangeFormVisibility(newStatus: Record<string, number>): void; + onChangeFormVisibility(newStatus: Record<string, int>): void; /** * Called when a specified message event defined by the form provider is triggered. This method is valid only for @@ -328,15 +342,15 @@ declare class FormExtensionAbility { onStop?(): void; /** - * Called to notify the form provider that the form location of the form has been changed. - * - * @param { string } formId - Indicates the ID of the form. - * @param { formInfo.FormLocation } newFormLocation - Indicates the new form location of the form. + * Called when this ability breaks the last link, notifying the provider that the provider process is about to stop. * + * @type { ?OnStopFn } * @syscap SystemCapability.Ability.Form * @stagemodelonly + * @atomicservice * @since 20 + * @arkts 1.2 */ - onFormLocationChanged(formId: string, newFormLocation: formInfo.FormLocation): void; + onStop?: OnStopFn; } export default FormExtensionAbility; diff --git a/api/@ohos.app.form.formBindingData.d.ts b/api/@ohos.app.form.formBindingData.d.ts index 3cdd10aaac65dc01c36e412f979adbf9212d8771..356ef5858a53dec459c75e34a69037bc4622cc86 100644 --- a/api/@ohos.app.form.formBindingData.d.ts +++ b/api/@ohos.app.form.formBindingData.d.ts @@ -16,12 +16,9 @@ /** * @file * @kit FormKit + * @arkts 1.1&1.2 */ -/*** if arkts 1.1 */ -import { BusinessError } from './@ohos.base'; -/*** endif */ - /** * Interface of formBindingData. * @@ -93,7 +90,8 @@ declare namespace formBindingData { * @type { Object } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ data: Object; @@ -112,7 +110,8 @@ declare namespace formBindingData { * @syscap SystemCapability.Ability.Form * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ proxies?: Array<ProxyData>; } @@ -132,7 +131,8 @@ declare namespace formBindingData { * @syscap SystemCapability.Ability.Form * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface ProxyData { /** @@ -150,7 +150,8 @@ declare namespace formBindingData { * @syscap SystemCapability.Ability.Form * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ key: string; @@ -169,7 +170,8 @@ declare namespace formBindingData { * @syscap SystemCapability.Ability.Form * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ subscriberId?: string; } diff --git a/api/@ohos.app.form.formHost.d.ts b/api/@ohos.app.form.formHost.d.ts index 421eb36c6e8552bfb90b34dc66406e1e7a961906..5e9c209421c0acb757af0cd65b749b1210a955f1 100644 --- a/api/@ohos.app.form.formHost.d.ts +++ b/api/@ohos.app.form.formHost.d.ts @@ -617,7 +617,7 @@ declare namespace formHost { * * @permission ohos.permission.REQUIRE_FORM * @param { Array<string> } formIds - Indicates the specified form id. - * @param { AsyncCallback<number> } callback - The callback is used to return the number of invalid forms deleted + * @param { AsyncCallback<int> } callback - The callback is used to return the number of invalid forms deleted * by the Form Manager Service. * @throws { BusinessError } 201 - Permissions denied. * @throws { BusinessError } 202 - The application is not a system application. @@ -630,7 +630,7 @@ declare namespace formHost { * @systemapi * @since 9 */ - function deleteInvalidForms(formIds: Array<string>, callback: AsyncCallback<number>): void; + function deleteInvalidForms(formIds: Array<string>, callback: AsyncCallback<int>): void; /** * Deletes invalid forms of the application in the Form Manager Service based on the list of. @@ -638,7 +638,7 @@ declare namespace formHost { * * @permission ohos.permission.REQUIRE_FORM * @param { Array<string> } formIds - Indicates the specified form id. - * @returns { Promise<number> } Returns the number of invalid forms deleted by the Form Manager Service. + * @returns { Promise<int> } Returns the number of invalid forms deleted by the Form Manager Service. * @throws { BusinessError } 201 - Permissions denied. * @throws { BusinessError } 202 - The application is not a system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -650,7 +650,7 @@ declare namespace formHost { * @systemapi * @since 9 */ - function deleteInvalidForms(formIds: Array<string>): Promise<number>; + function deleteInvalidForms(formIds: Array<string>): Promise<int>; /** * Obtains the Form state. diff --git a/api/@ohos.app.form.formInfo.d.ts b/api/@ohos.app.form.formInfo.d.ts index f6f9d43c383da0079efb42cb8762910a8a82877c..37f856b58696461df746ba867a45fe220fa1db1f 100644 --- a/api/@ohos.app.form.formInfo.d.ts +++ b/api/@ohos.app.form.formInfo.d.ts @@ -33,7 +33,8 @@ import Want from './@ohos.app.ability.Want'; * @namespace formInfo * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace formInfo { /** @@ -49,7 +50,8 @@ declare namespace formInfo { * @typedef FormInfo * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface FormInfo { /** @@ -65,7 +67,8 @@ declare namespace formInfo { * @type { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ bundleName: string; @@ -82,7 +85,8 @@ declare namespace formInfo { * @type { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ moduleName: string; @@ -99,7 +103,8 @@ declare namespace formInfo { * @type { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ abilityName: string; @@ -116,7 +121,8 @@ declare namespace formInfo { * @type { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -126,19 +132,21 @@ declare namespace formInfo { * @type { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ displayName: string; /** * Obtains the displayName resource id of this form. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - displayNameId: number; + displayNameId: int; /** * Obtains the description of this form. @@ -153,26 +161,28 @@ declare namespace formInfo { * @type { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ description: string; /** * Obtains the description id of this form. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.Form * @since 10 */ /** * Obtains the description id of this form. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - descriptionId: number; + descriptionId: int; /** * Obtains the type of this form. Currently, JS forms are supported. @@ -187,7 +197,8 @@ declare namespace formInfo { * @type { FormType } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ type: FormType; @@ -204,7 +215,8 @@ declare namespace formInfo { * @type { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ jsComponentName: string; @@ -221,8 +233,8 @@ declare namespace formInfo { * @type { ColorMode } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 - * @deprecated since 20 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ colorMode: ColorMode; @@ -250,7 +262,8 @@ declare namespace formInfo { * @type { boolean } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ isDefault: boolean; @@ -267,7 +280,8 @@ declare namespace formInfo { * @type { boolean } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ updateEnabled: boolean; @@ -284,7 +298,8 @@ declare namespace formInfo { * @type { boolean } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ formVisibleNotify: boolean; @@ -301,7 +316,8 @@ declare namespace formInfo { * @type { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ scheduledUpdateTime: string; @@ -318,60 +334,64 @@ declare namespace formInfo { * @type { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ formConfigAbility: string; /** * Obtains the updateDuration. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * Obtains the updateDuration. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - updateDuration: number; + updateDuration: int; /** * Obtains the default grid style of this form. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * Obtains the default grid style of this form. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - defaultDimension: number; + defaultDimension: int; /** * Obtains the grid styles supported by this form. * - * @type { Array<number> } + * @type { Array<int> } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * Obtains the grid styles supported by this form. * - * @type { Array<number> } + * @type { Array<int> } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - supportDimensions: Array<number>; + supportDimensions: Array<int>; /** * Obtains the custom data defined in this form. @@ -386,7 +406,8 @@ declare namespace formInfo { * @type { Record<string, string> } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ customizeData: Record<string, string>; @@ -403,7 +424,8 @@ declare namespace formInfo { * @type { boolean } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ isDynamic: boolean; @@ -414,31 +436,34 @@ declare namespace formInfo { * @default false * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ transparencyEnabled: boolean; /** * Obtains the shape supported by this form. * - * @type { Array<number> } + * @type { Array<int> } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - supportedShapes: Array<number>; + supportedShapes: Array<int>; /** * Indicates the form previewImage IDs map corresponds to the \"supportDimensions\". * - * @type { ?Array<number> } + * @type { ?Array<int> } * @readonly * @syscap SystemCapability.Ability.Form * @systemapi * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - readonly previewImages?: Array<number>; + readonly previewImages?: Array<int>; /** * Indicates whether the form uses a blur background provided by the form host. @@ -447,47 +472,78 @@ declare namespace formInfo { * @readonly * @syscap SystemCapability.Ability.Form * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly enableBlurBackground?: boolean; /** - * Indicates the fun interaction form params + * Obtains the rendering mode of the form. * - * @type { ?FunInteractionParams } + * @type { ?RenderingMode } * @readonly * @syscap SystemCapability.Ability.Form * @systemapi - * @since 20 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - readonly funInteractionParams?: FunInteractionParams; + readonly renderingMode?: RenderingMode; + } + /** + * Rendering mode. + * + * @enum { int } + * @syscap SystemCapability.Ability.Form + * @systemapi + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 + */ + enum RenderingMode { /** - * Indicates the scene animation form params + * Auto color mode. * - * @type { ?SceneAnimationParams } - * @readonly * @syscap SystemCapability.Ability.Form * @systemapi - * @since 20 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 + */ + AUTO_COLOR = 0, + /** + * Full color mode. + * + * @syscap SystemCapability.Ability.Form + * @systemapi + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - readonly sceneAnimationParams?: SceneAnimationParams; + FULL_COLOR = 1, + /** + * Single color mode. + * + * @syscap SystemCapability.Ability.Form + * @systemapi + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 + */ + SINGLE_COLOR = 2 } /** * Type of form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * Type of form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FormType { /** @@ -501,7 +557,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ JS = 1, @@ -516,7 +573,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ eTS = 2 } @@ -524,18 +582,18 @@ declare namespace formInfo { /** * Color mode. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * Color mode. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 - * @deprecated since 20 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum ColorMode { /** @@ -549,7 +607,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ MODE_AUTO = -1, @@ -564,7 +623,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ MODE_DARK = 0, @@ -579,7 +639,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ MODE_LIGHT = 1 } @@ -634,7 +695,8 @@ declare namespace formInfo { * @typedef FormStateInfo * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface FormStateInfo { /** @@ -650,7 +712,8 @@ declare namespace formInfo { * @type { FormState } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ formState: FormState; @@ -667,7 +730,8 @@ declare namespace formInfo { * @type { Want } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ want: Want; } @@ -675,17 +739,18 @@ declare namespace formInfo { /** * Provides state about a form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * Provides state about a form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FormState { /** @@ -699,7 +764,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ UNKNOWN = -1, @@ -714,7 +780,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 0, @@ -729,7 +796,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ READY = 1 } @@ -747,7 +815,8 @@ declare namespace formInfo { * @enum { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FormParam { /** @@ -771,7 +840,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ IDENTITY_KEY = 'ohos.extra.param.key.form_identity', @@ -796,7 +866,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ DIMENSION_KEY = 'ohos.extra.param.key.form_dimension', @@ -821,7 +892,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ NAME_KEY = 'ohos.extra.param.key.form_name', @@ -850,7 +922,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ MODULE_NAME_KEY = 'ohos.extra.param.key.module_name', @@ -875,7 +948,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ WIDTH_KEY = 'ohos.extra.param.key.form_width', @@ -900,7 +974,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ HEIGHT_KEY = 'ohos.extra.param.key.form_height', @@ -925,7 +1000,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ TEMPORARY_KEY = 'ohos.extra.param.key.form_temporary', @@ -950,7 +1026,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ BUNDLE_NAME_KEY = 'ohos.extra.param.key.bundle_name', @@ -975,7 +1052,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ ABILITY_NAME_KEY = 'ohos.extra.param.key.ability_name', @@ -989,7 +1067,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ THEME_KEY = 'ohos.extra.param.key.form_is_theme', @@ -1003,7 +1082,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ DEVICE_ID_KEY = 'ohos.extra.param.key.device_id', @@ -1028,7 +1108,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ LAUNCH_REASON_KEY = 'ohos.extra.param.key.form_launch_reason', @@ -1057,7 +1138,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ PARAM_FORM_CUSTOMIZE_KEY = 'ohos.extra.param.key.form_customize', @@ -1070,7 +1152,8 @@ declare namespace formInfo { * }. * * @syscap SystemCapability.Ability.Form - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ FORM_LOCATION_KEY = 'ohos.extra.param.key.form_location', @@ -1095,7 +1178,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ FORM_RENDERING_MODE_KEY = 'ohos.extra.param.key.form_rendering_mode', @@ -1109,7 +1193,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ HOST_BG_INVERSE_COLOR_KEY = 'ohos.extra.param.key.host_bg_inverse_color', @@ -1123,7 +1208,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ FORM_PERMISSION_NAME_KEY = 'ohos.extra.param.key.permission_name', @@ -1137,7 +1223,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ FORM_PERMISSION_GRANTED_KEY = 'ohos.extra.param.key.permission_granted', } @@ -1157,7 +1244,8 @@ declare namespace formInfo { * @typedef FormInfoFilter * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface FormInfoFilter { /** @@ -1167,7 +1255,8 @@ declare namespace formInfo { * @type { ?string } * @syscap SystemCapability.Ability.Form * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ bundleName?: string; @@ -1186,7 +1275,8 @@ declare namespace formInfo { * @type { ?string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ moduleName?: string; @@ -1194,39 +1284,42 @@ declare namespace formInfo { * optional supportedDimensions that used to ask getFormsInfo to return * form infos with the same supportedDimensions. * - * @type { ?Array<number> } + * @type { ?Array<int> } * @syscap SystemCapability.Ability.Form * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - supportedDimensions?: Array<number>; + supportedDimensions?: Array<int>; /** * optional supportedShapes that used to ask getFormsInfo to return * form infos with the same supportedShapes. * - * @type { ?Array<number> } + * @type { ?Array<int> } * @syscap SystemCapability.Ability.Form * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - supportedShapes?: Array<number>; + supportedShapes?: Array<int>; } /** * Defines the FormDimension enum. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * Defines the FormDimension enum. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FormDimension { /** @@ -1240,7 +1333,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Dimension_1_2 = 1, @@ -1255,7 +1349,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Dimension_2_2, @@ -1270,7 +1365,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Dimension_2_4, @@ -1285,7 +1381,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Dimension_4_4, @@ -1300,8 +1397,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 - * @deprecated since 20 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Dimension_2_1, @@ -1310,25 +1407,28 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - DIMENSION_1_1, + DIMENSION_1_1 = 6, /** * 6 x 4 form * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - DIMENSION_6_4, + DIMENSION_6_4 = 7, /** * 2 x 3 form used for wearable devices * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ DIMENSION_2_3 = 8, @@ -1337,18 +1437,30 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ DIMENSION_3_3 = 9, + + /** + * 3 x 4 form used for tv devices + * + * @syscap SystemCapability.Ability.Form + * @atomicservice + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 + */ + DIMENSION_3_4 = 10 } - /** + /** * Defines the FormShape enum. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FormShape { /** @@ -1356,7 +1468,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ RECT = 1, @@ -1365,25 +1478,27 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - CIRCLE, + CIRCLE = 2 } /** * The visibility of a form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * The visibility of a form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum VisibilityType { /** @@ -1401,7 +1516,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ UNKNOWN = 0, /** @@ -1419,7 +1535,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ FORM_VISIBLE = 1, /** @@ -1437,25 +1554,27 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - FORM_INVISIBLE + FORM_INVISIBLE = 2 } /** * Indicates the launch reason of a form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @since 10 */ /** * Indicates the launch reason of a form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum LaunchReason { /** @@ -1469,7 +1588,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ FORM_DEFAULT = 1, /** @@ -1483,9 +1603,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - FORM_SHARE + FORM_SHARE = 2 } /** @@ -1495,7 +1616,8 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface PublishFormResult { /** @@ -1505,7 +1627,8 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ code: PublishFormErrorCode; @@ -1516,7 +1639,8 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ message: string; } @@ -1524,11 +1648,12 @@ declare namespace formInfo { /** * The error code of publish form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enum PublishFormErrorCode { /** @@ -1537,9 +1662,10 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - SUCCESS, + SUCCESS = 0, /** * Host has no space to publish form. @@ -1547,9 +1673,10 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - NO_SPACE, + NO_SPACE = 1, /** * Check param failed. @@ -1557,9 +1684,10 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - PARAM_ERROR, + PARAM_ERROR = 2, /** * Internal error occurs during form processing. @@ -1567,9 +1695,10 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - INTERNAL_ERROR, + INTERNAL_ERROR = 3 } /** @@ -1579,7 +1708,8 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ interface FormProviderFilter { /** @@ -1589,7 +1719,8 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ bundleName: string; @@ -1600,7 +1731,8 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ formName?: string; @@ -1611,7 +1743,8 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ moduleName?: string; @@ -1622,7 +1755,8 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ abilityName?: string; @@ -1634,7 +1768,8 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ isUnusedIncluded?: boolean; } @@ -1645,7 +1780,8 @@ declare namespace formInfo { * @typedef RunningFormInfo * @syscap SystemCapability.Ability.Form * @systemapi hide this for inner system use - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ interface RunningFormInfo { /** @@ -1656,7 +1792,8 @@ declare namespace formInfo { * @default - * @syscap SystemCapability.Ability.Form * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly formId: string; @@ -1668,7 +1805,8 @@ declare namespace formInfo { * @default - * @syscap SystemCapability.Ability.Form * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly bundleName: string; @@ -1680,7 +1818,8 @@ declare namespace formInfo { * @default - * @syscap SystemCapability.Ability.Form * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly hostBundleName: string; @@ -1692,7 +1831,8 @@ declare namespace formInfo { * @default - * @syscap SystemCapability.Ability.Form * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly formLocation: FormLocation; @@ -1704,7 +1844,8 @@ declare namespace formInfo { * @default - * @syscap SystemCapability.Ability.Form * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly visibilityType: VisibilityType; @@ -1716,7 +1857,8 @@ declare namespace formInfo { * @default - * @syscap SystemCapability.Ability.Form * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly moduleName: string; @@ -1728,7 +1870,8 @@ declare namespace formInfo { * @default - * @syscap SystemCapability.Ability.Form * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly abilityName: string; @@ -1740,21 +1883,23 @@ declare namespace formInfo { * @default - * @syscap SystemCapability.Ability.Form * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly formName: string; /** * Obtains the grid style of this form. * - * @type { number } - * @readonly + * @type { int } * @default - + * @readonly * @syscap SystemCapability.Ability.Form * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - readonly dimension: number; + readonly dimension: int; /** * Obtains the stage of form use. @@ -1764,7 +1909,8 @@ declare namespace formInfo { * @readonly * @syscap SystemCapability.Ability.Form * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly formUsageState: FormUsageState; @@ -1775,7 +1921,8 @@ declare namespace formInfo { * @readonly * @syscap SystemCapability.Ability.Form * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly formDescription: string; @@ -1787,7 +1934,8 @@ declare namespace formInfo { * @readonly * @syscap SystemCapability.Ability.Form * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly extraData?: Record<string, Object>; } @@ -1795,10 +1943,11 @@ declare namespace formInfo { /** * The stage of form use. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FormUsageState { /** @@ -1806,7 +1955,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ USED = 0, /** @@ -1814,15 +1964,16 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - UNUSED = 1, + UNUSED = 1 } /** * Defines the FormLocation enum. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @systemapi * @since 12 @@ -1830,9 +1981,10 @@ declare namespace formInfo { /** * Defines the FormLocation enum. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @since 20 + * @arkts 1.1&1.2 */ enum FormLocation { /** @@ -1840,7 +1992,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ OTHER = -1, @@ -1856,6 +2009,7 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @since 20 + * @arkts 1.1&1.2 */ DESKTOP = 0, @@ -1871,6 +2025,7 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @since 20 + * @arkts 1.1&1.2 */ FORM_CENTER = 1, @@ -1886,6 +2041,7 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @since 20 + * @arkts 1.1&1.2 */ FORM_MANAGER = 2, @@ -1901,6 +2057,7 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @since 20 + * @arkts 1.1&1.2 */ NEGATIVE_SCREEN = 3, @@ -1909,7 +2066,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ FORM_CENTER_NEGATIVE_SCREEN = 4, @@ -1918,7 +2076,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ FORM_MANAGER_NEGATIVE_SCREEN = 5, @@ -1934,6 +2093,7 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @since 20 + * @arkts 1.1&1.2 */ SCREEN_LOCK = 6, @@ -1949,6 +2109,7 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @since 20 + * @arkts 1.1&1.2 */ AI_SUGGESTION = 7, } diff --git a/api/@ohos.app.form.formProvider.d.ts b/api/@ohos.app.form.formProvider.d.ts index 7bd2de5b9bae2f9b673b8df69291575c701182f0..4bb8041a31ce38b4bb5dfac54b5573fdd2b9d375 100644 --- a/api/@ohos.app.form.formProvider.d.ts +++ b/api/@ohos.app.form.formProvider.d.ts @@ -20,7 +20,9 @@ import { AsyncCallback } from './@ohos.base'; import formBindingData from './@ohos.app.form.formBindingData'; +/*** if arkts 1.1 */ import formInfo from './@ohos.app.form.formInfo'; +/*** endif */ import Want from './@ohos.app.ability.Want'; /** @@ -36,14 +38,15 @@ import Want from './@ohos.app.ability.Want'; * @namespace formProvider * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace formProvider { /** * Set next update time for a specified form. * * @param { string } formId - Indicates the form ID. - * @param { number } minute - Indicates duration minute before next update. + * @param { int } minute - Indicates duration minute before next update. * @param { AsyncCallback<void> } callback - The callback of setFormNextRefreshTime. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. @@ -61,7 +64,7 @@ declare namespace formProvider { * Set next update time for a specified form. * * @param { string } formId - Indicates the form ID. - * @param { number } minute - Indicates duration minute before next update. + * @param { int } minute - Indicates duration minute before next update. * @param { AsyncCallback<void> } callback - The callback of setFormNextRefreshTime. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. @@ -74,15 +77,16 @@ declare namespace formProvider { * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - function setFormNextRefreshTime(formId: string, minute: number, callback: AsyncCallback<void>): void; + function setFormNextRefreshTime(formId: string, minute: int, callback: AsyncCallback<void>): void; /** * Set next update time for a specified form. * * @param { string } formId - Indicates the form ID. - * @param { number } minute - Indicates duration minute before next update. + * @param { int } minute - Indicates duration minute before next update. * @returns { Promise<void> } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. @@ -100,7 +104,7 @@ declare namespace formProvider { * Set next update time for a specified form. * * @param { string } formId - Indicates the form ID. - * @param { number } minute - Indicates duration minute before next update. + * @param { int } minute - Indicates duration minute before next update. * @returns { Promise<void> } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. @@ -113,9 +117,10 @@ declare namespace formProvider { * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - function setFormNextRefreshTime(formId: string, minute: number): Promise<void>; + function setFormNextRefreshTime(formId: string, minute: int): Promise<void>; /** * Update a specified form. @@ -453,75 +458,10 @@ declare namespace formProvider { function openFormEditAbility(abilityName: string, formId: string, isMainPage?: boolean): void; /** - * Activate scene animation - * - * @param { string } formId - Indicates the edit form ID. - * @returns { Promise<void> } The promise returned by the function. - * @throws { BusinessError } 202 - The application is not a system application. - * @throws { BusinessError } 801 - Capability not supported.function activateSceneAnimation - * can not work correctly due to limited device capabilities. - * @throws { BusinessError } 16500050 - IPC connection error. - * @throws { BusinessError } 16500060 - Service connection error. - * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. - * @throws { BusinessError } 16501000 - An internal functional error occurred. - * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. - * @throws { BusinessError } 16501003 - The form can not be operated by the current application. - * @throws { BusinessError } 16501011 - The form can not support this operation. - * @syscap SystemCapability.Ability.Form - * @systemapi - * @since 20 - */ - function activateSceneAnimation(formId: string): Promise<void>; - - /** - * Deactivate scene animation - * - * @param { string } formId - Indicates the edit form ID. - * @returns { Promise<void> } The promise returned by the function. - * @throws { BusinessError } 202 - The application is not a system application. - * @throws { BusinessError } 801 - Capability not supported.function deactivateSceneAnimation can - * not work correctly due to limited device capabilities. - * @throws { BusinessError } 16500050 - IPC connection error. - * @throws { BusinessError } 16500060 - Service connection error. - * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. - * @throws { BusinessError } 16501000 - An internal functional error occurred. - * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. - * @throws { BusinessError } 16501003 - The form can not be operated by the current application. - * @throws { BusinessError } 16501011 - The form can not support this operation. - * @syscap SystemCapability.Ability.Form - * @systemapi - * @since 20 - */ - function deactivateSceneAnimation(formId: string): Promise<void>; - - /** - * Request form's overflow animation - * - * @param { string } formId - Indicates the edit form ID. - * @param { formInfo.OverflowInfo } overflowInfo - Indicates the overflow information. - * @returns { Promise<void> } The promise returned by the function. - * @throws { BusinessError } 801 - Capability not supported.function requestOverflow can - * not work correctly due to limited device capabilities. - * @throws { BusinessError } 16500050 - IPC connection error. - * @throws { BusinessError } 16500060 - Service connection error. - * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. - * @throws { BusinessError } 16501000 - An internal functional error occurred. - * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. - * @throws { BusinessError } 16501003 - The form can not be operated by the current application. - * @throws { BusinessError } 16501011 - The form can not support this operation. - * @syscap SystemCapability.Ability.Form - * @atomicservice - * @since 20 - */ - function requestOverflow(formId: string, overflowInfo: formInfo.OverflowInfo): Promise<void>; - - /** - * Cancel form's overflow animation + * Open the view of forms belonging to current bundle. + * Client to communication with FormManagerService. * - * @param { string } formId - Indicates the edit form ID. - * @returns { Promise<void> } The promise returned by the function. - * @throws { BusinessError } 801 - Capability not supported.function cancelOverflow can - * not work correctly due to limited device capabilities. + * @param { Want } want - The want of the form to open. * @throws { BusinessError } 16500050 - IPC connection error. * @throws { BusinessError } 16500060 - Service connection error. * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. @@ -531,28 +471,8 @@ declare namespace formProvider { * @throws { BusinessError } 16501011 - The form can not support this operation. * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 20 - */ - function cancelOverflow(formId: string): Promise<void>; - - /** - * Get form rect belonging to current bundle - * - * @param { string } formId - * - * @returns { Promise<formInfo.Rect> } - * @throws { BusinessError } 801 - Capability not supported.function getFormRect can not work correctly - * due to limited device capabilities. - * @throws { BusinessError } 16500050 - IPC connection error. - * @throws { BusinessError } 16500060 - Service connection error. - * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. - * @throws { BusinessError } 16501000 - An internal functional error occurred. - * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. - * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. - * @syscap SystemCapability.Ability.Form - * @atomicservice - * @since 20 + * @since 18 */ - function getFormRect(formId: string): Promise<formInfo.Rect>; + function openFormManager(want: Want): void; } export default formProvider; diff --git a/api/@ohos.application.BackupExtensionAbility.d.ets b/api/@ohos.application.BackupExtensionAbility.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..94bf8e02a84cc1f8dd64094ce814cd8f19cb6b03 --- /dev/null +++ b/api/@ohos.application.BackupExtensionAbility.d.ets @@ -0,0 +1,78 @@ +/* + * 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. + */ + + +/** + * Describe bundle version + * + * @interface BundleVersion + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @StageModelOnly + * @since 20 + */ +export interface BundleVersion { + /** + * Indicates bundle's version code. + * + * @type { number } + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @StageModelOnly + * @since 20 + */ + code: number; + + /** + * Indicates bundle's version name. + * + * @type { string } + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @StageModelOnly + * @since 20 + */ + name: string; +} + +/** + * Class to be override for backup extension ability. + * + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @StageModelOnly + * @since 20 + */ +declare class BackupExtensionAbility { + + /** + * Callback to be called when the backup procedure is started. + * Developer could override this method to build files to be backup. + * + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @StageModelOnly + * @since 20 + */ + onBackup(): void; + + /** + * Callback to be called when the restore procedure is started. + * Developer could override this method to restore from copies for various bundle versions. + * + * @param { BundleVersion } bundleVersion Bundle version to be restore. + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @StageModelOnly + * @since 20 + */ + onRestore(bundleVersion: BundleVersion): void; +} + +export default BackupExtensionAbility; \ No newline at end of file diff --git a/api/@ohos.application.StaticSubscriberExtensionAbility.d.ts b/api/@ohos.application.StaticSubscriberExtensionAbility.d.ts index d238b3dcf966ef794b4a001cf76b596e00355d1d..07be8e330715186b95b4fe63830a3a1d9007e771 100644 --- a/api/@ohos.application.StaticSubscriberExtensionAbility.d.ts +++ b/api/@ohos.application.StaticSubscriberExtensionAbility.d.ts @@ -18,7 +18,9 @@ * @kit BasicServicesKit */ +/*** if arkts 1.1 */ import { CommonEventData } from './commonEvent/commonEventData'; +/*** endif */ import StaticSubscriberExtensionContext from './@ohos.application.StaticSubscriberExtensionContext'; /** @@ -27,9 +29,10 @@ import StaticSubscriberExtensionContext from './@ohos.application.StaticSubscrib * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ -export default class StaticSubscriberExtensionAbility { +declare class StaticSubscriberExtensionAbility { /** * Indicates configuration information about an ability context. * @@ -37,7 +40,8 @@ export default class StaticSubscriberExtensionAbility { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ context: StaticSubscriberExtensionContext; @@ -52,3 +56,5 @@ export default class StaticSubscriberExtensionAbility { */ onReceiveEvent(event: CommonEventData): void; } + +export default StaticSubscriberExtensionAbility; \ No newline at end of file diff --git a/api/@ohos.application.StaticSubscriberExtensionContext.d.ts b/api/@ohos.application.StaticSubscriberExtensionContext.d.ts index ebb8029c2d275b3d773c8ede4209d7c07bcb20fd..8cbab8cd89aedb9582ca6e1e754814ecc3a05c05 100644 --- a/api/@ohos.application.StaticSubscriberExtensionContext.d.ts +++ b/api/@ohos.application.StaticSubscriberExtensionContext.d.ts @@ -18,8 +18,10 @@ * @kit BasicServicesKit */ +/*** if arkts 1.1 */ import { AsyncCallback } from './@ohos.base'; import Want from './@ohos.app.ability.Want'; +/*** endif */ import ExtensionContext from './application/ExtensionContext'; /** @@ -29,9 +31,10 @@ import ExtensionContext from './application/ExtensionContext'; * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ -export default class StaticSubscriberExtensionContext extends ExtensionContext { +declare class StaticSubscriberExtensionContext extends ExtensionContext { /** * Starts a new ability. If the caller application is in foreground, you can use this method to start ability; * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND. @@ -46,7 +49,7 @@ export default class StaticSubscriberExtensionContext extends ExtensionContext { * @throws { BusinessError } 401 - Params error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -56,7 +59,7 @@ export default class StaticSubscriberExtensionContext extends ExtensionContext { * @throws { BusinessError } 16000053 - The ability is not on the top of the UI. * @throws { BusinessError } 16000055 - Installation-free timed out. * @throws { BusinessError } 16200001 - The caller has been released. - * @throws { BusinessError } 16300003 - The target application is not the current application. + * @throws { BusinessError } 16300003 - The target application is not self application. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly @@ -78,7 +81,7 @@ export default class StaticSubscriberExtensionContext extends ExtensionContext { * @throws { BusinessError } 401 - Params error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -88,7 +91,7 @@ export default class StaticSubscriberExtensionContext extends ExtensionContext { * @throws { BusinessError } 16000053 - The ability is not on the top of the UI. * @throws { BusinessError } 16000055 - Installation-free timed out. * @throws { BusinessError } 16200001 - The caller has been released. - * @throws { BusinessError } 16300003 - The target application is not the current application. + * @throws { BusinessError } 16300003 - The target application is not self application. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly @@ -96,3 +99,5 @@ export default class StaticSubscriberExtensionContext extends ExtensionContext { */ startAbility(want: Want): Promise<void>; } + +export default StaticSubscriberExtensionContext; \ No newline at end of file diff --git a/api/@ohos.application.WindowExtensionAbility.d.ts b/api/@ohos.application.WindowExtensionAbility.d.ts index ee8a1b08b9e62f0ee78024a3c5e7f096aeffa47f..32ccd9c0e805d90d124fdc20c0861b3a04c3ea48 100644 --- a/api/@ohos.application.WindowExtensionAbility.d.ts +++ b/api/@ohos.application.WindowExtensionAbility.d.ts @@ -29,9 +29,10 @@ import window from './@ohos.window'; * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi hide for inner use. * @StageModelOnly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ -export default class WindowExtensionAbility { +declare class WindowExtensionAbility { /** * Indicates window extension ability context. * @@ -39,7 +40,8 @@ export default class WindowExtensionAbility { * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi hide for inner use. * @StageModelOnly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ context: WindowExtensionContext; @@ -50,7 +52,8 @@ export default class WindowExtensionAbility { * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi hide for inner use. * @StageModelOnly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ onConnect(want: Want): void; @@ -61,7 +64,8 @@ export default class WindowExtensionAbility { * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi hide for inner use. * @StageModelOnly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ onDisconnect(want: Want): void; @@ -72,11 +76,14 @@ export default class WindowExtensionAbility { * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi hide for inner use. * @StageModelOnly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ onWindowReady(window: window.Window): void; } +export default WindowExtensionAbility; + /** * The context of window extension. It allows access to * windowExtension-specific resources. @@ -85,6 +92,7 @@ export default class WindowExtensionAbility { * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi * @stagemodelonly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export type WindowExtensionContext = _WindowExtensionContext; diff --git a/api/@ohos.application.formError.d.ts b/api/@ohos.application.formError.d.ts index 41eedb71973c5f15a64929c1e5b46699e83f3878..e0a3fd46986364447a2bbfb5b2823dcc6172f300 100644 --- a/api/@ohos.application.formError.d.ts +++ b/api/@ohos.application.formError.d.ts @@ -23,22 +23,25 @@ * * @namespace formError * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace formError { /** * Error of form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FormError { /** * A common internal error occurs during form processing. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_COMMON = 1, @@ -48,7 +51,8 @@ declare namespace formError { * and ohos.permission.GET_BUNDLE_INFO_PRIVILEGED permissions. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_PERMISSION_DENY = 2, @@ -58,7 +62,8 @@ declare namespace formError { * consistent with those provided by the form provider. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_GET_INFO_FAILED = 4, @@ -67,7 +72,8 @@ declare namespace formError { * Ensure that the bundle to which the form to be added belongs is available. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_GET_BUNDLE_FAILED = 5, @@ -76,7 +82,8 @@ declare namespace formError { * Ensure that the grid style of the form is supported by the form provider. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_GET_LAYOUT_FAILED = 6, @@ -85,7 +92,8 @@ declare namespace formError { * parameters are valid. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_ADD_INVALID_PARAM = 7, @@ -94,7 +102,8 @@ declare namespace formError { * different from that obtained for the first time. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CFG_NOT_MATCH_ID = 8, @@ -102,7 +111,8 @@ declare namespace formError { * The ID of the form to be operated does not exist in the Form Manager Service. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_NOT_EXIST_ID = 9, @@ -110,7 +120,8 @@ declare namespace formError { * Failed to bind the Form Manager Service to the provider service. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_BIND_PROVIDER_FAILED = 10, @@ -118,7 +129,8 @@ declare namespace formError { * The total number of added forms exceeds the maximum allowed by the system. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_MAX_SYSTEM_FORMS = 11, @@ -127,7 +139,8 @@ declare namespace formError { * exceeds the maximum allowed by the system. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_MAX_INSTANCES_PER_FORM = 12, @@ -136,7 +149,8 @@ declare namespace formError { * operated by the current application. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_OPERATION_FORM_NOT_SELF = 13, @@ -144,7 +158,8 @@ declare namespace formError { * The Form Manager Service failed to instruct the form provider to delete the form. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_PROVIDER_DEL_FAIL = 14, @@ -152,7 +167,8 @@ declare namespace formError { * The total number of added forms exceeds the maximum per client. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_MAX_FORMS_PER_CLIENT = 15, @@ -160,7 +176,8 @@ declare namespace formError { * The total number of added temp forms exceeds the maximum in system. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_MAX_SYSTEM_TEMP_FORMS = 16, @@ -168,7 +185,8 @@ declare namespace formError { * The module can not be find in system. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_FORM_NO_SUCH_MODULE = 17, @@ -176,7 +194,8 @@ declare namespace formError { * The ability can not be find in system. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_FORM_NO_SUCH_ABILITY = 18, @@ -184,7 +203,8 @@ declare namespace formError { * The dimension is not exist in the form. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_FORM_NO_SUCH_DIMENSION = 19, @@ -192,7 +212,8 @@ declare namespace formError { * The ability is not installed. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_FORM_FA_NOT_INSTALLED = 20, @@ -201,7 +222,8 @@ declare namespace formError { * the service is not started.Please try again after the service is started. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_SYSTEM_RESPONSES_FAILED = 30, @@ -213,7 +235,8 @@ declare namespace formError { * the request parameters. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_FORM_DUPLICATE_ADDED = 31, @@ -222,7 +245,8 @@ declare namespace formError { * the restoration is complete. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_IN_RECOVERY = 36, @@ -231,7 +255,8 @@ declare namespace formError { * * @syscap SystemCapability.Ability.Form * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_DISTRIBUTED_SCHEDULE_FAILED = 37 } diff --git a/api/@ohos.arkui.UIContext.d.ts b/api/@ohos.arkui.UIContext.d.ts index 5abf099d146c609b272ac9a8efcc59701b210f74..4d4c8fdd61a0480226c1f061ff797a091d200686 100755 --- a/api/@ohos.arkui.UIContext.d.ts +++ b/api/@ohos.arkui.UIContext.d.ts @@ -23,11 +23,14 @@ import font from './@ohos.font'; import mediaQuery from './@ohos.mediaquery'; import type inspector from './@ohos.arkui.inspector'; import type observer from './@ohos.arkui.observer'; -import promptAction, { LevelOrder } from './@ohos.promptAction'; +import promptAction from './@ohos.promptAction'; +import { LevelOrder } from './@ohos.promptAction'; import router from './@ohos.router'; import type componentUtils from './@ohos.arkui.componentUtils'; +/*** if arkts 1.1 */ import { ComponentContent, FrameNode, Frame } from './@ohos.arkui.node'; import type { AnimatorOptions, AnimatorResult } from './@ohos.animator'; +/*** endif */ import { SimpleAnimatorOptions } from './@ohos.animator'; import type { Callback, AsyncCallback } from './@ohos.base'; import { MeasureOptions } from './@ohos.measure'; @@ -37,6 +40,28 @@ import image from './@ohos.multimedia.image'; import type common from './@ohos.app.ability.common'; import type pointer from './@ohos.multimodalInput.pointer'; +/*** if arkts 1.2 */ +import { ComponentContent, FrameNode, Frame } from '@ohos.arkui.node'; +import { AnimatorOptions, AnimatorResult } from './@ohos.animator'; +import { + ClickEvent, ExpectedFrameRateRange, DragItemInfo, AnimateParam, KeyframeAnimateParam, + KeyframeState, SheetOptions, PopupCommonOptions, MenuOptions, KeyEvent, Optional +} from './arkui/component/common'; +import { CustomBuilder } from './arkui/component/builder'; +import { GestureEvent, GestureRecognizer } from './arkui/component/gesture'; +import { ResourceStr, SizeOptions } from './arkui/component/units'; +import { Nullable, Color, FontStyle, WidthBreakpoint, HeightBreakpoint, PixelRoundMode } from './arkui/component/enums'; +import { TimePickerDialogOptions } from './arkui/component/timePicker'; +import { AlertDialogParamWithConfirm, AlertDialogParamWithButtons, AlertDialogParamWithOptions } from './arkui/component/alertDialog'; +import { ActionSheetOptions } from './arkui/component/actionSheet'; +import { TextPickerDialogOptions } from './arkui/component/textPicker'; +import { LocalStorage } from '@ohos.arkui.stateManagement'; +import { DatePickerDialogOptions } from './arkui/component/datePicker'; +import { TabsController } from './arkui/component/tabs'; +import { Scroller } from './arkui/component/scroll'; +import { KeyProcessingMode } from './arkui/component/focus'; +import { TextMenuOptions } from './arkui/component/textCommon'; +/*** endif */ /** * class Font * @@ -46,18 +71,14 @@ import type pointer from './@ohos.multimodalInput.pointer'; */ /** * class Font - * - * <p><strong>NOTE</strong>: - * <br>You must first use getFont() in UIContext to obtain a Font instance, - * and then call the APIs using the obtained instance. - * </p> - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ -export class Font { +export declare class Font { /** * Register a customized font in the FontManager. * @@ -73,7 +94,8 @@ export class Font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ registerFont(options: font.FontOptions): void; @@ -85,15 +107,11 @@ export class Font { */ /** * Gets a list of fonts supported by system. - * - * <p><strong>NOTE</strong>: - * <br>This API takes effect only on 2-in-1 devices. - * </p> - * * @returns { Array<string> } A list of font names * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ getSystemFontList(): Array<string>; @@ -110,7 +128,8 @@ export class Font { * @returns { font.FontInfo } Returns the font info * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ getFontByName(fontName: string): font.FontInfo; } @@ -128,9 +147,10 @@ export class Font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ -export class MediaQuery { +export declare class MediaQuery { /** * Sets the media query criteria and returns the corresponding listening handle * @@ -148,7 +168,8 @@ export class MediaQuery { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ matchMediaSync(condition: string): mediaQuery.MediaQueryListener; } @@ -164,9 +185,10 @@ export class MediaQuery { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ -export class UIInspector { +export declare class UIInspector { /** * Sets the component after layout or draw criteria and returns the corresponding listening handle * @param { string } id - component id. @@ -182,7 +204,8 @@ export class UIInspector { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ createComponentObserver(id: string): inspector.ComponentObserver; } @@ -208,14 +231,15 @@ export class UIInspector { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ -export class Router { +export declare class Router { /** - * Navigates to a specified page in the application. + * Navigates to a specified page in the application based on the page URL and parameters. * - * @param { router.RouterOptions } options - Page routing parameters. - * @param { AsyncCallback<void> } callback - Callback used to return the result. + * @param { router.RouterOptions } options - Options. + * @param { AsyncCallback<void> } callback - the callback of pushUrl. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. @@ -228,10 +252,10 @@ export class Router { * @since 10 */ /** - * Navigates to a specified page in the application. + * Navigates to a specified page in the application based on the page URL and parameters. * - * @param { router.RouterOptions } options - Page routing parameters. - * @param { AsyncCallback<void> } callback - Callback used to return the result. + * @param { router.RouterOptions } options - Options. + * @param { AsyncCallback<void> } callback - the callback of pushUrl. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. @@ -242,15 +266,16 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ pushUrl(options: router.RouterOptions, callback: AsyncCallback<void>): void; /** - * Navigates to a specified page in the application. This API uses a promise to return the result. + * Navigates to a specified page in the application based on the page URL and parameters. * - * @param { router.RouterOptions } options - Page routing parameters. - * @returns { Promise<void> } Promise used to return the result. + * @param { router.RouterOptions } options - Options. + * @returns { Promise<void> } the promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. @@ -263,10 +288,10 @@ export class Router { * @since 10 */ /** - * Navigates to a specified page in the application. This API uses a promise to return the result. + * Navigates to a specified page in the application based on the page URL and parameters. * - * @param { router.RouterOptions } options - Page routing parameters. - * @returns { Promise<void> } Promise used to return the result. + * @param { router.RouterOptions } options - Options. + * @returns { Promise<void> } the promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. @@ -277,16 +302,17 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ pushUrl(options: router.RouterOptions): Promise<void>; /** - * Navigates to a specified page in the application. + * Navigates to a specified page in the application based on the page URL and parameters. * - * @param { router.RouterOptions } options - Page routing parameters. - * @param { router.RouterMode } mode - Routing mode. - * @param { AsyncCallback<void> } callback - Callback used to return the result. + * @param { router.RouterOptions } options - Options. + * @param { router.RouterMode } mode - RouterMode. + * @param { AsyncCallback<void> } callback - the callback of pushUrl. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. @@ -299,11 +325,11 @@ export class Router { * @since 10 */ /** - * Navigates to a specified page in the application. + * Navigates to a specified page in the application based on the page URL and parameters. * - * @param { router.RouterOptions } options - Page routing parameters. - * @param { router.RouterMode } mode - Routing mode. - * @param { AsyncCallback<void> } callback - Callback used to return the result. + * @param { router.RouterOptions } options - Options. + * @param { router.RouterMode } mode - RouterMode. + * @param { AsyncCallback<void> } callback - the callback of pushUrl. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. @@ -314,16 +340,17 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ pushUrl(options: router.RouterOptions, mode: router.RouterMode, callback: AsyncCallback<void>): void; /** - * Navigates to a specified page in the application. This API uses a promise to return the result. + * Navigates to a specified page in the application based on the page URL and parameters. * - * @param { router.RouterOptions } options - Page routing parameters. - * @param { router.RouterMode } mode - Routing mode. - * @returns { Promise<void> } Promise used to return the result. + * @param { router.RouterOptions } options - Options. + * @param { router.RouterMode } mode - RouterMode. + * @returns { Promise<void> } the promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. @@ -336,11 +363,11 @@ export class Router { * @since 10 */ /** - * Navigates to a specified page in the application. This API uses a promise to return the result. + * Navigates to a specified page in the application based on the page URL and parameters. * - * @param { router.RouterOptions } options - Page routing parameters. - * @param { router.RouterMode } mode - Routing mode. - * @returns { Promise<void> } Promise used to return the result. + * @param { router.RouterOptions } options - Options. + * @param { router.RouterMode } mode - RouterMode. + * @returns { Promise<void> } the promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. @@ -351,7 +378,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ pushUrl(options: router.RouterOptions, mode: router.RouterMode): Promise<void>; @@ -384,7 +412,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ replaceUrl(options: router.RouterOptions, callback: AsyncCallback<void>): void; @@ -417,7 +446,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ replaceUrl(options: router.RouterOptions): Promise<void>; @@ -452,7 +482,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ replaceUrl(options: router.RouterOptions, mode: router.RouterMode, callback: AsyncCallback<void>): void; @@ -487,18 +518,15 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ replaceUrl(options: router.RouterOptions, mode: router.RouterMode): Promise<void>; /** * Returns to the previous page or a specified page. * - * @param { router.RouterOptions } options - Description of the page. - * <br>The **url** parameter indicates the URL of the page to return to. - * <br>If the specified page does not exist in the page stack, the application does not respond. - * <br>If no URL is set, the application returns to the previous page, and the page is not rebuilt. - * <br>The page in the page stack is not reclaimed. It will be reclaimed after being popped up. + * @param { router.RouterOptions } options - Options. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 @@ -506,27 +534,25 @@ export class Router { /** * Returns to the previous page or a specified page. * - * @param { router.RouterOptions } options - Description of the page. - * <br>The **url** parameter indicates the URL of the page to return to. - * <br>If the specified page does not exist in the page stack, the application does not respond. - * <br>If no URL is set, the application returns to the previous page, and the page is not rebuilt. - * <br>The page in the page stack is not reclaimed. It will be reclaimed after being popped up. + * @param { router.RouterOptions } options - Options. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ back(options?: router.RouterOptions): void; /** * Returns to the specified page. * - * @param { number } index - Index of the target page to navigate to. - * @param { Object } [params] - Parameters carried when returning to the page. + * @param { number } index - index of page. + * @param { Object } [params] - params of page. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ back(index: number, params?: Object): void; @@ -543,7 +569,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ clear(): void; @@ -562,14 +589,15 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ getLength(): string; /** * Obtains information about the current page state. * - * @returns { router.RouterState } Page routing state. + * @returns { router.RouterState } Page state. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 @@ -577,11 +605,12 @@ export class Router { /** * Obtains information about the current page state. * - * @returns { router.RouterState } Page routing state. + * @returns { router.RouterState } Page state. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ getState(): router.RouterState; @@ -593,7 +622,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getStateByIndex(index: number): router.RouterState | undefined; @@ -605,7 +635,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getStateByUrl(url: string): Array<router.RouterState>; @@ -634,7 +665,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ showAlertBeforeBackPage(options: router.EnableAlertOptions): void; @@ -651,7 +683,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ hideAlertBeforeBackPage(): void; @@ -670,14 +703,15 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ getParams(): Object; /** - * Navigates to a page using the named route. This API uses a promise to return the result. - * @param { router.NamedRouterOptions } options - Page routing parameters. - * @param { AsyncCallback<void> } callback - Callback used to return the result. + * Navigates to a specified page in the application based on the page URL and parameters. + * @param { router.NamedRouterOptions } options - Options. + * @param { AsyncCallback<void> } callback - the callback of pushNamedRoute. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. @@ -690,9 +724,9 @@ export class Router { * @since 10 */ /** - * Navigates to a page using the named route. This API uses a promise to return the result. - * @param { router.NamedRouterOptions } options - Page routing parameters. - * @param { AsyncCallback<void> } callback - Callback used to return the result. + * Navigates to a specified page in the application based on the page URL and parameters. + * @param { router.NamedRouterOptions } options - Options. + * @param { AsyncCallback<void> } callback - the callback of pushNamedRoute. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. @@ -703,14 +737,15 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ pushNamedRoute(options: router.NamedRouterOptions, callback: AsyncCallback<void>): void; /** - * Navigates to a page using the named route. This API uses a promise to return the result. - * @param { router.NamedRouterOptions } options - Page routing parameters. - * @returns { Promise<void> } Promise used to return the result. + * Navigates to a specified page in the application based on the page URL and parameters. + * @param { router.NamedRouterOptions } options - Options. + * @returns { Promise<void> } the promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. @@ -723,9 +758,9 @@ export class Router { * @since 10 */ /** - * Navigates to a page using the named route. This API uses a promise to return the result. - * @param { router.NamedRouterOptions } options - Page routing parameters. - * @returns { Promise<void> } Promise used to return the result. + * Navigates to a specified page in the application based on the page URL and parameters. + * @param { router.NamedRouterOptions } options - Options. + * @returns { Promise<void> } the promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. @@ -736,15 +771,16 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ pushNamedRoute(options: router.NamedRouterOptions): Promise<void>; /** - * Navigates to a page using the named route. This API uses a promise to return the result. - * @param { router.NamedRouterOptions } options - Page routing parameters. - * @param { router.RouterMode } mode - Routing mode. - * @param { AsyncCallback<void> } callback - Callback used to return the result. + * Navigates to a specified page in the application based on the page URL and parameters. + * @param { router.NamedRouterOptions } options - Options. + * @param { router.RouterMode } mode - RouterMode. + * @param { AsyncCallback<void> } callback - the callback of pushNamedRoute. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. @@ -757,10 +793,10 @@ export class Router { * @since 10 */ /** - * Navigates to a page using the named route. This API uses a promise to return the result. - * @param { router.NamedRouterOptions } options - Page routing parameters. - * @param { router.RouterMode } mode - Routing mode. - * @param { AsyncCallback<void> } callback - Callback used to return the result. + * Navigates to a specified page in the application based on the page URL and parameters. + * @param { router.NamedRouterOptions } options - Options. + * @param { router.RouterMode } mode - RouterMode. + * @param { AsyncCallback<void> } callback - the callback of pushNamedRoute. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. @@ -771,15 +807,16 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ pushNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode, callback: AsyncCallback<void>): void; /** - * Navigates to a page using the named route. This API uses a promise to return the result. - * @param { router.NamedRouterOptions } options - Page routing parameters. - * @param { router.RouterMode } mode - Routing mode. - * @returns { Promise<void> } Promise used to return the result. + * Navigates to a specified page in the application based on the page URL and parameters. + * @param { router.NamedRouterOptions } options - Options. + * @param { router.RouterMode } mode - RouterMode. + * @returns { Promise<void> } the promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. @@ -792,10 +829,10 @@ export class Router { * @since 10 */ /** - * Navigates to a page using the named route. This API uses a promise to return the result. - * @param { router.NamedRouterOptions } options - Page routing parameters. - * @param { router.RouterMode } mode - Routing mode. - * @returns { Promise<void> } Promise used to return the result. + * Navigates to a specified page in the application based on the page URL and parameters. + * @param { router.NamedRouterOptions } options - Options. + * @param { router.RouterMode } mode - RouterMode. + * @returns { Promise<void> } the promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. @@ -806,7 +843,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ pushNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode): Promise<void>; @@ -837,7 +875,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ replaceNamedRoute(options: router.NamedRouterOptions, callback: AsyncCallback<void>): void; @@ -865,7 +904,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ replaceNamedRoute(options: router.NamedRouterOptions): Promise<void>; @@ -895,7 +935,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ replaceNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode, callback: AsyncCallback<void>): void; @@ -928,7 +969,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ replaceNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode): Promise<void>; } @@ -940,7 +982,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ declare type CustomBuilderWithId = (id: number) => void; @@ -951,7 +994,8 @@ declare type CustomBuilderWithId = (id: number) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ export interface TargetInfo { /** @@ -961,7 +1005,8 @@ export interface TargetInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ id: string | number; @@ -972,7 +1017,8 @@ export interface TargetInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ componentId?: number; } @@ -990,9 +1036,10 @@ export interface TargetInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ -export class PromptAction { +export declare class PromptAction { /** * Displays the notification text. * @@ -1007,9 +1054,9 @@ export class PromptAction { * @since 10 */ /** - * Shows a toast in the given settings. + * Displays the notification text. * - * @param { promptAction.ShowToastOptions } options - Toast options. + * @param { promptAction.ShowToastOptions } options - Options. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. @@ -1018,7 +1065,8 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ showToast(options: promptAction.ShowToastOptions): void; @@ -1035,7 +1083,8 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ openToast(options: promptAction.ShowToastOptions): Promise<number>; @@ -1052,7 +1101,8 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ closeToast(toastId: number): void; @@ -1086,11 +1136,10 @@ export class PromptAction { * @since 11 */ /** - * Shows a dialog box in the given settings. This API uses an asynchronous callback to return the result. + * Displays the dialog box. * - * @param { promptAction.ShowDialogOptions } options - Dialog box options. - * @param { AsyncCallback<promptAction.ShowDialogSuccessResponse> } callback - Callback used to return the dialog - * box response result. + * @param { promptAction.ShowDialogOptions } options - Options. + * @param { AsyncCallback<promptAction.ShowDialogSuccessResponse> } callback - the callback of showDialog. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. @@ -1099,7 +1148,8 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ showDialog(options: promptAction.ShowDialogOptions, callback: AsyncCallback<promptAction.ShowDialogSuccessResponse>): void; @@ -1118,11 +1168,10 @@ export class PromptAction { * @since 10 */ /** - * Shows a dialog box. This API uses a promise to return the result. + * Displays the dialog box. * - * @param { promptAction.ShowDialogOptions } options - Dialog box options. - * @returns { Promise<promptAction.ShowDialogSuccessResponse> } Promise used to return the dialog - * box response result. + * @param { promptAction.ShowDialogOptions } options - Options. + * @returns { Promise<promptAction.ShowDialogSuccessResponse> } the promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. @@ -1131,16 +1180,16 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ showDialog(options: promptAction.ShowDialogOptions): Promise<promptAction.ShowDialogSuccessResponse>; /** - * Shows an action menu in the given settings. This API uses an asynchronous callback to return the result. + * Displays the menu. * - * @param { promptAction.ActionMenuOptions } options - Action menu options. - * @param { promptAction.ActionMenuSuccessResponse } callback - Callback used to return the action menu - * response result. + * @param { promptAction.ActionMenuOptions } options - Options. + * @param { promptAction.ActionMenuSuccessResponse } callback - the callback of showActionMenu. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. @@ -1155,11 +1204,10 @@ export class PromptAction { showActionMenu(options: promptAction.ActionMenuOptions, callback: promptAction.ActionMenuSuccessResponse): void; /** - * Shows an action menu in the given settings. This API uses an asynchronous callback to return the result. + * Displays the menu. * - * @param { promptAction.ActionMenuOptions } options - Action menu options. - * @param { AsyncCallback<promptAction.ActionMenuSuccessResponse> } callback - Callback used to return the action - * menu response result. + * @param { promptAction.ActionMenuOptions } options - Options. + * @param { AsyncCallback<promptAction.ActionMenuSuccessResponse> } callback - the callback of showActionMenu. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. @@ -1168,7 +1216,8 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ showActionMenu(options: promptAction.ActionMenuOptions, callback: AsyncCallback<promptAction.ActionMenuSuccessResponse>): void; @@ -1187,11 +1236,10 @@ export class PromptAction { * @since 10 */ /** - * Shows an action menu in the given settings. This API uses an asynchronous callback to return the result. + * Displays the menu. * - * @param { promptAction.ActionMenuOptions } options - Action menu options. - * @returns { Promise<promptAction.ActionMenuSuccessResponse> } callback - Promise used to return the action - * menu response result. + * @param { promptAction.ActionMenuOptions } options - Options. + * @returns { Promise<promptAction.ActionMenuSuccessResponse> } callback - the callback of showActionMenu. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. @@ -1200,7 +1248,8 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ showActionMenu(options: promptAction.ActionMenuOptions): Promise<promptAction.ActionMenuSuccessResponse>; @@ -1214,20 +1263,19 @@ export class PromptAction { * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. * <br> 3. Parameter verification failed. - * @throws { BusinessError } 103301 - Dialog content error. The ComponentContent is incorrect. - * @throws { BusinessError } 103302 - Dialog content already exist. The ComponentContent has already been opened. + * @throws { BusinessError } 103301 - the ComponentContent is incorrect. + * @throws { BusinessError } 103302 - Dialog content already exists. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ - openCustomDialog<T extends Object>(dialogContent: ComponentContent<T>, options?: promptAction.BaseDialogOptions): Promise<void>; + openCustomDialog<T extends Object>(dialogContent: ComponentContent<T>, options?: promptAction.BaseDialogOptions): Promise<void>; /** * Open the custom dialog with frameNode and controller. * - * isModal = true and showInSubWindow = true cannot be used at the same time. - * * @param { ComponentContent<T> } dialogContent - the content of custom dialog. * @param { promptAction.DialogController } controller - Dialog controller. * @param { promptAction.BaseDialogOptions } options - Options. @@ -1236,12 +1284,13 @@ export class PromptAction { * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. * <br> 3. Parameter verification failed. - * @throws { BusinessError } 103301 - Dialog content error. The ComponentContent is incorrect. - * @throws { BusinessError } 103302 - Dialog content already exist. The ComponentContent has already been opened. + * @throws { BusinessError } 103301 - the ComponentContent is incorrect. + * @throws { BusinessError } 103302 - Dialog content already exists. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ openCustomDialogWithController<T extends Object>(dialogContent: ComponentContent<T>, controller: promptAction.DialogController, options?: promptAction.BaseDialogOptions): Promise<void>; @@ -1251,44 +1300,42 @@ export class PromptAction { * * @param { ComponentContent<T> } dialogContent - the content of custom dialog. * @param { promptAction.BaseDialogOptions } options - Options. - * only alignment, offset, autoCancel, and maskColor can be updated. * @returns { Promise<void> } the promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. * <br> 3. Parameter verification failed. - * @throws { BusinessError } 103301 - Dialog content error. The ComponentContent is incorrect. - * @throws { BusinessError } 103303 - Dialog content not found. The ComponentContent cannot be found. + * @throws { BusinessError } 103301 - the ComponentContent is incorrect. + * @throws { BusinessError } 103303 - the ComponentContent cannot be found. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ - updateCustomDialog<T extends Object>(dialogContent: ComponentContent<T>, options: promptAction.BaseDialogOptions): Promise<void>; + updateCustomDialog<T extends Object>(dialogContent: ComponentContent<T>, options: promptAction.BaseDialogOptions): Promise<void>; /** - * Closes a custom dialog box corresponding to dialogContent. This API uses a promise to return the result. + * Close the custom dialog with frameNode. * - * @param { ComponentContent<T> } dialogContent - Content of the custom dialog box. - * @returns { Promise<void> } Promise used to return the result. + * @param { ComponentContent<T> } dialogContent - the content of custom dialog. + * @returns { Promise<void> } the promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. * <br> 3. Parameter verification failed. - * @throws { BusinessError } 103301 - Dialog content error. The ComponentContent is incorrect. - * @throws { BusinessError } 103303 - Dialog content not found. The ComponentContent cannot be found. + * @throws { BusinessError } 103301 - the ComponentContent is incorrect. + * @throws { BusinessError } 103303 - the ComponentContent cannot be found. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 - */ + */ closeCustomDialog<T extends Object>(dialogContent: ComponentContent<T>): Promise<void>; /** * Open the custom dialog. * - * isModal = true and showInSubWindow = true cannot be used at the same time. - * * @param { promptAction.CustomDialogOptions } options - Options. * @returns { Promise<number> } return the dialog id that will be used by closeCustomDialog. * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -1299,15 +1346,14 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ openCustomDialog(options: promptAction.CustomDialogOptions): Promise<number>; /** * Present the custom dialog with controller. * - * isModal = true and showInSubWindow = true cannot be used at the same time. - * * @param { CustomBuilder | CustomBuilderWithId } builder - Dialog builder. * @param { promptAction.DialogController } controller - Dialog controller. * @param { promptAction.DialogOptions } options - Options. @@ -1320,7 +1366,8 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ presentCustomDialog(builder: CustomBuilder | CustomBuilderWithId, controller?: promptAction.DialogController, options?: promptAction.DialogOptions): Promise<number>; @@ -1337,7 +1384,8 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ closeCustomDialog(dialogId: number): void; @@ -1348,9 +1396,10 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ - getTopOrder(): LevelOrder; + getTopOrder(): LevelOrder /** * Get order value of bottom dialog. @@ -1359,9 +1408,10 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ - getBottomOrder(): LevelOrder; + getBottomOrder(): LevelOrder /** * Open popup with frameNode. @@ -1374,14 +1424,15 @@ export class PromptAction { * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. * <br> 3. Parameter verification failed. - * @throws { BusinessError } 103301 - The ComponentContent is incorrect. - * @throws { BusinessError } 103302 - The ComponentContent already exists. - * @throws { BusinessError } 103304 - The targetId does not exist. - * @throws { BusinessError } 103305 - The node of targetId is not in the component tree. + * @throws { BusinessError } 103301 - The content is incorrect. + * @throws { BusinessError } 103302 - The content already exists. + * @throws { BusinessError } 103304 - The target does not exist. + * @throws { BusinessError } 103305 - The target node is not in the component tree. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ openPopup<T extends Object>(content: ComponentContent<T>, target: TargetInfo, options?: PopupCommonOptions): Promise<void>; @@ -1398,12 +1449,13 @@ export class PromptAction { * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. * <br> 3. Parameter verification failed. - * @throws { BusinessError } 103301 - The ComponentContent is incorrect. - * @throws { BusinessError } 103303 - The ComponentContent cannot be found. + * @throws { BusinessError } 103301 - the ComponentContent is incorrect. + * @throws { BusinessError } 103303 - the ComponentContent cannot be found. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ updatePopup<T extends Object>(content: ComponentContent<T>, options: PopupCommonOptions, partialUpdate?: boolean): Promise<void>; @@ -1416,12 +1468,13 @@ export class PromptAction { * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. * <br> 3. Parameter verification failed. - * @throws { BusinessError } 103301 - The ComponentContent is incorrect. - * @throws { BusinessError } 103303 - The ComponentContent cannot be found. + * @throws { BusinessError } 103301 - the ComponentContent is incorrect. + * @throws { BusinessError } 103303 - the ComponentContent cannot be found. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ closePopup<T extends Object>(content: ComponentContent<T>): Promise<void>; @@ -1436,14 +1489,15 @@ export class PromptAction { * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. * <br> 3. Parameter verification failed. - * @throws { BusinessError } 103301 - The ComponentContent is incorrect. - * @throws { BusinessError } 103302 - The ComponentContent already exists. - * @throws { BusinessError } 103304 - The targetId does not exist. - * @throws { BusinessError } 103305 - The node of targetId is not in the component tree. + * @throws { BusinessError } 103301 - The content is incorrect. + * @throws { BusinessError } 103302 - The content already exists. + * @throws { BusinessError } 103304 - The target does not exist. + * @throws { BusinessError } 103305 - The target node is not in the component tree. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ openMenu<T extends Object>(content: ComponentContent<T>, target: TargetInfo, options?: MenuOptions): Promise<void>; @@ -1460,12 +1514,13 @@ export class PromptAction { * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. * <br> 3. Parameter verification failed. - * @throws { BusinessError } 103301 - The ComponentContent is incorrect. - * @throws { BusinessError } 103303 - The ComponentContent cannot be found. + * @throws { BusinessError } 103301 - the ComponentContent is incorrect. + * @throws { BusinessError } 103303 - the ComponentContent cannot be found. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ updateMenu<T extends Object>(content: ComponentContent<T>, options: MenuOptions, partialUpdate?: boolean): Promise<void>; @@ -1478,15 +1533,15 @@ export class PromptAction { * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. * <br> 3. Parameter verification failed. - * @throws { BusinessError } 103301 - The ComponentContent is incorrect. - * @throws { BusinessError } 103303 - The ComponentContent cannot be found. + * @throws { BusinessError } 103301 - the ComponentContent is incorrect. + * @throws { BusinessError } 103303 - the ComponentContent cannot be found. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ - closeMenu<T extends Object>(content: ComponentContent<T>): Promise<void>; -} + closeMenu<T extends Object>(content: ComponentContent<T>): Promise<void>;} /** * Defines the callback type used in UIObserver watch click event. @@ -1499,9 +1554,10 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ -declare type ClickEventListenerCallback = (event: ClickEvent, node?: FrameNode) => void; +type ClickEventListenerCallback = (event: ClickEvent, node?: FrameNode) => void; /** * Defines the callback type used in UIObserver watch pan event. @@ -1515,9 +1571,10 @@ declare type ClickEventListenerCallback = (event: ClickEvent, node?: FrameNode) * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ -declare type PanListenerCallback = (event: GestureEvent, current: GestureRecognizer, node?: FrameNode) => void; +type PanListenerCallback = (event: GestureEvent, current: GestureRecognizer, node?: FrameNode) => void; /** * Defines the callback type used in UIObserver watch gesture. @@ -1584,7 +1641,8 @@ export declare type GestureListenerCallback = (info: GestureTriggerInfo) => void * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export interface PageInfo { /** @@ -1593,7 +1651,8 @@ export interface PageInfo { * @type { ?observer.RouterPageInfo } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ routerPageInfo?: observer.RouterPageInfo; @@ -1603,7 +1662,8 @@ export interface PageInfo { * @type { ?observer.NavDestinationInfo } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ navDestinationInfo?: observer.NavDestinationInfo; } @@ -1615,7 +1675,8 @@ export interface PageInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts { '1.1':'15','1.2':'20' } + * @arkts 1.1&1.2 */ export interface OverlayManagerOptions { /** @@ -1626,11 +1687,12 @@ export interface OverlayManagerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts { '1.1':'15','1.2':'20' } + * @arkts 1.1&1.2 */ renderRootOverlay?: boolean; - /** +/** * Set whether support backPressed event or not. * * @type { ?boolean } @@ -1648,14 +1710,13 @@ export interface OverlayManagerOptions { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ enableBackPressedEvent?: boolean; } /** * Register callbacks to observe ArkUI behavior. - * In the following API examples, you must first use getUIObserver() in UIContext to obtain a UIObserver instance, and - * then call the APIs using the obtained instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -1663,37 +1724,38 @@ export interface OverlayManagerOptions { */ /** * Register callbacks to observe ArkUI behavior. - * In the following API examples, you must first use getUIObserver() in UIContext to obtain a UIObserver instance, and - * then call the APIs using the obtained instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ -export class UIObserver { +/** + * Register callbacks to observe ArkUI behavior. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +export declare class UIObserver { /** - * Subscribes to status changes of this **NavDestination** component. + * Registers a callback function to be called when the navigation destination is updated. * - * @param { 'navDestinationUpdate' } type - Event type. - * The value is fixed at **'navDestinationUpdate'**, which indicates the state change event - * <br>of the **NavDestination** component. - * @param { object } options - ID of the target **NavDestination** component. - * @param { Callback<observer.NavDestinationInfo> } callback - Callback used to return the current - * <br>state of the **NavDestination** component. + * @param { 'navDestinationUpdate' } type - The type of event to listen for. Must be 'navDestinationUpdate'. + * @param { object } options - Specify the id of observed navigation. + * @param { Callback<observer.NavDestinationInfo> } callback - The callback function to be called when the navigation destination is updated. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** - * Subscribes to status changes of this **NavDestination** component. + * Registers a callback function to be called when the navigation destination is updated. * - * @param { 'navDestinationUpdate' } type - Event type. - * The value is fixed at **'navDestinationUpdate'**, which indicates the state change event - * <br>of the **NavDestination** component. - * @param { object } options - ID of the target **NavDestination** component. - * @param { Callback<observer.NavDestinationInfo> } callback - Callback used to return the current - * <br>state of the **NavDestination** component. + * @param { 'navDestinationUpdate' } type - The type of event to listen for. Must be 'navDestinationUpdate'. + * @param { object } options - The options object. + * @param { Callback<observer.NavDestinationInfo> } callback - The callback function to be called when the navigation destination is updated. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -1701,6 +1763,24 @@ export class UIObserver { */ on(type: 'navDestinationUpdate', options: { navigationId: ResourceStr }, callback: Callback<observer.NavDestinationInfo>): void; + /** + * Registers a callback function to be called when the navigation destination is updated. + * + * @param { 'navDestinationUpdate' } type - The type of event to listen for. Must be 'navDestinationUpdate'. + * @param { observer.NavDestinationSwitchObserverOptions } options - The options object. + * @param { Callback<observer.NavDestinationInfo> } callback - The callback function to be called when the navigation destination is updated. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + on( + type: 'navDestinationUpdate', + options: observer.NavDestinationSwitchObserverOptions, + callback: Callback<observer.NavDestinationInfo> + ): void; + /** * Removes a callback function that was previously registered with `on()`. * @@ -1727,29 +1807,43 @@ export class UIObserver { off(type: 'navDestinationUpdate', options: { navigationId: ResourceStr }, callback?: Callback<observer.NavDestinationInfo>): void; /** - * Subscribes to status changes of this **NavDestination** component. + * Removes a callback function that was previously registered with `on()`. * - * @param { 'navDestinationUpdate' } type - Event type. - * The value is fixed at **'navDestinationUpdate'**, which indicates the state change event of - * <br>the **NavDestination** component. - * @param { Callback<observer.NavDestinationInfo> } callback - Callback used to return the current state of - * <brthe **NavDestination** component. + * @param { 'navDestinationUpdate' } type - The type of event to remove the listener for. Must be 'navDestinationUpdate'. + * @param { observer.NavDestinationSwitchObserverOptions } options - The options object. + * @param { Callback<observer.NavDestinationInfo> } callback - The callback function to remove. If not provided, all callbacks for the given event type and + * navigation ID will be removed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + off( + type: 'navDestinationUpdate', + options: observer.NavDestinationSwitchObserverOptions, + callback?: Callback<observer.NavDestinationInfo> + ): void; + + /** + * Registers a callback function to be called when the navigation destination is updated. + * + * @param { 'navDestinationUpdate' } type - The type of event to listen for. Must be 'navDestinationUpdate'. + * @param { Callback<observer.NavDestinationInfo> } callback - The callback function to be called when the navigation destination is updated. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** - * Subscribes to status changes of this **NavDestination** component. + * Registers a callback function to be called when the navigation destination is updated. * - * @param { 'navDestinationUpdate' } type - Event type. - * The value is fixed at **'navDestinationUpdate'**, - * <br>which indicates the state change event of the **NavDestination** component. - * @param { Callback<observer.NavDestinationInfo> } callback - Callback used to return the current state of - * <br>the **NavDestination** component. + * @param { 'navDestinationUpdate' } type - The type of event to listen for. Must be 'navDestinationUpdate'. + * @param { Callback<observer.NavDestinationInfo> } callback - The callback function to be called when the navigation destination is updated. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'navDestinationUpdate', callback: Callback<observer.NavDestinationInfo>): void; @@ -1772,7 +1866,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'navDestinationUpdate', callback?: Callback<observer.NavDestinationInfo>): void; @@ -1812,7 +1907,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'scrollEvent', options: observer.ObserverOptions, callback: Callback<observer.ScrollEventInfo>): void; @@ -1826,7 +1922,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'scrollEvent', options: observer.ObserverOptions, callback?: Callback<observer.ScrollEventInfo>): void; @@ -1838,7 +1935,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'scrollEvent', callback: Callback<observer.ScrollEventInfo>): void; @@ -1851,30 +1949,30 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'scrollEvent', callback?: Callback<observer.ScrollEventInfo>): void; /** - * Unsubscribes to state changes of the page in the router. + * Registers a callback function to be called when the router page in a ui context is updated. * - * @param { 'routerPageUpdate' } type - Event type. - * <br>The value is fixed at 'routerPageUpdate', which indicates the state change event of the page in the router. - * @param { Callback<observer.RouterPageInfo> } callback - Callback to be unregistered. + * @param { 'routerPageUpdate' } type - The type of event to listen for. Must be 'routerPageUpdate'. + * @param { Callback<observer.RouterPageInfo> } callback - The callback function to be called when the router page is updated. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** - * Unsubscribes to state changes of the page in the router. + * Registers a callback function to be called when the router page in a ui context is updated. * - * @param { 'routerPageUpdate' } type - Event type. - * <br>The value is fixed at 'routerPageUpdate', which indicates the state change event of the page in the router. - * @param { Callback<observer.RouterPageInfo> } callback - Callback to be unregistered. + * @param { 'routerPageUpdate' } type - The type of event to listen for. Must be 'routerPageUpdate'. + * @param { Callback<observer.RouterPageInfo> } callback - The callback function to be called when the router page is updated. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'routerPageUpdate', callback: Callback<observer.RouterPageInfo>): void; @@ -1897,7 +1995,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'routerPageUpdate', callback?: Callback<observer.RouterPageInfo>): void; @@ -1909,7 +2008,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'densityUpdate', callback: Callback<observer.DensityInfo>): void; @@ -1922,7 +2022,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'densityUpdate', callback?: Callback<observer.DensityInfo>): void; @@ -1934,7 +2035,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'willDraw', callback: Callback<void>): void; @@ -1947,7 +2049,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'willDraw', callback?: Callback<void>): void; @@ -1959,7 +2062,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'didLayout', callback: Callback<void>): void; @@ -1972,7 +2076,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'didLayout', callback?: Callback<void>): void; @@ -1985,7 +2090,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on( type: 'navDestinationSwitch', @@ -2001,7 +2107,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off( type: 'navDestinationSwitch', @@ -2018,7 +2125,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on( type: 'navDestinationSwitch', @@ -2036,7 +2144,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off( type: 'navDestinationSwitch', @@ -2053,7 +2162,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'willClick', callback: ClickEventListenerCallback): void; @@ -2066,7 +2176,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'willClick', callback?: ClickEventListenerCallback): void; @@ -2079,7 +2190,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'didClick', callback: ClickEventListenerCallback): void; @@ -2092,7 +2204,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'didClick', callback?: ClickEventListenerCallback): void; @@ -2105,7 +2218,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'willClick', callback: GestureEventListenerCallback): void; @@ -2118,7 +2232,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'willClick', callback?: GestureEventListenerCallback): void; @@ -2131,7 +2246,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'didClick', callback: GestureEventListenerCallback): void; @@ -2144,7 +2260,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'didClick', callback?: GestureEventListenerCallback): void; @@ -2157,7 +2274,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'beforePanStart', callback: PanListenerCallback): void; @@ -2170,7 +2288,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'beforePanStart', callback?: PanListenerCallback): void; @@ -2183,7 +2302,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'beforePanEnd', callback: PanListenerCallback): void; @@ -2196,7 +2316,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'beforePanEnd', callback?: PanListenerCallback): void; @@ -2209,7 +2330,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'afterPanStart', callback: PanListenerCallback): void; @@ -2222,7 +2344,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'afterPanStart', callback?: PanListenerCallback): void; @@ -2235,7 +2358,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'afterPanEnd', callback: PanListenerCallback): void; @@ -2248,7 +2372,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'afterPanEnd', callback?: PanListenerCallback): void; @@ -2262,7 +2387,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'tabContentUpdate', options: observer.ObserverOptions, callback: Callback<observer.TabContentInfo>): void; @@ -2276,7 +2402,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'tabContentUpdate', options: observer.ObserverOptions, callback?: Callback<observer.TabContentInfo>): void; @@ -2289,7 +2416,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'tabContentUpdate', callback: Callback<observer.TabContentInfo>): void; @@ -2302,7 +2430,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'tabContentUpdate', callback?: Callback<observer.TabContentInfo>): void; @@ -2394,9 +2523,10 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ -export class ComponentUtils { +export declare class ComponentUtils { /** * Provide the ability to obtain the coordinates and size of component drawing areas. * @@ -2414,7 +2544,8 @@ export class ComponentUtils { * @throws { BusinessError } 100001 - UI execution context not found. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ getRectangleById(id: string): componentUtils.ComponentInfo; } @@ -2424,58 +2555,45 @@ export class ComponentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ -export class OverlayManager { +export declare class OverlayManager { /** - * Adds a specified ComponentContent node to the OverlayManager. - * - * @param { ComponentContent } content - Content to add to the new node on the OverlayManager. - * <p><strong>NOTE</strong>: - * <br>By default, the new node is centered on the page and stacked according to its stacking level. - * </p> - * - * @param { number } [ index ] - Stacking level of the new node on the OverlayManager. - * <p><strong>NOTE</strong>: - * <br>If the value is greater than or equal to 0, a larger value indicates a higher stacking level; for those that - * have the same index, the one that is added at a later time has a higher stacking level. If the value is less than - * 0 or is null or undefined, the ComponentContent node is added at the highest level by default. If the same - * ComponentContent node is added multiple times, only the last added one is retained. - * </p> + * Add the ComponentContent to the OverlayManager. * + * @param { ComponentContent } content - The content will be added to the OverlayManager. + * @param { number } [ index ] - The index at which to add the ComponentContent. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ addComponentContent(content: ComponentContent, index?: number): void; /** - * Creates a floating layer node with the specified display order. - * This API allows you to define the stacking order of the nodes when they are created. - * - * @param { ComponentContent } content - Content to add to the new node on the OverlayManager. - * <p><strong>NOTE</strong>: - * <br>By default, the new node is centered on the page and stacked according to its stacking level. - * </p> + * Add the ComponentContent to the OverlayManager with order. * - * @param { LevelOrder } [ levelOrder ] - The display order of the ComponentContDisplay order of the new floating - * layer node, default is LevelOrder.clamp(0) + * @param { ComponentContent } content - The content will be added to the OverlayManager. + * @param { LevelOrder } [ levelOrder ] - The display order of the ComponentContent. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ addComponentContentWithOrder(content: ComponentContent, levelOrder?: LevelOrder): void; /** - * Removes a specified ComponentContent node from the OverlayManager + * Remove the ComponentContent from the OverlayManager. * - * @param { ComponentContent } content - Content to remove from the OverlayManager. + * @param { ComponentContent } content - The content will be removed from the OverlayManager. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ removeComponentContent(content: ComponentContent): void; @@ -2486,7 +2604,8 @@ export class OverlayManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ showComponentContent(content: ComponentContent): void; @@ -2497,7 +2616,8 @@ export class OverlayManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ hideComponentContent(content: ComponentContent): void; @@ -2507,7 +2627,8 @@ export class OverlayManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ showAllComponentContents(): void; @@ -2517,7 +2638,8 @@ export class OverlayManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ hideAllComponentContents(): void; } @@ -2535,7 +2657,8 @@ export class OverlayManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export interface AtomicServiceBar { /** @@ -2544,7 +2667,8 @@ export interface AtomicServiceBar { * @param { boolean } visible - whether this bar is visible. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ setVisible(visible: boolean): void; @@ -2561,7 +2685,8 @@ export interface AtomicServiceBar { * @param { Nullable< Color | number | string> } color - the color to set, undefined indicates using default. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ setBackgroundColor(color: Nullable< Color | number | string>): void; @@ -2578,7 +2703,8 @@ export interface AtomicServiceBar { * @param { string } content - the content of the bar. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ setTitleContent(content: string): void; @@ -2595,7 +2721,8 @@ export interface AtomicServiceBar { * @param { FontStyle } font - the font style of the bar's title. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ setTitleFontStyle(font: FontStyle): void; @@ -2612,7 +2739,8 @@ export interface AtomicServiceBar { * @param { Nullable< Color | number | string> } color - the color to set to icon, undefined indicates using default. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ setIconColor(color: Nullable< Color | number | string>): void; @@ -2623,7 +2751,8 @@ export interface AtomicServiceBar { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts { '1.1':'15','1.2':'20' } + * @arkts 1.1&1.2 */ getBarRect(): Frame; } @@ -2709,16 +2838,18 @@ export interface GestureObserverConfigs { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ -export class DynamicSyncScene { +export declare class DynamicSyncScene { /** * Sets the FrameRateRange of the DynamicSyncScene. * * @param { ExpectedFrameRateRange } range - The range of frameRate. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ setFrameRateRange(range: ExpectedFrameRateRange): void; @@ -2728,7 +2859,8 @@ export class DynamicSyncScene { * @returns { ExpectedFrameRateRange } The range of frameRate. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getFrameRateRange(): ExpectedFrameRateRange; } @@ -2739,16 +2871,18 @@ export class DynamicSyncScene { * @extends DynamicSyncScene * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ -export class SwiperDynamicSyncScene extends DynamicSyncScene { +export declare class SwiperDynamicSyncScene extends DynamicSyncScene { /** * Type of the SwiperDynamicSyncSceneType. * @type { SwiperDynamicSyncSceneType } * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ readonly type: SwiperDynamicSyncSceneType; } @@ -2759,16 +2893,18 @@ export class SwiperDynamicSyncScene extends DynamicSyncScene { * @extends DynamicSyncScene * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 14 + * @since arkts { '1.1':'14','1.2':'20' } + * @arkts 1.1&1.2 */ -export class MarqueeDynamicSyncScene extends DynamicSyncScene { +export declare class MarqueeDynamicSyncScene extends DynamicSyncScene { /** * Type of the MarqueeDynamicSyncSceneType. * @type { MarqueeDynamicSyncSceneType } * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 14 + * @since arkts { '1.1':'14','1.2':'20' } + * @arkts 1.1&1.2 */ readonly type: MarqueeDynamicSyncSceneType; } @@ -2789,9 +2925,10 @@ export class MarqueeDynamicSyncScene extends DynamicSyncScene { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ -export class DragController { +export declare class DragController { /** * Execute a drag event. * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. @@ -2835,7 +2972,8 @@ export class DragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: dragController.DragInfo, callback: AsyncCallback<dragController.DragEventParam>): void; @@ -2880,7 +3018,8 @@ export class DragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: dragController.DragInfo) : Promise<dragController.DragEventParam>; @@ -2925,7 +3064,8 @@ export class DragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ createDragAction(customArray: Array<CustomBuilder | DragItemInfo>, dragInfo: dragController.DragInfo): dragController.DragAction; @@ -2948,7 +3088,8 @@ export class DragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ getDragPreview(): dragController.DragPreview; @@ -2964,7 +3105,8 @@ export class DragController { * @param { boolean } enable - Indicating enable drag event strict reporting or not. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ setDragEventStrictReportingEnabled(enable: boolean): void; @@ -2973,7 +3115,8 @@ export class DragController { * @param { dragController.DragStartRequestStatus } requestStatus - Status about the drag start behavior. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ notifyDragStartRequest(requestStatus: dragController.DragStartRequestStatus): void; @@ -2985,7 +3128,8 @@ export class DragController { * @throws { BusinessError } 190004 - Operation failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts { '1.1':'15','1.2':'20' } + * @arkts 1.1&1.2 */ cancelDataLoading(key: string): void; @@ -3014,27 +3158,23 @@ export class DragController { /** * class MeasureUtils - * - * <p><strong>NOTE</strong>: - * <br>You must first use getMeasureUtils() in UIContext to obtain a MeasureUtils instance, - * and then call the APIs using the obtained instance. - * </p> - * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ -export class MeasureUtils { +export declare class MeasureUtils { /** * Obtains the width of the specified text in a single line layout. * * @param { MeasureOptions } options - Options. - * @returns { number } - The unit is px. + * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ measureText(options: MeasureOptions): number; @@ -3042,11 +3182,12 @@ export class MeasureUtils { * Obtains the width and height of the specified text in a single line layout. * * @param { MeasureOptions } options - Options of measure area occupied by text. - * @returns { SizeOptions } width and height for text to display.The return values for text width and height are both in px. + * @returns { SizeOptions } width and height for text to display * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ measureTextSize(options: MeasureOptions): SizeOptions; @@ -3066,14 +3207,16 @@ export class MeasureUtils { * class FocusController * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ - export class FocusController { +export declare class FocusController { /** * clear focus to the root container. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ clearFocus(): void; @@ -3085,7 +3228,8 @@ export class MeasureUtils { * @throws { BusinessError } 150003 - the component is not on tree or does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ requestFocus(key: string): void; @@ -3096,7 +3240,8 @@ export class MeasureUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts { '1.1':'14','1.2':'20' } + * @arkts 1.1&1.2 */ activate(isActive: boolean, autoInactive?: boolean): void; @@ -3116,7 +3261,8 @@ export class MeasureUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts { '1.1':'14','1.2':'20' } + * @arkts 1.1&1.2 */ setAutoFocusTransfer(isAutoFocusTransfer: boolean): void; @@ -3126,7 +3272,8 @@ export class MeasureUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts { '1.1':'15','1.2':'20' } + * @arkts 1.1&1.2 */ setKeyProcessingMode(mode: KeyProcessingMode): void; } @@ -3137,7 +3284,8 @@ export class MeasureUtils { * @typedef {pointer.PointerStyle} PointerStyle * @syscap SystemCapability.MultimodalInput.Input.Pointer * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export type PointerStyle = pointer.PointerStyle; @@ -3147,16 +3295,18 @@ export type PointerStyle = pointer.PointerStyle; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ -export class CursorController { +export declare class CursorController { /** * Restore default cursor. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ restoreDefault(): void; /** @@ -3166,7 +3316,8 @@ export class CursorController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ setCursor(value: PointerStyle): void; } @@ -3177,16 +3328,18 @@ export class CursorController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ -export class ContextMenuController { +export declare class ContextMenuController { /** * Close context menu. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ close(): void; } @@ -3199,28 +3352,37 @@ export class ContextMenuController { * @atomicservice * @since 12 */ -export abstract class FrameCallback { +/** + * Class FrameCallback + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +export declare abstract class FrameCallback { /** * Call when a new display frame is being rendered. * * @param { number } frameTimeInNano - The frame time in nanoseconds. - * Value range: [0, +∞) * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ onFrame(frameTimeInNano: number): void; /** * Called at the end of the next idle frame. If there is no next frame, will request one automatically. * - * @param { number } timeLeftInNano - The remaining time from the deadline for this frame, in nanoseconds. - * Value range: [0, +∞) + * @param { number } timeLeftInNano - The remaining time from the deadline for this frame. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ onIdle(timeLeftInNano: number): void; } @@ -3234,7 +3396,8 @@ export abstract class FrameCallback { * @StageModelOnly * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export type Context = common.Context; @@ -3242,9 +3405,10 @@ export type Context = common.Context; * class ComponentSnapshot * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ -export class ComponentSnapshot { +export declare class ComponentSnapshot { /** * Get a component snapshot by component id. * @@ -3259,7 +3423,8 @@ export class ComponentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ get(id: string, callback: AsyncCallback<image.PixelMap>, options?: componentSnapshot.SnapshotOptions): void; @@ -3277,7 +3442,8 @@ export class ComponentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ get(id: string, options?: componentSnapshot.SnapshotOptions): Promise<image.PixelMap>; @@ -3322,7 +3488,8 @@ export class ComponentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ createFromBuilder(builder: CustomBuilder, delay?: number, checkImageStatus?: boolean, options?: componentSnapshot.SnapshotOptions): Promise<image.PixelMap>; @@ -3344,7 +3511,8 @@ export class ComponentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getSync(id: string, options?: componentSnapshot.SnapshotOptions): image.PixelMap; @@ -3362,7 +3530,8 @@ export class ComponentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts { '1.1':'15','1.2':'20' } + * @arkts 1.1&1.2 */ getWithUniqueId(uniqueId: number, options?: componentSnapshot.SnapshotOptions): Promise<image.PixelMap>; @@ -3383,7 +3552,8 @@ export class ComponentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts { '1.1':'15','1.2':'20' } + * @arkts 1.1&1.2 */ getSyncWithUniqueId(uniqueId: number, options?: componentSnapshot.SnapshotOptions): image.PixelMap; @@ -3405,7 +3575,8 @@ export class ComponentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ createFromComponent<T extends Object>(content: ComponentContent<T>, delay?: number, checkImageStatus?: boolean, options?: componentSnapshot.SnapshotOptions): Promise<image.PixelMap>; @@ -3446,18 +3617,16 @@ export class ComponentSnapshot { * @atomicservice * @since 11 */ -export class UIContext { - /** - * Checks whether the UiContext object ia available. - * - * @returns { boolean } Returns true if the UIConetxt object is available. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - isAvailable(): boolean; - +/** + * class UIContext + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +export declare class UIContext { /** * get object font. * @@ -3473,7 +3642,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ getFont(): Font; @@ -3492,7 +3662,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ getMediaQuery(): MediaQuery; @@ -3509,7 +3680,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ getUIInspector(): UIInspector; @@ -3524,7 +3696,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getFilteredInspectorTree(filters?: Array<string>): string; @@ -3541,26 +3714,28 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getFilteredInspectorTreeById(id: string, depth: number, filters?: Array<string>): string; /** - * Obtains a Router object. + * get object router. * - * @returns { Router } Router object. + * @returns { Router } object Router. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Obtains a Router object. + * get object router. * - * @returns { Router } Router object. + * @returns { Router } object Router. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ getRouter(): Router; @@ -3573,13 +3748,14 @@ export class UIContext { * @since 10 */ /** - * Obtains a PromptAction object. + * get object PromptAction. * - * @returns { PromptAction } PromptAction object. + * @returns { PromptAction } object PromptAction. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getPromptAction(): PromptAction; @@ -3596,7 +3772,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getComponentUtils(): ComponentUtils; @@ -3615,18 +3792,20 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getUIObserver(): UIObserver; /** - * Obtains the OverlayManager object. + * Get object OverlayManager. * - * @returns { OverlayManager } OverlayManager instance obtained. + * @returns { OverlayManager } object OverlayManager. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getOverlayManager(): OverlayManager; @@ -3638,7 +3817,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts { '1.1':'15','1.2':'20' } + * @arkts 1.1&1.2 */ setOverlayManagerOptions(options: OverlayManagerOptions): boolean; @@ -3649,7 +3829,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts { '1.1':'15','1.2':'20' } + * @arkts 1.1&1.2 */ getOverlayManagerOptions(): OverlayManagerOptions; @@ -3678,7 +3859,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ createAnimator(options: AnimatorOptions): AnimatorResult; @@ -3694,7 +3876,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ createAnimator(options: AnimatorOptions | SimpleAnimatorOptions): AnimatorResult; @@ -3715,7 +3898,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ animateTo(value: AnimateParam, event: () => void): void; @@ -3728,14 +3912,14 @@ export class UIContext { * @since 10 */ /** - * Shows an alert dialog box. + * alertDialog display. * - * @param { AlertDialogParamWithConfirm | AlertDialogParamWithButtons | AlertDialogParamWithOptions } options - Shows - * an AlertDialog component in the given settings. + * @param { AlertDialogParamWithConfirm | AlertDialogParamWithButtons | AlertDialogParamWithOptions } options - Options. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ showAlertDialog(options: AlertDialogParamWithConfirm | AlertDialogParamWithButtons | AlertDialogParamWithOptions): void; @@ -3748,13 +3932,14 @@ export class UIContext { * @since 10 */ /** - * Shows an action sheet in the given settings. + * actionSheet display. * - * @param { ActionSheetOptions } value - Parameters of the action sheet. + * @param { ActionSheetOptions } value - Options. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ showActionSheet(value: ActionSheetOptions): void; @@ -3773,7 +3958,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ showDatePickerDialog(options: DatePickerDialogOptions): void; @@ -3792,7 +3978,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ showTimePickerDialog(options: TimePickerDialogOptions): void; @@ -3811,7 +3998,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ showTextPickerDialog(options: TextPickerDialogOptions): void; @@ -3830,29 +4018,31 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ runScopedTask(callback: () => void): void; /** - * Sets the avoidance mode for the virtual keyboard.<br> - * Default mode: **KeyboardAvoidMode.OFFSET**. + * Set KeyboardAvoidMode. The default mode is KeyboardAvoidMode.OFFSET * * @param { KeyboardAvoidMode } value - The mode of keyboard avoid. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ setKeyboardAvoidMode(value: KeyboardAvoidMode): void; /** - * Obtains the avoidance mode of the virtual keyboard. + * Get KeyboardAvoidMode. * @returns { KeyboardAvoidMode } The mode of keyboard avoid. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ getKeyboardAvoidMode(): KeyboardAvoidMode; @@ -3863,7 +4053,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ setPixelRoundMode(mode: PixelRoundMode): void; @@ -3874,7 +4065,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ getPixelRoundMode(): PixelRoundMode; @@ -3886,7 +4078,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts { '1.1':'15','1.2':'20' } + * @arkts 1.1&1.2 */ dispatchKeyEvent(node: number | string, event: KeyEvent): boolean; @@ -3896,7 +4089,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ getAtomicServiceBar(): Nullable<AtomicServiceBar>; @@ -3919,7 +4113,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ getDragController(): DragController; @@ -3929,28 +4124,30 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getMeasureUtils(): MeasureUtils; /** - * Generates a key frame animation. + * Defining keyframe animation function. * - * @param { KeyframeAnimateParam } param - Global parameters of the keyframe animation. - * @param { Array<KeyframeState> } keyframes - Array of keyframes. + * @param { KeyframeAnimateParam } param - overall animation parameters + * @param { Array<KeyframeState> } keyframes - all keyframe states * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** - * Generates a key frame animation. + * Defining keyframe animation function. * - * @param { KeyframeAnimateParam } param - Global parameters of the keyframe animation. - * @param { Array<KeyframeState> } keyframes - Array of keyframes. + * @param { KeyframeAnimateParam } param - overall animation parameters + * @param { Array<KeyframeState> } keyframes - all keyframe states * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ keyframeAnimateTo(param: KeyframeAnimateParam, keyframes: Array<KeyframeState>): void; @@ -3959,7 +4156,8 @@ export class UIContext { * @returns { FocusController } the FocusController * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getFocusController(): FocusController; @@ -3971,7 +4169,8 @@ export class UIContext { * and the system will automatically insert transition animations for state changes caused by the closure function. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ animateToImmediately(param: AnimateParam, event: Callback<void>): void; @@ -3983,7 +4182,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getFrameNodeById(id: string): FrameNode | null; @@ -3995,26 +4195,21 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getAttachedFrameNodeById(id: string): FrameNode | null; /** * Get FrameNode by uniqueId. - * Obtains the entity node, FrameNode, of a component on the component tree using its uniqueId. - * The return value depends on the type of component associated with the uniqueId. - * 1. If the uniqueId corresponds to a built-in component, the associated FrameNode is returned. - * 2. If the uniqueId corresponds to a custom component: If the component has rendered content, its root node is - * returned, with the type __Common__; if the component has no rendered content, the FrameNode of its first child - * component is returned. - * 3. If the uniqueId does not correspond to any component, null is returned. * * @param { number } id - The uniqueId of the FrameNode. * @returns { FrameNode | null } - The FrameNode with the target uniqueId, or null if the frameNode is not existed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getFrameNodeByUniqueId(id: number): FrameNode | null; @@ -4028,7 +4223,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getPageInfoByUniqueId(id: number): PageInfo; @@ -4041,7 +4237,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getNavigationInfoByUniqueId(id: number): observer.NavigationInfo | undefined; @@ -4053,7 +4250,8 @@ export class UIContext { * set values less than 0 to 0 and values greater than 1 to 1. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ setDynamicDimming(id: string, value: number): void; @@ -4064,7 +4262,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getCursorController(): CursorController; @@ -4075,7 +4274,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getContextMenuController(): ContextMenuController; @@ -4084,7 +4284,8 @@ export class UIContext { * @returns { ComponentSnapshot } the ComponentSnapshot * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getComponentSnapshot(): ComponentSnapshot; @@ -4094,7 +4295,8 @@ export class UIContext { * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ vp2px(value: number): number; @@ -4104,7 +4306,8 @@ export class UIContext { * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ px2vp(value: number): number; @@ -4114,7 +4317,8 @@ export class UIContext { * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ fp2px(value: number): number; @@ -4124,7 +4328,8 @@ export class UIContext { * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ px2fp(value: number): number; @@ -4134,7 +4339,8 @@ export class UIContext { * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ lpx2px(value: number): number; @@ -4144,19 +4350,21 @@ export class UIContext { * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ px2lpx(value: number): number; /** - * Obtains the LocalStorage instance shared by this stage. + * Get current LocalStorage shared from stage. * * @returns { LocalStorage | undefined } * @syscap SystemCapability.ArkUI.ArkUI.Full * @stagemodelonly * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getSharedLocalStorage(): LocalStorage | undefined; @@ -4168,7 +4376,8 @@ export class UIContext { * @stagemodelonly * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getHostContext(): Context | undefined; @@ -4179,7 +4388,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getWindowName(): string | undefined; @@ -4189,7 +4399,8 @@ export class UIContext { * @returns { WidthBreakpoint } The width breakpoint of current window. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 13 + * @since arkts { '1.1':'13','1.2':'20' } + * @arkts 1.1&1.2 */ getWindowWidthBreakpoint(): WidthBreakpoint; @@ -4199,25 +4410,18 @@ export class UIContext { * @returns { HeightBreakpoint } The height breakpoint of current window. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 13 + * @since arkts { '1.1':'13','1.2':'20' } + * @arkts 1.1&1.2 */ getWindowHeightBreakpoint(): HeightBreakpoint; /** - * Creates a sheet whose content is as defined in bindSheetContent and displays the sheet. - * This API uses a promise to return the result. - * - * @param { ComponentContent<T> } bindSheetContent - Content to display on the sheet. - * @param { SheetOptions } sheetOptions - Style of the sheet. - * <p>**NOTE**: - * <br>1. SheetOptions.uiContext cannot be set. Its value is fixed to the UIContext object of the current instance. - * <br>2.If targetId is not passed in, SheetOptions.preferType cannot be set to POPUP; if POPUP is set, it will be - * replaced with CENTER. - * <br>3. If targetId is not passed in, SheetOptions.mode cannot be set to EMBEDDED; the default mode is OVERLAY. - * <br>4. For the default values of other attributes, @see SheetOptions. - * </p> - * @param { number } targetId - ID of the component to be bound. If this parameter is not set, no component is bound. - * @returns { Promise<void> } Promise used to return the result. + * Open the BindSheet. + * + * @param { ComponentContent<T> } bindSheetContent - The content of BindSheet. + * @param { SheetOptions } sheetOptions - The options of sheet. + * @param { number } targetId - The uniqueId of the FrameNode to which BindSheet is attached. + * @returns { Promise<void> } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. @@ -4230,7 +4434,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ openBindSheet<T extends Object>(bindSheetContent: ComponentContent<T>, sheetOptions?: SheetOptions, targetId?: number): Promise<void>; @@ -4252,18 +4457,16 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ updateBindSheet<T extends Object>(bindSheetContent: ComponentContent<T>, sheetOptions: SheetOptions, partialUpdate?: boolean): Promise<void>; /** - * Closes the sheet corresponding to bindSheetContent. This API uses a promise to return the result. - * <p>**NOTE**: - * <br>Closing a sheet using this API will not invoke the shouldDismiss callback. - * </p> - * - * @param { ComponentContent<T> } bindSheetContent - Content to display on the sheet. - * @returns { Promise<void> } Promise used to return the result. + * Close the BindSheet. + * + * @param { ComponentContent<T> } bindSheetContent - The content of BindSheet. + * @returns { Promise<void> } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. * <br> 2. Incorrect parameters types. @@ -4273,7 +4476,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ closeBindSheet<T extends Object>(bindSheetContent: ComponentContent<T>): Promise<void>; @@ -4283,7 +4487,8 @@ export class UIContext { * @param { FrameCallback } frameCallback - The frame callback to run on the next frame. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ postFrameCallback(frameCallback: FrameCallback): void; @@ -4294,7 +4499,8 @@ export class UIContext { * @param { number } delayTime - The delay time in milliseconds, * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ postDelayedFrameCallback(frameCallback: FrameCallback, delayTime: number): void; @@ -4305,7 +4511,8 @@ export class UIContext { * @returns { Array<DynamicSyncScene>} The instance of SwiperDynamicSyncScene. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ requireDynamicSyncScene(id: string): Array<DynamicSyncScene>; @@ -4326,7 +4533,8 @@ export class UIContext { * @throws { BusinessError } 202 - The caller is not a system application. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 13 + * @since arkts { '1.1':'13','1.2':'20' } + * @arkts 1.1&1.2 */ clearResourceCache(): void; @@ -4337,7 +4545,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts { '1.1':'13','1.2':'20' } + * @arkts 1.1&1.2 */ isFollowingSystemFontScale(): boolean; @@ -4348,7 +4557,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts { '1.1':'13','1.2':'20' } + * @arkts 1.1&1.2 */ getMaxFontScale(): number; @@ -4360,7 +4570,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts { '1.1':'13','1.2':'20' } + * @arkts 1.1&1.2 */ bindTabsToScrollable(tabsController: TabsController, scroller: Scroller): void; @@ -4372,7 +4583,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts { '1.1':'13','1.2':'20' } + * @arkts 1.1&1.2 */ unbindTabsFromScrollable(tabsController: TabsController, scroller: Scroller): void; @@ -4385,7 +4597,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts { '1.1':'13','1.2':'20' } + * @arkts 1.1&1.2 */ bindTabsToNestedScrollable(tabsController: TabsController, parentScroller: Scroller, childScroller: Scroller): void; @@ -4398,7 +4611,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts { '1.1':'13','1.2':'20' } + * @arkts 1.1&1.2 */ unbindTabsFromNestedScrollable(tabsController: TabsController, parentScroller: Scroller, childScroller: Scroller): void; @@ -4408,7 +4622,8 @@ export class UIContext { * @param { Optional<boolean> } enabled - enable or disable swipe to back event. * @syscap SystemCapability.ArkUI.ArkUI.Circle * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ enableSwipeBack(enabled: Optional<boolean>): void; @@ -4420,7 +4635,8 @@ export class UIContext { * @throws { BusinessError } 202 - The caller is not a system application. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ freezeUINode(id: string, isFrozen: boolean): void; @@ -4432,7 +4648,8 @@ export class UIContext { * @throws { BusinessError } 202 - The caller is not a system application. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ freezeUINode(uniqueId: number, isFrozen: boolean): void; @@ -4443,7 +4660,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 16 + * @since arkts { '1.1':'16','1.2':'20' } + * @arkts 1.1&1.2 */ getTextMenuController(): TextMenuController; @@ -4461,27 +4679,27 @@ export class UIContext { /** * Create a UI instance singleton without window and get its UIContext object. - * + * * @param { common.UIAbilityContext | common.ExtensionContext } context - UIAbilityContext or ExtensionContext. * @returns { UIContext | undefined } object UIContext, or undefined when failed. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. The number of parameters is incorrect. * <br> 2. Invalid parameter type of context. * @throws { BusinessError } 100001 - Internal error. - * @static * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ static createUIContextWithoutWindow(context: common.UIAbilityContext | common.ExtensionContext) : UIContext | undefined; /** * Destroy the UI instance singleton without window. * - * @static * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ static destroyUIContextWithoutWindow(): void; } @@ -4493,52 +4711,58 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ export const enum KeyboardAvoidMode { /** - * Offset Type, the layout moves up. + * Default Type, offset the whole page when keyBoard height changed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ OFFSET = 0, /** - * Resize Type, the layout is resized. + * Resize Type, resize the page when keyBoard height changed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ RESIZE = 1, /** - * Offset Type, the layout moves up, and this adjustment also occurs if the caret position in the text box changes. + * Offset Type, offset the whole page when caret position or keyboard height changed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts { '1.1':'14','1.2':'20' } + * @arkts 1.1&1.2 */ OFFSET_WITH_CARET = 2, /** - * Resize Type, the layout moves up, and this adjustment also occurs if the caret position in the text box changes. + * Resize Type, resize the whole page when when caret position or keyboard height changed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts { '1.1':'14','1.2':'20' } + * @arkts 1.1&1.2 */ RESIZE_WITH_CARET = 3, /** - * None Type, the layout is not adjusted to avoid the keyboard. + * None Type, nothing to do when keyboard height changed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts { '1.1':'14','1.2':'20' } + * @arkts 1.1&1.2 */ NONE = 4, } @@ -4549,7 +4773,8 @@ export const enum KeyboardAvoidMode { * @enum { number } SwiperDynamicSyncSceneType * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export const enum SwiperDynamicSyncSceneType { /** @@ -4557,7 +4782,8 @@ export const enum SwiperDynamicSyncSceneType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ GESTURE = 0, @@ -4566,7 +4792,8 @@ export const enum SwiperDynamicSyncSceneType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ ANIMATION = 1 } @@ -4577,7 +4804,8 @@ export const enum SwiperDynamicSyncSceneType { * @enum { number } MarqueeDynamicSyncSceneType * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 14 + * @since arkts { '1.1':'14','1.2':'20' } + * @arkts 1.1&1.2 */ export const enum MarqueeDynamicSyncSceneType { /** @@ -4585,7 +4813,8 @@ export const enum MarqueeDynamicSyncSceneType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 14 + * @since arkts { '1.1':'14','1.2':'20' } + * @arkts 1.1&1.2 */ ANIMATION = 1 } @@ -4596,17 +4825,18 @@ export const enum MarqueeDynamicSyncSceneType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 16 + * @since arkts { '1.1':'16','1.2':'20' } + * @arkts 1.1&1.2 */ -export class TextMenuController { +export declare class TextMenuController { /** * Set text menu options. * - * @param { TextMenuOptions } options - the options of the text menu. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 16 + * @since arkts { '1.1':'16','1.2':'20' } + * @arkts 1.1&1.2 */ setMenuOptions(options: TextMenuOptions): void; diff --git a/api/@ohos.arkui.advanced.GridObjectSortComponent.d.ets b/api/@ohos.arkui.advanced.GridObjectSortComponent.d.ets index 1818bd2488a5b89857ff28c9b30be2550642a784..0d5a7d2ea674e58d6cceea5b238bd12238752825 100644 --- a/api/@ohos.arkui.advanced.GridObjectSortComponent.d.ets +++ b/api/@ohos.arkui.advanced.GridObjectSortComponent.d.ets @@ -18,14 +18,21 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource, ResourceStr, ResourceColor, LocalizedMargin } from './arkui/component/units'; +import { Prop } from './arkui/stateManagement/common'; +import { Component } from './arkui/component/customComponent'; +/*** endif */ + /** * Controls the style types of GridObjectSortComponent. * @enum { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - /** +/** * Controls the style types of GridObjectSortComponent. * @enum { string } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -38,9 +45,10 @@ export declare enum GridObjectSortComponentType { * The GridObjectSortComponent image text type. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - /** + /** * The GridObjectSortComponent image text type. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -53,9 +61,10 @@ export declare enum GridObjectSortComponentType { * The GridObjectSortComponent text type. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - /** + /** * The GridObjectSortComponent text type. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -70,9 +79,10 @@ export declare enum GridObjectSortComponentType { * @interface GridObjectSortComponentIteml * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - /** +/** * Declaration of the GridObjectSortComponent item. * @interface GridObjectSortComponentIteml * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -86,9 +96,10 @@ export interface GridObjectSortComponentItem { * @type { number | string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - /** + /** * id of GridObjectSortComponent item. * @type { number | string } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -103,9 +114,10 @@ export interface GridObjectSortComponentItem { * @type { ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - /** + /** * GridObjectSortComponent item text. * @type { ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -120,9 +132,10 @@ export interface GridObjectSortComponentItem { * @type { boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - /** + /** * selected of GridObjectSortComponent item, true is show area, false is add area. * @type { boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -137,9 +150,10 @@ export interface GridObjectSortComponentItem { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - /** + /** * order of GridObjectSortComponentItem, Used for sorting dataList. * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -154,9 +168,10 @@ export interface GridObjectSortComponentItem { * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - /** + /** * image resource path of the GridObjectSortComponent item. * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -181,9 +196,10 @@ export interface GridObjectSortComponentItem { * @interface GridEditOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - /** +/** * GridObjectSortComponentOptions of GridObjectSortComponent. * @interface GridEditOptions * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -198,9 +214,10 @@ export interface GridObjectSortComponentOptions { * @default GridObjectSortComponentType.TEXT * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - /** + /** * Configuration GridObjectSortComponent type. * @type { GridObjectSortComponentType } * @default GridObjectSortComponentType.TEXT @@ -216,9 +233,10 @@ export interface GridObjectSortComponentOptions { * @type { ?number | ?Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - /** + /** * The size of the GridObjectSortComponent image. * @type { ?number | ?Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -233,9 +251,10 @@ export interface GridObjectSortComponentOptions { * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - /** + /** * The title displayed in the unedited state of the GridObjectSortComponent. * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -250,9 +269,10 @@ export interface GridObjectSortComponentOptions { * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - /** + /** * The title displayed in the GridObjectSortComponent edit state. * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -267,9 +287,10 @@ export interface GridObjectSortComponentOptions { * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - /** + /** * Display Area Title, First subtitle of the GridObjectSortComponent. * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -284,9 +305,10 @@ export interface GridObjectSortComponentOptions { * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - /** + /** * Add Zone Title, second subtitle of the GridObjectSortComponent. * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -302,9 +324,10 @@ export interface GridObjectSortComponentOptions { * @struct { GridObjectSortComponent } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - /** +/** * Declare struct GridObjectSortComponent. * @struct { GridObjectSortComponent } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -319,9 +342,10 @@ export declare struct GridObjectSortComponent { * @type { GridObjectSortComponentOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - /** + /** * Component types and parameters of the GridObjectSortComponent. * @type { GridObjectSortComponentOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -331,15 +355,15 @@ export declare struct GridObjectSortComponent { */ @Prop options: GridObjectSortComponentOptions; - /** * Data list of GridObjectSortComponent. * @type { Array<GridObjectSortComponentItem> } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - /** + /** * Data list of GridObjectSortComponent. * @type { Array<GridObjectSortComponentItem> } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -348,15 +372,15 @@ export declare struct GridObjectSortComponent { * @since 12 */ dataList: Array<GridObjectSortComponentItem>; - /** * Callback when Obtain edited data. * @type { (select: Array<GridObjectSortComponentItem>, unselect: Array<GridObjectSortComponentItem>) => void } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - /** + /** * Callback when Obtain edited data. * @type { (select: Array<GridObjectSortComponentItem>, unselect: Array<GridObjectSortComponentItem>) => void } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -365,15 +389,15 @@ export declare struct GridObjectSortComponent { * @since 12 */ onSave: (select: Array<GridObjectSortComponentItem>, unselect: Array<GridObjectSortComponentItem>) => void; - /** * Cancel callback for saving data. * @type { () => void } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - /** + /** * Cancel callback for saving data. * @type { () => void } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -387,9 +411,10 @@ export declare struct GridObjectSortComponent { * Build function of GridObjectSortComponent. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - /** + /** * Build function of GridObjectSortComponent. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform diff --git a/api/@ohos.arkui.advanced.SelectionMenu.d.ets b/api/@ohos.arkui.advanced.SelectionMenu.d.ets index 25053bb86d4911e862f55250c412ce1252d135e3..1c58a2456a3eeb321d99acd21967d85bb212fb4c 100644 --- a/api/@ohos.arkui.advanced.SelectionMenu.d.ets +++ b/api/@ohos.arkui.advanced.SelectionMenu.d.ets @@ -69,6 +69,7 @@ export interface EditorMenuOptions { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ symbolStyle?: SymbolGlyphModifier; diff --git a/api/@ohos.arkui.component.d.ets b/api/@ohos.arkui.component.d.ets index 90c190a547e8d64091b20e8c36ae82a17293bcfa..d3a0d127aced09eab4da10acd61a00bfac55503c 100644 --- a/api/@ohos.arkui.component.d.ets +++ b/api/@ohos.arkui.component.d.ets @@ -12,42 +12,143 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + /** * @file * @kit ArkUI * @arkts 1.2 */ + export * from './arkui/UserView'; +export * from './arkui/component/customComponent'; +export * from './arkui/component/common'; +export * from './arkui/component/column'; export * from './arkui/component/text'; +export * from './arkui/component/styledString'; export * from './arkui/component/enums'; export * from './arkui/component/units'; +export * from './arkui/component/actionSheet'; +export * from './arkui/component/alertDialog'; +export * from './arkui/component/alphabetIndexer'; +export * from './arkui/component/animator'; +export * from './arkui/component/badge'; export * from './arkui/component/blank'; +export * from './arkui/component/builder'; export * from './arkui/component/button'; +export * from './arkui/component/calendar'; +export * from './arkui/component/calendarPicker'; +export * from './arkui/component/canvas'; +export * from './arkui/component/checkbox'; +export * from './arkui/component/checkboxgroup'; +export * from './arkui/component/circle'; export * from './arkui/component/column'; -export * from './arkui/component/row'; +export * from './arkui/component/columnSplit'; export * from './arkui/component/common'; +export * from './arkui/component/containerSpan'; +export * from './arkui/component/contentSlot'; +export * from './arkui/component/counter'; export * from './arkui/component/customComponent'; +export * from './arkui/component/customDialogController'; +export * from './arkui/component/dataPanel'; +export * from './arkui/component/datePicker'; +export * from './arkui/component/divider'; +export * from './arkui/component/effectComponent'; +export * from './arkui/component/ellipse'; +export * from './arkui/component/embeddedComponent'; export * from './arkui/component/enums'; +export * from './arkui/component/flex'; +export * from './arkui/component/flowItem'; +export * from './arkui/component/focus'; +export * from './arkui/component/folderStack'; export * from './arkui/component/forEach'; +export * from './arkui/component/formComponent'; +export * from './arkui/component/formLink'; +export * from './arkui/component/gauge'; export * from './arkui/component/gesture'; export * from './arkui/component/grid'; -export * from './arkui/component/griditem'; +export * from './arkui/component/gridCol'; +export * from './arkui/component/gridRow'; +export * from './arkui/component/gridItem'; +export * from './arkui/component/hyperlink'; export * from './arkui/component/image'; +export * from './arkui/component/imageAnimator'; export * from './arkui/component/imageCommon'; +export * from './arkui/component/imageSpan'; +export * from './arkui/component/indicatorcomponent'; +export * from './arkui/component/inspector'; export * from './arkui/component/lazyForEach'; +export * from './arkui/component/line'; +export * from './arkui/component/linearindicator'; export * from './arkui/component/list'; +export * from './arkui/component/listItem'; +export * from './arkui/component/listItemGroup'; +export * from './arkui/component/loadingProgress'; +export * from './arkui/component/marquee'; +export * from './arkui/component/matrix2d'; export * from './arkui/component/mediaCachedImage'; +export * from './arkui/component/menu'; +export * from './arkui/component/menuItem'; +export * from './arkui/component/menuItemGroup'; +export * from './arkui/component/navDestination'; export * from './arkui/component/navigation'; +export * from './arkui/component/nodeContainer'; +export * from './arkui/component/particle'; +export * from './arkui/component/pasteButton'; +export * from './arkui/component/path'; +export * from './arkui/component/patternLock'; +export * from './arkui/component/pluginComponent'; +export * from './arkui/component/polygon'; +export * from './arkui/component/polyline'; export * from './arkui/component/progress'; +export * from './arkui/component/qrcode'; +export * from './arkui/component/radio'; +export * from './arkui/component/rating'; +export * from './arkui/component/rect'; +export * from './arkui/component/refresh'; +export * from './arkui/component/relativeContainer'; +export * from './arkui/component/remoteWindow'; +export * from './arkui/component/repeat'; +export * from './arkui/component/richEditor'; +export * from './arkui/component/richText'; +export * from './arkui/component/rootScene'; +export * from './arkui/component/row'; +export * from './arkui/component/rowSplit'; +export * from './arkui/component/saveButton'; +export * from './arkui/component/screen'; export * from './arkui/component/scroll'; export * from './arkui/component/scrollBar'; +export * from './arkui/component/search'; +export * from './arkui/component/securityComponent'; +export * from './arkui/component/select'; +export * from './arkui/component/shape'; +export * from './arkui/component/sidebar'; +export * from './arkui/component/slider'; +export * from './arkui/component/span'; export * from './arkui/component/stack'; +export * from './arkui/component/stateManagement'; +export * from './arkui/component/stepper'; +export * from './arkui/component/stepperItem'; +export * from './arkui/component/styledString'; +export * from './arkui/component/swiper'; +export * from './arkui/component/symbolSpan'; export * from './arkui/component/symbolglyph'; +export * from './arkui/component/tabContent'; +export * from './arkui/component/tabs'; +export * from './arkui/component/text'; +export * from './arkui/component/textArea'; +export * from './arkui/component/textClock'; +export * from './arkui/component/textCommon'; +export * from './arkui/component/textInput'; +export * from './arkui/component/textPicker'; +export * from './arkui/component/textTimer'; +export * from './arkui/component/timePicker'; +export * from './arkui/component/toggle'; +export * from './arkui/component/uiExtensionComponent'; export * from './arkui/component/units'; -export * from './arkui/component/resources'; -export * from './arkui/component/locationButton'; -export * from './arkui/component/pasteButton'; -export * from './arkui/component/saveButton'; -export * from './arkui/component/securityComponent'; +export * from './arkui/component/video'; +export * from './arkui/component/waterFlow'; export * from './arkui/component/web'; -export * from './arkui/component/textCommon'; \ No newline at end of file +export * from './arkui/component/windowScene'; +export * from './arkui/component/withTheme'; +export * from './arkui/component/xcomponent'; +export * from './arkui/component/resources'; diff --git a/api/@ohos.arkui.componentSnapshot.d.ts b/api/@ohos.arkui.componentSnapshot.d.ts index bbb183f6ddf63287b1a01f0ff4dae8d7a7adb909..9d76a24829f7ec7508377272affc3e7df6480d2e 100644 --- a/api/@ohos.arkui.componentSnapshot.d.ts +++ b/api/@ohos.arkui.componentSnapshot.d.ts @@ -18,8 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CustomBuilder } from './arkui/component/builder'; +/*** endif */ + import { AsyncCallback } from './@ohos.base'; -import image from './@ohos.multimedia.image' +import image from './@ohos.multimedia.image'; /** * This module allows developers to export snapshot image from a component or a custom builder. @@ -36,7 +40,8 @@ import image from './@ohos.multimedia.image' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace componentSnapshot { /** @@ -46,9 +51,10 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ - interface SnapshotRegion { + export interface SnapshotRegion { /** * Left side position of rectangle, in PX. * @@ -56,7 +62,8 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ left: number; @@ -67,7 +74,8 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ right: number; @@ -78,7 +86,8 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ top: number; @@ -89,7 +98,8 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ bottom: number; } @@ -102,9 +112,10 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ - interface LocalizedSnapshotRegion { + export interface LocalizedSnapshotRegion { /** * Left/Right side position of rectangle, in PX * @@ -112,7 +123,8 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ start: number; @@ -123,7 +135,8 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ end: number; @@ -134,7 +147,8 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ top: number; @@ -145,7 +159,8 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ bottom: number; } @@ -157,9 +172,10 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ - type SnapshotRegionType = SnapshotRegion | LocalizedSnapshotRegion; + export type SnapshotRegionType = SnapshotRegion | LocalizedSnapshotRegion; /** * Defines the extra options for snapshot taking. @@ -168,9 +184,10 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - interface SnapshotOptions { + export interface SnapshotOptions { /** * Defines the scale property to render the snapshot. * @@ -178,7 +195,8 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ scale?: number @@ -189,7 +207,8 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ waitUntilRenderFinished?: boolean @@ -200,7 +219,8 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ region?: SnapshotRegionType } @@ -233,9 +253,10 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @deprecated since 18 * @useinstead ohos.arkui.UIContext.ComponentSnapshot#get + * @arkts 1.1&1.2 */ function get(id: string, callback: AsyncCallback<image.PixelMap>, options?: SnapshotOptions): void; @@ -267,9 +288,10 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @deprecated since 18 * @useinstead ohos.arkui.UIContext.ComponentSnapshot#get + * @arkts 1.1&1.2 */ function get(id: string, options?: SnapshotOptions): Promise<image.PixelMap>; @@ -305,9 +327,10 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @deprecated since 18 * @useinstead ohos.arkui.UIContext.ComponentSnapshot#createFromBuilder + * @arkts 1.1&1.2 */ function createFromBuilder(builder: CustomBuilder, callback: AsyncCallback<image.PixelMap>, delay?: number, checkImageStatus?: boolean, options?: SnapshotOptions): void; @@ -344,9 +367,10 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @deprecated since 18 * @useinstead ohos.arkui.UIContext.ComponentSnapshot#createFromBuilder + * @arkts 1.1&1.2 */ function createFromBuilder(builder: CustomBuilder, delay?: number, checkImageStatus?: boolean, options?: SnapshotOptions): Promise<image.PixelMap>; @@ -368,9 +392,10 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - function getSync(id: string, options?: SnapshotOptions): image.PixelMap; + export function getSync(id: string, options?: SnapshotOptions): image.PixelMap; } export default componentSnapshot; diff --git a/api/@ohos.arkui.componentUtils.d.ts b/api/@ohos.arkui.componentUtils.d.ts index 32658420dca159b505dcfb4717f7f95fb6b865ed..5f2b6268df7841b1c25d4b4b01f67dd361d7d6b0 100644 --- a/api/@ohos.arkui.componentUtils.d.ts +++ b/api/@ohos.arkui.componentUtils.d.ts @@ -37,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 namespace componentUtils { @@ -60,9 +61,10 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - interface ComponentInfo { + export interface ComponentInfo { /** * component size. @@ -83,7 +85,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ size: Size @@ -106,7 +109,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ localOffset: Offset @@ -129,7 +133,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ windowOffset: Offset @@ -152,7 +157,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ screenOffset: Offset @@ -175,7 +181,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ translate: TranslateResult @@ -198,7 +205,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ scale: ScaleResult @@ -221,7 +229,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ rotate: RotateResult @@ -244,7 +253,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ transform: Matrix4Result } @@ -268,9 +278,10 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - interface Size { + export interface Size { /** * Defines the width property. @@ -291,7 +302,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width: number @@ -314,7 +326,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ height: number } @@ -338,9 +351,10 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - interface Offset { + export interface Offset { /** * Coordinate x of the Position. @@ -361,7 +375,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ x: number @@ -384,7 +399,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ y: number } @@ -408,9 +424,10 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - interface TranslateResult { + export interface TranslateResult { /** * Indicates the translation distance of the x-axis, in vp. @@ -431,7 +448,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ x: number @@ -454,7 +472,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ y: number @@ -477,7 +496,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ z: number } @@ -501,9 +521,10 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - interface ScaleResult { + export interface ScaleResult { /** * Zoom factor of the x-axis. @@ -524,7 +545,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ x: number @@ -547,7 +569,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ y: number @@ -570,7 +593,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ z: number @@ -593,7 +617,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ centerX: number @@ -616,7 +641,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ centerY: number } @@ -640,9 +666,10 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - interface RotateResult { + export interface RotateResult { /** * Axis of rotation vector x coordinate. @@ -663,7 +690,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ x: number @@ -686,7 +714,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ y: number @@ -709,7 +738,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ z: number @@ -732,7 +762,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ centerX: number @@ -755,7 +786,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ centerY: number @@ -778,7 +810,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ angle: number } @@ -802,9 +835,10 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - type Matrix4Result = [ + export type Matrix4Result = [ number, number, number, diff --git a/api/@ohos.arkui.dragController.d.ts b/api/@ohos.arkui.dragController.d.ts index 0b8c6882c6323f93e5613b0f5e4d42d9aa9c312a..f1a94005c153b40245ca403c4479903dc0708401 100644 --- a/api/@ohos.arkui.dragController.d.ts +++ b/api/@ohos.arkui.dragController.d.ts @@ -18,10 +18,15 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { DragEvent, DragPreviewOptions, DragItemInfo, ICurve } from './arkui/component/common'; +import { CustomBuilder } from './arkui/component/builder'; +import { TouchPoint, ResourceColor } from './arkui/component/units'; +import { Curve } from './arkui/component/enums'; +/*** endif */ - -import type { AsyncCallback, BusinessError, Callback } from './@ohos.base'; -import type unifiedDataChannel from './@ohos.data.unifiedDataChannel'; +import { AsyncCallback, BusinessError, Callback } from './@ohos.base'; +import unifiedDataChannel from './@ohos.data.unifiedDataChannel'; /** * This module allows developers to trigger a drag event. @@ -42,7 +47,8 @@ import type unifiedDataChannel from './@ohos.data.unifiedDataChannel'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace dragController { /** @@ -67,7 +73,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ const enum DragStatus { /** @@ -86,7 +93,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ STARTED = 0, /** @@ -105,7 +113,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ENDED = 1, } @@ -132,7 +141,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface DragAndDropInfo { /** @@ -154,7 +164,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ status: DragStatus; /** @@ -176,7 +187,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ event: DragEvent; /** @@ -198,7 +210,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ extraParams?: string; } @@ -225,7 +238,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface DragAction { /** @@ -253,7 +267,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ startDrag(): Promise<void>; /** @@ -284,7 +299,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'statusChange', callback: Callback<DragAndDropInfo>): void; @@ -316,7 +332,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'statusChange', callback?: Callback<DragAndDropInfo>): void; } @@ -343,7 +360,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface DragInfo { /** @@ -365,7 +383,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ pointerId: number; @@ -388,7 +407,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ data?: unifiedDataChannel.UnifiedData; @@ -411,7 +431,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ extraParams?: string; @@ -434,7 +455,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ touchPoint?: TouchPoint; @@ -457,23 +479,10 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ previewOptions?: DragPreviewOptions; - - /** - * Provide a data representation to the system instead of providing a complete data - * object directly. When the user releases the drag over the target application, the system will use this data - * representation to request the actual data from drag source. This approach significantly improves the - * efficiency of initiating drag operations for large volumes of data and enhances the effectiveness of data - * reception. It is recommended to use this instead of the data field. - * - * @type { ?unifiedDataChannel.DataLoadParams } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - dataLoadParams?: unifiedDataChannel.DataLoadParams; } /** @@ -498,7 +507,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface AnimationOptions { /** @@ -520,7 +530,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ duration?: number; /** @@ -542,7 +553,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ curve?: Curve | ICurve; } @@ -563,7 +575,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ export class DragPreview { /** @@ -585,7 +598,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ setForegroundColor(color: ResourceColor): void; /** @@ -610,7 +624,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ animate(options: AnimationOptions, handler: () =>void): void; } @@ -630,7 +645,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface DragEventParam { @@ -653,7 +669,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ event: DragEvent; @@ -676,7 +693,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ extraParams: string; } @@ -685,11 +703,12 @@ declare namespace dragController { * Execute a drag event. * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. * @param { DragInfo } dragInfo - Information about the drag event. - * @param { AsyncCallback<{ event: DragEvent, extraParams: string }> } callback - Callback that contains the drag event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * <br> 1. Mandatory parameters are left unspecified. - * <br> 2. Incorrect parameters types. - * <br> 3. Parameter verification failed. + * @param { AsyncCallback<{ event: DragEvent, extraParams: string }> } callback - Callback that contains the drag + * event information. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * <br> 1. Mandatory parameters are left unspecified. + * <br> 2. Incorrect parameters types. + * <br> 3. Parameter verification failed. * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 @@ -699,44 +718,45 @@ declare namespace dragController { * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. * @param { DragInfo } dragInfo - Information about the drag event. * @param { AsyncCallback<DragEventParam> } callback - Callback that contains the drag event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * <br> 1. Mandatory parameters are left unspecified. - * <br> 2. Incorrect parameters types. - * <br> 3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * <br> 1. Mandatory parameters are left unspecified. + * <br> 2. Incorrect parameters types. + * <br> 3. Parameter verification failed. * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 - */ + */ /** * Execute a drag event. * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. * @param { DragInfo } dragInfo - Information about the drag event. * @param { AsyncCallback<DragEventParam> } callback - Callback that contains the drag event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * <br> 1. Mandatory parameters are left unspecified. - * <br> 2. Incorrect parameters types. - * <br> 3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * <br> 1. Mandatory parameters are left unspecified. + * <br> 2. Incorrect parameters types. + * <br> 3. Parameter verification failed. * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 - * @deprecated since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @deprecated since 18 * @useinstead ohos.arkui.UIContext.DragController#executeDrag + * @arkts 1.1&1.2 */ function executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: DragInfo, - callback: AsyncCallback<DragEventParam>): void; + callback: AsyncCallback<DragEventParam>): void; /** * Execute a drag event. * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. * @param { DragInfo } dragInfo - Information about the drag event. * @returns { Promise<{ event: DragEvent, extraParams: string }> } A Promise with the drag event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * <br> 1. Mandatory parameters are left unspecified. - * <br> 2. Incorrect parameters types. - * <br> 3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * <br> 1. Mandatory parameters are left unspecified. + * <br> 2. Incorrect parameters types. + * <br> 3. Parameter verification failed. * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 @@ -746,10 +766,10 @@ declare namespace dragController { * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. * @param { DragInfo } dragInfo - Information about the drag event. * @returns { Promise<DragEventParam> } A Promise with the drag event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * <br> 1. Mandatory parameters are left unspecified. - * <br> 2. Incorrect parameters types. - * <br> 3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * <br> 1. Mandatory parameters are left unspecified. + * <br> 2. Incorrect parameters types. + * <br> 3. Parameter verification failed. * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice @@ -760,17 +780,18 @@ declare namespace dragController { * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. * @param { DragInfo } dragInfo - Information about the drag event. * @returns { Promise<DragEventParam> } A Promise with the drag event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * <br> 1. Mandatory parameters are left unspecified. - * <br> 2. Incorrect parameters types. - * <br> 3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * <br> 1. Mandatory parameters are left unspecified. + * <br> 2. Incorrect parameters types. + * <br> 3. Parameter verification failed. * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} * @deprecated since 18 * @useinstead ohos.arkui.UIContext.DragController#executeDrag + * @arkts 1.1&1.2 */ function executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: DragInfo): Promise<DragEventParam>; @@ -778,13 +799,13 @@ declare namespace dragController { * Create one drag action object, which can be used for starting drag later or monitoring * the drag status after drag started. * @param { Array<CustomBuilder | DragItemInfo> } customArray - Objects used for prompts - * displayed when the objects are dragged. + * displayed when the objects are dragged. * @param { DragInfo } dragInfo - Information about the drag event. * @returns { DragAction } one drag action object - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * <br> 1. Mandatory parameters are left unspecified. - * <br> 2. Incorrect parameters types. - * <br> 3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * <br> 1. Mandatory parameters are left unspecified. + * <br> 2. Incorrect parameters types. + * <br> 3. Parameter verification failed. * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 11 @@ -793,13 +814,13 @@ declare namespace dragController { * Create one drag action object, which can be used for starting drag later or monitoring * the drag status after drag started. * @param { Array<CustomBuilder | DragItemInfo> } customArray - Objects used for prompts - * displayed when the objects are dragged. + * displayed when the objects are dragged. * @param { DragInfo } dragInfo - Information about the drag event. * @returns { DragAction } one drag action object - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * <br> 1. Mandatory parameters are left unspecified. - * <br> 2. Incorrect parameters types. - * <br> 3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * <br> 1. Mandatory parameters are left unspecified. + * <br> 2. Incorrect parameters types. + * <br> 3. Parameter verification failed. * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice @@ -809,20 +830,21 @@ declare namespace dragController { * Create one drag action object, which can be used for starting drag later or monitoring * the drag status after drag started. * @param { Array<CustomBuilder | DragItemInfo> } customArray - Objects used for prompts - * displayed when the objects are dragged. + * displayed when the objects are dragged. * @param { DragInfo } dragInfo - Information about the drag event. * @returns { DragAction } one drag action object - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * <br> 1. Mandatory parameters are left unspecified. - * <br> 2. Incorrect parameters types. - * <br> 3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * <br> 1. Mandatory parameters are left unspecified. + * <br> 2. Incorrect parameters types. + * <br> 3. Parameter verification failed. * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} * @deprecated since 18 * @useinstead ohos.arkui.UIContext.DragController#createDragAction + * @arkts 1.1&1.2 */ function createDragAction(customArray: Array<CustomBuilder | DragItemInfo>, dragInfo: DragInfo): DragAction; @@ -845,9 +867,10 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} * @deprecated since 18 * @useinstead ohos.arkui.UIContext.DragController#getDragPreview + * @arkts 1.1&1.2 */ function getDragPreview(): DragPreview; @@ -857,7 +880,8 @@ declare namespace dragController { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ const enum DragStartRequestStatus { /** @@ -866,7 +890,8 @@ declare namespace dragController { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ WAITING = 0, @@ -876,7 +901,8 @@ declare namespace dragController { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ READY = 1, } diff --git a/api/@ohos.arkui.drawableDescriptor.d.ts b/api/@ohos.arkui.drawableDescriptor.d.ts index 6c7ff4b6a3120ecd4095d063ccd187c9dcfe086a..1b4d5b0752cee048d97166cd44174d6c0f2928e4 100644 --- a/api/@ohos.arkui.drawableDescriptor.d.ts +++ b/api/@ohos.arkui.drawableDescriptor.d.ts @@ -96,15 +96,17 @@ declare interface DrawableDescriptorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ -export class DrawableDescriptor { +export declare class DrawableDescriptor { /** * Creates a new DrawableDescriptor. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -130,57 +132,10 @@ export class DrawableDescriptor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getPixelMap(): image.PixelMap; - - /** - * 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<DrawableDescriptorResult> } 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<DrawableDescriptorResult>; - - /** - * 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; } /** @@ -205,9 +160,10 @@ export class DrawableDescriptor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ -export class LayeredDrawableDescriptor extends DrawableDescriptor { +export declare class LayeredDrawableDescriptor extends DrawableDescriptor { /** * Creates a new LayeredDrawableDescriptor. * @@ -216,7 +172,8 @@ export class LayeredDrawableDescriptor extends DrawableDescriptor { * @param { DrawableDescriptor } [mask] - Indicates the mask option to create LayeredDrawableDescriptor. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor( foreground?: DrawableDescriptor, @@ -246,7 +203,8 @@ export class LayeredDrawableDescriptor extends DrawableDescriptor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getForeground(): DrawableDescriptor; @@ -272,7 +230,8 @@ export class LayeredDrawableDescriptor extends DrawableDescriptor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getBackground(): DrawableDescriptor; @@ -298,7 +257,8 @@ export class LayeredDrawableDescriptor extends DrawableDescriptor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getMask(): DrawableDescriptor; @@ -325,7 +285,8 @@ export class LayeredDrawableDescriptor extends DrawableDescriptor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static getMaskClipPath(): string; } @@ -336,15 +297,17 @@ export class LayeredDrawableDescriptor extends DrawableDescriptor { * @extends DrawableDescriptor * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ -export class PixelMapDrawableDescriptor extends DrawableDescriptor { +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 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(src?: image.PixelMap); @@ -367,9 +330,10 @@ export class PixelMapDrawableDescriptor extends DrawableDescriptor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ -declare interface AnimationOptions { +interface AnimationOptions { /** * The duration of animation playback once. * @@ -377,7 +341,8 @@ declare interface AnimationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ duration?: number; /** @@ -387,7 +352,8 @@ declare interface AnimationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ iterations?: number; @@ -410,9 +376,10 @@ declare interface AnimationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ -export class AnimatedDrawableDescriptor extends DrawableDescriptor { +export declare class AnimatedDrawableDescriptor extends DrawableDescriptor { /** * Creates a new AnimatedDrawableDescriptor. * @@ -421,7 +388,8 @@ export class AnimatedDrawableDescriptor extends DrawableDescriptor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(pixelMaps: Array<image.PixelMap>, options?: AnimationOptions); diff --git a/api/@ohos.arkui.inspector.d.ts b/api/@ohos.arkui.inspector.d.ts index e1cc913b37dcfdee4f89530e88bfd7c29f8f04ab..592063e24cb89eb422c739a9bb37f00b2f1bb846 100644 --- a/api/@ohos.arkui.inspector.d.ts +++ b/api/@ohos.arkui.inspector.d.ts @@ -33,7 +33,8 @@ import { Callback } from './@ohos.base'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace inspector { @@ -50,7 +51,8 @@ declare namespace inspector { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface ComponentObserver { @@ -71,7 +73,8 @@ declare namespace inspector { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'layout', callback: () => void): void; @@ -92,7 +95,8 @@ declare namespace inspector { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'layout', callback?: () => void): void; @@ -113,7 +117,8 @@ declare namespace inspector { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'draw', callback: () => void): void; @@ -134,7 +139,8 @@ declare namespace inspector { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'draw', callback?: () => void): void; @@ -178,11 +184,54 @@ declare namespace inspector { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 * @deprecated since 18 * @useinstead ohos.arkui.UIContext.UIInspector#createComponentObserver */ function createComponentObserver(id: string): ComponentObserver; + + /** + * Obtains all attributes of the component with the specified ID. + * + * @param { string } id - ID of the component whose attributes are to be obtained. + * @returns { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + function getInspectorByKey(id: string): string; + + /** + * Get components tree. + * + * @returns { Object } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + * @test + */ + function getInspectorTree(): Object; + + /** + * Sends an event to the component with the specified ID. + * + * @param { string } id - ID of the component for which the event is to be sent. + * @param { number } action - Type of the event to be sent. The options are as follows: Click event: 10 LongClick: 11. + * @param { string } params - Event parameters. If there is no parameter, pass an empty string "". + * @returns { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + * @test + */ + function sendEventByKey(id: string, action: number, params: string): boolean; } export default inspector; diff --git a/api/@ohos.arkui.node.d.ts b/api/@ohos.arkui.node.d.ts index 67602a631009b49554a601a4c2adafff09876bc6..aa73335d6ecdc282541800c7e66409c98c887d46 100644 --- a/api/@ohos.arkui.node.d.ts +++ b/api/@ohos.arkui.node.d.ts @@ -29,7 +29,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export { NodeRenderType, RenderOptions, BuilderNode } from './arkui/BuilderNode'; @@ -38,19 +39,11 @@ export { NodeRenderType, RenderOptions, BuilderNode } from './arkui/BuilderNode' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export { BuildOptions } from './arkui/BuilderNode'; -/** - * Export InputEventType which refers to the event type used for posting. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -export { InputEventType } from './arkui/BuilderNode'; - /** * Export NodeController, which defines the controller of node container. Provides lifecycle callbacks for the associated NodeContainer * and methods to control the child node of the NodeContainer. @@ -66,7 +59,8 @@ export { InputEventType } from './arkui/BuilderNode'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export { NodeController } from './arkui/NodeController'; @@ -83,20 +77,20 @@ export { NodeController } from './arkui/NodeController'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ -export { FrameNode, LayoutConstraint, ExpandMode, UIState } from './arkui/FrameNode'; - +export { FrameNode, LayoutConstraint, ExpandMode } from './arkui/FrameNode'; /** * Export FrameNode. FrameNode defines a basic type of node which contains a RenderNode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export { typeNode, NodeAdapter } from './arkui/FrameNode'; - /** * Export Graphics. Defines the basic types related to the Graphics. * @@ -110,17 +104,18 @@ export { typeNode, NodeAdapter } from './arkui/FrameNode'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export { DrawContext, Size, Offset, Position, Pivot, Scale, Translation, Matrix4, Rotation, Frame, RoundRect, Circle, CommandPath, ShapeMask, ShapeClip, BorderRadiuses, CornerRadius, Rect, Edges, edgeColors, edgeWidths, borderStyles, borderRadiuses, LengthMetricsUnit } from './arkui/Graphics'; - /** * Export Graphics. Defines the basic types related to the Graphics. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export { LengthUnit, SizeT, LengthMetrics, ColorMetrics } from './arkui/Graphics'; @@ -137,10 +132,11 @@ export { LengthUnit, SizeT, LengthMetrics, ColorMetrics } from './arkui/Graphics * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export { RenderNode } from './arkui/RenderNode'; - +/*** if arkts 1.1 */ /** * Export XComponentNode, which extends FrameNode. * @@ -157,14 +153,15 @@ export { RenderNode } from './arkui/RenderNode'; * @since 12 */ export { XComponentNode } from './arkui/XComponentNode'; - +/*** endif */ /** * Export Content. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export { Content } from './arkui/Content'; @@ -174,7 +171,8 @@ export { Content } from './arkui/Content'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export { ComponentContent } from './arkui/ComponentContent'; @@ -184,6 +182,7 @@ export { ComponentContent } from './arkui/ComponentContent'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export { NodeContent } from './arkui/NodeContent'; \ No newline at end of file diff --git a/api/@ohos.arkui.observer.d.ts b/api/@ohos.arkui.observer.d.ts index 29af3503e28d49e2c453312902b592d5ba136eda..d21faa17beb2a88bfa7afa4a25763bbc0127f2c3 100644 --- a/api/@ohos.arkui.observer.d.ts +++ b/api/@ohos.arkui.observer.d.ts @@ -17,10 +17,19 @@ * @file * @kit ArkUI */ - +/*** if arkts 1.2 */ +import { ResourceStr } from './arkui/component/units'; +import { NavPathStack, NavigationOperation, NavBar } from './arkui/component/navigation'; +import { UIContext } from '@ohos.arkui.UIContext'; +import UIAbilityContext from './application/UIAbilityContext'; +import { Callback } from './@ohos.base'; +/*** endif */ + +/*** if arkts 1.1 */ import type { Callback } from './@ohos.base'; import type UIAbilityContext from './application/UIAbilityContext'; import type { NavigationOperation, NavBar } from '../component/navigation'; +/*** endif */ /** * Register callbacks to observe ArkUI behavior. @@ -37,7 +46,8 @@ import type { NavigationOperation, NavBar } from '../component/navigation'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace uiObserver { /** @@ -55,7 +65,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export enum NavDestinationState { /** @@ -71,7 +82,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ON_SHOWN = 0, @@ -88,7 +100,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ON_HIDDEN = 1, @@ -98,7 +111,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ON_APPEAR = 2, @@ -108,7 +122,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ON_DISAPPEAR = 3, @@ -118,7 +133,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ON_WILL_SHOW = 4, @@ -128,7 +144,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ON_WILL_HIDE = 5, @@ -138,7 +155,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ON_WILL_APPEAR = 6, @@ -148,7 +166,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ON_WILL_DISAPPEAR = 7, @@ -158,7 +177,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 17 + * @since 18 */ ON_ACTIVE = 8, @@ -168,7 +187,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 17 + * @since 18 */ ON_INACTIVE = 9, @@ -178,7 +197,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ON_BACKPRESS = 100 } @@ -198,7 +218,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export enum RouterPageState { /** @@ -214,7 +235,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ABOUT_TO_APPEAR = 0, @@ -231,7 +253,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ABOUT_TO_DISAPPEAR = 1, @@ -248,7 +271,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ON_PAGE_SHOW = 2, @@ -265,7 +289,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ON_PAGE_HIDE = 3, @@ -282,7 +307,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ON_BACK_PRESS = 4 } @@ -294,7 +320,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export enum ScrollEventType { /** @@ -303,7 +330,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCROLL_START = 0, @@ -313,7 +341,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCROLL_STOP = 1 } @@ -325,7 +354,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export enum TabContentState { /** @@ -334,7 +364,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ON_SHOW = 0, @@ -344,7 +375,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ON_HIDE = 1 } @@ -364,7 +396,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NavDestinationInfo { /** @@ -382,7 +415,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ navigationId: ResourceStr, @@ -401,7 +435,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ name: ResourceStr, @@ -420,7 +455,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ state: NavDestinationState, @@ -431,7 +467,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ index: number; @@ -442,7 +479,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ param?: Object; @@ -453,7 +491,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ navDestinationId: string; @@ -487,7 +526,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NavigationInfo { /** @@ -497,7 +537,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ navigationId: string; @@ -508,7 +549,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pathStack: NavPathStack; @@ -531,7 +573,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface ScrollEventInfo { /** @@ -541,7 +584,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ id: string, @@ -552,7 +596,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ uniqueId: number, @@ -563,7 +608,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ scrollEvent: ScrollEventType, @@ -574,7 +620,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ offset: number, @@ -597,7 +644,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface TabContentInfo { /** @@ -607,7 +655,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ tabContentId: string, @@ -618,7 +667,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ tabContentUniqueId: number, @@ -629,7 +679,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ state: TabContentState, @@ -640,7 +691,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ index: number, @@ -651,7 +703,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ id: string, @@ -662,7 +715,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ uniqueId: number } @@ -674,7 +728,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface ObserverOptions { /** @@ -684,7 +739,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ id: string } @@ -702,7 +758,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export class RouterPageInfo { /** @@ -720,7 +777,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ context: UIAbilityContext | UIContext; @@ -739,7 +797,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ index: number; @@ -758,7 +817,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -777,7 +837,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ path: string; @@ -796,7 +857,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ state: RouterPageState; @@ -807,7 +869,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pageId: string; } @@ -818,7 +881,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export class DensityInfo { /** @@ -828,7 +892,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ context: UIContext; @@ -839,7 +904,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ density: number; } @@ -851,7 +917,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NavDestinationSwitchInfo { /** @@ -861,7 +928,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ context: UIAbilityContext | UIContext; @@ -872,7 +940,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ from: NavDestinationInfo | NavBar; @@ -883,7 +952,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ to: NavDestinationInfo | NavBar; @@ -894,7 +964,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ operation: NavigationOperation; } @@ -906,7 +977,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NavDestinationSwitchObserverOptions { /** @@ -916,7 +988,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ navigationId: ResourceStr; } @@ -943,6 +1016,20 @@ declare namespace uiObserver { * @since 12 */ export function on(type: 'navDestinationUpdate', options: { navigationId: ResourceStr }, callback: Callback<NavDestinationInfo>): void; + + /** + * Registers a callback function to be called when the navigation destination is updated. + * + * @param { 'navDestinationUpdate' } type - The type of event to listen for. Must be 'navDestinationUpdate'. + * @param { NavDestinationSwitchObserverOptions } options - The options object. + * @param { Callback<NavDestinationInfo> } callback - The callback function to be called when the navigation destination is updated. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + export function on(type: 'navDestinationUpdate', options: NavDestinationSwitchObserverOptions, callback: Callback<NavDestinationInfo>): void; /** * Removes a callback function that was previously registered with `on()`. @@ -968,6 +1055,21 @@ declare namespace uiObserver { * @since 12 */ export function off(type: 'navDestinationUpdate', options: { navigationId: ResourceStr }, callback?: Callback<NavDestinationInfo>): void; + + /** + * Removes a callback function that was previously registered with `on()`. + * + * @param { 'navDestinationUpdate' } type - The type of event to remove the listener for. Must be 'navDestinationUpdate'. + * @param { NavDestinationSwitchObserverOptions } options - The options object. + * @param { Callback<NavDestinationInfo> } callback - The callback function to remove. If not provided, all callbacks for the given event type and + * navigation ID will be removed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + export function off(type: 'navDestinationUpdate', options: NavDestinationSwitchObserverOptions, callback?: Callback<NavDestinationInfo>): void; /** * Registers a callback function to be called when the navigation destination is updated. @@ -986,7 +1088,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function on(type: 'navDestinationUpdate', callback: Callback<NavDestinationInfo>): void; @@ -1009,7 +1112,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function off(type: 'navDestinationUpdate', callback?: Callback<NavDestinationInfo>): void; @@ -1022,7 +1126,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function on(type: 'scrollEvent', options: ObserverOptions, callback: Callback<ScrollEventInfo>): void; @@ -1036,7 +1141,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function off(type: 'scrollEvent', options: ObserverOptions, callback?: Callback<ScrollEventInfo>): void; @@ -1048,7 +1154,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function on(type: 'scrollEvent', callback: Callback<ScrollEventInfo>): void; @@ -1061,7 +1168,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function off(type: 'scrollEvent', callback?: Callback<ScrollEventInfo>): void; @@ -1084,7 +1192,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function on(type: 'routerPageUpdate', context: UIAbilityContext | UIContext, callback: Callback<RouterPageInfo>): void; @@ -1109,7 +1218,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function off(type: 'routerPageUpdate', context: UIAbilityContext | UIContext, callback?: Callback<RouterPageInfo>): void; @@ -1122,7 +1232,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function on(type: 'densityUpdate', context: UIContext, callback: Callback<DensityInfo>): void; @@ -1136,7 +1247,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function off(type: 'densityUpdate', context: UIContext, callback?: Callback<DensityInfo>): void; @@ -1149,7 +1261,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function on(type: 'willDraw', context: UIContext, callback: Callback<void>): void; @@ -1163,7 +1276,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function off(type: 'willDraw', context: UIContext, callback?: Callback<void>): void; @@ -1176,7 +1290,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function on(type: 'didLayout', context: UIContext, callback: Callback<void>): void; @@ -1190,7 +1305,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function off(type: 'didLayout', context: UIContext, callback?: Callback<void>): void; @@ -1203,7 +1319,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function on(type: 'tabContentUpdate', options: ObserverOptions, callback: Callback<TabContentInfo>): void; @@ -1217,7 +1334,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function off(type: 'tabContentUpdate', options: ObserverOptions, callback?: Callback<TabContentInfo>): void; @@ -1229,7 +1347,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function on(type: 'tabContentUpdate', callback: Callback<TabContentInfo>): void; @@ -1242,7 +1361,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function off(type: 'tabContentUpdate', callback?: Callback<TabContentInfo>): void; @@ -1255,7 +1375,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function on( type: 'navDestinationSwitch', @@ -1273,7 +1394,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function off( type: 'navDestinationSwitch', @@ -1291,7 +1413,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function on( type: 'navDestinationSwitch', @@ -1311,7 +1434,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function off( type: 'navDestinationSwitch', diff --git a/api/@ohos.arkui.shape.d.ts b/api/@ohos.arkui.shape.d.ts index f4688f6e5c8e55933a4ed6dce5fd5772008173d0..3274f282b20d6ac3f484d23002c52dd538c260c6 100644 --- a/api/@ohos.arkui.shape.d.ts +++ b/api/@ohos.arkui.shape.d.ts @@ -18,7 +18,9 @@ * @kit ArkUI */ - +/*** if arkts 1.2 */ +import { Position, ResourceColor, Length, SizeOptions } from './arkui/component/units' +/*** endif */ /** * Interface for shape size properties. @@ -28,16 +30,18 @@ * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ -interface ShapeSize { +export interface ShapeSize { /** * Defines the width of Shape. * @type { ? (number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width?: number | string; @@ -47,7 +51,8 @@ interface ShapeSize { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ height?: number | string; } @@ -61,16 +66,18 @@ interface ShapeSize { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ -interface RectShapeOptions extends ShapeSize { +export interface RectShapeOptions extends ShapeSize { /** * Defines the corner radius of the RectShape. * @type { ? (number | string | Array<number | string>) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radius?: number | string | Array<number | string>; } @@ -84,16 +91,18 @@ interface RectShapeOptions extends ShapeSize { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ -interface RoundRectShapeOptions extends ShapeSize { +export interface RoundRectShapeOptions extends ShapeSize { /** * Defines the width of the corner radius for RectShape. * @type { ? (number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radiusWidth?: number | string; @@ -103,7 +112,8 @@ interface RoundRectShapeOptions extends ShapeSize { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radiusHeight?: number | string; } @@ -116,16 +126,18 @@ interface RoundRectShapeOptions extends ShapeSize { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ -interface PathShapeOptions { +export interface PathShapeOptions { /** * Defines the commands for drawing the PathShape. * @type { ?string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ commands?: string; } @@ -137,7 +149,8 @@ interface PathShapeOptions { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CommonShapeMethod<T> { /** @@ -149,7 +162,8 @@ declare class CommonShapeMethod<T> { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ offset(offset: Position): T; @@ -162,7 +176,8 @@ declare class CommonShapeMethod<T> { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fill(color: ResourceColor): T; @@ -175,7 +190,8 @@ declare class CommonShapeMethod<T> { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ position(position: Position): T; } @@ -188,7 +204,8 @@ declare class CommonShapeMethod<T> { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class BaseShape<T> extends CommonShapeMethod<T> { /** @@ -200,7 +217,8 @@ declare class BaseShape<T> extends CommonShapeMethod<T> { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width(width: Length): T; @@ -213,7 +231,8 @@ declare class BaseShape<T> extends CommonShapeMethod<T> { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ height(height: Length): T; @@ -226,7 +245,8 @@ declare class BaseShape<T> extends CommonShapeMethod<T> { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ size(size: SizeOptions): T; } @@ -239,7 +259,8 @@ declare class BaseShape<T> extends CommonShapeMethod<T> { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export declare class RectShape extends BaseShape<RectShape> { /** @@ -250,7 +271,8 @@ export declare class RectShape extends BaseShape<RectShape> { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(options?: RectShapeOptions | RoundRectShapeOptions); @@ -263,7 +285,8 @@ export declare class RectShape extends BaseShape<RectShape> { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radiusWidth(rWidth: number | string): RectShape; @@ -276,7 +299,8 @@ export declare class RectShape extends BaseShape<RectShape> { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radiusHeight(rHeight: number | string): RectShape; @@ -289,7 +313,8 @@ export declare class RectShape extends BaseShape<RectShape> { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radius(radius: number | string | Array<number | string>): RectShape; } @@ -302,7 +327,8 @@ export declare class RectShape extends BaseShape<RectShape> { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export declare class CircleShape extends BaseShape<CircleShape> { /** @@ -313,7 +339,8 @@ export declare class CircleShape extends BaseShape<CircleShape> { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(options?: ShapeSize); } @@ -326,7 +353,8 @@ export declare class CircleShape extends BaseShape<CircleShape> { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export declare class EllipseShape extends BaseShape<EllipseShape> { /** @@ -337,7 +365,8 @@ export declare class EllipseShape extends BaseShape<EllipseShape> { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(options?: ShapeSize); } @@ -350,7 +379,8 @@ export declare class EllipseShape extends BaseShape<EllipseShape> { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export declare class PathShape extends CommonShapeMethod<PathShape> { /** @@ -361,7 +391,8 @@ export declare class PathShape extends CommonShapeMethod<PathShape> { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(options?: PathShapeOptions); @@ -374,7 +405,8 @@ export declare class PathShape extends CommonShapeMethod<PathShape> { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ commands(commands: string): PathShape; } \ No newline at end of file diff --git a/api/@ohos.arkui.stateManagement.d.ets b/api/@ohos.arkui.stateManagement.d.ets index f29f2f0d28eec854dd65068f5f504295a35ca84b..9a6caa8f8fc3d6d0c4d7371293a552105b37d1d7 100644 --- a/api/@ohos.arkui.stateManagement.d.ets +++ b/api/@ohos.arkui.stateManagement.d.ets @@ -22,11 +22,16 @@ export * from './arkui/stateManagement/common'; export * from './arkui/stateManagement/runtime'; export * from './arkui/stateManagement/storage'; +export * from './arkui/stateManagement/base/backingValue'; export * from './arkui/stateManagement/base/decoratorBase'; export * from './arkui/stateManagement/base/iObservedObject'; +export * from './arkui/stateManagement/base/mutableStateMeta'; export * from './arkui/stateManagement/decorators/decoratorState'; export * from './arkui/stateManagement/decorators/decoratorLink'; +export * from './arkui/stateManagement/decorators/decoratorObjectLink'; export * from './arkui/stateManagement/decorators/decoratorProp'; +export * from './arkui/stateManagement/decorators/decoratorProvide'; +export * from './arkui/stateManagement/decorators/decoratorConsume'; export * from './arkui/stateManagement/decorators/decoratorStorageLink'; export * from './arkui/stateManagement/decorators/decoratorStorageProp'; export * from './arkui/stateManagement/decorators/decoratorWatch'; diff --git a/api/@ohos.arkui.theme.d.ts b/api/@ohos.arkui.theme.d.ts index bec047f52697f106ecc076ddb9293cfb431d6a38..50f2062772205f75c8b4595c24474139a5a9aeee 100644 --- a/api/@ohos.arkui.theme.d.ts +++ b/api/@ohos.arkui.theme.d.ts @@ -18,6 +18,11 @@ * @file * @kit ArkUI */ + +/*** if arkts 1.2 */ +import { ResourceColor } from './arkui/component/units'; +/*** endif */ + /** * Defines the struct of Theme. * @@ -25,7 +30,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export declare interface Theme { /** @@ -35,7 +41,8 @@ export declare interface Theme { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ colors: Colors; } @@ -47,7 +54,8 @@ export declare interface Theme { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export declare interface Colors { @@ -58,7 +66,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ brand: ResourceColor; @@ -69,7 +78,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ warning: ResourceColor; @@ -80,7 +90,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ alert: ResourceColor; @@ -91,7 +102,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ confirm: ResourceColor; @@ -102,7 +114,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontPrimary: ResourceColor; @@ -113,7 +126,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontSecondary: ResourceColor; @@ -124,7 +138,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontTertiary: ResourceColor; @@ -135,7 +150,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontFourth: ResourceColor; @@ -146,7 +162,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontEmphasize: ResourceColor; @@ -157,7 +174,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontOnPrimary: ResourceColor; @@ -168,7 +186,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontOnSecondary: ResourceColor; @@ -179,7 +198,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontOnTertiary: ResourceColor; @@ -190,7 +210,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontOnFourth: ResourceColor; @@ -201,7 +222,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ iconPrimary: ResourceColor; @@ -212,7 +234,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ iconSecondary: ResourceColor; @@ -223,7 +246,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ iconTertiary: ResourceColor; @@ -234,7 +258,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ iconFourth: ResourceColor; @@ -245,7 +270,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ iconEmphasize: ResourceColor; @@ -256,7 +282,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ iconSubEmphasize: ResourceColor; @@ -267,7 +294,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ iconOnPrimary: ResourceColor; @@ -278,7 +306,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ iconOnSecondary: ResourceColor; @@ -289,7 +318,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ iconOnTertiary: ResourceColor; @@ -300,7 +330,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ iconOnFourth: ResourceColor; @@ -311,7 +342,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundPrimary: ResourceColor; @@ -322,7 +354,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundSecondary: ResourceColor; @@ -333,7 +366,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundTertiary: ResourceColor; @@ -344,7 +378,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundFourth: ResourceColor; @@ -355,7 +390,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundEmphasize: ResourceColor; @@ -366,7 +402,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compForegroundPrimary: ResourceColor; @@ -377,7 +414,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compBackgroundPrimary: ResourceColor; @@ -388,7 +426,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compBackgroundPrimaryTran: ResourceColor; @@ -399,7 +438,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compBackgroundPrimaryContrary: ResourceColor; @@ -410,7 +450,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compBackgroundGray: ResourceColor; @@ -421,7 +462,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compBackgroundSecondary: ResourceColor; @@ -432,7 +474,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compBackgroundTertiary: ResourceColor; @@ -443,7 +486,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compBackgroundEmphasize: ResourceColor; @@ -454,7 +498,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compBackgroundNeutral: ResourceColor; @@ -465,7 +510,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compEmphasizeSecondary: ResourceColor; @@ -476,7 +522,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compEmphasizeTertiary: ResourceColor; @@ -487,7 +534,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compDivider: ResourceColor; @@ -498,7 +546,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compCommonContrary: ResourceColor; @@ -509,7 +558,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compBackgroundFocus: ResourceColor; @@ -520,7 +570,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compFocusedPrimary: ResourceColor; @@ -531,7 +582,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compFocusedSecondary: ResourceColor; @@ -542,7 +594,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compFocusedTertiary: ResourceColor; @@ -553,7 +606,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interactiveHover: ResourceColor; @@ -564,7 +618,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interactivePressed: ResourceColor; @@ -575,7 +630,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interactiveFocus: ResourceColor; @@ -586,7 +642,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interactiveActive: ResourceColor; @@ -597,7 +654,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interactiveSelect: ResourceColor; @@ -608,7 +666,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interactiveClick: ResourceColor; } @@ -620,7 +679,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export declare interface CustomTheme { /** @@ -630,7 +690,8 @@ export declare interface CustomTheme { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ colors?: CustomColors; } @@ -646,13 +707,26 @@ export declare interface CustomTheme { */ export declare type CustomColors = Partial<Colors>; +/** + * Defines the struct of CustomColors. + * + * @typedef { Partial<Colors> } CustomColors + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +export type CustomColors = Partial<Colors>; + /** * Class ThemeControl provides the Theme management for whole Ability and pages. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export declare class ThemeControl { /** @@ -664,7 +738,8 @@ export declare class ThemeControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static setDefaultTheme(theme: CustomTheme): void; } diff --git a/api/@ohos.arkui.uiExtension.d.ts b/api/@ohos.arkui.uiExtension.d.ts index 89f2f5cab5105ab2c10d0cb8b2962baebc411037..44cd4566b3e8f1a3fe59bed94997f36921f4545c 100644 --- a/api/@ohos.arkui.uiExtension.d.ts +++ b/api/@ohos.arkui.uiExtension.d.ts @@ -28,7 +28,8 @@ import window from './@ohos.window'; * @namespace uiExtension * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace uiExtension { /** @@ -37,11 +38,12 @@ declare namespace uiExtension { * @interface WindowProxy * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - interface WindowProxy { + export interface WindowProxy { /** - * Obtains the area where this window cannot be displayed, for example, the system bar area, notch, gesture area, and soft keyboard area. + * Get the avoid area. * * @param { window.AvoidAreaType } type - Type of the avoid area. * @returns { window.AvoidArea } Area where the window cannot be displayed. @@ -51,14 +53,15 @@ declare namespace uiExtension { * <br> 3. Parameter verification failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ getWindowAvoidArea(type: window.AvoidAreaType): window.AvoidArea; /** - * Subscribes to the event indicating changes to the area where the window cannot be displayed. + * Register the callback of avoidAreaChange. * - * @param { 'avoidAreaChange' } type - Event type. The value is fixed at 'avoidAreaChange', indicating the event of changes to the area where the window cannot be displayed. + * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area. * @param { Callback<AvoidAreaInfo> } callback - Callback used to return the avoid area information. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. @@ -66,14 +69,15 @@ declare namespace uiExtension { * <br> 3. Parameter verification failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'avoidAreaChange', callback: Callback<AvoidAreaInfo>): void; /** - * Unsubscribes from the event indicating changes to the area where the window cannot be displayed. + * Unregister the callback of avoidAreaChange. * - * @param { 'avoidAreaChange' } type - Event type. The value is fixed at 'avoidAreaChange', indicating the event of changes to the area where the window cannot be displayed. + * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area. * @param { Callback<AvoidAreaInfo> } callback - Callback used to return the avoid area information. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. @@ -81,14 +85,15 @@ declare namespace uiExtension { * <br> 3. Parameter verification failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'avoidAreaChange', callback?: Callback<AvoidAreaInfo>): void; /** - * Subscribes to the window size change event of the host application. + * Register the callback of windowSizeChange. * - * @param { 'windowSizeChange' } type - Event type. The value is fixed at 'windowSizeChange', indicating the window size change event. + * @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event. * @param { Callback<window.Size> } callback - Callback used to return the window size. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. @@ -96,14 +101,15 @@ declare namespace uiExtension { * <br> 3. Parameter verification failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'windowSizeChange', callback: Callback<window.Size>): void; /** - * Unsubscribes from the window size change event of the host application. + * Unregister the callback of windowSizeChange. * - * @param { 'windowSizeChange' } type - Event type. The value is fixed at 'windowSizeChange', indicating the window size change event. + * @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event. * @param { Callback<window.Size> } callback - Callback used to return the window size. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. @@ -111,14 +117,15 @@ declare namespace uiExtension { * <br> 3. Parameter verification failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'windowSizeChange', callback?: Callback<window.Size>): void; /** - * Subscribes to changes in the position and size of the component (EmbeddedComponent or UIExtensionComponent). This API can be used only on 2-in-1 devices. + * Register the callback of rectChange * - * @param { 'rectChange' } type - Event type. The value is fixed at 'rectChange', indicating the rectangle change event for the component (EmbeddedComponent or UIExtensionComponent). + * @param { 'rectChange' } type - The value is fixed at 'rectChange', indicating the component rect change event. * @param { 'number' } reasons - The reasons of component rect change. * @param { Callback<RectChangeOptions> } callback - Callback used to return the RectChangeOptions. * @throws { BusinessError } 401 - Parameter error. Possible cause: @@ -133,9 +140,9 @@ declare namespace uiExtension { on(type: 'rectChange', reasons: number, callback: Callback<RectChangeOptions>): void; /** - * Unsubscribes from changes in the position and size of the component (EmbeddedComponent or UIExtensionComponent). This API can be used only on 2-in-1 devices. + * Unregister the callback of rectChange * - * @param { 'rectChange' } type - Event type. The value is fixed at 'rectChange', indicating the rectangle change event for the component (EmbeddedComponent or UIExtensionComponent). + * @param { 'rectChange' } type - The value is fixed at 'rectChange', indicating the component rect change event. * @param { Callback<RectChangeOptions> } callback - Callback used to return the RectChangeOptions. * @throws { BusinessError } 401 - Parameter error. Possible cause: * <br> 1. Mandatory parameters are left unspecified. @@ -149,11 +156,11 @@ declare namespace uiExtension { off(type: 'rectChange', callback?: Callback<RectChangeOptions>): void; /** - * Sets whether to hide insecure windows. + * Hide the non-secure windows. * When called by modal UIExtension and shouldHide == false, the "ohos.permission.ALLOW_SHOW_NON_SECURE_WINDOWS" permission is required. * * @permission ohos.permission.ALLOW_SHOW_NON_SECURE_WINDOWS - * @param { boolean } shouldHide - Whether to hide insecure windows. The value true means to hide insecure windows, and false means the opposite. + * @param { boolean } shouldHide - Hide the non-secure windows if true, otherwise means the opposite. * @returns { Promise<void> } - The promise returned by the function. * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -166,15 +173,16 @@ declare namespace uiExtension { * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ hideNonSecureWindows(shouldHide: boolean): Promise<void>; /** - * Creates a subwindow for this window proxy. This API uses a promise to return the result. + * Create sub window. * - * @param { string } name - Name of the subwindow. - * @param { window.SubWindowOptions } subWindowOptions - Parameters used for creating the subwindow. + * @param { string } name - window name of sub window. + * @param { window.SubWindowOptions } subWindowOptions - options of sub window creation. * @returns { Promise<window.Window> } Promise used to return the subwindow. * @throws { BusinessError } 401 - Parameter error. Possible causes: * <br> 1. Mandatory parameters are left unspecified. @@ -182,31 +190,34 @@ declare namespace uiExtension { * <br> 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300005 - This window proxy is abnormal. * @syscap SystemCapability.ArkUI.ArkUI.Full * @StageModelOnly * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ createSubWindowWithOptions(name: string, subWindowOptions: window.SubWindowOptions): Promise<window.Window>; /** - * Adds or deletes the watermark flag for this window. This API uses a promise to return the result. + * Set the watermark flag on the UIExtension window * - * @param { boolean } enable - Whether to add or delete the flag. The value true means to add the watermark flag, and false means to delete the watermark flag. + * @param { boolean } enable - Add water mark flag to the UIExtension window if true, or remove flag if false * @returns { Promise<void> } - The promise returned by the function * @throws { BusinessError } 1300002 - The UIExtension window proxy is abnormal. * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @throws { BusinessError } 1300008 - The display device is abnormal. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ setWaterMarkFlag(enable: boolean): Promise<void>; /** - * Sets the events that the component (EmbeddedComponent or UIExtensionComponent) will occupy, preventing the host from responding to these events within the component's area. + * Set events that only need to be handled by the UIExtension provider * - * @param { EventFlag } eventFlags - Type of events to occupy. For details about the available values, see {@link uiExtension.EventFlag }. + * @param { EventFlag } eventFlags - The events to be set. * @returns { Promise<void> } - The promise returned by the function * @throws { BusinessError } 401 - Parameter error. Possible cause: * <br> 1. Mandatory parameters are left unspecified. @@ -304,26 +315,29 @@ declare namespace uiExtension { * @interface AvoidAreaInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - interface AvoidAreaInfo { + export interface AvoidAreaInfo { /** - * Type of the area where the window cannot be displayed. + * Describes the type of avoid area. * * @type { window.AvoidAreaType } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type: window.AvoidAreaType; /** - * Area where the window cannot be displayed. + * Describes the position and size of avoid area. * * @type { window.AvoidArea } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ area: window.AvoidArea; } @@ -334,17 +348,19 @@ declare namespace uiExtension { * @interface WindowProxyProperties * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 * */ - interface WindowProxyProperties { + export interface WindowProxyProperties { /** - * Position and size of the component (EmbeddedComponent or UIExtensionComponent). + * The position and size of the UIExtension window * * @type { window.Rect } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ uiExtensionHostWindowProxyRect: window.Rect; } @@ -359,7 +375,7 @@ declare namespace uiExtension { */ enum RectChangeReason { /** - * The rectangle of the host window containing the component changes. + * Host window rect change * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice @@ -378,7 +394,7 @@ declare namespace uiExtension { */ interface RectChangeOptions { /** - * New values of the rectangle of the component after the change. + * Rect of UIExtension Component * * @type { window.Rect } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -388,7 +404,7 @@ declare namespace uiExtension { rect: window.Rect, /** - * Reason for the rectangle change. + * Rect change reason * * @type { RectChangeReason } * @syscap SystemCapability.ArkUI.ArkUI.Full diff --git a/api/@ohos.base.d.ets b/api/@ohos.base.d.ets index 39f9d3995fd8fcee34650181e05a732a7468c206..0f7d42b99c200e99227ddb41516bb7ab0e64cea3 100644 --- a/api/@ohos.base.d.ets +++ b/api/@ohos.base.d.ets @@ -51,7 +51,7 @@ export type ErrorCallback<T extends Error = BusinessError> = (err: T)=> void; * @atomicservice * @since 20 */ -export type AsyncCallback<T, E = void> = (err: BusinessError<E>, data: T)=> void; +export type AsyncCallback<T, E = void> = (err: BusinessError<E> | null, data: T | undefined)=> void; /** * Defines the error interface. diff --git a/api/@ohos.base.d.ts b/api/@ohos.base.d.ts index b9930a4b6fd6d393f4a13ed87f19241bed4f52da..b01563daa27e71d27f1f205509cce38df81295b3 100644 --- a/api/@ohos.base.d.ts +++ b/api/@ohos.base.d.ts @@ -84,7 +84,7 @@ export interface Callback<T> { /** * Defines the basic error callback. - * @typedef ErrorCallback + * @typedef ErrorCallback * @syscap SystemCapability.Base * @since 6 */ diff --git a/api/@ohos.batteryInfo.d.ets b/api/@ohos.batteryInfo.d.ets index 7b8f73ca199c713d6393ca4ac983f258e4f6ca63..a5585c54f63074c3e844f1c3d89fe8a665c0eb6b 100644 --- a/api/@ohos.batteryInfo.d.ets +++ b/api/@ohos.batteryInfo.d.ets @@ -23,19 +23,431 @@ * <p>Battery information includes the remaining battery power, * voltage, temperature, model, and charger type. * + * @namespace batteryInfo * @syscap SystemCapability.PowerManager.BatteryManager.Core * @atomicservice * @since 20 */ -declare class batteryInfo { +declare namespace batteryInfo { + /** + * Sets the battery config by scene name. + * + * @param { string } sceneName - Indicates the battery charging scene name. + * sceneName parameter must be of type string. + * @param { string } sceneValue - Indicates the battery charging scene value. + * sceneValue parameter must be of type string. + * @returns { int } Return to set the charging configuration result. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types; + * @throws { BusinessError } 5100101 - Failed to connect to the service. + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @systemapi + * @since 20 + */ + function setBatteryConfig(sceneName: string, sceneValue: string): int; + + /** + * Queries the battery config by scene name. + * + * @param { string } sceneName - Indicates the battery charging scene name. + * sceneName parameter must be of type string. + * @returns { string } Returns the battery charging configuration, returns "" otherwise. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types; + * @throws { BusinessError } 5100101 - Failed to connect to the service. + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @systemapi + * @since 20 + */ + function getBatteryConfig(sceneName: string): string; + + /** + * Checks the battery config is enable by scene name. + * + * @param { string } sceneName - Indicates the battery charging scene name. + * sceneName parameter must be of type string. + * @returns { boolean } Returns true if the device supports the charging scene, returns false otherwise. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types; + * @throws { BusinessError } 5100101 - Failed to connect to the service. + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @systemapi + * @since 20 + */ + function isBatteryConfigSupported(sceneName: string): boolean; + /** * Battery state of charge (SoC) of the current device, in percent. * - * @readonly * @syscap SystemCapability.PowerManager.BatteryManager.Core * @atomicservice * @since 20 */ - static get batterySOC(): int; + function batterySOC(): int; + + /** + * Battery charging status of the current device. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @atomicservice + * @since 20 + */ + function chargingStatus(): BatteryChargeState; + + /** + * Battery health state of the current device. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + function healthStatus(): BatteryHealthState; + + /** + * Charger type of the current device. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + function pluggedType(): BatteryPluggedType; + + /** + * Battery voltage of the current device, in µV. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + function voltage(): int; + + /** + * Battery technology of the current device. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + function technology(): string; + + /** + * Battery temperature of the current device, in 0.1℃. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + function batteryTemperature(): int; + + /** + * Battery present state of the current device. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + function isBatteryPresent(): boolean; + + /** + * Battery capacity level of the current device. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + function batteryCapacityLevel(): BatteryCapacityLevel; + + /** + * Estimated remaining time for the current device to be fully charged, in ms. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @systemapi + * @since 20 + */ + function estimatedRemainingChargeTime(): long; + + /** + * Battery total energy of the current device, in mAh. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @systemapi + * @since 20 + */ + function totalEnergy(): int; + + /** + * Battery immediate current of the current device, in mA. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + function nowCurrent(): int; + + /** + * Battery remaining energy of the current device, in mAh. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @systemapi + * @since 20 + */ + function remainingEnergy(): int; + + /** + * Charger type of a device. + * + * @enum { int } + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + export enum BatteryPluggedType { + /** + * Unknown type + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + NONE, + /** + * AC charger + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + AC, + /** + * USB charger + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + USB, + /** + * Wireless charger + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + WIRELESS + } + + /** + * Battery charging status of a device. + * + * @enum { int } + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @atomicservice + * @since 20 + */ + export enum BatteryChargeState { + /** + * Unknown state. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @atomicservice + * @since 20 + */ + NONE, + /** + * The battery is being charged. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @atomicservice + * @since 20 + */ + ENABLE, + /** + * The battery is not being charged. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @atomicservice + * @since 20 + */ + DISABLE, + /** + * The battery is fully charged. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @atomicservice + * @since 20 + */ + FULL + } + + /** + * Battery health status of a device. + * + * @enum { int } + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + export enum BatteryHealthState { + /** + * Unknown state. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + UNKNOWN, + /** + * The battery is in healthy state. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + GOOD, + /** + * The battery is overheated. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + OVERHEAT, + /** + * The battery voltage is over high. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + OVERVOLTAGE, + /** + * The battery temperature is low. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + COLD, + /** + * The battery is dead. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + DEAD + } + + /** + * Battery capacity level of a device. + * + * @enum { int } + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + export enum BatteryCapacityLevel { + /** + * The battery is in full capacity level. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + LEVEL_FULL, + /** + * The battery is in high capacity level. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + LEVEL_HIGH, + /** + * The battery is in normal capacity level. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + LEVEL_NORMAL, + /** + * The battery is in low capacity level. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + LEVEL_LOW, + /** + * The battery is in warning low capacity level. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + LEVEL_WARNING, + /** + * The battery is in critical low capacity level. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + LEVEL_CRITICAL, + /** + * The battery is in the lowest capacity level, system will shut down automatically in a few seconds. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + LEVEL_SHUTDOWN + } + + /** + * Extra key of common event COMMON_EVENT_BATTERY_CHANGED. + * + * @enum { string } + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + export enum CommonEventBatteryChangedKey { + /** + * Extra code of batterySOC. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + EXTRA_SOC = 'soc', + /** + * Extra code of chargingStatus. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + EXTRA_CHARGE_STATE = 'chargeState', + /** + * Extra code of healthStatus. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + EXTRA_HEALTH_STATE = 'healthState', + /** + * Extra code of pluggedType. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + EXTRA_PLUGGED_TYPE = 'pluggedType', + /** + * Extra code of voltage. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + EXTRA_VOLTAGE = 'voltage', + /** + * Extra code of technology. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + EXTRA_TECHNOLOGY = 'technology', + /** + * Extra code of batteryTemperature. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + EXTRA_TEMPERATURE = 'temperature', + /** + * Extra code of isBatteryPresent. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + EXTRA_PRESENT = 'present', + /** + * Extra code of batteryCapacityLevel. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + EXTRA_CAPACITY_LEVEL = 'capacityLevel' + } } -export default batteryInfo; \ No newline at end of file +export default batteryInfo; diff --git a/api/@ohos.bluetooth.a2dp.d.ts b/api/@ohos.bluetooth.a2dp.d.ts index c3eeaadd89eb837188139d1d13470bbf1386e40e..6a64dc35c2c89251d199060ccea9e72c234b9bc7 100644 --- a/api/@ohos.bluetooth.a2dp.d.ts +++ b/api/@ohos.bluetooth.a2dp.d.ts @@ -34,7 +34,8 @@ import type baseProfile from './@ohos.bluetooth.baseProfile'; * @namespace a2dp * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace a2dp { /** @@ -42,7 +43,8 @@ declare namespace a2dp { * * @typedef { baseProfile.BaseProfile } BaseProfile * @syscap SystemCapability.Communication.Bluetooth.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ type BaseProfile = baseProfile.BaseProfile; @@ -65,7 +67,8 @@ declare namespace a2dp { * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ function createA2dpSrcProfile(): A2dpSourceProfile; @@ -83,7 +86,8 @@ declare namespace a2dp { * @typedef A2dpSourceProfile * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface A2dpSourceProfile extends BaseProfile { /** diff --git a/api/@ohos.bluetooth.access.d.ts b/api/@ohos.bluetooth.access.d.ts index d5c13b9beb2e75a4070871eaf9258bd110984427..99617b50385f93d98dff8fcac99f0ecd2c4aafed 100644 --- a/api/@ohos.bluetooth.access.d.ts +++ b/api/@ohos.bluetooth.access.d.ts @@ -42,7 +42,8 @@ import type { AsyncCallback, Callback } from './@ohos.base'; * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace access { /** @@ -79,7 +80,8 @@ declare namespace access { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ function enableBluetooth(): void; @@ -117,7 +119,8 @@ declare namespace access { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ function disableBluetooth(): void; @@ -186,7 +189,8 @@ declare namespace access { * @throws { BusinessError } 2900099 - Operation failed. * @syscap SystemCapability.Communication.Bluetooth.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function restrictBluetooth(): Promise<void>; @@ -225,7 +229,8 @@ declare namespace access { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ function getState(): BluetoothState; @@ -409,8 +414,7 @@ declare namespace access { * @param { string } deviceId - the randomized address of remote device. * @returns { Promise<void> } Returns the promise object. * @throws { BusinessError } 201 - Permission denied. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. - * 2. Incorrect parameter types. 3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 2900003 - Bluetooth disabled. * @throws { BusinessError } 2900010 - The number of supported device addresses has reached the upper limit. @@ -428,8 +432,7 @@ declare namespace access { * @param { string } deviceId - the randomized address of remote device. * @returns { Promise<void> } Returns the promise object. * @throws { BusinessError } 201 - Permission denied. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. - * 2. Incorrect parameter types. 3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 2900003 - Bluetooth disabled. * @throws { BusinessError } 2900099 - delete persistent device address failed. @@ -461,8 +464,7 @@ declare namespace access { * @param { string } deviceId - the randomized address of remote device. * @returns { boolean } Returns whether the randomized device address is valid. * @throws { BusinessError } 201 - Permission denied. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. - * 2. Incorrect parameter types. 3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 2900003 - Bluetooth disabled. * @throws { BusinessError } 2900099 - Check persistent device address failed. @@ -494,7 +496,8 @@ declare namespace access { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ export enum BluetoothState { /** @@ -516,7 +519,8 @@ declare namespace access { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_OFF = 0, /** @@ -538,7 +542,8 @@ declare namespace access { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_TURNING_ON = 1, /** @@ -560,7 +565,8 @@ declare namespace access { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_ON = 2, /** @@ -582,7 +588,8 @@ declare namespace access { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_TURNING_OFF = 3, /** @@ -596,7 +603,8 @@ declare namespace access { * * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_BLE_TURNING_ON = 4, /** @@ -610,7 +618,8 @@ declare namespace access { * * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_BLE_ON = 5, /** @@ -624,7 +633,8 @@ declare namespace access { * * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_BLE_TURNING_OFF = 6 } diff --git a/api/@ohos.data.distributedKVStore.d.ets b/api/@ohos.data.distributedKVStore.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..6c459e422776881d97fdea7958d88d23e9d8a4d3 --- /dev/null +++ b/api/@ohos.data.distributedKVStore.d.ets @@ -0,0 +1,3150 @@ +/* + * Copyright (c) 2022 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 ArkData + */ + +import { AsyncCallback, Callback } from './@ohos.base'; +import { ValuesBucket } from './@ohos.data.ValuesBucket'; +import dataSharePredicates from './@ohos.data.dataSharePredicates'; +import BaseContext from './application/BaseContext'; + +/** + * Provider interfaces to create a {@link KVManager} instance. + * + * @namespace distributedKVStore + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ +declare namespace distributedKVStore { + /** + * Provides configuration information to create a {@link KVManager} instance, + * which includes the caller's package name and ability or hap context. + * + * @interface KVManagerConfig + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + export interface KVManagerConfig { + /** + * Indicates the bundleName + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + bundleName: string; + + /** + * Indicates the ability or hap context + * + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * if swap the area, you should close all the KV store and use the new Context to create the KVManager + * @since 9 + */ + /** + * Indicates the ability or hap context + * + * @type { BaseContext } + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * if swap the area, you should close all the KV store and use the new BaseContext to create the KVManager + * @since 10 + */ + context: BaseContext; + } + + /** + * KVStore constants + * + * @interface Constants + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + export interface Constants { + /** + * Max key length is 1024. + * + * @type { number } + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + readonly MAX_KEY_LENGTH: number; + + /** + * Max value length is 4194303. + * + * @type { number } + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + readonly MAX_VALUE_LENGTH: number; + + /** + * Max device coordinate key length is 896. + * + * @type { number } + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + readonly MAX_KEY_LENGTH_DEVICE: number; + + /** + * Max store id length is 128. + * + * @type { number } + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + readonly MAX_STORE_ID_LENGTH: number; + + /** + * Max query length is 512000. + * + * @type { number } + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + readonly MAX_QUERY_LENGTH: number; + + /** + * Max batch operation size is 128. + * + * @type { number } + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + readonly MAX_BATCH_SIZE: number; + } + + /** + * Indicates the {@code ValueType}. + * <p>{@code ValueType} is obtained based on the value. + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + export enum ValueType { + /** + * Indicates that the value type is string. + * + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + STRING, + + /** + * Indicates that the value type is int. + * + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + INTEGER, + + /** + * Indicates that the value type is float. + * + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + FLOAT, + + /** + * Indicates that the value type is byte array. + * + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + BYTE_ARRAY, + + /** + * Indicates that the value type is boolean. + * + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + BOOLEAN, + + /** + * Indicates that the value type is double. + * + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + DOUBLE + } + + /** + * Obtains {@code Value} objects stored in a {@link SingleKVStore} or {@link DeviceKVStore} database. + * + * @interface Value + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + export interface Value { + /** + * Indicates the value type + * + * @type { ValueType } + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + * @see ValueType + */ + type: ValueType; + + /** + * Indicates the value + * + * @type { Uint8Array | string | number | boolean } + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + value: Uint8Array | string | number | boolean; + } + + /** + * Provides key-value pairs stored in the distributedKVStore. + * + * @interface Entry + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + export interface Entry { + /** + * Indicates the key + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + key: string; + + /** + * Indicates the value + * + * @type { Value } + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + value: Value; + } + + /** + * Receive notifications of all data changes, including data insertion, update, and deletion. + * <p>If you have subscribed to {@code SingleKVStore} or {@code DeviceKVStore}, you will receive + * data change notifications and obtain the changed data from the parameters in callback methods + * upon data insertion, update or deletion. + * + * @interface ChangeNotification + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + export interface ChangeNotification { + /** + * Indicates data insertion records. + * + * @type { Entry[] } + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + insertEntries: Entry[]; + + /** + * Indicates data update records. + * + * @type { Entry[] } + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + updateEntries: Entry[]; + + /** + * Indicates data deletion records. + * + * @type { Entry[] } + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + deleteEntries: Entry[]; + + /** + * Indicates the device id which brings the data change. + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + deviceId: string; + } + + /** + * Indicates the database synchronization mode. + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + export enum SyncMode { + /** + * Indicates that data is only pulled from the remote end. + * + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + PULL_ONLY, + + /** + * Indicates that data is only pushed from the local end. + * + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + PUSH_ONLY, + + /** + * Indicates that data is pushed from the local end, and then pulled from the remote end. + * + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + PUSH_PULL + } + + /** + * Describes the subscription type. + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + export enum SubscribeType { + /** + * Subscription to local data changes + * + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + SUBSCRIBE_TYPE_LOCAL, + + /** + * Subscription to remote data changes + * + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + SUBSCRIBE_TYPE_REMOTE, + + /** + * Subscription to both local and remote data changes + * + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + SUBSCRIBE_TYPE_ALL + } + + /** + * Describes the KVStore type. + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + export enum KVStoreType { + /** + * Device-collaboration database, as specified by {@code DeviceKVStore} + * + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + DEVICE_COLLABORATION, + + /** + * Single-version database, as specified by {@code SingleKVStore} + * + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + SINGLE_VERSION + } + + /** + * Describes the KVStore security level. + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + export enum SecurityLevel { + /** + * S1: means the db is in the low security level + * There are some low impact when the data is leaked. + * + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + S1, + + /** + * S2: means the db is in the middle security level + * There are some major impact when the data is leaked. + * + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + S2, + + /** + * S3: means the db is in the high security level + * There are some severity impact when the data is leaked. + * + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + S3, + + /** + * S4: means the db is in the critical security level + * There are some critical impact when the data is leaked. + * + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + S4 + } + + /** + * Provides configuration options to create a {@code SingleKVStore} or {@code DeviceKVStore}. + * + * @interface Options + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + export interface Options { + /** + * Indicates whether to create a database when the database file does not exist + * + * @type { ?boolean } + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + createIfMissing?: boolean; + + /** + * Indicates whether database files to be encrypted + * + * @type { ?boolean } + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + encrypt?: boolean; + + /** + * Indicates whether to back up database files + * + * @type { ?boolean } + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + backup?: boolean; + + /** + * Indicates whether database files are automatically synchronized + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @type { ?boolean } + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + autoSync?: boolean; + + /** + * Indicates the database type + * + * @type { ?KVStoreType } + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + kvStoreType?: KVStoreType; + + /** + * Indicates the database security level + * + * @type { SecurityLevel } + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + securityLevel: SecurityLevel; + + /** + * Indicates the database schema + * + * @type { ?Schema } + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + schema?: Schema; + } + + /** + * Represents the database schema. + * You can set the schema object in options when create or open the database. + * + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + export class Schema { + /** + * A constructor used to create a Schema instance. + * + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + constructor(); + + /** + * Indicates the root json object. + * + * @type { FieldNode } + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + root: FieldNode; + + /** + * Indicates the string array of json. + * + * @type { Array<string> } + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + indexes: Array<string>; + + /** + * Indicates the mode of schema. + * + * @type { number } + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + mode: number; + + /** + * Indicates the skip size of schema. + * + * @type { number } + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + skip: number; + } + + /** + * Represents a node of a {@link Schema} instance. + * <p>With a {@link Schema} instance, you can define the value fields which stored in the database. + * <p>A FieldNode of the {@link Schema} instance is either a leaf or a non-leaf node. + * <p>The leaf node must have a value; the non-leaf node must have a child {@code FieldNode}. + * + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + export class FieldNode { + /** + * A constructor used to create a FieldNode instance with the specified field. + * name Indicates the field node name. + * + * @param { string } name - It can not be empty. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + constructor(name: string); + + /** + * Adds a child node to this {@code FieldNode}. + * <p>Add a child node to makes this node a non-leaf node and field value will be ignored if it has a child node. + * + * @param { FieldNode } child - The field node to append. + * @returns { boolean } Returns true if the child node is successfully added to this {@code FieldNode} and false otherwise. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + appendChild(child: FieldNode): boolean; + + /** + * Indicates the default value of field node. + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + // default: string; // TODO: add this field + + /** + * Indicates the nullable of database field. + * + * @type { boolean } + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + nullable: boolean; + + /** + * Indicates the type of value. + * + * @type { number } + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + type: number; + } + + /** + * Provides methods to operate the result set of the {@code SingleKVStore} or {@code DeviceKVStore} database. + * <p>The result set is created by using the {@code getResultSet} method in the {@code SingleKVStore} or + * {@code DeviceKVStore} class. This interface also provides methods to move the data read + * position in the result set. + * + * @interface KVStoreResultSet + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + export interface KVStoreResultSet { + /** + * Obtains the number of lines in a result set. + * + * @returns { number } Returns the number of lines. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getCount(): number; + + /** + * Obtains the current read position in a result set. + * + * @returns { number } Returns the current read position. The read position starts with 0. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getPosition(): number; + + /** + * Moves the read position to the first line. + * <p>If the result set is empty, false is returned. + * + * @returns { boolean } Returns true if the operation succeeds; return false otherwise. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + moveToFirst(): boolean; + + /** + * Moves the read position to the last line. + * <p>If the result set is empty, false is returned. + * + * @returns { boolean } Returns true if the operation succeeds; return false otherwise. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + moveToLast(): boolean; + + /** + * Moves the read position to the next line. + * <p>If the result set is empty or the data in the last line is being read, false is returned. + * + * @returns { boolean } Returns true if the operation succeeds; return false otherwise. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + moveToNext(): boolean; + + /** + * Moves the read position to the previous line. + * <p>If the result set is empty or the data in the first line is being read, false is returned. + * + * @returns { boolean } Returns true if the operation succeeds; return false otherwise. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + moveToPrevious(): boolean; + + /** + * Moves the read position by a relative offset to the current position. + * + * @param { number } offset - Indicates the relative offset to the current position. A negative offset indicates moving + * backwards, and a positive offset indicates moving forwards. For example, if the current position is entry 1 and + * this offset is 2, the destination position will be entry 3; if the current position is entry 3 and this offset is -2, + * the destination position will be entry 1. The valid final position after moving forwards starts with 0. If the + * final position is invalid, false will be returned. + * @returns { boolean } Returns true if the operation succeeds; return false otherwise. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + move(offset: number): boolean; + + /** + * Moves the read position from 0 to an absolute position. + * + * @param { number } position - Indicates the absolute position. + * @returns { boolean } Returns true if the operation succeeds; return false otherwise. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + moveToPosition(position: number): boolean; + + /** + * Checks whether the read position is the first line. + * + * @returns { boolean } Returns true if the read position is the first line; returns false otherwise. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + isFirst(): boolean; + + /** + * Checks whether the read position is the last line. + * + * @returns { boolean } Returns true if the read position is the last line; returns false otherwise. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + isLast(): boolean; + + /** + * Checks whether the read position is before the last line. + * + * @returns { boolean } Returns true if the read position is before the first line; returns false otherwise. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + isBeforeFirst(): boolean; + + /** + * Checks whether the read position is after the last line. + * + * @returns { boolean } Returns true if the read position is after the last line; returns false otherwise. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + isAfterLast(): boolean; + + /** + * Obtains a key-value pair. + * + * @returns { Entry } Returns a key-value pair. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getEntry(): Entry; + } + + /** + * Represents a database query using predicates. + * <p>This class provides a constructor used to create a {@code Query} instance, which is used to query data + * matching specified conditions in the database. + * <p>This class also provides methods to add predicates to the {@code Query} instance. + * + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + export class Query { + /** + * A constructor used to create a Query instance. + * + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + constructor(); + + /** + * Resets this {@code Query} object. + * + * @returns { Query } Returns the reset {@code Query} object. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + reset(): Query; + + /** + * Constructs a {@code Query} object to query entries with the specified field whose value is equal to the specified long value. + * + * @param { string } field - Indicates the field, which cannot contain ^. + * @param { number | string | boolean } value - Indicates the value to be compared. + * @returns { Query } Returns the {@coed Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + equalTo(field: string, value: number | string | boolean): Query; + + /** + * Constructs a {@code Query} object to query entries with the specified field whose value is not equal to the specified int value. + * + * @param { string } field - Indicates the field, which cannot contain ^. + * @param { number | string | boolean } value - Indicates the value to be compared. + * @returns { Query } Returns the {@coed Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + notEqualTo(field: string, value: number | string | boolean): Query; + + /** + * Constructs a {@code Query} object to query entries with the specified field whose value is greater than or equal to the + * specified int value. + * + * @param { string } field - Indicates the field, which cannot contain ^. + * @param { number | string | boolean } value - Indicates the value to be compared. + * @returns { Query } Returns the {@coed Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + greaterThan(field: string, value: number | string | boolean): Query; + + /** + * Constructs a {@code Query} object to query entries with the specified field whose value is less than the specified int value. + * + * @param { string } field - Indicates the field, which cannot contain ^. + * @param { number | string } value - Indicates the value to be compared. + * @returns { Query } Returns the {@coed Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + lessThan(field: string, value: number | string): Query; + + /** + * Constructs a {@code Query} object to query entries with the specified field whose value is greater than or + * equal to the specified int value. + * + * @param { string } field - Indicates the field, which cannot contain ^. + * @param { number | string } value - Indicates the value to be compared. + * @returns { Query } Returns the {@coed Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + greaterThanOrEqualTo(field: string, value: number | string): Query; + + /** + * Constructs a {@code Query} object to query entries with the specified field whose value is less than or equal to the + * specified int value. + * + * @param { string } field - Indicates the field, which cannot contain ^. + * @param { number | string } value - Indicates the value to be compared. + * @returns { Query } Returns the {@coed Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + lessThanOrEqualTo(field: string, value: number | string): Query; + + /** + * Constructs a {@code Query} object to query entries with the specified field whose value is null. + * + * @param { string } field - Indicates the field, which cannot contain ^. + * @returns { Query } Returns the {@coed Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + isNull(field: string): Query; + + /** + * Constructs a {@code Query} object to query entries with the specified field whose value is within the specified int value list. + * + * @param { string } field - Indicates the field, which cannot contain ^. + * @param { number[] } valueList - Indicates the int value list. + * @returns { Query } Returns the {@coed Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + inNumber(field: string, valueList: number[]): Query; + + /** + * Constructs a {@code Query} object to query entries with the specified field whose value is within the specified string value list. + * + * @param { string } field - Indicates the field, which cannot contain ^. + * @param { string[] } valueList - Indicates the string value list. + * @returns { Query } Returns the {@coed Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + inString(field: string, valueList: string[]): Query; + + /** + * Constructs a {@code Query} object to query entries with the specified field whose value is not within the specified int value list. + * + * @param { string } field - Indicates the field, which cannot contain ^. + * @param { number[] } valueList - Indicates the int value list. + * @returns { Query } Returns the {@coed Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + notInNumber(field: string, valueList: number[]): Query; + + /** + * Constructs a {@code Query} object to query entries with the specified field whose value is not within the specified string value list. + * + * @param { string } field - Indicates the field, which cannot contain ^. + * @param { string[] } valueList - Indicates the string value list. + * @returns { Query } Returns the {@coed Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + notInString(field: string, valueList: string[]): Query; + + /** + * Constructs a {@code Query} object to query entries with the specified field whose value is similar to the specified string value. + * + * @param { string } field - Indicates the field, which cannot contain ^. + * @param { string } value - Indicates the string value. + * @returns { Query } Returns the {@coed Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + like(field: string, value: string): Query; + + /** + * Constructs a {@code Query} object to query entries with the specified field whose value is not similar to the specified string value. + * + * @param { string } field - Indicates the field, which cannot contain ^. + * @param { string } value - Indicates the string value. + * @returns { Query } Returns the {@coed Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + unlike(field: string, value: string): Query; + + /** + * Constructs a {@code Query} object with the and condition. + * <p>Multiple predicates should be connected using the and or or condition. + * + * @returns { Query } Returns the {@coed Query} object. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + and(): Query; + + /** + * Constructs a {@code Query} object with the or condition. + * <p>Multiple predicates should be connected using the and or or condition. + * + * @returns { Query } Returns the {@coed Query} object. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + or(): Query; + + /** + * Constructs a {@code Query} object to sort the query results in ascending order. + * + * @param { string } field - Indicates the field, which cannot contain ^. + * @returns { Query } Returns the {@coed Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + orderByAsc(field: string): Query; + + /** + * Constructs a {@code Query} object to sort the query results in descending order. + * + * @param { string } field - Indicates the field, which cannot contain ^. + * @returns { Query } Returns the {@coed Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + orderByDesc(field: string): Query; + + /** + * Constructs a {@code Query} object to specify the number of results and the start position. + * + * @param { number } total - Indicates the number of results. + * @param { number } offset - Indicates the start position. + * @returns { Query } Returns the {@coed Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + limit(total: number, offset: number): Query; + + /** + * Creates a {@code Query} condition with a specified field that is not null. + * + * @param { string } field - Indicates the specified field. + * @returns { Query } Returns the {@coed Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + isNotNull(field: string): Query; + + /** + * Creates a query condition group with a left bracket. + * <p>Multiple query conditions in an {@code Query} object can be grouped. The query conditions in a group can be used as a + * whole to combine with other query conditions. + * + * @returns { Query } Returns the {@coed Query} object. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + beginGroup(): Query; + + /** + * Creates a query condition group with a right bracket. + * <p>Multiple query conditions in an {@code Query} object can be grouped. The query conditions in a group can be used as a + * whole to combine with other query conditions. + * + * @returns { Query } Returns the {@coed Query} object. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + endGroup(): Query; + + /** + * Creates a query condition with a specified key prefix. + * + * @param { string } prefix - Indicates the specified key prefix. + * @returns { Query } Returns the {@coed Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + prefixKey(prefix: string): Query; + + /** + * Sets a specified index that will be preferentially used for query. + * + * @param { string } index - Indicates the index to set. + * @returns { Query } Returns the {@coed Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + setSuggestIndex(index: string): Query; + + /** + * Add device ID key prefix.Used by {@code DeviceKVStore}. + * + * @param { string } deviceId - Specify device id to query from, It can not be empty. + * @returns { Query } Returns the {@code Query} object with device ID prefix added. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + deviceId(deviceId: string): Query; + + /** + * Get a String that represents this {@code Query}. + * <p>The String would be parsed to DB query format. + * The String length should be no longer than 500kb. + * + * @returns { string } String representing this {@code Query}. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getSqlLike(): string; + } + + /** + * Provides methods related to single-version distributed databases. + * <p>To create a {@code SingleKVStore} database, + * you can use the {@link data.distributed.common.KVManager#getKVStore​(Options, String)} method + * with {@code KVStoreType} set to {@code SINGLE_VERSION} for the input parameter {@code Options}. + * This database synchronizes data to other databases in time sequence. + * The {@code SingleKVStore} database does not support + * synchronous transactions, or data search using snapshots. + * + * @interface SingleKVStore + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + export interface SingleKVStore { + /** + * Writes a key-value pair of the string type into the {@code SingleKVStore} database. + * <p>If you do not want to synchronize this key-value pair to other devices, set the write option in the local database. + * + * @param { string } key - Indicates the key. Length must be less than {@code MAX_KEY_LENGTH}. + * Spaces before and after the key will be cleared. + * @param { Uint8Array | string | number | boolean } value - Indicates the value to be inserted. + * @param { AsyncCallback<void> } callback - the callback of put. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + /** + * Writes a key-value pair of the string type into the {@code SingleKVStore} database. + * <p>If you do not want to synchronize this key-value pair to other devices, set the write option in the local database. + * + * @param { string } key - Indicates the key. Length must be less than {@code MAX_KEY_LENGTH}. + * Spaces before and after the key will be cleared. + * @param { Uint8Array | string | number | boolean } value - Indicates the value to be inserted. + * @param { AsyncCallback<void> } callback - the callback of put. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 10 + */ + put(key: string, value: Uint8Array | string | number | boolean, callback: AsyncCallback<void>): void; + + /** + * Writes a key-value pair of the string type into the {@code SingleKVStore} database. + * <p>If you do not want to synchronize this key-value pair to other devices, set the write option in the local database. + * + * @param { string } key - Indicates the key. Length must be less than {@code MAX_KEY_LENGTH}. + * Spaces before and after the key will be cleared. + * @param { Uint8Array | string | number | boolean } value - Indicates the value to be inserted. + * @returns { Promise<void> } the promise returned by the function. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + /** + * Writes a key-value pair of the string type into the {@code SingleKVStore} database. + * <p>If you do not want to synchronize this key-value pair to other devices, set the write option in the local database. + * + * @param { string } key - Indicates the key. Length must be less than {@code MAX_KEY_LENGTH}. + * Spaces before and after the key will be cleared. + * @param { Uint8Array | string | number | boolean } value - Indicates the value to be inserted. + * @returns { Promise<void> } the promise returned by the function. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 10 + */ + put(key: string, value: Uint8Array | string | number | boolean): Promise<void>; + + /** + * Inserts key-value pairs into the {@code SingleKVStore} database in batches. + * + * @param { Entry[] } entries - Indicates the key-value pairs to be inserted in batches. + * @param { AsyncCallback<void> } callback - the callback of putBatch. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + /** + * Inserts key-value pairs into the {@code SingleKVStore} database in batches. + * + * @param { Entry[] } entries - Indicates the key-value pairs to be inserted in batches. + * @param { AsyncCallback<void> } callback - the callback of putBatch. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 10 + */ + putBatch(entries: Entry[], callback: AsyncCallback<void>): void; + + /** + * Inserts key-value pairs into the {@code SingleKVStore} database in batches. + * + * @param { Entry[] } entries - Indicates the key-value pairs to be inserted in batches. + * @returns { Promise<void> } the promise returned by the function. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + /** + * Inserts key-value pairs into the {@code SingleKVStore} database in batches. + * + * @param { Entry[] } entries - Indicates the key-value pairs to be inserted in batches. + * @returns { Promise<void> } the promise returned by the function. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 10 + */ + putBatch(entries: Entry[]): Promise<void>; + + /** + * Writes values of ValuesBucket type into the {@code SingleKVStore} database. + * + * @param { Array<ValuesBucket> } value - Indicates the ValuesBucket array to be inserted. + * @param { AsyncCallback<void> } callback - the callback of putBatch. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @systemapi + * @StageModelOnly + * @since 9 + */ + /** + * Writes values of ValuesBucket type into the {@code SingleKVStore} database. + * + * @param { Array<ValuesBucket> } value - Indicates the ValuesBucket array to be inserted. + * @param { AsyncCallback<void> } callback - the callback of putBatch. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @systemapi + * @StageModelOnly + * @since 10 + */ + putBatch(value: Array<ValuesBucket>, callback: AsyncCallback<void>): void; + + /** + * Writes values of ValuesBucket type into the {@code SingleKVStore} database. + * + * @param { Array<ValuesBucket> } value - Indicates the ValuesBucket array to be inserted. + * @returns { Promise<void> } the promise returned by the function. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @systemapi + * @StageModelOnly + * @since 9 + */ + /** + * Writes values of ValuesBucket type into the {@code SingleKVStore} database. + * + * @param { Array<ValuesBucket> } value - Indicates the ValuesBucket array to be inserted. + * @returns { Promise<void> } the promise returned by the function. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @systemapi + * @StageModelOnly + * @since 10 + */ + putBatch(value: Array<ValuesBucket>): Promise<void>; + + /** + * Deletes the key-value pair based on a specified key. + * + * @param { string } key - Indicates the key. Length must be less than {@code MAX_KEY_LENGTH}. + * Spaces before and after the key will be cleared. + * @param { AsyncCallback<void> } callback - the callback of delete. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + /** + * Deletes the key-value pair based on a specified key. + * + * @param { string } key - Indicates the key. Length must be less than {@code MAX_KEY_LENGTH}. + * Spaces before and after the key will be cleared. + * @param { AsyncCallback<void> } callback - the callback of delete. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 10 + */ + delete(key: string, callback: AsyncCallback<void>): void; + + /** + * Deletes the key-value pair based on a specified key. + * + * @param { string } key - Indicates the key. Length must be less than {@code MAX_KEY_LENGTH}. + * Spaces before and after the key will be cleared. + * @returns { Promise<void> } the promise returned by the function. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + /** + * Deletes the key-value pair based on a specified key. + * + * @param { string } key - Indicates the key. Length must be less than {@code MAX_KEY_LENGTH}. + * Spaces before and after the key will be cleared. + * @returns { Promise<void> } the promise returned by the function. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 10 + */ + delete(key: string): Promise<void>; + + /** + * Deletes the key-value pairs based on the dataSharePredicates. + * + * @param { dataSharePredicates.DataSharePredicates } predicates - Indicates the dataSharePredicates. + * @param { AsyncCallback<void> } callback - the callback of delete. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.DataShare.Provider + * @systemapi + * @StageModelOnly + * @since 9 + */ + /** + * Deletes the key-value pairs based on the dataSharePredicates. + * + * @param { dataSharePredicates.DataSharePredicates } predicates - Indicates the dataSharePredicates. + * @param { AsyncCallback<void> } callback - the callback of delete. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.DataShare.Provider + * @systemapi + * @StageModelOnly + * @since 10 + */ + delete(predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback<void>): void; + + /** + * Deletes the key-value pairs based on the dataSharePredicates. + * + * @param { dataSharePredicates.DataSharePredicates } predicates - Indicates the dataSharePredicates. + * @returns { Promise<void> } the promise returned by the function. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.DataShare.Provider + * @systemapi + * @StageModelOnly + * @since 9 + */ + /** + * Deletes the key-value pairs based on the dataSharePredicates. + * + * @param { dataSharePredicates.DataSharePredicates } predicates - Indicates the dataSharePredicates. + * @returns { Promise<void> } the promise returned by the function. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.DataShare.Provider + * @systemapi + * @StageModelOnly + * @since 10 + */ + delete(predicates: dataSharePredicates.DataSharePredicates): Promise<void>; + + /** + * Deletes key-value pairs in batches from the {@code SingleKVStore} database. + * + * @param { string[] } keys - Indicates the key-value pairs to be deleted in batches, It can not be empty. + * @param { AsyncCallback<void> } callback - the callback of deleteBatch. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + /** + * Deletes key-value pairs in batches from the {@code SingleKVStore} database. + * + * @param { string[] } keys - Indicates the key-value pairs to be deleted in batches, It can not be empty. + * @param { AsyncCallback<void> } callback - the callback of deleteBatch. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 10 + */ + deleteBatch(keys: string[], callback: AsyncCallback<void>): void; + + /** + * Deletes key-value pairs in batches from the {@code SingleKVStore} database. + * + * @param { string[] } keys - Indicates the key-value pairs to be deleted in batches, It can not be empty. + * @returns { Promise<void> } the promise returned by the function. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + /** + * Deletes key-value pairs in batches from the {@code SingleKVStore} database. + * + * @param { string[] } keys - Indicates the key-value pairs to be deleted in batches, It can not be empty. + * @returns { Promise<void> } the promise returned by the function. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 10 + */ + deleteBatch(keys: string[]): Promise<void>; + + /** + * Removes data of the specified device from current database. This method is used to remove only the data + * synchronized from remote devices. This operation does not synchronize data to other databases or affect + * subsequent data synchronization. + * + * @param { string } deviceId - Identifies the device whose data is to be removed and the value cannot be the current device ID. + * @param { AsyncCallback<void> } callback - the callback of removeDeviceData. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Parameter verification failed. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + removeDeviceData(deviceId: string, callback: AsyncCallback<void>): void; + + /** + * Removes data of the specified device from current database. This method is used to remove only the data + * synchronized from remote devices. This operation does not synchronize data to other databases or affect + * subsequent data synchronization. + * + * @param { string } deviceId - Identifies the device whose data is to be removed and the value cannot be the current device ID. + * @returns { Promise<void> } the promise returned by the function. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Parameter verification failed. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + removeDeviceData(deviceId: string): Promise<void>; + + /** + * Obtains the value of a specified key. + * + * @param { string } key - Indicates the key. The length must be less than {@code MAX_KEY_LENGTH}. + * @param { AsyncCallback<boolean | string | number | Uint8Array> } callback - + * {Uint8Array|string|boolean|number}: the returned value specified by the key. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100004 - Not found. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + get(key: string, callback: AsyncCallback<boolean | string | number | Uint8Array>): void; + + /** + * Obtains the value of a specified key. + * + * @param { string } key - Indicates the key. The length must be less than {@code MAX_KEY_LENGTH}. + * @returns { Promise<boolean | string | number | Uint8Array> } + * {Uint8Array|string|boolean|number}: the returned value specified by the key. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100004 - Not found. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + get(key: string): Promise<boolean | string | number | Uint8Array>; + + /** + * Obtains all key-value pairs that match a specified key prefix. + * + * @param { string } keyPrefix - Indicates the key prefix to match. + * @param { AsyncCallback<Entry[]> } callback - {Entry[]}: the list of all key-value pairs + * that match the specified key prefix. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getEntries(keyPrefix: string, callback: AsyncCallback<Entry[]>): void; + + /** + * Obtains all key-value pairs that match a specified key prefix. + * + * @param { string } keyPrefix - Indicates the key prefix to match. + * @returns { Promise<Entry[]> } {Entry[]}: the list of all key-value pairs that match the + * specified key prefix. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getEntries(keyPrefix: string): Promise<Entry[]>; + + /** + * Obtains the list of key-value pairs matching the specified {@code Query} object. + * + * @param { Query } query - Indicates the {@code Query} object. + * @param { AsyncCallback<Entry[]> } callback - {Entry[]}: the list of all key-value pairs + * matching the specified {@code Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getEntries(query: Query, callback: AsyncCallback<Entry[]>): void; + + /** + * Obtains the list of key-value pairs matching the specified {@code Query} object. + * + * @param { Query } query - Indicates the {@code Query} object. + * @returns { Promise<Entry[]> } {Entry[]}: the list of all key-value pairs matching the + * specified {@code Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getEntries(query: Query): Promise<Entry[]>; + + /** + * Obtains the result set with a specified prefix from a {@code SingleKVStore} database. The {@code KVStoreResultSet} + * object can be used to query all key-value pairs that meet the search criteria. Each {@code SingleKVStore} + * instance can have a maximum of four {@code KVStoreResultSet} objects at the same time. If you have created + * four objects, calling this method will return a failure. Therefore, you are advised to call the closeResultSet + * method to close unnecessary {@code KVStoreResultSet} objects in a timely manner. + * + * @param { string } keyPrefix - Indicates the key prefix to match. + * @param { AsyncCallback<KVStoreResultSet> } callback - {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the specified keyPrefix. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + /** + * Obtains the result set with a specified prefix from a {@code SingleKVStore} database. The {@code KVStoreResultSet} + * object can be used to query all key-value pairs that meet the search criteria. Each {@code SingleKVStore} + * instance can have a maximum of four {@code KVStoreResultSet} objects at the same time. If you have created + * four objects, calling this method will return a failure. Therefore, you are advised to call the closeResultSet + * method to close unnecessary {@code KVStoreResultSet} objects in a timely manner. + * + * @param { string } keyPrefix - Indicates the key prefix to match. + * @param { AsyncCallback<KVStoreResultSet> } callback - {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the specified keyPrefix. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100001 - Over max limits. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 10 + */ + getResultSet(keyPrefix: string, callback: AsyncCallback<KVStoreResultSet>): void; + + /** + * Obtains the result set with a specified prefix from a {@code SingleKVStore} database. The {@code KVStoreResultSet} + * object can be used to query all key-value pairs that meet the search criteria. Each {@code SingleKVStore} + * instance can have a maximum of four {@code KVStoreResultSet} objects at the same time. If you have created + * four objects, calling this method will return a failure. Therefore, you are advised to call the closeResultSet + * method to close unnecessary {@code KVStoreResultSet} objects in a timely manner. + * + * @param { string } keyPrefix - Indicates the key prefix to match. + * @returns { Promise<KVStoreResultSet> } {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the specified keyPrefix. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + /** + * Obtains the result set with a specified prefix from a {@code SingleKVStore} database. The {@code KVStoreResultSet} + * object can be used to query all key-value pairs that meet the search criteria. Each {@code SingleKVStore} + * instance can have a maximum of four {@code KVStoreResultSet} objects at the same time. If you have created + * four objects, calling this method will return a failure. Therefore, you are advised to call the closeResultSet + * method to close unnecessary {@code KVStoreResultSet} objects in a timely manner. + * + * @param { string } keyPrefix - Indicates the key prefix to match. + * @returns { Promise<KVStoreResultSet> } {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the specified keyPrefix. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100001 - Over max limits. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 10 + */ + getResultSet(keyPrefix: string): Promise<KVStoreResultSet>; + + /** + * Obtains the {@code KVStoreResultSet} object matching the specified {@code Query} object. + * + * @param { Query } query - Indicates the {@code Query} object. + * @param { AsyncCallback<KVStoreResultSet> } callback - {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the specified {@code Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + /** + * Obtains the {@code KVStoreResultSet} object matching the specified {@code Query} object. + * + * @param { Query } query - Indicates the {@code Query} object. + * @param { AsyncCallback<KVStoreResultSet> } callback - {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the specified {@code Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100001 - Over max limits. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 10 + */ + getResultSet(query: Query, callback: AsyncCallback<KVStoreResultSet>): void; + + /** + * Obtains the {@code KVStoreResultSet} object matching the specified {@code Query} object. + * + * @param { Query } query - Indicates the {@code Query} object. + * @returns { Promise<KVStoreResultSet> } {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the specified {@code Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + /** + * Obtains the {@code KVStoreResultSet} object matching the specified {@code Query} object. + * + * @param { Query } query - Indicates the {@code Query} object. + * @returns { Promise<KVStoreResultSet> } {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the specified {@code Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100001 - Over max limits. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 10 + */ + getResultSet(query: Query): Promise<KVStoreResultSet>; + + /** + * Obtains the KVStoreResultSet object matching the specified predicate object. + * + * @param { dataSharePredicates.DataSharePredicates } predicates - Indicates the datasharePredicates. + * @param { AsyncCallback<KVStoreResultSet> } callback - {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the specified {@code dataSharePredicates.DataSharePredicates} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.DataShare.Provider + * @systemapi + * @StageModelOnly + * @since 9 + */ + /** + * Obtains the KVStoreResultSet object matching the specified predicate object. + * + * @param { dataSharePredicates.DataSharePredicates } predicates - Indicates the datasharePredicates. + * @param { AsyncCallback<KVStoreResultSet> } callback - {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the specified {@code dataSharePredicates.DataSharePredicates} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 15100001 - Over max limits. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.DataShare.Provider + * @systemapi + * @StageModelOnly + * @since 10 + */ + getResultSet(predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback<KVStoreResultSet>): void; + + /** + * Obtains the KVStoreResultSet object matching the specified predicate object. + * + * @param { dataSharePredicates.DataSharePredicates } predicates - Indicates the datasharePredicates. + * @returns { Promise<KVStoreResultSet> } {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the specified {@code dataSharePredicates.DataSharePredicates} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.DataShare.Provider + * @systemapi + * @StageModelOnly + * @since 9 + */ + /** + * Obtains the KVStoreResultSet object matching the specified predicate object. + * + * @param { dataSharePredicates.DataSharePredicates } predicates - Indicates the datasharePredicates. + * @returns { Promise<KVStoreResultSet> } {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the specified {@code dataSharePredicates.DataSharePredicates} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 15100001 - Over max limits. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.DataShare.Provider + * @systemapi + * @StageModelOnly + * @since 10 + */ + getResultSet(predicates: dataSharePredicates.DataSharePredicates): Promise<KVStoreResultSet>; + + /** + * Closes a {@code KVStoreResultSet} object returned by getResultSet method. + * + * @param { KVStoreResultSet } resultSet - Indicates the {@code KVStoreResultSet} object to close. + * @param { AsyncCallback<void> } callback - the callback of closeResultSet. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + closeResultSet(resultSet: KVStoreResultSet, callback: AsyncCallback<void>): void; + + /** + * Closes a {@code KVStoreResultSet} object returned by getResultSet method. + * + * @param { KVStoreResultSet } resultSet - Indicates the {@code KVStoreResultSet} object to close. + * @returns { Promise<void> } the promise returned by the function. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + closeResultSet(resultSet: KVStoreResultSet): Promise<void>; + + /** + * Obtains the number of results matching the specified {@code Query} object. + * + * @param { Query } query - Indicates the {@code Query} object. + * @param { AsyncCallback<number> } callback - {number}: the number of results matching the + * specified {@code Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getResultSize(query: Query, callback: AsyncCallback<number>): void; + + /** + * Obtains the number of results matching the specified {@code Query} object. + * + * @param { Query } query - Indicates the {@code Query} object. + * @returns { Promise<number> } {number}: the number of results matching the specified + * {@code Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getResultSize(query: Query): Promise<number>; + + /** + * Backs up a database in the specified filename. + * + * @param { string } file - Indicates the database backup filename, It can not be empty and + * The length must be less than {@code MAX_KEY_LENGTH}. + * @param { AsyncCallback<void> } callback - the callback of backup. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Parameter verification failed. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + backup(file: string, callback: AsyncCallback<void>): void; + + /** + * Backs up a database in the specified filename. + * + * @param { string } file - Indicates the database backup filename, It can not be empty and + * The length must be less than {@code MAX_KEY_LENGTH}. + * @returns { Promise<void> } the promise returned by the function. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Parameter verification failed. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + backup(file: string): Promise<void>; + + /** + * Restores a database from a specified database file. + * + * @param { string } file - Indicates the database backup filename, It can not be empty and + * The length must be less than {@code MAX_KEY_LENGTH}. + * @param { AsyncCallback<void> } callback - the callback of restore. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Parameter verification failed. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + restore(file: string, callback: AsyncCallback<void>): void; + + /** + * Restores a database from a specified database file. + * + * @param { string } file - Indicates the database backup filename, It can not be empty and + * The length must be less than {@code MAX_KEY_LENGTH}. + * @returns { Promise<void> } the promise returned by the function. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Parameter verification failed. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + restore(file: string): Promise<void>; + + /** + * Delete database backup files based on the specified filenames. + * + * @param { Array<string> } files - Indicates the backup filenames to be deleted, It can not be empty and + * The length must be less than {@code MAX_KEY_LENGTH}. + * @param { AsyncCallback<Array<[string, number]>> } callback - {Array<[string, number]>}: + * the list of backup file and it's corresponding delete result which 0 means delete success + * and otherwise failed. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + deleteBackup(files: Array<string>, callback: AsyncCallback<Array<[string, number]>>): void; + + /** + * Delete database backup files based on the specified filenames. + * + * @param { Array<string> } files - Indicates the backup filenames to be deleted, It can not be empty and + * The length must be less than {@code MAX_KEY_LENGTH}. + * @returns { Promise<Array<[string, number]>> } {Array<[string, number]>}: the list of backup + * file and it's corresponding delete result which 0 means delete success and otherwise failed. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + deleteBackup(files: Array<string>): Promise<Array<[string, number]>>; + + /** + * Starts a transaction operation in the {@code SingleKVStore} database. + * <p>After the database transaction is started, you can submit or roll back the operation. + * + * @param { AsyncCallback<void> } callback - the callback of startTransaction. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + /** + * Starts a transaction operation in the {@code SingleKVStore} database. + * <p>After the database transaction is started, you can submit or roll back the operation. + * + * @param { AsyncCallback<void> } callback - the callback of startTransaction. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 10 + */ + startTransaction(callback: AsyncCallback<void>): void; + + /** + * Starts a transaction operation in the {@code SingleKVStore} database. + * <p>After the database transaction is started, you can submit or roll back the operation. + * + * @returns { Promise<void> } the promise returned by the function. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + /** + * Starts a transaction operation in the {@code SingleKVStore} database. + * <p>After the database transaction is started, you can submit or roll back the operation. + * + * @returns { Promise<void> } the promise returned by the function. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 10 + */ + startTransaction(): Promise<void>; + + /** + * Submits a transaction operation in the {@code SingleKVStore} database. + * + * @param { AsyncCallback<void> } callback - the callback of commit. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + commit(callback: AsyncCallback<void>): void; + + /** + * Submits a transaction operation in the {@code SingleKVStore} database. + * + * @returns { Promise<void> } the promise returned by the function. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + commit(): Promise<void>; + + /** + * Rolls back a transaction operation in the {@code SingleKVStore} database. + * + * @param { AsyncCallback<void> } callback - the callback of rollback. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + rollback(callback: AsyncCallback<void>): void; + + /** + * Rolls back a transaction operation in the {@code SingleKVStore} database. + * + * @returns { Promise<void> } the promise returned by the function. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + rollback(): Promise<void>; + + /** + * Sets whether to enable synchronization. + * + * @param { boolean } enabled - Specifies whether to enable synchronization. The value true + * means to enable synchronization, and false means the opposite. + * @param { AsyncCallback<void> } callback - the callback of enableSync. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + enableSync(enabled: boolean, callback: AsyncCallback<void>): void; + + /** + * Sets whether to enable synchronization. + * + * @param { boolean } enabled - Specifies whether to enable synchronization. The value true + * means to enable synchronization, and false means the opposite. + * @returns { Promise<void> } the promise returned by the function. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + enableSync(enabled: boolean): Promise<void>; + + /** + * Sets synchronization range labels. + * <p>The labels determine the devices with which data will be synchronized. + * + * @param { string[] } localLabels - Indicates the synchronization labels of the local device. + * @param { string[] } remoteSupportLabels - Indicates the labels of the devices with which + * data will be synchronized. + * @param { AsyncCallback<void> } callback - the callback of setSyncRange. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + setSyncRange(localLabels: string[], remoteSupportLabels: string[], callback: AsyncCallback<void>): void; + + /** + * Sets synchronization range labels. + * <p>The labels determine the devices with which data will be synchronized. + * + * @param { string[] } localLabels - Indicates the synchronization labels of the local device. + * @param { string[] } remoteSupportLabels - Indicates the labels of the devices with which + * data will be synchronized. + * @returns { Promise<void> } the promise returned by the function. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + setSyncRange(localLabels: string[], remoteSupportLabels: string[]): Promise<void>; + + /** + * Sets the default delay allowed for database synchronization + * + * @param { number } defaultAllowedDelayMs - Indicates the default delay allowed for the + * database synchronization, in milliseconds. + * @param { AsyncCallback<void> } callback - the callback of setSyncParam. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + setSyncParam(defaultAllowedDelayMs: number, callback: AsyncCallback<void>): void; + + /** + * Sets the default delay allowed for database synchronization + * + * @param { number } defaultAllowedDelayMs - Indicates the default delay allowed for the + * database synchronization, in milliseconds. + * @returns { Promise<void> } the promise returned by the function. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + setSyncParam(defaultAllowedDelayMs: number): Promise<void>; + + /** + * Synchronize the database to the specified devices with the specified delay allowed. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { string[] } deviceIds - Indicates the list of devices to which to synchronize the database. + * @param { SyncMode } mode - Indicates the synchronization mode. The value can be {@code PUSH}, + * {@code PULL}, or {@code PUSH_PULL}. + * @param { number } delayMs - Indicates the delay allowed for the synchronization, in milliseconds. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100004 - Not found. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + sync(deviceIds: string[], mode: SyncMode, delayMs?: number): void; + + /** + * Synchronize the database to the specified devices with the specified delay allowed. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { string[] } deviceIds - Indicates the list of devices to which to synchronize the database. + * @param { Query } query - Indicates the {@code Query} object. + * @param { SyncMode } mode - Indicates the synchronization mode. The value can be {@code PUSH}, + * {@code PULL}, or {@code PUSH_PULL}. + * @param { number } delayMs - Indicates the delay allowed for the synchronization, in milliseconds. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100004 - Not found. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + sync(deviceIds: string[], query: Query, mode: SyncMode, delayMs?: number): void; + + /** + * Register a callback to the database and when data in the distributed database has changed, + * the callback will be invoked. + * + * @param { 'dataChange' } event - Subscribed event name, fixed as 'dataChange', indicates the data change event. + * @param { SubscribeType } type - Indicates the subscription type, which is defined in {@code SubscribeType}. + * @param { Callback<ChangeNotification> } listener - {ChangeNotification}: the {@code ChangeNotification} + * object indicates the data change events in the distributed database. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100001 - Over max limits. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + /** + * Register a callback to the database and when data in the distributed database has changed, + * the callback will be invoked. + * + * @param { 'dataChange' } event - Subscribed event name, fixed as 'dataChange', indicates the data change event. + * @param { SubscribeType } type - Indicates the subscription type, which is defined in {@code SubscribeType}. + * @param { Callback<ChangeNotification> } listener - {ChangeNotification}: the {@code ChangeNotification} + * object indicates the data change events in the distributed database. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100001 - Over max limits. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 10 + */ + on(event: 'dataChange', type: SubscribeType, listener: Callback<ChangeNotification>): void; + + /** + * Register a databases synchronization callback to the database. + * <p> Sync result is returned through asynchronous callback. + * + * @param { 'syncComplete' } event - Subscribed event name, fixed as 'syncComplete', indicates the synchronization completion event. + * @param { Callback<Array<[string, number]>> } syncCallback - {Array<[string, number]>}: the + * deviceId and it's corresponding synchronization result which 0 means synchronization success + * and otherwise failed. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + on(event: 'syncComplete', syncCallback: Callback<Array<[string, number]>>): void; + + /** + * Unsubscribe from the SingleKVStore database based on the specified subscribeType and listener. + * + * @param { 'dataChange' } event - The unsubscribe event name, fixed as 'dataChange', indicates the data change event. + * @param { Callback<ChangeNotification> } listener - {ChangeNotification}: the {@code ChangeNotification} + * object indicates the data change events in the distributed database. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + off(event: 'dataChange', listener?: Callback<ChangeNotification>): void; + + /** + * Unregister the database synchronization callback. + * + * @param { 'syncComplete' } event - The unsubscribe event name, fixed as 'syncComplete', indicates the synchronization completion event. + * @param { Callback<Array<[string, number]>> } syncCallback - {Array<[string, number]>}: the + * deviceId and it's corresponding synchronization result which 0 means synchronization success + * and otherwise failed. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + off(event: 'syncComplete', syncCallback?: Callback<Array<[string, number]>>): void; + + /** + * Get the security level of the database. + * + * @param { AsyncCallback<SecurityLevel> } callback - {SecurityLevel}: the {@code SecurityLevel} + * object indicates the security level of the database. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getSecurityLevel(callback: AsyncCallback<SecurityLevel>): void; + + /** + * Get the security level of the database. + * + * @returns { Promise<SecurityLevel> } {SecurityLevel}: the {@code SecurityLevel} object indicates + * the security level of the database. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getSecurityLevel(): Promise<SecurityLevel>; + } + + /** + * Provides methods related to device-collaboration distributed databases. + * <p>To create a {@code DeviceKVStore} database, you can use the {@link data.distributed.common.KVManager.getKVStore(Options, String)} + * method with {@code KVStoreType} set to {@code DEVICE_COLLABORATION} for the input parameter Options. This database manages distributed + * data by device, and cannot modify data synchronized from remote devices. When an application writes a key-value pair entry + * into the database, the system automatically adds the ID of the device running the application to the key. + * + * @interface DeviceKVStore + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + export interface DeviceKVStore extends SingleKVStore { + /** + * Obtains the value matching the local device ID and specified key. + * + * @param { string } key - Indicates the key. The length must be less than {@code MAX_KEY_LENGTH}. + * @param { AsyncCallback<boolean | string | number | Uint8Array> } callback - + * {Uint8Array|string|boolean|number}: the returned value specified by the local device ID and specified key. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100004 - Not found. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + get(key: string, callback: AsyncCallback<boolean | string | number | Uint8Array>): void; + + /** + * Obtains the value matching the local device ID and specified key. + * + * @param { string } key - Indicates the key. The length must be less than {@code MAX_KEY_LENGTH}. + * @returns { Promise<boolean | string | number | Uint8Array> } + * {Uint8Array|string|boolean|number}: the returned value specified by the local device ID and specified key. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100004 - Not found. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + get(key: string): Promise<boolean | string | number | Uint8Array>; + + /** + * Obtains the value matching a specified device ID and key. + * + * @param { string } deviceId - Indicates the device to be queried. + * @param { string } key - Indicates the key of the value to be queried. The length must be less than {@code MAX_KEY_LENGTH}. + * @param { AsyncCallback<boolean | string | number | Uint8Array> } callback - + * {boolean | string | number | Uint8Array}: the returned value specified by the deviceId and key. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100004 - Not found. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + get(deviceId: string, key: string, callback: AsyncCallback<boolean | string | number | Uint8Array>): void; + + /** + * Obtains the value matching a specified device ID and key. + * + * @param { string } deviceId - Indicates the device to be queried. + * @param { string } key - Indicates the key of the value to be queried. The length must be less than {@code MAX_KEY_LENGTH}. + * @returns { Promise<boolean | string | number | Uint8Array> } + * {Uint8Array|string|boolean|number}: the returned value specified by the deviceId and key. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100004 - Not found. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + get(deviceId: string, key: string): Promise<boolean | string | number | Uint8Array>; + + /** + * Obtains all key-value pairs that match the local device ID and specified key prefix. + * + * @param { string } keyPrefix - Indicates the key prefix to match. + * @param { AsyncCallback<Entry[]> } callback - {Entry[]}: the list of all key-value pairs + * that match the local device ID and specified key prefix. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getEntries(keyPrefix: string, callback: AsyncCallback<Entry[]>): void; + + /** + * Obtains all key-value pairs that match the local device ID and specified key prefix. + * + * @param { string } keyPrefix - Indicates the key prefix to match. + * @returns { Promise<Entry[]> } {Entry[]}: the list of all key-value pairs that match the + * local device ID and specified key prefix. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getEntries(keyPrefix: string): Promise<Entry[]>; + + /** + * Obtains all key-value pairs matching a specified device ID and key prefix. + * + * @param { string } deviceId - Identifies the device whose data is to be queried. + * @param { string } keyPrefix - Indicates the key prefix to match. + * @param { AsyncCallback<Entry[]> } callback - {Entry[]}: the list of all key-value pairs + * that match the specified deviceId and key prefix. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + getEntries(deviceId: string, keyPrefix: string, callback: AsyncCallback<Entry[]>): void; + + /** + * Obtains all key-value pairs matching a specified device ID and key prefix. + * + * @param { string } deviceId - Identifies the device whose data is to be queried. + * @param { string } keyPrefix - Indicates the key prefix to match. + * @returns { Promise<Entry[]> } {Entry[]}: the list of all key-value pairs that match the + * specified deviceId and key prefix. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + getEntries(deviceId: string, keyPrefix: string): Promise<Entry[]>; + + /** + * Obtains the list of key-value pairs matching the local device ID and specified {@code Query} object. + * + * @param { Query } query - Indicates the {@code Query} object. + * @param { AsyncCallback<Entry[]> } callback - {Entry[]}: the list of all key-value pairs + * matching the local device ID and specified {@code Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getEntries(query: Query, callback: AsyncCallback<Entry[]>): void; + + /** + * Obtains the list of key-value pairs matching the local device ID and specified {@code Query} object. + * + * @param { Query } query - Indicates the {@code Query} object. + * @returns { Promise<Entry[]> } {Entry[]}: the list of all key-value pairs matching the local device ID and + * specified {@code Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getEntries(query: Query): Promise<Entry[]>; + + /** + * Obtains the list of key-value pairs matching a specified device ID and {@code Query} object. + * + * @param { string } deviceId - Indicates the ID of the device to which the key-value pairs belong. + * @param { Query } query - Indicates the {@code Query} object. + * @param { AsyncCallback<Entry[]> } callback - {Entry[]}: the list of all key-value pairs + * matching the specified deviceId and {@code Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + getEntries(deviceId: string, query: Query, callback: AsyncCallback<Entry[]>): void; + + /** + * Obtains the list of key-value pairs matching a specified device ID and {@code Query} object. + * + * @param { string } deviceId - Indicates the ID of the device to which the key-value pairs belong. + * @param { Query } query - Indicates the {@code Query} object. + * @returns { Promise<Entry[]> } {Entry[]}: the list of all key-value pairs matching the + * specified deviceId and {@code Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + getEntries(deviceId: string, query: Query): Promise<Entry[]>; + + /** + * Obtains the result set with the local device ID and specified prefix from a {@code DeviceKVStore} database. + * The {@code KVStoreResultSet} object can be used to query all key-value pairs that meet the search criteria. + * Each {@code DeviceKVStore} instance can have a maximum of four {@code KVStoreResultSet} objects at the same time. + * If you have created four objects, calling this method will return a failure. Therefore, you are advised to + * call the closeResultSet method to close unnecessary {@code KVStoreResultSet} objects in a timely manner. + * + * @param { string } keyPrefix - Indicates the key prefix to match. + * @param { AsyncCallback<KVStoreResultSet> } callback - {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the local device ID and specified keyPrefix. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + /** + * Obtains the result set with the local device ID and specified prefix from a {@code DeviceKVStore} database. + * The {@code KVStoreResultSet} object can be used to query all key-value pairs that meet the search criteria. + * Each {@code DeviceKVStore} instance can have a maximum of four {@code KVStoreResultSet} objects at the same time. + * If you have created four objects, calling this method will return a failure. Therefore, you are advised to + * call the closeResultSet method to close unnecessary {@code KVStoreResultSet} objects in a timely manner. + * + * @param { string } keyPrefix - Indicates the key prefix to match. + * @param { AsyncCallback<KVStoreResultSet> } callback - {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the local device ID and specified keyPrefix. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100001 - Over max limits. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 10 + */ + getResultSet(keyPrefix: string, callback: AsyncCallback<KVStoreResultSet>): void; + + /** + * Obtains the result set with the local device ID and specified prefix from a {@code DeviceKVStore} database. + * The {@code KVStoreResultSet} object can be used to query all key-value pairs that meet the search criteria. + * Each {@code DeviceKVStore} instance can have a maximum of four {@code KVStoreResultSet} objects at the same time. + * If you have created four objects, calling this method will return a failure. Therefore, you are advised to + * call the closeResultSet method to close unnecessary {@code KVStoreResultSet} objects in a timely manner. + * + * @param { string } keyPrefix - Indicates the key prefix to match. + * @returns { Promise<KVStoreResultSet> } {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the local device ID and specified keyPrefix. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + /** + * Obtains the result set with the local device ID and specified prefix from a {@code DeviceKVStore} database. + * The {@code KVStoreResultSet} object can be used to query all key-value pairs that meet the search criteria. + * Each {@code DeviceKVStore} instance can have a maximum of four {@code KVStoreResultSet} objects at the same time. + * If you have created four objects, calling this method will return a failure. Therefore, you are advised to + * call the closeResultSet method to close unnecessary {@code KVStoreResultSet} objects in a timely manner. + * + * @param { string } keyPrefix - Indicates the key prefix to match. + * @returns { Promise<KVStoreResultSet> } {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the local device ID and specified keyPrefix. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100001 - Over max limits. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 10 + */ + getResultSet(keyPrefix: string): Promise<KVStoreResultSet>; + + /** + * Obtains the {@code KVStoreResultSet} object matching the specified device ID and key prefix. + * <p>The {@code KVStoreResultSet} object can be used to query all key-value pairs that meet the search criteria. Each {@code DeviceKVStore} + * instance can have a maximum of four {@code KVStoreResultSet} objects at the same time. If you have created four objects, + * calling this method will return a failure. Therefore, you are advised to call the closeResultSet method to close unnecessary + * {@code KVStoreResultSet} objects in a timely manner. + * + * @param { string } deviceId - Identifies the device whose data is to be queried. + * @param { string } keyPrefix - Indicates the key prefix to match. + * @param { AsyncCallback<KVStoreResultSet> } callback - {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the specified deviceId and keyPrefix. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + /** + * Obtains the {@code KVStoreResultSet} object matching the specified device ID and key prefix. + * <p>The {@code KVStoreResultSet} object can be used to query all key-value pairs that meet the search criteria. Each {@code DeviceKVStore} + * instance can have a maximum of four {@code KVStoreResultSet} objects at the same time. If you have created four objects, + * calling this method will return a failure. Therefore, you are advised to call the closeResultSet method to close unnecessary + * {@code KVStoreResultSet} objects in a timely manner. + * + * @param { string } deviceId - Identifies the device whose data is to be queried. + * @param { string } keyPrefix - Indicates the key prefix to match. + * @param { AsyncCallback<KVStoreResultSet> } callback - {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the specified deviceId and keyPrefix. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100001 - Over max limits. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 10 + */ + getResultSet(deviceId: string, keyPrefix: string, callback: AsyncCallback<KVStoreResultSet>): void; + + /** + * Obtains the {@code KVStoreResultSet} object matching the specified device ID and key prefix. + * <p>The {@code KVStoreResultSet} object can be used to query all key-value pairs that meet the search criteria. Each {@code DeviceKVStore} + * instance can have a maximum of four {@code KVStoreResultSet} objects at the same time. If you have created four objects, + * calling this method will return a failure. Therefore, you are advised to call the closeResultSet method to close unnecessary + * {@code KVStoreResultSet} objects in a timely manner. + * + * @param { string } deviceId - Identifies the device whose data is to be queried. + * @param { string } keyPrefix - Indicates the key prefix to match. + * @returns { Promise<KVStoreResultSet> } {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the specified deviceId and keyPrefix. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + /** + * Obtains the {@code KVStoreResultSet} object matching the specified device ID and key prefix. + * <p>The {@code KVStoreResultSet} object can be used to query all key-value pairs that meet the search criteria. Each {@code DeviceKVStore} + * instance can have a maximum of four {@code KVStoreResultSet} objects at the same time. If you have created four objects, + * calling this method will return a failure. Therefore, you are advised to call the closeResultSet method to close unnecessary + * {@code KVStoreResultSet} objects in a timely manner. + * + * @param { string } deviceId - Identifies the device whose data is to be queried. + * @param { string } keyPrefix - Indicates the key prefix to match. + * @returns { Promise<KVStoreResultSet> } {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the specified deviceId and keyPrefix. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100001 - Over max limits. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 10 + */ + getResultSet(deviceId: string, keyPrefix: string): Promise<KVStoreResultSet>; + + /** + * Obtains the {@code KVStoreResultSet} object matching the local device ID and specified {@code Query} object. + * + * @param { Query } query - Indicates the {@code Query} object. + * @param { AsyncCallback<KVStoreResultSet> } callback - {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the local device ID and specified {@code Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + /** + * Obtains the {@code KVStoreResultSet} object matching the local device ID and specified {@code Query} object. + * + * @param { Query } query - Indicates the {@code Query} object. + * @param { AsyncCallback<KVStoreResultSet> } callback - {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the local device ID and specified {@code Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100001 - Over max limits. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 10 + */ + getResultSet(query: Query, callback: AsyncCallback<KVStoreResultSet>): void; + + /** + * Obtains the {@code KVStoreResultSet} object matching the local device ID and specified {@code Query} object. + * + * @param { Query } query - Indicates the {@code Query} object. + * @returns { Promise<KVStoreResultSet> } {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the local device ID and specified {@code Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + /** + * Obtains the {@code KVStoreResultSet} object matching the local device ID and specified {@code Query} object. + * + * @param { Query } query - Indicates the {@code Query} object. + * @returns { Promise<KVStoreResultSet> } {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the local device ID and specified {@code Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100001 - Over max limits. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 10 + */ + getResultSet(query: Query): Promise<KVStoreResultSet>; + + /** + * Obtains the {@code KVStoreResultSet} object matching a specified device ID and {@code Query} object. + * + * @param { string } deviceId - Indicates the ID of the device to which the {@code KVStoreResultSet} object belongs. + * @param { Query } query - Indicates the {@code Query} object. + * @param { AsyncCallback<KVStoreResultSet> } callback - {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the specified deviceId and {@code Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + /** + * Obtains the {@code KVStoreResultSet} object matching a specified device ID and {@code Query} object. + * + * @param { string } deviceId - Indicates the ID of the device to which the {@code KVStoreResultSet} object belongs. + * @param { Query } query - Indicates the {@code Query} object. + * @param { AsyncCallback<KVStoreResultSet> } callback - {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the specified deviceId and {@code Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100001 - Over max limits. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 10 + */ + getResultSet(deviceId: string, query: Query, callback: AsyncCallback<KVStoreResultSet>): void; + + /** + * Obtains the {@code KVStoreResultSet} object matching a specified device ID and {@code Query} object. + * + * @param { string } deviceId - Indicates the ID of the device to which the {@code KVStoreResultSet} object belongs. + * @param { Query } query - Indicates the {@code Query} object. + * @returns { Promise<KVStoreResultSet> } {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the specified deviceId and {@code Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + /** + * Obtains the {@code KVStoreResultSet} object matching a specified device ID and {@code Query} object. + * + * @param { string } deviceId - Indicates the ID of the device to which the {@code KVStoreResultSet} object belongs. + * @param { Query } query - Indicates the {@code Query} object. + * @returns { Promise<KVStoreResultSet> } {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the specified deviceId and {@code Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100001 - Over max limits. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 10 + */ + getResultSet(deviceId: string, query: Query): Promise<KVStoreResultSet>; + + /** + * Obtains the KVStoreResultSet object matching the local device ID and specified predicate object. + * + * @param { dataSharePredicates.DataSharePredicates } predicates - Indicates the datasharePredicates. + * @param { AsyncCallback<KVStoreResultSet> } callback - {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the local device ID and specified {@code dataSharePredicates.DataSharePredicates} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.DataShare.Provider + * @systemapi + * @StageModelOnly + * @since 9 + */ + /** + * Obtains the KVStoreResultSet object matching the local device ID and specified predicate object. + * + * @param { dataSharePredicates.DataSharePredicates } predicates - Indicates the datasharePredicates. + * @param { AsyncCallback<KVStoreResultSet> } callback - {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the local device ID and specified {@code dataSharePredicates.DataSharePredicates} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 15100001 - Over max limits. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.DataShare.Provider + * @systemapi + * @StageModelOnly + * @since 10 + */ + getResultSet(predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback<KVStoreResultSet>): void; + + /** + * Obtains the KVStoreResultSet object matching the local device ID and specified predicate object. + * + * @param { dataSharePredicates.DataSharePredicates } predicates - Indicates the datasharePredicates. + * @returns { Promise<KVStoreResultSet> } {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the local device ID and specified {@code dataSharePredicates.DataSharePredicates} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.DataShare.Provider + * @systemapi + * @StageModelOnly + * @since 9 + */ + /** + * Obtains the KVStoreResultSet object matching the local device ID and specified predicate object. + * + * @param { dataSharePredicates.DataSharePredicates } predicates - Indicates the datasharePredicates. + * @returns { Promise<KVStoreResultSet> } {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the local device ID and specified {@code dataSharePredicates.DataSharePredicates} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 15100001 - Over max limits. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.DataShare.Provider + * @systemapi + * @StageModelOnly + * @since 10 + */ + getResultSet(predicates: dataSharePredicates.DataSharePredicates): Promise<KVStoreResultSet>; + + /** + * Obtains the KVStoreResultSet object matching a specified Device ID and Predicate object. + * + * @param { string } deviceId Indicates the ID of the device to which the results belong. + * @param { dataSharePredicates.DataSharePredicates } predicates - Indicates the dataSharePredicates. + * @param { AsyncCallback<KVStoreResultSet> } callback - {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the specified deviceId and {@code dataSharePredicates.DataSharePredicates} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.DataShare.Provider + * @systemapi + * @StageModelOnly + * @since 9 + */ + /** + * Obtains the KVStoreResultSet object matching a specified Device ID and Predicate object. + * + * @param { string } deviceId Indicates the ID of the device to which the results belong. + * @param { dataSharePredicates.DataSharePredicates } predicates - Indicates the dataSharePredicates. + * @param { AsyncCallback<KVStoreResultSet> } callback - {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the specified deviceId and {@code dataSharePredicates.DataSharePredicates} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 15100001 - Over max limits. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.DataShare.Provider + * @systemapi + * @StageModelOnly + * @since 10 + */ + getResultSet( + deviceId: string, + predicates: dataSharePredicates.DataSharePredicates, + callback: AsyncCallback<KVStoreResultSet> + ): void; + + /** + * Obtains the KVStoreResultSet object matching a specified Device ID and Predicate object. + * + * @param { string } deviceId Indicates the ID of the device to which the results belong. + * @param { dataSharePredicates.DataSharePredicates } predicates - Indicates the dataSharePredicates. + * @returns { Promise<KVStoreResultSet> } {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the specified deviceId and {@code dataSharePredicates.DataSharePredicates} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.DataShare.Provider + * @systemapi + * @StageModelOnly + * @since 9 + */ + /** + * Obtains the KVStoreResultSet object matching a specified Device ID and Predicate object. + * + * @param { string } deviceId Indicates the ID of the device to which the results belong. + * @param { dataSharePredicates.DataSharePredicates } predicates - Indicates the dataSharePredicates. + * @returns { Promise<KVStoreResultSet> } {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the specified deviceId and {@code dataSharePredicates.DataSharePredicates} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 15100001 - Over max limits. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.DataShare.Provider + * @systemapi + * @StageModelOnly + * @since 10 + */ + getResultSet(deviceId: string, predicates: dataSharePredicates.DataSharePredicates): Promise<KVStoreResultSet>; + + /** + * Obtains the number of results matching the local device ID and specified {@code Query} object. + * + * @param { Query } query - Indicates the {@code Query} object. + * @param { AsyncCallback<number> } callback - {number}: the number of results matching the + * local device ID and specified {@code Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getResultSize(query: Query, callback: AsyncCallback<number>): void; + + /** + * Obtains the number of results matching the local device ID and specified {@code Query} object. + * + * @param { Query } query - Indicates the {@code Query} object. + * @returns { Promise<number> } {number}: the number of results matching the local device ID and specified + * {@code Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getResultSize(query: Query): Promise<number>; + + /** + * Obtains the number of results matching a specified device ID and {@code Query} object. + * + * @param { string } deviceId - Indicates the ID of the device to which the results belong. + * @param { Query } query - Indicates the {@code Query} object. + * @param { AsyncCallback<number> } callback - {number}: the number of results matching the + * specified deviceId and {@code Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + getResultSize(deviceId: string, query: Query, callback: AsyncCallback<number>): void; + + /** + * Obtains the number of results matching a specified device ID and {@code Query} object. + * + * @param { string } deviceId - Indicates the ID of the device to which the results belong. + * @param { Query } query - Indicates the {@code Query} object. + * @returns { Promise<number> } {number}: the number of results matching the specified + * deviceId and {@code Query} object. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types. + * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100005 - Database or result set already closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + getResultSize(deviceId: string, query: Query): Promise<number>; + } + + /** + * Creates a {@link KVManager} instance based on the configuration information. + * <p>You must pass {@link KVManagerConfig} to provide configuration information + * to create a {@link KVManager} instance. + * + * @param { KVManagerConfig } config - Indicates the KVStore configuration information, + * including the package name and context, and package name can not be empty. + * @returns { KVManager } : the {@code KVManager} instance. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + export function createKVManager(config: KVManagerConfig): KVManager; + + /** + * Provides interfaces to manage a {@code SingleKVStore} database, including obtaining, closing, and deleting the {@code SingleKVStore}. + * + * @interface KVManager + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + export interface KVManager { + /** + * Creates and obtains a KVStore database by specifying {@code Options} and {@code storeId}. + * + * @param { string } storeId - Identifies the KVStore database. The value of this parameter must be unique + * for the same application, and different applications can share the same value. The storeId can consist + * of only letters, digits, and underscores (_), and cannot exceed 128 characters. + * @param { Options } options - Indicates the {@code Options} object used for creating and + * obtaining the KVStore database. + * @param { AsyncCallback<T> } callback - {T}: the {@code SingleKVStore} or {@code DeviceKVStore} instance. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @throws { BusinessError } 15100002 - Open existed database with changed options. + * @throws { BusinessError } 15100003 - Database corrupted. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getKVStore<T>(storeId: string, options: Options, callback: AsyncCallback<T>): void; + + /** + * Creates and obtains a KVStore database by specifying {@code Options} and {@code storeId}. + * + * @param { string } storeId - Identifies the KVStore database. The value of this parameter must be unique + * for the same application, and different applications can share the same value. The storeId can consist + * of only letters, digits, and underscores (_), and cannot exceed 128 characters. + * @param { Options } options - Indicates the {@code Options} object used for creating and + * obtaining the KVStore database. + * @returns { Promise<T> } {T}: the {@code SingleKVStore} or {@code DeviceKVStore} instance. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @throws { BusinessError } 15100002 - Open existed database with changed options. + * @throws { BusinessError } 15100003 - Database corrupted. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getKVStore<T>(storeId: string, options: Options): Promise<T>; + + /** + * Closes the KVStore database. + * <p>Warning: This method is not thread-safe. If you call this method to stop a KVStore database that is running, your + * thread may crash. + * <p>The KVStore database to close must be an object created by using the {@code getKVStore} method. Before using this + * method, release the resources created for the database, for example, {@code KVStoreResultSet} for KVStore, otherwise + * closing the database will fail. + * + * @param { string } appId - Identifies the application that the database belong to, and cannot exceed 256 characters. + * @param { string } storeId - Identifies the KVStore database to close. The storeId can consist of only letters, digits, + * and underscores (_), and cannot exceed 128 characters. + * @param { AsyncCallback<void> } callback - the callback of closeKVStore. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + closeKVStore(appId: string, storeId: string, callback: AsyncCallback<void>): void; + + /** + * Closes the KVStore database. + * <p>Warning: This method is not thread-safe. If you call this method to stop a KVStore database that is running, your + * thread may crash. + * <p>The KVStore database to close must be an object created by using the {@code getKVStore} method. Before using this + * method, release the resources created for the database, for example, {@code KVStoreResultSet} for KVStore, otherwise + * closing the database will fail. + * + * @param { string } appId - Identifies the application that the database belong to, and cannot exceed 256 characters. + * @param { string } storeId - Identifies the KVStore database to close. The storeId can consist of only letters, digits, + * and underscores (_), and cannot exceed 128 characters. + * @returns { Promise<void> } the promise returned by the function. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + closeKVStore(appId: string, storeId: string): Promise<void>; + + /** + * Deletes the KVStore database identified by storeId. + * <p>Before using this method, close all KVStore instances in use that are identified by the same storeId. + * <p>You can use this method to delete a KVStore database not in use. After the database is deleted, all its data will be + * lost. + * + * @param { string } appId - Identifies the application that the database belong to, and cannot exceed 256 characters. + * @param { string } storeId - Identifies the KVStore database to delete. The storeId can consist of only letters, digits, + * and underscores (_), and cannot exceed 128 characters. + * @param { AsyncCallback<void> } callback - the callback of deleteKVStore. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Parameter verification failed. + * @throws { BusinessError } 15100004 - Not found. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + deleteKVStore(appId: string, storeId: string, callback: AsyncCallback<void>): void; + + /** + * Deletes the KVStore database identified by storeId. + * <p>Before using this method, close all KVStore instances in use that are identified by the same storeId. + * <p>You can use this method to delete a KVStore database not in use. After the database is deleted, all its data will be + * lost. + * + * @param { string } appId - Identifies the application that the database belong to, and cannot exceed 256 characters. + * @param { string } storeId - Identifies the KVStore database to delete. The storeId can consist of only letters, digits, + * and underscores (_), and cannot exceed 128 characters. + * @returns { Promise<void> } the promise returned by the function. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Parameter verification failed. + * @throws { BusinessError } 15100004 - Not found. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + deleteKVStore(appId: string, storeId: string): Promise<void>; + + /** + * Obtains the storeId of all KVStore databases that are created by using the {@code getKVStore} method and not deleted by + * calling the {@code deleteKVStore} method. + * + * @param { string } appId - Identifies the application that obtains the databases, and cannot exceed 256 characters. + * @param { AsyncCallback<string[]> } callback - {string[]}: the storeId of all created KVStore databases. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getAllKVStoreId(appId: string, callback: AsyncCallback<string[]>): void; + + /** + * Obtains the storeId of all KVStore databases that are created by using the {@code getKVStore} method and not deleted by + * calling the {@code deleteKVStore} method. + * + * @param { string } appId - Identifies the application that obtains the databases, and cannot exceed 256 characters. + * @returns { Promise<string[]> } {string[]}: the storeId of all created KVStore databases. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified. + * <br>2.Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getAllKVStoreId(appId: string): Promise<string[]>; + + /** + * Register a death callback to get notification when the data manager service is terminated. + * <p>If the data manager service is terminated,you need to re-subscribe to data change notifications and synchronization + * completion notifications, and calling the sync method will return a failure. + * + * @param { 'distributedDataServiceDie' } event - Subscribed event name, fixed as 'distributedDataServiceDie', as a service status change events. + * @param { Callback<void> } deathCallback - callback to be invoked when the data manager service is terminated. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + on(event: 'distributedDataServiceDie', deathCallback: Callback<void>): void; + + /** + * Unregister the death callback. Not notification will be received when the data manager service is terminated. + * <p>The unregistered death callback must be a registered death callback of the database. If no death callback parameter + * is passed, all database death callbacks will be unregistered. + * + * @param { 'distributedDataServiceDie' } event - Unsubscribe event name, fixed as 'distributedDataServiceDie', as a service status change events. + * @param { Callback<void> } deathCallback - the data manager service is terminated callback which has been registered. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + * <br>2.Incorrect parameters types; + * <br>3.Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + off(event: 'distributedDataServiceDie', deathCallback?: Callback<void>): void; + } +} + +export default distributedKVStore; \ No newline at end of file diff --git a/api/@ohos.distributedDeviceManager.d.ets b/api/@ohos.distributedDeviceManager.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..1912263af9d365e9d37d927a9106d27bd160fe34 --- /dev/null +++ b/api/@ohos.distributedDeviceManager.d.ets @@ -0,0 +1,646 @@ +/* + * 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 DistributedServiceKit + */ + +import type { AsyncCallback, Callback } from './@ohos.base'; + +/** + * Providers interfaces to create a {@link deviceManager} instances. + * + * @namespace distributedDeviceManager + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + +declare namespace distributedDeviceManager { + + /** + * Basic description information of a distributed device. + * @interface DeviceBasicInfo + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + export interface DeviceBasicInfo { + /** + * Device identifier. The actual value is udid-hash confused with appid and salt value based on sha256. + * This id remains unchanged after application installation. If the application is uninstalled and reinstalled, + * the obtained ID will change. + * @type { string } + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + deviceId: string; + + /** + * Device name. + * @type { string } + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + deviceName: string; + + /** + * Obtains the device type represented by a string, + * which can be {@code phone}, {@code tablet}, {@code tv}, {@code smartVision}, {@code car}. + * @type { string } + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + deviceType: string; + + /** + * Device network id. + * @type { ?string } + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + networkId?: string; + } + + /** + * The state of the nearby devices. + * @enum { number } + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + export enum DeviceStateChange { + /** + * This state indicates the device is online but the state is unknown,The distributed function cannot used until + * state changes to AVAILABLE. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + UNKNOWN = 0, + + /** + * This state indicates the device has been synchronized to the database, Now the distributed function can be used. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + AVAILABLE = 1, + + /** + * This state indicates the device is offline. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + UNAVAILABLE = 2, + } + + /** + * Creates an {@code DeviceManager} instance. + * + * To manage devices, you must first call this method to obtain a {@code DeviceManager} instance and then + * use this instance to call other device management methods. + * + * @param { string } bundleName - Indicates the bundle name of the application. + * @returns { DeviceManager } - Return the DeviceManager object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter type; + * 3. Parameter verification failed. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + export function createDeviceManager(bundleName: string): DeviceManager; + + /** + * Releases the {@code DeviceManager} instance that is no longer used. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { DeviceManager } deviceManager - Indicates the {@code DeviceManager} instance. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission + * required to call the API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter types; + * 3. Parameter verification failed. + * @throws { BusinessError } 11600101 - Failed to execute the function. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + export function releaseDeviceManager(deviceManager: DeviceManager): void; + + interface DeviceResult { + deviceId: string; + } + + interface DeviceResultNumber { + reason: number; + } + + type DeviceResultCallback = AsyncCallback<DeviceResult>; + +// 定义接口 +interface DeviceStateChangeData { + action: DeviceStateChange; + device: DeviceBasicInfo; +} + +interface DeviceStateChangeAction { + device: DeviceBasicInfo; +} + +// 提取类型 +type DeviceStateChangeCallback = Callback<DeviceStateChangeData>; + +type DeviceStateChangeCallbackAction = Callback<DeviceStateChangeAction>; + +type DeviceStateString = Callback<DeviceResult>; +type DeviceStateNumber = Callback<DeviceResultNumber>; + +interface ServiceDieData {} +type ServiceDieCallback = Callback<ServiceDieData>; + /** + * Provides methods for managing devices. + * + * @interface DeviceManager + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + export interface DeviceManager { + + /** + * Get a list of available devices. This interface query all authorized and connectable devices. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @returns { Array<DeviceBasicInfo> } - Returns a list of available devices. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter types; + * 3. Parameter verification failed. + * @throws { BusinessError } 11600101 - Failed to execute the function. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + getAvailableDeviceListSync(): Array<DeviceBasicInfo>; + + /** + * Get a list of available devices. This interface query all authorized and connectable devices. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { AsyncCallback<Array<DeviceBasicInfo>> } callback - Indicates the callback to be + * invoked upon getAvailableDeviceList. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 11600101 - Failed to execute the function. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + getAvailableDeviceList(callback: AsyncCallback<Array<DeviceBasicInfo>>): void; + + /** + * Get a list of available devices. This interface query all authorized and connectable devices. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @returns { Promise<Array<DeviceBasicInfo>> } - Returns a list of available devices. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 11600101 - Failed to execute the function. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + getAvailableDeviceList(): Promise<Array<DeviceBasicInfo>>; + + /** + * Get the network id of the local device. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @returns { string } - Returns local device network id. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 11600101 - Failed to execute the function. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + getLocalDeviceNetworkId(): string; + + /** + * Get the device name of the local device. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @returns { string } - Returns local device name. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 11600101 - Failed to execute the function. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + getLocalDeviceName(): string; + + /** + * Get the device type of the local device. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @returns { number } - Returns local device type. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 11600101 - Failed to execute the function. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + getLocalDeviceType(): number; + + /** + * Get the device id of the local device. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @returns { string } - Device identifier. The actual value is udid-hash confused with appid and salt value based on sha256. + * This id remains unchanged after application installation. If the application is uninstalled and reinstalled, + * the obtained ID will change. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 11600101 - Failed to execute the function. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + getLocalDeviceId(): string; + + /** + * Get the device name by network id. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { string } networkId - Device network id. + * @returns { string } - Returns device name. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter type; + * 3. Parameter verification failed; + * 4. The size of specified networkId is greater than 255. + * @throws { BusinessError } 11600101 - Failed to execute the function. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + getDeviceName(networkId: string): string; + + /** + * Get the device type by network id. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { string } networkId - Device network id. + * @returns { double } - Returns device type. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission + * required to call the API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter type; + * 3. Parameter verification failed; + * 4. The size of specified networkId is greater than 255. + * @throws { BusinessError } 11600101 - Failed to execute the function. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + getDeviceType(networkId: string): double; + + /** + * Start to discover nearby devices. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { object } discoverParam - Identifies the type of target discovered: + * discoverTargetType : 1 - Discovery target as a device by default, the value is 1. + * @param { object } filterOptions - FilterOptions to filter discovery device. + * The type of filterOptions is map. The map are as follows: + * availableStatus: 0-1 - Discover devices only are credible, The value is 0 indicates device isn't credible; + * 0: Devices are offline, client need to bind the device by calling bindTarget() and then connect to it. + * 1: Devices already online, client can make connection. + * discoverDistance: 0-100 - Discover devices within a certain distance from the local, the unit is cm. + * authenticationStatus: 0-1 - Discover devices based on different authentication status: + * 0: Devices not authenticated. + 1: Devices already authenticated. + * The value is 1 indicates device is trust. + * authorizationType: 0-2 - Discover devices based on different authorization type: + * 0: Devices authenticated based on temporary negotiated session key. + * 1: Devices authenticated based on the same account credential key. + * 2: Devices authenticated based on different account credential keys. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter type; + * 3. Parameter verification failed. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission + * required to call the API. + * @throws { BusinessError } 11600104 - Discovery unavailable. + * @throws { BusinessError } 11600101 - Failed to execute the function. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + startDiscovering(discoverParam: Record<string, Object>, filterOptions?: Record<string, Object>): void; + + /** + * Stop discovering nearby devices. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter type; + * 3. Parameter verification failed. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission + * required to call the API. + * @throws { BusinessError } 11600104 - Discovery unavailable. + * @throws { BusinessError } 11600101 - Failed to execute the function. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + stopDiscovering(): void; + + /** + * Bind the specified target. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { string } deviceId - id of device to bind. + * @param { object } bindParam - parameters of device to bind, The parameter type is map,such as: + * "bindType" : 1, - This value is type of bind, the values are as follows: + * 1 - The bind type is pin code . + + * "targetPkgName" : "xxxx", - The package name of binding target. + * "appName" : "xxxx", - The app name that try to bind the target. + * "appOperation" : "xxxx" - The reason why the app want to bind the target package. + * "customDescription" : "xxxx" - The detail description of the operation. + * @param { AsyncCallback<{deviceId: string;}> } callback - indicates the callback to be invoked upon bindDevice. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter type; + * 3. Parameter verification failed; + * 4. The size of specified deviceId is greater than 255. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission + * required to call the API. + * @throws { BusinessError } 11600101 - Failed to execute the function. + * @throws { BusinessError } 11600103 - Authentication unavailable. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + bindTarget(deviceId: string, bindParam: Record<string, Object>, callback: DeviceResultCallback): void; + + /** + * Unbind the specified target. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { string } deviceId - id of device to unbind + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter type; + * 3. Parameter verification failed; + * 4. The size of specified deviceId is greater than 255. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission + * required to call the API. + * @throws { BusinessError } 11600101 - Failed to execute the function. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + unbindTarget(deviceId: string): void; + + /** + * The reply of ui operation from pin-code window, this interface can only be used by pin-code-hap of devicemanager. + * + * @permission ohos.permission.ACCESS_SERVICE_DM + * @param { number } action - The reply action of user operation. + * @param { string } actionResult - Indicates the user operation result. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission + * required to call the API. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter type; + * 3. Parameter verification failed; + * 4. The size of specified actionResult is greater than 255. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @systemapi this method can be used only by system applications. + * @since 10 + */ + replyUiAction(action: number, actionResult: string): void; + + /** + * Register a device state callback so that the application can be notified upon device state changes based on + * the application bundle name. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { 'deviceStateChange' } type - Device state change. + * @param { Callback<{ action: DeviceStateChange; device: DeviceBasicInfo; }> } callback + * Indicates the device state callback to register. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission + * required to call the API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter type; + * 3. Parameter verification failed; + * 4. The size of specified type is greater than 255. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + on(type: 'deviceStateChange', callback: DeviceStateChangeCallback): void; + + /** + * UnRegister device state callback based on the application bundle name. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { 'deviceStateChange' } type - Device state change. + * @param { Callback<{ action: DeviceStateChange; device: DeviceBasicInfo; }> } callback + * Indicates the device state callback to unregister. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission + * required to call the API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter type; + * 3. Parameter verification failed; + * 4. The size of specified type is greater than 255. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + off(type: 'deviceStateChange', callback?: DeviceStateChangeCallback): void; + + /** + * Register a device discovery result callback so that the application can be notified when discovery success. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { 'discoverSuccess' } type - Successfully discovered device. + * @param { Callback<{ device: DeviceBasicInfo; }> } callback - Indicates the device discovery callback to register. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission + * required to call the API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter type; + * 3. Parameter verification failed; + * 4. The size of specified type is greater than 255. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + on(type: 'discoverSuccess', callback: DeviceStateChangeCallbackAction): void; + + /** + * UnRegister the device discovery result callback. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { 'discoverSuccess' } type - Successfully discovered device. + * @param { Callback<{ device: DeviceBasicInfo; }> } callback - Indicates the device discovery callback to unregister. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission + * required to call the API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter type; + * 3. Parameter verification failed; + * 4. The size of specified type is greater than 255. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + off(type: 'discoverSuccess', callback?: DeviceStateChangeCallbackAction): void; + + /** + * Register a device name change callback so that the application can be notified when discovery success. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { 'deviceNameChange' } type - Changed device name. + * @param { Callback<{ deviceName: string; }> } callback - Indicates the device name change callback to register. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission + * required to call the API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter type; + * 3. Parameter verification failed; + * 4. The size of specified type is greater than 255. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + on(type: 'deviceNameChange', callback: DeviceStateString): void; + + /** + * UnRegister the device name change result callback. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { 'deviceNameChange' } type - Changed device name. + * @param { Callback<{ deviceName: string; }> } callback - Indicates the device name change callback to unregister. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission + * required to call the API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter type; + * 3. Parameter verification failed; + * 4. The size of specified type is greater than 255. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + off(type: 'deviceNameChange', callback?: DeviceStateString): void; + + /** + * Register a device discovery result callback so that the application can be notified when discover failed. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { 'discoverFailure' } type - Discovery Device Failure. + * @param { Callback<{ reason: number; }> } callback + * Indicates the device found result callback to register. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission + * required to call the API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter type; + * 3. Parameter verification failed; + * 4. The size of specified type is greater than 255. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + on(type: 'discoverFailure', callback: DeviceStateNumber): void; + + /** + * UnRegister the device discovery result callback. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { 'discoverFailure' } type - Discovery Device Failure. + * @param { Callback<{ reason: number; }> } callback + * Indicates the device found result callback to unregister. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission + * required to call the API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter type; + * 3. Parameter verification failed; + * 4. The size of specified type is greater than 255. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + off(type: 'discoverFailure', callback?: DeviceStateNumber): void; + + /** + * Register a serviceError callback so that the application can be notified when devicemanager service died + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { 'serviceDie' } type - Service death. + * @param { Callback<{}> } callback - Indicates the service error callback to register. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission + * required to call the API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter type; + * 3. Parameter verification failed; + * 4. The size of specified type is greater than 255. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + on(type: 'serviceDie', callback?: ServiceDieCallback): void; + + /** + * UnRegister the service error callback. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { 'serviceDie' } type - Service death. + * @param { Callback<{}> } callback - Indicates the service error callback to unregister. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission + * required to call the API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter type; + * 3. Parameter verification failed; + * 4. The size of specified type is greater than 255. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since 10 + */ + off(type: 'serviceDie', callback?: ServiceDieCallback): void; + + /** + * Register a callback from deviceManager service so that the devicemanager ui can be notified when uiStateChanges. + * + * @permission ohos.permission.ACCESS_SERVICE_DM + * @param { 'replyResult' } type - Ui reply result to register. + * @param { Callback<{ param: string; }> } callback - Indicates the devicemanager ui state to register. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter type; + * 3. Parameter verification failed; + * 4. The size of specified type is greater than 255. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @systemapi this method can be used only by system applications. + * @since 10 + */ + on(type: 'replyResult', callback: DeviceStateString): void; + + /** + * Unregister uiStateChange, this interface can only be used by devicemanager ui. + * + * @permission ohos.permission.ACCESS_SERVICE_DM + * @param { 'replyResult' } type - Ui reply result to unregister. + * @param { Callback<{ param: string; }> } callback - Indicates the devicemanager ui state to unregister. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter type; + * 3. Parameter verification failed; + * 4. The size of specified type is greater than 255. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @systemapi this method can be used only by system applications. + * @since 10 + */ + off(type: 'replyResult', callback?: DeviceStateString): void; + } +} + +export default distributedDeviceManager; \ No newline at end of file diff --git a/api/@ohos.file.backup.d.ets b/api/@ohos.file.backup.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..e84f3ce7f6eef1a53eea12a40da3a2c414c63424 --- /dev/null +++ b/api/@ohos.file.backup.d.ets @@ -0,0 +1,838 @@ +/* + * 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 CoreFileKit + */ + +import type { AsyncCallback, Callback } from './@ohos.base'; + +/** + * Module providing backup and restore capabilities. + * + * @namespace backup + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 10 + */ +declare namespace backup { + /** + * Corresponding to a file's metadata. FileMeta is useful when doing IPC with the backup service. + * + * @interface FileMeta + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 10 + */ + interface FileMeta { + /** + * Indicates the name of a bundle. + * + * @type { string } + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 10 + */ + bundleName: string; + + /** + * Indicates a uri to a file. + * + * @type { string } + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 10 + */ + uri: string; + } + + /** + * Corresponding to a file's data. Filedata is useful when doing IPC with the backup service. + * + * @interface FileData + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 10 + */ + interface FileData { + /** + * Indicates a native file descriptor typically retrieved from the backup service to hold the file's content. + * + * @type { number } + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 10 + */ + fd: number; + } + + /** + * Save the time information of the incremental backup. IncrementalBackupTime is useful when doing IPC with the backup service. + * + * @interface IncrementalBackupTime + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 12 + */ + interface IncrementalBackupTime { + /** + * Indicates the name of a bundle. + * + * @type { string } + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 12 + */ + bundleName: string; + + /** + * Time of the last incremental backup + * + * @type { number } + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 12 + */ + lastIncrementalTime: number; + } + + /** + * Manifest file information in incremental data. FileManifestData is useful when doing IPC with the backup service. + * + * @interface FileManifestData + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 12 + */ + interface FileManifestData { + /** + * A file descriptor for the manifest file that holds the data + * + * @type { number } + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 12 + */ + manifestFd: number; + } + + /** + * Provides configuration parameters for backup and restore. + * + * @interface BackupParams + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 12 + */ + interface BackupParams { + /** + * The optional parameters a json strings in the form of key value in backup or restore. + * + * @type { ?string } + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 12 + */ + parameters?: string; + } + + /** + * Control backup and restore priority sequence + * + * @interface BackupPriority + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 12 + */ + interface BackupPriority { + /** + * Indicates the priority of a bundle. + * + * @type { ?number } + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 12 + */ + priority?: number; + } + + /** + * Corresponds to an incremental application, including its last incremental time and incremental list. + * + * @interface IncrementalBackupData + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 12 + */ + interface IncrementalBackupData extends IncrementalBackupTime, FileManifestData, BackupParams, BackupPriority {} + + /** + * Corresponding to a file, including its metadata and data. + * File is useful when doing IPC with the backup service. + * + * @interface File + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 10 + */ + /** + * Corresponds to a file, including its metadata and data and the file's manifest data. + * Files are useful as IPC and backup services. + * + * @interface File + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 12 + */ + interface File extends FileMeta, FileData, FileManifestData {} + + /** + * Obtain a Json file that describes local capabilities. + * + * @permission ohos.permission.BACKUP + * @returns { Promise<FileData> } A FileData holding all the local capabilities. The returned file is a temporal file that will be + * deleted automatically when closed. + * @throws { BusinessError } 13600001 - IPC error + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 10 + */ + function getLocalCapabilities(): Promise<FileData>; + + /** + * Obtain a Json file that describes local capabilities. + * + * @permission ohos.permission.BACKUP + * @param { AsyncCallback<FileData> } callback A callback method, the argument FileData will holding all the local capabilities. + * The returned file is a temporal file that will be deleted automatically when closed. + * @throws { BusinessError } 13600001 - IPC error + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 10 + */ + function getLocalCapabilities(callback: AsyncCallback<FileData>): void; + + /** + * Obtain a json file that describes local capabilities. + * + * @permission ohos.permission.BACKUP + * @param { Array<IncrementalBackupTime> } dataList + * @returns { Promise<FileData> } A FileData holding all the local capabilities. The returned file is a temporal file that will be + * deleted automatically when closed. + * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + * <br>2. Incorrect parameter types. 3.Parameter verification failed. + * @throws { BusinessError } 13600001 - IPC error + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 12 + */ + function getLocalCapabilities(dataList: Array<IncrementalBackupTime>): Promise<FileData>; + + /** + * Get Backup information from bundle. + * + * @permission ohos.permission.BACKUP + * @param { string } bundleToBackup Bundle to backup. + * @returns { string } Return the backup application's info. + * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + * <br>2. Incorrect parameter types. 3.Parameter verification failed. + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 12 + */ + function getBackupInfo(bundleToBackup: string): string; + + /** + * Update backup or restore timeout. + * + * @permission ohos.permission.BACKUP + * @param { string } bundleName set update to bundleName app. + * @param { number } timeout Update backup or restore timeout(unit:ms). + * @returns { boolean } Return update result, true is success, false is fail. + * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + * <br>2. Incorrect parameter types. 3.Parameter verification failed. + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 12 + */ + function updateTimer(bundleName: string, timeout: number): boolean; + + /** + * Update send file fd rate. + * + * @permission ohos.permission.BACKUP + * @param { string } bundleName set update to bundleName app. + * @param { number } sendRate set send file fd rate. + * @returns { boolean } Return update result, true is success, false is fail. + * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + * <br>2. Incorrect parameter types. 3.Parameter verification failed. + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 12 + */ + function updateSendRate(bundleName: string, sendRate: number): boolean; + + /** + * General callbacks for both backup and restore procedure. + * The backup service will notify the client by these callbacks. + * + * @interface GeneralCallbacks + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 10 + */ + interface GeneralCallbacks { + /** + * Callback called when the backup service tries to send files to the client. + * The File argument indicates a file to send to the client. + * The returned file is owned by the backup service and will be cleaned by the service once the file is closed. + * + * @type { AsyncCallback<File> } + * @throws { BusinessError } 13600001 - IPC error + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 10 + */ + onFileReady: AsyncCallback<File>; + + /** + * Callback called when a backup/restore procedure for an bundle is started. + * The return string argument indicates the name of the bundle. + * + * @throws { BusinessError } 13600001 - IPC error + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 10 + */ + /** + * Callback called when a backup/restore procedure for an bundle is started. + * The first return string parameter indicates the name of the bundle. + * The second return string parameter indicates that when BusinessError errors occur, + * the callback data is the name of the bundle. + * + * @type { AsyncCallback<string, void | string> } + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + * <br>2. Incorrect parameter types. 3.Parameter verification failed. + * @throws { BusinessError } 13500001 - The application is not added to the backup or restore + * @throws { BusinessError } 13500002 - Failed to start application extension Procedure + * @throws { BusinessError } 13600001 - IPC error + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 12 + */ + onBundleBegin: AsyncCallback<string, undefined | string>; + + /** + * Callback called when a backup/restore procedure for an bundle ends successfully or gets aborted unexpectedly. + * The return string argument indicates the name of the bundle. + * + * @throws { BusinessError } 13600001 - IPC error + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 10 + */ + /** + * Callback called when a backup/restore procedure for an bundle ends successfully or gets aborted unexpectedly. + * The first return string parameter indicates the name of the bundle. + * The second return string parameter indicates that when BusinessError errors occur, + * the callback data is the name of the bundle. + * + * @type { AsyncCallback<string, void | string> } + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + * <br>2. Incorrect parameter types. 3.Parameter verification failed. + * @throws { BusinessError } 13500003 - Backup or restore timed out + * @throws { BusinessError } 13500004 - Application extension death + * @throws { BusinessError } 13600001 - IPC error + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 12 + */ + onBundleEnd: AsyncCallback<string, undefined | string>; + + /** + * Callback called when the all the bundles to backup/restore are done or aborted unexpectedly. + * + * @type { AsyncCallback<undefined> } + * @throws { BusinessError } 13600001 - IPC error + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 10 + */ + onAllBundlesEnd: AsyncCallback<undefined>; + + /** + * Callback called when the backup service dies unexpectedly. + * + * @type { Callback<undefined> } + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 10 + */ + onBackupServiceDied: Callback<undefined>; + + /** + * Callback called when the backup service return result information. + * The first return string parameter indicates the bundleName that triggers the callback. + * The second return string parameter indicates the result of the bundle. + * + * @param { string } bundleName the bundleName that triggers the callback. + * @param { string } result the result of the bundle. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + * <br>2. Incorrect parameter types. 3.Parameter verification failed. + * @throws { BusinessError } 13600001 - IPC error + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 12 + */ + onResultReport(bundleName: string, result: string):void; + + /** + * Callback called when the backup_sa service return result information. + * The first return string parameter indicates the result of the bundle. + * + * @param { string } bundleName the bundleName that triggers the callback. + * @param { string } process the process info of the bundle. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + * <br>2. Incorrect parameter types. 3.Parameter verification failed. + * @throws { BusinessError } 13500006 - Tar error + * @throws { BusinessError } 13500008 - Untar error + * @throws { BusinessError } 13600001 - IPC error + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900025 - No space left on device + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 12 + */ + onProcess(bundleName: string, process: string):void; + } + + /** + * Control class for backup procedure. + * + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 10 + */ + class SessionBackup { + /** + * Constructor for obtaining the instance of the SessionBackup class. + * + * @permission ohos.permission.BACKUP + * @param { GeneralCallbacks } callbacks Callbacks to be registered for the backup. + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 10 + */ + constructor(callbacks: GeneralCallbacks); + + /** + * Append new bundles to backup. + * + * @permission ohos.permission.BACKUP + * @param { string[] } bundlesToBackup Bundles to backup. + * @returns { Promise<void> } The promise returned by the function. + * @throws { BusinessError } 13600001 - IPC error + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 10 + */ + /** + * Append new bundles and backupInfos to backup. + * + * @permission ohos.permission.BACKUP + * @param { string[] } bundlesToBackup Bundles to backup. + * @param { string[] } infos Infos to backup. + * @returns { Promise<void> } The promise returned by the function. + * @throws { BusinessError } 13600001 - IPC error + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 12 + */ + appendBundles(bundlesToBackup: string[], infos?: string[]): Promise<void>; + + /** + * Append new bundles to backup. + * + * @permission ohos.permission.BACKUP + * @param { string[] } bundlesToBackup Bundles to backup. + * @param { AsyncCallback<void> } callback Asynchronous callback to be called when appendBundles has finished. + * @throws { BusinessError } 13600001 - IPC error + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 10 + */ + appendBundles(bundlesToBackup: string[], callback: AsyncCallback<void>): void; + + /** + * End Backup process + * + * @permission ohos.permission.BACKUP + * @returns { Promise<void> } The promise returned by the function. + * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + * <br>2. Incorrect parameter types. 3.Parameter verification failed. + * @throws { BusinessError } 13600001 - IPC error + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 12 + */ + release(): Promise<void>; + } + + /** + * Control class for restore procedure. + * + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 10 + */ + class SessionRestore { + /** + * Constructor for obtaining the instance of the SessionBackup class. + * + * @permission ohos.permission.BACKUP + * @param { GeneralCallbacks } callbacks Callbacks to be registered for the restore. + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 10 + */ + constructor(callbacks: GeneralCallbacks); + + /** + * Append new bundles to be restore up during the restore. + * + * @permission ohos.permission.BACKUP + * @param { number } remoteCapabilitiesFd Opened JSON file that stores remote device capabilities. + * You can use the getLocalCapabilities method to obtain the value. + * @param { string[] } bundlesToBackup Bundles to restore. + * @returns { Promise<void> } The promise returned by the function. + * @throws { BusinessError } 13600001 - IPC error + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 10 + */ + /** + * Append new bundles and restoreInfos to be restore up during the restore. + * + * @permission ohos.permission.BACKUP + * @param { number } remoteCapabilitiesFd Opened JSON file that stores remote device capabilities. + * You can use the getLocalCapabilities method to obtain the value. + * @param { string[] } bundlesToBackup Bundles to restore. + * @param { string[] } [infos] infos to restore + * @returns { Promise<void> } The promise returned by the function. + * @throws { BusinessError } 13600001 - IPC error + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 12 + */ + appendBundles(remoteCapabilitiesFd: number, bundlesToBackup: string[], infos?: string[]): Promise<void>; + + /** + * Append new bundles to be restore up during the restore. + * + * @permission ohos.permission.BACKUP + * @param { number } remoteCapabilitiesFd Opened JSON file that stores remote device capabilities. + * You can use the getLocalCapabilities method to obtain the value. + * @param { string[] } bundlesToBackup Bundles to restore. + * @param { AsyncCallback<void> } callback Asynchronous callback to be called when appendBundles has finished. + * @throws { BusinessError } 13600001 - IPC error + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 10 + */ + appendBundles(remoteCapabilitiesFd: number, bundlesToBackup: string[], callback: AsyncCallback<void>): void; + + /** + * Publish the file handle to the backup service to make the service aware that the file's content is ready. + * This interface is part of the zero-copy feature. + * + * @permission ohos.permission.BACKUP + * @param { FileMeta } fileMeta Metadata of the file to be sent. Make sure that the backup framework holds + * this file by calling getFileHandle. + * @returns { Promise<void> } The promise returned by the function. + * @throws { BusinessError } 13600001 - IPC error + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 10 + */ + publishFile(fileMeta: FileMeta): Promise<void>; + + /** + * Publish the file handle to the backup service to make the service aware that the file's content is ready. + * This interface is part of the zero-copy feature. + * + * @permission ohos.permission.BACKUP + * @param { FileMeta } fileMeta Metadata of the file to be sent. Make sure that the backup framework holds + * this file by calling getFileHandle. + * @param { AsyncCallback<void> } callback Asynchronous callback to be called when publishFile has finished. + * @throws { BusinessError } 13600001 - IPC error + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 10 + */ + publishFile(fileMeta: FileMeta, callback: AsyncCallback<void>): void; + + /** + * Request to get a shared file from the service. This interface is part of the zero-copy feature. + * Developers could get the file through onFileReady callback. + * When the client accomplished the file, use publishFile to publish. + * + * @permission ohos.permission.BACKUP + * @param { FileMeta } fileMeta Metadata of the file to be sent. Note that all the files should come + * from the backup procedure or the getLocalCapabilities method. + * @returns { Promise<void> } The promise returned by the function. + * @throws { BusinessError } 13600001 - IPC error + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 10 + */ + getFileHandle(fileMeta: FileMeta): Promise<void>; + + /** + * Request to get a shared file from the service. This interface is part of the zero-copy feature. + * Developers could get the file through onFileReady callback. + * When the client accomplished the file, use publishFile to publish. + * + * @permission ohos.permission.BACKUP + * @param { FileMeta } fileMeta Metadata of the file to be sent. Note that all the files should come + * from the backup procedure or the getLocalCapabilities method. + * @param { AsyncCallback<void> } callback Asynchronous callback to be called when getFileHandle has finished. + * @throws { BusinessError } 13600001 - IPC error + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 10 + */ + getFileHandle(fileMeta: FileMeta, callback: AsyncCallback<void>): void; + + /** + * End restore process + * + * @permission ohos.permission.BACKUP + * @returns { Promise<void> } The promise returned by the function. + * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + * <br>2. Incorrect parameter types. 3.Parameter verification failed. + * @throws { BusinessError } 13600001 - IPC error + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 12 + */ + release(): Promise<void>; + } + + /** + * Control class for incremental backup procedure. + * + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 12 + */ + class IncrementalBackupSession { + /** + * Constructor for obtaining the instance of the IncrementalBackupSession class. + * + * @permission ohos.permission.BACKUP + * @param { GeneralCallbacks } callbacks Callbacks to be registered for the backup. + * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + * <br>2. Incorrect parameter types. 3.Parameter verification failed. + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 12 + */ + constructor(callbacks: GeneralCallbacks); + + /** + * Append new bundles to incremental backup. + * + * @permission ohos.permission.BACKUP + * @param { Array<IncrementalBackupData> } bundlesToBackup Bundles to incremental backup. + * @returns { Promise<void> } The promise returned by the function. + * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + * <br>2. Incorrect parameter types. 3.Parameter verification failed. + * @throws { BusinessError } 13600001 - IPC error + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 12 + */ + appendBundles(bundlesToBackup: Array<IncrementalBackupData>): Promise<void>; + + /** + * Append new bundles to incremental backup. + * + * @permission ohos.permission.BACKUP + * @param { Array<IncrementalBackupData> } bundlesToAppend Bundles to incremental backup. + * @param { string[] } infos information of the bundlesToBackup + * @returns { Promise<void> } The promise returned by the function. + * @throws { BusinessError } 201 - Permission verification failed. This error code is usually the result returned by VerifyAccessToken. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + * <br>2. Incorrect parameter types. 3. Parameter verification failed. + * @throws { BusinessError } 13600001 - IPC error + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 12 + */ + appendBundles(bundlesToAppend: Array<IncrementalBackupData>, infos: string[]): Promise<void>; + + /** + * End backup process + * + * @permission ohos.permission.BACKUP + * @returns { Promise<void> } The promise returned by the function. + * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application + * uses system API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + * <br>2. Incorrect parameter types. 3.Parameter verification failed. + * @throws { BusinessError } 13600001 - IPC error + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 12 + */ + release(): Promise<void>; + } +} +export default backup; diff --git a/api/@ohos.file.fileAccess.d.ets b/api/@ohos.file.fileAccess.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..91c5e24b74627da6a764428d7a8f67a12ba7f794 --- /dev/null +++ b/api/@ohos.file.fileAccess.d.ets @@ -0,0 +1,2212 @@ +/* + * Copyright (c) 2022-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. + */ + +/** + * @file + * @kit CoreFileKit + */ + +import type { AsyncCallback, Callback } from './@ohos.base'; +import Want from './@ohos.app.ability.Want'; +import Context from './application/Context'; +import { Filter } from './@ohos.file.fs'; + +/** + * This module provides the capability to access user public files. + * + * @namespace fileAccess + * @syscap SystemCapability.FileManagement.UserFileService + * @since 9 + */ +declare namespace fileAccess { + /** + * Query the want information of HAP configured with fileaccess. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER and ohos.permission.GET_BUNDLE_INFO_PRIVILEGED + * @param { AsyncCallback<Array<Want>> } callback - The callback is used to return a Array<Want> object. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 9 + */ + export function getFileAccessAbilityInfo(callback: AsyncCallback<Array<Want>>): void; + + /** + * Query the want information of HAP configured with fileaccess. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER and ohos.permission.GET_BUNDLE_INFO_PRIVILEGED + * @returns { Promise<Array<Want>> } Returns the wants. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 9 + */ + export function getFileAccessAbilityInfo(): Promise<Array<Want>>; + + /** + * Obtains the fileAccessHelper that connects all fileaccess servers in the system. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER and ohos.permission.GET_BUNDLE_INFO_PRIVILEGED + * @param { Context } context Indicates the application context. + * @returns { FileAccessHelper } Returns the fileAccessHelper. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 9 + */ + export function createFileAccessHelper(context: Context): FileAccessHelper; + + /** + * Obtains the fileAccessHelper that connects some specified fileaccess servers in the system. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER and ohos.permission.GET_BUNDLE_INFO_PRIVILEGED + * @param { Context } context Indicates the application context. + * @param { Array<Want> } wants Represents the connected data provider. + * @returns { FileAccessHelper } Returns the fileAccessHelper. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 9 + */ + export function createFileAccessHelper(context: Context, wants: Array<Want>): FileAccessHelper; + + /** + * File Object + * + * @interface FileInfo + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 9 + */ + export interface FileInfo { + /** + * Indicates the path of the file. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @type { string } + * @readonly + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 9 + */ + uri: string; + /** + * Indicates the relativePath of the file. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @type { string } + * @readonly + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 10 + */ + relativePath: string; + /** + * Indicates the name of the file. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @type { string } + * @readonly + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 9 + */ + fileName: string; + /** + * Indicates the mode of the file. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @type { number } + * @readonly + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 9 + */ + mode: number; + /** + * Indicates the size of the file. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @type { number } + * @readonly + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 9 + */ + size: number; + /** + * Indicates the mtime of the file. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @type { number } + * @readonly + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 9 + */ + mtime: number; + /** + * Indicates the mimeType of the file. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @type { string } + * @readonly + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 9 + */ + mimeType: string; + + /** + * List files in the current directory. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { Filter } filter Indicates the filter of file. + * @returns { FileIterator } Returns the FileIterator Object. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14000001 - Invalid display name + * @throws { BusinessError } 14000002 - Invalid uri + * @throws { BusinessError } 14000003 - Invalid file extension + * @throws { BusinessError } 14000004 - File has been put into trash bin + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 9 + */ + listFile(filter?: Filter): FileIterator; + + /** + * Recursively list all files in the current directory. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { Filter } filter Indicates the filter of file. + * @returns { FileIterator } Returns the FileIterator Object. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14000001 - Invalid display name + * @throws { BusinessError } 14000002 - Invalid uri + * @throws { BusinessError } 14000003 - Invalid file extension + * @throws { BusinessError } 14000004 - File has been put into trash bin + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 9 + */ + scanFile(filter?: Filter): FileIterator; + } + +// 定义返回值类型 + interface IteratorResult { + value: FileInfo; + done: boolean; + } + + /** + * FileIterator Object + * + * @interface FileIterator + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 9 + */ + export interface FileIterator { + /** + * Get the next fileInfo. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @returns { object } Returns FileInfo Object and boolean flag. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14000001 - Invalid display name + * @throws { BusinessError } 14000002 - Invalid uri + * @throws { BusinessError } 14000003 - Invalid file extension + * @throws { BusinessError } 14000004 - File has been put into trash bin + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 9 + */ + next(): IteratorResult; + } + + /** + * Root Object + * + * @interface RootInfo + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 9 + */ + export interface RootInfo { + /** + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @type { number } + * @readonly + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 9 + */ + deviceType: number; + /** + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @type { string } + * @readonly + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 9 + */ + uri: string; + /** + * File or directory relative path + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @type { string } + * @readonly + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 10 + */ + relativePath: string; + /** + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @type { string } + * @readonly + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 9 + */ + displayName: string; + /** + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @type { number } + * @readonly + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 9 + */ + deviceFlags: number; + + /** + * List files in the current directory. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { Filter } filter Indicates the filter of file. + * @returns { FileIterator } Returns the FileIterator Object. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14000001 - Invalid display name + * @throws { BusinessError } 14000002 - Invalid uri + * @throws { BusinessError } 14000003 - Invalid file extension + * @throws { BusinessError } 14000004 - File has been put into trash bin + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 9 + */ + listFile(filter?: Filter): FileIterator; + + /** + * Recursively list all files in the current directory. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { Filter } filter Indicates the filter of file. + * @returns { FileIterator } Returns the RootIterator Object. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14000001 - Invalid display name + * @throws { BusinessError } 14000002 - Invalid uri + * @throws { BusinessError } 14000003 - Invalid file extension + * @throws { BusinessError } 14000004 - File has been put into trash bin + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 9 + */ + scanFile(filter?: Filter): FileIterator; + } + + interface RootIterator_ { + value: RootInfo; + done: boolean; + } + + /** + * RootIterator Object + * + * @interface RootIterator + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 9 + */ + export interface RootIterator { + /** + * Get a next RootInfo. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @returns { object } Returns RootInfo Object and boolean flag. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14000001 - Invalid display name + * @throws { BusinessError } 14000002 - Invalid uri + * @throws { BusinessError } 14000003 - Invalid file extension + * @throws { BusinessError } 14000004 - File has been put into trash bin + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 9 + */ + next(): RootIterator_; + } + + /** + * Describes the return information of the copy operation. + * + * @interface CopyResult + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @since 10 + */ + export interface CopyResult { + /** + * Represents the source file or directory uri to be copied + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @type { string } + * @readonly + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @stagemodeonly + * @since 10 + */ + sourceUri: string; + /** + * Represents a file or directory uri in the target folder + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @type { string } + * @readonly + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @stagemodeonly + * @since 10 + */ + destUri: string; + /** + * Error code for failure to copy a file or directory. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @type { number } + * @readonly + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @stagemodeonly + * @since 10 + */ + errCode: number; + /** + * Error message for failure to copy a file or directory. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @type { string } + * @readonly + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @stagemodeonly + * @since 10 + */ + errMsg: string; + } + + /** + * OPENFLAGS represents the way to open the file. + * + * @enum { number } OPENFLAGS + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 9 + */ + export enum OPENFLAGS { + /** + * Open the file by Read-only mode. + * + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 9 + */ + READ = 0o0, + + /** + * Open the file by Write-only mode. + * + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 9 + */ + WRITE = 0o1, + + /** + * Open the file by Write-Read mode. + * + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 9 + */ + WRITE_READ = 0o2 + } + + /** + * Property elements that support the file queries. + * + * @enum { string } FileKey + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 10 + */ + export enum FileKey { + /** + * The key represents the file name. + * + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 10 + */ + DISPLAY_NAME = 'display_name', + + /** + * The key represents the date of the file creation. + * + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 10 + */ + DATE_ADDED = 'date_added', + + /** + * The key represents the modify date of the file. + * + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 10 + */ + DATE_MODIFIED = 'date_modified', + + /** + * The key represents the relative path. + * + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 10 + */ + RELATIVE_PATH = 'relative_path', + + /** + * The key represents the file size. + * + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 10 + */ + FILE_SIZE = 'size' + } + + /** + * Describes the notifyType. + * + * @enum { number } NotifyType + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 10 + */ + export enum NotifyType { + /** + * Type for add notification + * + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 10 + */ + NOTIFY_ADD, + + /** + * Type for delete notification + * + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 10 + */ + NOTIFY_DELETE, + + /** + * The file was moved into the monitored directory. + * + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 10 + */ + NOTIFY_MOVED_TO, + + /** + * The file in the monitored directory was moved. + * + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 10 + */ + NOTIFY_MOVED_FROM, + + /** + * The monitored file or directory was moved. + * + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 10 + */ + NOTIFY_MOVE_SELF, + + /** + * Event type of device online. + * + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 11 + */ + NOTIFY_DEVICE_ONLINE, + + /** + * Event type of device offline. + * + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 11 + */ + NOTIFY_DEVICE_OFFLINE + } + + /** + * The value of the notify callback function + * + * @interface NotifyMessage + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 10 + */ + export interface NotifyMessage { + /** + * Indicates the change type. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @type { NotifyType } + * @readonly + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 10 + */ + type: NotifyType; + + /** + * Indicates the uris generated the change event. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @type { Array<string> } + * @readonly + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 10 + */ + uris: Array<string>; + } + + /** + * Describes the return information of the move operation. + * + * @interface MoveResult + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 11 + */ + export interface MoveResult { + /** + * Indicates the source file or directory uri to be moved. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @type { string } + * @readonly + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 11 + */ + sourceUri: string; + + /** + * Indicates the file or directory uri in the destination folder. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @type { string } + * @readonly + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 11 + */ + destUri: string; + + /** + * Error code for failure to move a file or directory. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @type { number } + * @readonly + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 11 + */ + errCode: number; + + /** + * Error message for failure to move a file. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @type { string } + * @readonly + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 11 + */ + errMsg: string; + } + + /** + * Indicates the root uri of the device + * + * @constant + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 11 + */ + const DEVICES_URI = 'file://docs'; + + /** + * FileAccessHelper Object + * + * @interface FileAccessHelper + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @since 9 + */ + export interface FileAccessHelper { + /** + * Open a file. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } uri Indicates the path of the file to open. + * @param { OPENFLAGS } flags Indicate options of opening a file. The default value is read-only. + * @returns { Promise<number> } Returns the file descriptor. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14000001 - Invalid display name + * @throws { BusinessError } 14000002 - Invalid uri + * @throws { BusinessError } 14000003 - Invalid file extension + * @throws { BusinessError } 14000004 - File has been put into trash bin + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @since 9 + */ + openFile(uri: string, flags: OPENFLAGS): Promise<number>; + + /** + * Open a file. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } uri Indicates the path of the file to open. + * @param { OPENFLAGS } flags Indicate options of opening a file. The default value is read-only. + * @param { AsyncCallback<number> } callback - The callback is used to return the file descriptor. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14000001 - Invalid display name + * @throws { BusinessError } 14000002 - Invalid uri + * @throws { BusinessError } 14000003 - Invalid file extension + * @throws { BusinessError } 14000004 - File has been put into trash bin + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @since 9 + */ + openFile(uri: string, flags: OPENFLAGS, callback: AsyncCallback<number>): void; + + /** + * Create a file. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } uri Represents a specific parent directory. + * @param { string } displayName Indicates the new file name, and supports with suffix. + * @returns { Promise<string> } Returns the new file's URI. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14000001 - Invalid display name + * @throws { BusinessError } 14000002 - Invalid uri + * @throws { BusinessError } 14000003 - Invalid file extension + * @throws { BusinessError } 14000004 - File has been put into trash bin + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @since 9 + */ + createFile(uri: string, displayName: string): Promise<string>; + + /** + * Create a file. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } uri Represents a specific parent directory. + * @param { string } displayName Indicates the new file name, and supports with suffix. + * @param { AsyncCallback<string> } callback - The callback is used to return the new file's URI. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14000001 - Invalid display name + * @throws { BusinessError } 14000002 - Invalid uri + * @throws { BusinessError } 14000003 - Invalid file extension + * @throws { BusinessError } 14000004 - File has been put into trash bin + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @since 9 + */ + createFile(uri: string, displayName: string, callback: AsyncCallback<string>): void; + + /** + * Create a Directory. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } parentUri Represents a specific parent directory. + * @param { string } displayName Indicates the new directory name. + * @returns { Promise<string> } Returns the new directory's URI. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14000001 - Invalid display name + * @throws { BusinessError } 14000002 - Invalid uri + * @throws { BusinessError } 14000003 - Invalid file extension + * @throws { BusinessError } 14000004 - File has been put into trash bin + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @since 9 + */ + mkDir(parentUri: string, displayName: string): Promise<string>; + + /** + * Create a Directory. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } parentUri Represents a specific parent directory. + * @param { string } displayName Indicates the new directory name. + * @param { AsyncCallback<string> } callback - The callback is used to return the new directory's URI. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14000001 - Invalid display name + * @throws { BusinessError } 14000002 - Invalid uri + * @throws { BusinessError } 14000003 - Invalid file extension + * @throws { BusinessError } 14000004 - File has been put into trash bin + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @since 9 + */ + mkDir(parentUri: string, displayName: string, callback: AsyncCallback<string>): void; + + /** + * Delete a file or delete a directory recursively. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } uri Indicates the file or directory to be deleted. + * @returns { Promise<number> } + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14000001 - Invalid display name + * @throws { BusinessError } 14000002 - Invalid uri + * @throws { BusinessError } 14000003 - Invalid file extension + * @throws { BusinessError } 14000004 - File has been put into trash bin + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @since 9 + */ + delete(uri: string): Promise<number>; + + /** + * Delete a file or delete a directory recursively. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } uri Indicates the file or directory to be deleted. + * @param { AsyncCallback<number> } callback + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14000001 - Invalid display name + * @throws { BusinessError } 14000002 - Invalid uri + * @throws { BusinessError } 14000003 - Invalid file extension + * @throws { BusinessError } 14000004 - File has been put into trash bin + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @since 9 + */ + delete(uri: string, callback: AsyncCallback<number>): void; + + /** + * Move a file or move a directory recursively. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } sourceFile Indicates the file or directory to be moved. + * @param { string } destFile Represents the destination folder. + * @returns { Promise<string> } Returns the generated new file or directory. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14000001 - Invalid display name + * @throws { BusinessError } 14000002 - Invalid uri + * @throws { BusinessError } 14000003 - Invalid file extension + * @throws { BusinessError } 14000004 - File has been put into trash bin + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @since 9 + */ + move(sourceFile: string, destFile: string): Promise<string>; + + /** + * Move a file or move a directory recursively. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } sourceFile Indicates the file or directory to be moved. + * @param { string } destFile Represents the destination folder. + * @param { AsyncCallback<string> } callback - The callback is used to return the generated new file or directory. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14000001 - Invalid display name + * @throws { BusinessError } 14000002 - Invalid uri + * @throws { BusinessError } 14000003 - Invalid file extension + * @throws { BusinessError } 14000004 - File has been put into trash bin + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @since 9 + */ + move(sourceFile: string, destFile: string, callback: AsyncCallback<string>): void; + + /** + * Copy file or directory in the promise way. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } sourceUri - Indicates the file or directory to be copied. + * @param { string } destUri - Represents the destination directory. + * @param { boolean } force - Optional parameter that determines whether to forcibly copy files. + * @returns { Promise<Array<CopyResult>> } Returns the file information where the error occurred. + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @since 10 + */ + copy(sourceUri: string, destUri: string, force?: boolean): Promise<Array<CopyResult>>; + + /** + * Copy file or directory in the asyncCallback way. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } sourceUri - Indicates the file or directory to be copied. + * @param { string } destUri - Represents the destination directory. + * @param { AsyncCallback<Array<CopyResult>> } callback - The callback is used to return the file information where + * the error occurred. + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @since 10 + */ + copy(sourceUri: string, destUri: string, callback: AsyncCallback<Array<CopyResult>>): void; + + /** + * Copy file or directory in the asyncCallback way. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } sourceUri - Indicates the file or directory to be copied. + * @param { string } destUri - Represents the destination directory. + * @param { boolean } force - Determines whether to forcibly copy files. + * @param { AsyncCallback<Array<CopyResult>> } callback - The callback is used to return the file information where + * the error occurred. + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @since 10 + */ + copy(sourceUri: string, destUri: string, force: boolean, callback: AsyncCallback<Array<CopyResult>>): void; + + /** + * copy the file with the specified file name in the promise way. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } sourceUri - Indicates the file or directory to be moved. + * @param { string } destUri - Represents the destination folder. + * @param { string } fileName - Represents the name of the specified file. + * @returns { Promise<string> } Returns the generated new file uri. + * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application + * uses system API + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 11 + */ + copyFile(sourceUri: string, destUri: string, fileName: string): Promise<string>; + + /** + * copy the file with the specified file name in the asyncCallback way. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } sourceUri - Indicates the file or directory to be moved. + * @param { string } destUri - Represents the destination folder. + * @param { string } fileName - Represents the name of the specified file. + * @param { AsyncCallback<string> } callback - Returns the generated new file uri. + * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application + * uses system API + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 11 + */ + copyFile(sourceUri: string, destUri: string, fileName: string, callback: AsyncCallback<string>): void; + + /** + * Rename the selected file or directory. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } uri Indicates the selected file or directory. + * @param { string } displayName Indicates the new directory or file name. + * @returns { Promise<string> } Returns a URI representing the new file or directory. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14000001 - Invalid display name + * @throws { BusinessError } 14000002 - Invalid uri + * @throws { BusinessError } 14000003 - Invalid file extension + * @throws { BusinessError } 14000004 - File has been put into trash bin + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @since 9 + */ + rename(uri: string, displayName: string): Promise<string>; + + /** + * Rename the selected file or directory. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } uri Indicates the selected file or directory. + * @param { string } displayName Indicates the new directory or file name. + * @param { AsyncCallback<string> } callback - The callback is used to return a URI representing the new file or + * directory. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14000001 - Invalid display name + * @throws { BusinessError } 14000002 - Invalid uri + * @throws { BusinessError } 14000003 - Invalid file extension + * @throws { BusinessError } 14000004 - File has been put into trash bin + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @since 9 + */ + rename(uri: string, displayName: string, callback: AsyncCallback<string>): void; + + /** + * Obtain the status of a file or directory. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } sourceFileUri Indicates the selected file or directory. + * @returns { Promise<boolean> } Returns whether it exists. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14000001 - Invalid display name + * @throws { BusinessError } 14000002 - Invalid uri + * @throws { BusinessError } 14000003 - Invalid file extension + * @throws { BusinessError } 14000004 - File has been put into trash bin + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @since 9 + */ + access(sourceFileUri: string): Promise<boolean>; + + /** + * Obtain the status of a file or directory. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } sourceFileUri Indicates the selected file or directory. + * @param { AsyncCallback<boolean> } callback - The callback is used to return whether it exists. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14000001 - Invalid display name + * @throws { BusinessError } 14000002 - Invalid uri + * @throws { BusinessError } 14000003 - Invalid file extension + * @throws { BusinessError } 14000004 - File has been put into trash bin + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @since 9 + */ + access(sourceFileUri: string, callback: AsyncCallback<boolean>): void; + + /** + * Query file related information by the uri in the promise way. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } uri - Indicates the selected file or directory. + * @param { string } metaJson The json string includes query property. + * @returns { Promise<string> } Returns the json string, includes query property and value. + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @since 10 + */ + query(uri: string, metaJson: string): Promise<string>; + + /** + * Query file related information by the uri in the asyncCallback way. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } uri - Indicates the selected file or directory. + * @param { string } metaJson The json string includes query property. + * @param { AsyncCallback<string> } callback - Returns the json string, includes query property and value. + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @since 10 + */ + query(uri: string, metaJson: string, callback: AsyncCallback<string>): void; + + /** + * Get a FileInfo by the uri in the promise way. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } uri - Indicates the selected file or directory. + * @returns { Promise<FileInfo> } Returns a FileInfo. + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @since 10 + */ + getFileInfoFromUri(uri: string): Promise<FileInfo>; + + /** + * Get a FileInfo by the uri in the asyncCallback way. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } uri - Indicates the selected file or directory. + * @param { AsyncCallback<FileInfo> } callback - The callback is used to return a fileinfo object. + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @since 10 + */ + getFileInfoFromUri(uri: string, callback: AsyncCallback<FileInfo>): void; + + /** + * Get a FileInfo by the relative path in the promise way. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } relativePath - Indicates the selected file or directory. + * @returns { Promise<FileInfo> } Returns a FileInfo. + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @since 10 + */ + getFileInfoFromRelativePath(relativePath: string): Promise<FileInfo>; + + /** + * Get a FileInfo by the relative path in the asyncCallback way. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } relativePath - Indicates the selected file or directory. + * @param { AsyncCallback<FileInfo> } callback - The callback is used to return a fileinfo object. + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @since 10 + */ + getFileInfoFromRelativePath(relativePath: string, callback: AsyncCallback<FileInfo>): void; + + /** + * Get a RootIterator. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @returns { Promise<RootIterator> } Returns a RootIterator. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14000001 - Invalid display name + * @throws { BusinessError } 14000002 - Invalid uri + * @throws { BusinessError } 14000003 - Invalid file extension + * @throws { BusinessError } 14000004 - File has been put into trash bin + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @since 9 + */ + getRoots(): Promise<RootIterator>; + + /** + * Get a RootIterator. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { AsyncCallback<RootIterator> } callback - The callback is used to return a RootIterator. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14000001 - Invalid display name + * @throws { BusinessError } 14000002 - Invalid uri + * @throws { BusinessError } 14000003 - Invalid file extension + * @throws { BusinessError } 14000004 - File has been put into trash bin + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @since 9 + */ + getRoots(callback: AsyncCallback<RootIterator>): void; + + /** + * Turn on monitor the specified uri. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } uri - Indicates the file or directory to be monitored. + * @param { boolean } notifyForDescendants - Indicates Whether to monitor changes in descendants. + * @param { Callback<NotifyMessage> } callback - The callback is used to return the notify message. + * @throws { BusinessError } 14300002 - Invalid uri + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @since 10 + */ + registerObserver(uri: string, notifyForDescendants: boolean, callback: Callback<NotifyMessage>): void; + + /** + * Turn off monitor the specified uri. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } uri - Indicates the file or directory the file that will cancel monitored. + * @param { Callback<NotifyMessage> } callback - The object bound to the uri. + * @throws { BusinessError } 14300002 - Invalid uri + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @since 10 + */ + unregisterObserver(uri: string, callback?: Callback<NotifyMessage>): void; + + /** + * Move file or directory in the promise way, And return the MoveResult. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } sourceUri - Indicates the file or directory to be moved. + * @param { string } destUri - Represents the destination directory. + * @param { boolean } [force] - Optional parameter that determines whether to forcibly move files. + * @returns { Promise<Array<MoveResult>> } Returns the file information where the error occurred. + * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application + * uses system API. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 11 + */ + moveItem(sourceUri: string, destUri: string, force?: boolean): Promise<Array<MoveResult>>; + + /** + * Move file or directory in the asyncCallback way, and return the MoveResult. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } sourceUri - Indicates the file or directory to be moved. + * @param { string } destUri - Represents the destination directory. + * @param { AsyncCallback<Array<MoveResult>> } callback - The callback is used to return the file information where + * the error occurred. + * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application + * uses system API. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 11 + */ + moveItem(sourceUri: string, destUri: string, callback: AsyncCallback<Array<MoveResult>>): void; + + /** + * Move file or directory in the asyncCallback way, and return the MoveResult. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } sourceUri - Indicates the file or directory to be moved. + * @param { string } destUri - Represents the destination directory. + * @param { boolean } force - Determines whether to forcibly move files. + * @param { AsyncCallback<Array<MoveResult>> } callback - The callback is used to return the file information where + * the error occurred. + * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application + * uses system API. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 11 + */ + moveItem(sourceUri: string, destUri: string, force: boolean, callback: AsyncCallback<Array<MoveResult>>): void; + + /** + * Move the file with the specified file name in the promise way. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } sourceUri - Indicates the file or directory to be moved. + * @param { string } destUri - Represents the destination folder. + * @param { string } fileName - Represents the name of the specified file. + * @returns { Promise<string> } Returns the generated new file uri. + * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application + * uses system API. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 11 + */ + moveFile(sourceUri: string, destUri: string, fileName: string): Promise<string>; + + /** + * Move the file with the specified file name in the asyncCallback way. + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { string } sourceUri - Indicates the file or directory to be moved. + * @param { string } destUri - Represents the destination folder. + * @param { string } fileName - Represents the name of the specified file. + * @param { AsyncCallback<string> } callback - The callback is used to return the generated new file uri. + * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application + * uses system API. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14300001 - IPC error + * @throws { BusinessError } 14300002 - Invalid uri + * @throws { BusinessError } 14300003 - Fail to get fileextension info + * @throws { BusinessError } 14300004 - Get wrong result + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + * @StageModelOnly + * @since 11 + */ + moveFile(sourceUri: string, destUri: string, fileName: string, callback: AsyncCallback<string>): void; + } +} + +export default fileAccess; diff --git a/api/@ohos.file.keyManager.d.ets b/api/@ohos.file.keyManager.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..574722d984039c87307762af2fed3d1882466fc2 --- /dev/null +++ b/api/@ohos.file.keyManager.d.ets @@ -0,0 +1,46 @@ +/* + * 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 CoreFileKit + */ + +/** + * Provides filesystem KeyManager APIs. + * + * @namespace keyManager + * @syscap SystemCapability.FileManagement.StorageService.Encryption + * @since 20 + */ +declare namespace keyManager { + /** + * Initiate the deactivation of user key for the specified user when user screen is locked. + * + * @permission ohos.permission.STORAGE_MANAGER_CRYPT + * @param { int } userId + * @throws { BusinessError } 201 - Permission verification failed. + * @throws { BusinessError } 202 - The caller is not a system application. + * @throws { BusinessError } 13600001 - IPC error. + * @throws { BusinessError } 13600008 - No such object. Possible causes: Cannot find userkey for the specified user. + * input parameter userId < 100 or userId > 10736. + * @syscap SystemCapability.FileManagement.StorageService.Encryption + * @systemapi + * @since 20 + */ + function deactivateUserKeyId(userId: int):void; + } + + export default keyManager; \ No newline at end of file diff --git a/api/@ohos.file.storageStatistics.d.ets b/api/@ohos.file.storageStatistics.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..671082770a283f0c4f7954d364cabaac7f03097d --- /dev/null +++ b/api/@ohos.file.storageStatistics.d.ets @@ -0,0 +1,224 @@ +/* + * 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 CoreFileKit + */ + +import { AsyncCallback, Callback } from './@ohos.base'; + +/** + * Provides filesystem statistics APIs. + * + * @namespace storageStatistics + * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics + * @since 20 + */ +declare namespace storageStatistics { + /** + * Get the free size. + * + * @param { AsyncCallback<long> } callback - callback + * @throws { BusinessError } 13600001 - Permission Denied.Possible causes: + * May need permission ohos.permission.STORAGE_MANAGER. + * @throws { BusinessError } 13900042 - Unknown error. + * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics + * @since 20 + */ + function getFreeSize(callback: AsyncCallback<long>): void; + + /** + * Get the free size. + * + * @returns { Promise<long> } return Promise + * @throws { BusinessError } 13600001 - Permission Denied.Possible causes: + * May need permission ohos.permission.STORAGE_MANAGER. + * @throws { BusinessError } 13900042 - Unknown error. + * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics + * @since 20 + */ + function getFreeSize(): Promise<long>; + + /** + * Get the total size. + * + * @param { AsyncCallback<long> } callback - callback + * @throws { BusinessError } 13600001 - Permission Denied.Possible causes: + * May need permission ohos.permission.STORAGE_MANAGER. + * @throws { BusinessError } 13900042 - Unknown error. + * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics + * @since 20 + */ + function getTotalSize(callback: AsyncCallback<long>): void; + + /** + * Get the total size. + * + * @returns { Promise<long> } return Promise + * @throws { BusinessError } 13600001 - Permission Denied.Possible causes: + * May need permission ohos.permission.STORAGE_MANAGER. + * @throws { BusinessError } 13900042 - Unknown error. + * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics + * @since 20 + */ + function getTotalSize(): Promise<long>; + + /** + * Get the current bundle statistics. + * + * @param { AsyncCallback<BundleStats> } callback - callback + * @throws { BusinessError } 13600001 - Permission Denied.Possible causes: + * May need permission ohos.permission.STORAGE_MANAGER. + * @throws { BusinessError } 13900042 - Unknown error. + * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics + * @since 20 + */ + function getCurrentBundleStats(callback: AsyncCallback<BundleStats>): void; + + /** + * Get the current bundle statistics. + * + * @returns { Promise<BundleStats> } return Promise + * @throws { BusinessError } 13600001 - Permission Denied.Possible causes: + * May need permission ohos.permission.STORAGE_MANAGER. + * @throws { BusinessError } 13900042 - Unknown error. + * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics + * @since 20 + */ + function getCurrentBundleStats(): Promise<BundleStats>; + + /** + * Get the user storage statistics. + * + * @permission ohos.permission.STORAGE_MANAGER + * @returns { Promise<StorageStats> } return Promise + * @throws { BusinessError } 201 - Permission verification failed. + * @throws { BusinessError } 202 - The caller is not a system application. + * @throws { BusinessError } 13600001 - IPC error. + * @throws { BusinessError } 13900042 - Unknown error. + * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics + * @systemapi + * @since 20 + */ + function getUserStorageStats(): Promise<StorageStats>; + + /** + * Get the user storage statistics. + * + * @permission ohos.permission.STORAGE_MANAGER + * @param { AsyncCallback<StorageStats> } callback - callback + * @throws { BusinessError } 201 - Permission verification failed. + * @throws { BusinessError } 202 - The caller is not a system application. + * @throws { BusinessError } 13600001 - IPC error. + * @throws { BusinessError } 13900042 - Unknown error. + * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics + * @systemapi + * @since 20 + */ + function getUserStorageStats(callback: AsyncCallback<StorageStats>): void; + + /** + * Get the user storage statistics. + * + * @permission ohos.permission.STORAGE_MANAGER + * @param { long } userId - The id of the user + * @returns { Promise<StorageStats> } return Promise + * @throws { BusinessError } 201 - Permission verification failed. + * @throws { BusinessError } 202 - The caller is not a system application. + * @throws { BusinessError } 13600001 - IPC error. + * @throws { BusinessError } 13600009 - User if out of range. + * @throws { BusinessError } 13900042 - Unknown error. + * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics + * @systemapi + * @since 20 + */ + function getUserStorageStats(userId: long): Promise<StorageStats>; + + /** + * Get the user storage statistics. + * + * @permission ohos.permission.STORAGE_MANAGER + * @param { long } userId - The id of the user + * @param { AsyncCallback<StorageStats> } callback - callback + * @throws { BusinessError } 201 - Permission verification failed. + * @throws { BusinessError } 202 - The caller is not a system application. + * @throws { BusinessError } 13600001 - IPC error. + * @throws { BusinessError } 13600009 - User if out of range. + * @throws { BusinessError } 13900042 - Unknown error. + * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics + * @systemapi + * @since 20 + */ + function getUserStorageStats(userId: long, callback: AsyncCallback<StorageStats>): void; + + /** + * Get the bundle statistics. + * + * @interface BundleStats + * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics + * @since 20 + */ + export interface BundleStats { + /** + * The size of application installation data. + * + * @type { long } + * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics + * @since 20 + */ + appSize: long; + + /** + * The size of application cache data. + * + * @type { long } + * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics + * @since 20 + */ + cacheSize: long; + + /** + * The size of application local data, distributed data and database data. + * + * @type { long } + * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics + * @since 20 + */ + dataSize: long; + } + + /** + * Get the user storage statistics. + * + * @interface StorageStats + * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics + * @systemapi + * @since 20 + */ + export interface StorageStats { + /** + * The total size of device. + * + * @type { long } + * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics + * @systemapi + * @since 20 + */ + total: long; + } +} + +export default storageStatistics; \ No newline at end of file diff --git a/api/@ohos.file.volumeManager.d.ets b/api/@ohos.file.volumeManager.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..8b9370070f55abcf8494c637157fa25a9e3e9b04 --- /dev/null +++ b/api/@ohos.file.volumeManager.d.ets @@ -0,0 +1,127 @@ +/* + * 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 CoreFileKit + */ + +import { AsyncCallback, Callback } from './@ohos.base'; + +/** + * Provides volumemanager statistics APIs + * + * @namespace volumeManager + * @syscap SystemCapability.FileManagement.StorageService.Volume + * @systemapi + * @since 20 + */ +declare namespace volumeManager { + /** + * Get All Volumes + * + * @interface Volume + * @syscap SystemCapability.FileManagement.StorageService.Volume + * @systemapi + * @since 20 + */ + export interface Volume { + /** + * Universally unique identifier of volume. + * + * @type { string } + * @syscap SystemCapability.FileManagement.StorageService.Volume + * @systemapi + * @since 20 + */ + uuid: string; + + /** + * The label of the volume. + * + * @type { string } + * @syscap SystemCapability.FileManagement.StorageService.Volume + * @systemapi + * @since 20 + */ + description: string; + } + + /** + * Get the volume by uuid. + * + * @permission ohos.permission.STORAGE_MANAGER + * @param { string } uuid - The uuid of volume + * @param { AsyncCallback<Volume> } callback - callback + * @throws { BusinessError } 201 - Permission verification failed. + * @throws { BusinessError } 202 - The caller is not a system application. + * @throws { BusinessError } 13600001 - IPC error. + * @throws { BusinessError } 13600008 - No such object. + * @throws { BusinessError } 13900042 - Unknown error. + * @syscap SystemCapability.FileManagement.StorageService.Volume + * @systemapi + * @since 20 + */ + function getVolumeByUuid(uuid: string, callback: AsyncCallback<Volume>): void; + + /** + * Get the volume by uuid. + * + * @permission ohos.permission.STORAGE_MANAGER + * @param { string } uuid - The uuid of volume + * @returns { Promise<Volume> } return Promise + * @throws { BusinessError } 201 - Permission verification failed. + * @throws { BusinessError } 202 - The caller is not a system application. + * @throws { BusinessError } 13600001 - IPC error. + * @throws { BusinessError } 13600008 - No such object. + * @throws { BusinessError } 13900042 - Unknown error. + * @syscap SystemCapability.FileManagement.StorageService.Volume + * @systemapi + * @since 20 + */ + function getVolumeByUuid(uuid: string): Promise<Volume>; + + /** + * Get All Volumes + * + * @permission ohos.permission.STORAGE_MANAGER + * @param { AsyncCallback<Array<Volume>> } callback - callback + * @throws { BusinessError } 201 - Permission verification failed. + * @throws { BusinessError } 202 - The caller is not a system application. + * @throws { BusinessError } 13600001 - IPC error. + * @throws { BusinessError } 13900042 - Unknown error. + * @syscap SystemCapability.FileManagement.StorageService.Volume + * @systemapi + * @since 20 + */ + function getAllVolumes(callback: AsyncCallback<Array<Volume>>): void; + + /** + * Get All Volumes + * + * @permission ohos.permission.STORAGE_MANAGER + * @returns { Promise<Array<Volume>> } return Promise + * @throws { BusinessError } 201 - Permission verification failed. + * @throws { BusinessError } 202 - The caller is not a system application. + * @throws { BusinessError } 13600001 - IPC error. + * @throws { BusinessError } 13900042 - Unknown error. + * @syscap SystemCapability.FileManagement.StorageService.Volume + * @systemapi + * @since 20 + */ + function getAllVolumes(): Promise<Array<Volume>>; +} + + export default volumeManager; \ No newline at end of file diff --git a/api/@ohos.hichecker.d.ets b/api/@ohos.hichecker.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..cd96d7e8c0440948112bfa42562d525147980c3c --- /dev/null +++ b/api/@ohos.hichecker.d.ets @@ -0,0 +1,157 @@ +/* + * Copyright (c) 2022 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 PerformanceAnalysisKit + */ + +/** + * This module provides the capability to check bad code usage. + * + * @namespace hichecker + * @syscap SystemCapability.HiviewDFX.HiChecker + * @since 8 + */ +declare namespace hichecker { + /** + * The caution rule print log. + * + * @constant + * @syscap SystemCapability.HiviewDFX.HiChecker + * @since 8 + */ + const RULE_CAUTION_PRINT_LOG: bigint = 9223372036854775808n; // 1 << 63 + + /** + * The caution rule trigger crash. + * + * @constant + * @syscap SystemCapability.HiviewDFX.HiChecker + * @since 8 + */ + const RULE_CAUTION_TRIGGER_CRASH: bigint = 4611686018427387904n; // 1 << 62 + + /** + * The thread rule check slow process. + * + * @constant + * @syscap SystemCapability.HiviewDFX.HiChecker + * @since 8 + */ + const RULE_THREAD_CHECK_SLOW_PROCESS: bigint = 1n; + + /** + * The process rule check slow event. + * + * @constant + * @syscap SystemCapability.HiviewDFX.HiChecker + * @since 20 + */ + const RULE_CHECK_SLOW_EVENT: bigint = 4294967296n; // 1 << 32 + + /** + * The process rule check ability connection leak. + * + * @constant + * @syscap SystemCapability.HiviewDFX.HiChecker + * @since 8 + */ + const RULE_CHECK_ABILITY_CONNECTION_LEAK: bigint = 8589934592n; // 1 << 33 + + /** + * The process rule check ability Arkui performance + * + * @constant + * @syscap SystemCapability.HiviewDFX.HiChecker + * @since 11 + */ + const RULE_CHECK_ARKUI_PERFORMANCE: bigint = 17179869184n; // 1 << 34 + + /** + * add one or more rule. + * + * @param { bigint } rule + * @syscap SystemCapability.HiviewDFX.HiChecker + * @since 8 + * @deprecated since 9 + * @useinstead ohos.hichecker/hichecker#addCheckRule + */ + function addRule(rule: bigint): void; + + /** + * remove one or more rule. + * + * @param { bigint } rule + * @syscap SystemCapability.HiviewDFX.HiChecker + * @since 8 + * @deprecated since 9 + * @useinstead ohos.hichecker/hichecker#removeCheckRule + */ + function removeRule(rule: bigint): void; + + /** + * get added rule + * + * @returns { bigint } all added thread rule and process rule. + * @syscap SystemCapability.HiviewDFX.HiChecker + * @since 8 + */ + function getRule(): bigint; + + /** + * whether the query rule is added + * + * @param { bigint } rule + * @returns { boolean } the result of whether the query rule is added. + * @syscap SystemCapability.HiviewDFX.HiChecker + * @since 8 + * @deprecated since 9 + * @useinstead ohos.hichecker/hichecker#containsCheckRule + */ + function contains(rule: bigint): boolean; + + /** + * Add one or more rule. + * + * @param { bigint } rule + * @throws { BusinessError } 401 - the parameter check failed, only one bigint type parameter is needed + * @syscap SystemCapability.HiviewDFX.HiChecker + * @since 9 + */ + function addCheckRule(rule: bigint): void; + + /** + * Remove one or more rule. + * + * @param { bigint } rule + * @throws { BusinessError } 401 - the parameter check failed, only one bigint type parameter is needed + * @syscap SystemCapability.HiviewDFX.HiChecker + * @since 9 + */ + function removeCheckRule(rule: bigint): void; + + /** + * Whether the query rule is added + * + * @param { bigint } rule + * @returns { boolean } the result of whether the query rule is added. + * @throws { BusinessError } 401 - the parameter check failed, only one bigint type parameter is needed + * @syscap SystemCapability.HiviewDFX.HiChecker + * @since 9 + */ + function containsCheckRule(rule: bigint): boolean; +} +export default hichecker; diff --git a/api/@ohos.sensor.d.ets b/api/@ohos.sensor.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..22e3e93049690512c7ea8c0ca5e14adbbcf547a7 --- /dev/null +++ b/api/@ohos.sensor.d.ets @@ -0,0 +1,191 @@ +/* + * 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 SensorServiceKit + */ + +import { AsyncCallback, Callback } from './@ohos.base'; + +/** + * This module provides the capability to subscribe to sensor data. + * @namespace sensor + * @syscap SystemCapability.Sensors.Sensor + * @atomicservice + * @since 20 + */ +declare namespace sensor { + /** + * Subscribe to orientation sensor data. + * @param { SensorId.ORIENTATION } type - Indicate the sensor type to listen for, {@code SensorId.ORIENTATION}. + * @param { Callback<OrientationResponse> } callback - callback orientation data. + * @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + * <br> 2. Incorrect parameter types; 3. Parameter verification failed. + * @throws { BusinessError } 14500101 - Service exception. + * @syscap SystemCapability.Sensors.Sensor + * @atomicservice + * @since 20 + */ + function on(type: 'ORIENTATION', callback: Callback<OrientationResponse>, + options?: Options): void; + + /** + * Unsubscribe to orientation sensor data. + * @param { SensorId.ORIENTATION } type - Indicate the sensor type to listen for, {@code SensorId.ORIENTATION}. + * @param { Callback<OrientationResponse> } callback - callback orientation data. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + * <br> 2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Sensors.Sensor + * @atomicservice + * @since 20 + */ + function off(type: 'ORIENTATION', callback?: Callback<OrientationResponse>): void; + + /** + * Subscribe to the sensor's optional parameters. + * @typedef Options + * @syscap SystemCapability.Sensors.Sensor + * @atomicservice + * @since 20 + */ + interface Options { + /** + * Sensor event reporting event interval. + * @type { ?(number | SensorFrequency) } + * @syscap SystemCapability.Sensors.Sensor + * @atomicservice + * @since 20 + */ + interval?: number | SensorFrequency; + } + + /** + * The sensor reporting frequency is divided into three modes. + * @typedef {'game' | 'ui' | 'normal'} + * @syscap SystemCapability.Sensors.Sensor + * @atomicservice + * @since 20 + */ + type SensorFrequency = 'game' | 'ui' | 'normal'; + + /** + * Enumerates the accuracy levels of data reported by a sensor. + * @enum { number } + * @syscap SystemCapability.Sensors.Sensor + * @atomicservice + * @since 20 + */ + enum SensorAccuracy { + /** + * The sensor data is unreliable. It is possible that the sensor does not contact with the device to measure. + * @syscap SystemCapability.Sensors.Sensor + * @atomicservice + * @since 20 + */ + ACCURACY_UNRELIABLE = 0, + + /** + * The sensor data is at a low accuracy level. The data must be calibrated based on the environment before being used. + * @syscap SystemCapability.Sensors.Sensor + * @atomicservice + * @since 20 + */ + ACCURACY_LOW = 1, + + /** + * The sensor data is at a medium accuracy level. You are advised to calibrate the data based on the environment + * <br> before using it. + * @syscap SystemCapability.Sensors.Sensor + * @atomicservice + * @since 20 + */ + ACCURACY_MEDIUM = 2, + + /** + * The sensor data is at a high accuracy level. The data can be used directly. + * @syscap SystemCapability.Sensors.Sensor + * @atomicservice + * @since 20 + */ + ACCURACY_HIGH = 3 + } + + /** + * The basic data structure of the sensor event. + * @typedef Response + * @syscap SystemCapability.Sensors.Sensor + * @atomicservice + * @since 20 + */ + interface Response { + /** + * The timestamp of the reported sensor data. + * @type { number } + * @syscap SystemCapability.Sensors.Sensor + * @atomicservice + * @since 20 + */ + timestamp: number; + + /** + * The accuracy levels of data reported by a sensor. + * @type { SensorAccuracy } + * @syscap SystemCapability.Sensors.Sensor + * @atomicservice + * @since 20 + */ + accuracy: SensorAccuracy; + } + + /** + * Orientation sensor event data. + * @typedef OrientationResponse + * @syscap SystemCapability.Sensors.Sensor + * @atomicservice + * @since 20 + */ + interface OrientationResponse extends Response { + /** + * The device rotates at an angle around the Z axis. + * @type { number } + * @syscap SystemCapability.Sensors.Sensor + * @atomicservice + * @since 20 + */ + alpha: number; + + /** + * The device rotates at an angle around the X axis. + * @type { number } + * @syscap SystemCapability.Sensors.Sensor + * @atomicservice + * @since 20 + */ + beta: number; + + /** + * The device rotates at an angle around the Y axis. + * @type { number } + * @syscap SystemCapability.Sensors.Sensor + * @atomicservice + * @since 20 + */ + gamma: number; + } +} + +export default sensor; \ No newline at end of file diff --git a/api/@ohos.transfer.d.ets b/api/@ohos.transfer.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..18969057d88cca5208704ee661e59781e8a74502 --- /dev/null +++ b/api/@ohos.transfer.d.ets @@ -0,0 +1,70 @@ +/* + * 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 ArkTS + * @arkts 1.2 + */ + +/** + * The transfer module provides transfer ability for subsystem class or interface. + * + * @namespace transfer + * @syscap SystemCapability.Utils.Lang + * @crossplatform + * @atomicservice + * @since 20 + */ +declare namespace transfer { + + /** + * Any is used for the parameter type and return type of the transfer methods + * + * @typedef {Object | undefined | null} + * @syscap SystemCapability.Utils.Lang + * @crossplatform + * @atomicservice + * @since 20 + */ + type Any = Object | undefined | null; + + /** + * Converting the 1.0 object to a 1.2 object. + * + * @param { Any } input The 1.0 object that needs to be converted + * @param { string } inputName name registered by the subsystem. + * @returns { Object } Object + * @syscap SystemCapability.Utils.Lang + * @crossplatform + * @atomicservice + * @since 20 + */ + function transferStatic(input: Any, inputName: string): Object; + + /** + * Converting the 1.2 object to a 1.0 object. + * + * @param { Object } input The 1.2 object that needs to be converted + * @param { string } inputName name registered by the subsystem. + * @returns { Any } Object + * @syscap SystemCapability.Utils.Lang + * @crossplatform + * @atomicservice + * @since 20 + */ + function transferDynamic(input: Object, inputName: string): Any; + +} export default transfer; \ No newline at end of file diff --git a/api/@system.configuration.d.ets b/api/@system.configuration.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..2b64c39d5ff56c4d6074dc89f713e6b83d8f58d4 --- /dev/null +++ b/api/@system.configuration.d.ets @@ -0,0 +1,116 @@ +/* + * Copyright (c) 2020 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 + */ + +/** + * @interface LocaleResponse + * @syscap SystemCapability.ArkUI.ArkUI.Lite + * @since 3 + */ +/** + * @interface LocaleResponse + * @syscap SystemCapability.ArkUI.ArkUI.Lite + * @atomicservice + * @since 12 + */ +export interface LocaleResponse { + /** + * Current language of the application. Example: zh. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Lite + * @since 3 + */ + /** + * Current language of the application. Example: zh. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Lite + * @atomicservice + * @since 12 + */ + language: string; + + /** + * Country or region. Example: CN. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Lite + * @since 3 + */ + /** + * Country or region. Example: CN. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Lite + * @atomicservice + * @since 12 + */ + countryOrRegion: string; + + /** + * Text layout direction. Available values are as follows: + * ltr: The text direction is from left to right. + * rtl: The text direction is from right to left. + * + * @type { "ltr" | "rtl" } + * @syscap SystemCapability.ArkUI.ArkUI.Lite + * @since 3 + */ + /** + * Text layout direction. Available values are as follows: + * ltr: The text direction is from left to right. + * rtl: The text direction is from right to left. + * + * @type { "ltr" | "rtl" } + * @syscap SystemCapability.ArkUI.ArkUI.Lite + * @atomicservice + * @since 12 + */ + dir: "ltr" | "rtl"; +} + +/** + * @syscap SystemCapability.ArkUI.ArkUI.Lite + * @since 3 + */ +/** + * @syscap SystemCapability.ArkUI.ArkUI.Lite + * @atomicservice + * @since 12 + */ +declare class Configuration { + /** + * Obtains the current locale of the application, which is the same as the system locale. + * + * @returns { LocaleResponse } + * @syscap SystemCapability.ArkUI.ArkUI.Lite + * @since 3 + */ + /** + * Obtains the current locale of the application, which is the same as the system locale. + * + * @returns { LocaleResponse } + * @syscap SystemCapability.ArkUI.ArkUI.Lite + * @atomicservice + * @since 12 + */ + static getLocale(): LocaleResponse; +} +export default Configuration; diff --git a/api/application/EventHub.d.ts b/api/application/EventHub.d.ts index 8b1a3fb6c114b4c5e553a988db3165661201b1a4..f7471558c11ce9d10ea5cff655fb226ad8fcade4 100644 --- a/api/application/EventHub.d.ts +++ b/api/application/EventHub.d.ts @@ -42,7 +42,8 @@ import { BusinessError } from '../@ohos.base'; * @stagemodelonly * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export default class EventHub { /** @@ -159,3 +160,5 @@ export default class EventHub { */ emit(event: string, ...args: Object[]): void; } + +export default EventHub; \ No newline at end of file diff --git a/api/application/ExtensionContext.d.ts b/api/application/ExtensionContext.d.ts index cdb9df42a73618ec0d4eae889ee7fb5e33a4e30a..54f65a4d81fe1e8e5a3ea6da53c5bd10bb4a2f26 100644 --- a/api/application/ExtensionContext.d.ts +++ b/api/application/ExtensionContext.d.ts @@ -18,10 +18,8 @@ * @kit AbilityKit */ -/*** if arkts 1.1 */ import { HapModuleInfo } from '../bundleManager/HapModuleInfo'; import { Configuration } from '../@ohos.app.ability.Configuration'; -/*** endif */ import Context from './Context'; import { ExtensionAbilityInfo } from '../bundleManager/ExtensionAbilityInfo'; @@ -59,7 +57,8 @@ declare class ExtensionContext extends Context { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ currentHapModuleInfo: HapModuleInfo; @@ -78,7 +77,8 @@ declare class ExtensionContext extends Context { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ config: Configuration; diff --git a/api/application/MultiAppMode.d.ts b/api/application/MultiAppMode.d.ts index af50f66357e4874a95596a509738605b66434eb2..8b821e9f21e374049f342c7c27d8b8595314bc8b 100644 --- a/api/application/MultiAppMode.d.ts +++ b/api/application/MultiAppMode.d.ts @@ -24,7 +24,8 @@ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum MultiAppMode { /** @@ -33,7 +34,8 @@ export enum MultiAppMode { * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NOT_SUPPORTED = 0, @@ -43,7 +45,8 @@ export enum MultiAppMode { * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @systemapi * @stagemodelonly - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ MULTI_INSTANCE = 1, @@ -53,7 +56,8 @@ export enum MultiAppMode { * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ APP_CLONE = 2 } \ No newline at end of file diff --git a/api/application/ProcessData.d.ts b/api/application/ProcessData.d.ts index 7d6df91bbfa342da09cd02e440e31c974c2c7118..d7abfacda909872cab24c513babfdca2d7f5a97d 100644 --- a/api/application/ProcessData.d.ts +++ b/api/application/ProcessData.d.ts @@ -22,7 +22,8 @@ * The process data. * * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ export default class ProcessData { /** @@ -78,4 +79,4 @@ export default class ProcessData { * @since 14 */ isKeepAlive: boolean; -} +} \ No newline at end of file diff --git a/api/application/ProcessInformation.d.ts b/api/application/ProcessInformation.d.ts index 15fe488e7153adc46b63f2ed18e85c7f8d5c7f58..4ffb3aabbf68f58710d4c8e12401e68d46cbcacd 100644 --- a/api/application/ProcessInformation.d.ts +++ b/api/application/ProcessInformation.d.ts @@ -18,7 +18,7 @@ * @kit AbilityKit */ -import type appManager from '../@ohos.app.ability.appManager'; +import appManager from '../@ohos.app.ability.appManager'; import bundleManager from '../@ohos.bundle.bundleManager'; /** @@ -43,7 +43,8 @@ import bundleManager from '../@ohos.bundle.bundleManager'; * @syscap SystemCapability.Ability.AbilityRuntime.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface ProcessInformation { /** @@ -66,7 +67,8 @@ export interface ProcessInformation { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ pid: number; @@ -81,7 +83,8 @@ export interface ProcessInformation { * @default user id * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ uid: number; @@ -105,7 +108,8 @@ export interface ProcessInformation { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ processName: string; @@ -129,7 +133,8 @@ export interface ProcessInformation { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ bundleNames: Array<string>; @@ -146,7 +151,8 @@ export interface ProcessInformation { * @type { appManager.ProcessState } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ state: appManager.ProcessState; @@ -156,7 +162,8 @@ export interface ProcessInformation { * @type { bundleManager.BundleType } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ bundleType: bundleManager.BundleType; @@ -165,7 +172,8 @@ export interface ProcessInformation { * @type { ?number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ appCloneIndex?: number; } diff --git a/api/application/RunningMultiAppInfo.d.ts b/api/application/RunningMultiAppInfo.d.ts index 29447ea549103f141a5d3356ec58f949365e0327..cb77e92feb76f6e4a8633f3d389d72b3e6cfa0a8 100644 --- a/api/application/RunningMultiAppInfo.d.ts +++ b/api/application/RunningMultiAppInfo.d.ts @@ -28,7 +28,8 @@ import { RunningMultiInstanceInfo } from './RunningMultiInstanceInfo'; * @typedef RunningMultiAppInfo * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface RunningMultiAppInfo { @@ -39,7 +40,8 @@ export interface RunningMultiAppInfo { * @type { string } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ bundleName: string; @@ -59,7 +61,8 @@ export interface RunningMultiAppInfo { * @type { ?Array<RunningMultiInstanceInfo> } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ runningMultiInstances?: Array<RunningMultiInstanceInfo>; diff --git a/api/application/RunningMultiInstanceInfo.d.ts b/api/application/RunningMultiInstanceInfo.d.ts index fc279f303149c8006c5a11d3dbf96f2e801489ba..1645db4051150699348f31ddabb10c8ac71a571a 100644 --- a/api/application/RunningMultiInstanceInfo.d.ts +++ b/api/application/RunningMultiInstanceInfo.d.ts @@ -24,7 +24,8 @@ * @typedef RunningMultiInstanceInfo * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface RunningMultiInstanceInfo { /** @@ -33,7 +34,8 @@ export interface RunningMultiInstanceInfo { * @type { string } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ instanceKey: string; diff --git a/api/application/ServiceExtensionContext.d.ts b/api/application/ServiceExtensionContext.d.ts index a5ed9e93d02d3e8ce5942193d85184d89a82f47d..85c386736380992cc956d38a0111212cb1693086 100644 --- a/api/application/ServiceExtensionContext.d.ts +++ b/api/application/ServiceExtensionContext.d.ts @@ -19,15 +19,16 @@ */ /*** if arkts 1.1 */ +import type AtomicServiceOptions from '../@ohos.app.ability.AtomicServiceOptions'; +/*** endif */ import { AsyncCallback } from '../@ohos.base'; import { ConnectOptions } from '../ability/connectOptions'; import { Caller } from '../@ohos.app.ability.UIAbility'; +import ExtensionContext from './ExtensionContext'; import Want from '../@ohos.app.ability.Want'; import StartOptions from '../@ohos.app.ability.StartOptions'; import OpenLinkOptions from '../@ohos.app.ability.OpenLinkOptions'; -import type AtomicServiceOptions from '../@ohos.app.ability.AtomicServiceOptions'; -/*** endif */ -import ExtensionContext from './ExtensionContext'; + /** * The context of service extension. It allows access to @@ -40,7 +41,7 @@ import ExtensionContext from './ExtensionContext'; * @since arkts {'1.1':'9', '1.2':'20'} * @arkts 1.1&1.2 */ -export default class ServiceExtensionContext extends ExtensionContext { +declare class ServiceExtensionContext extends ExtensionContext { /** * Service extension uses this method to start a specific ability. * @@ -50,12 +51,12 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode. - * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden. + * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden. * @throws { BusinessError } 16000011 - The context does not exist. * @throws { BusinessError } 16000050 - Internal error. * @throws { BusinessError } 16000053 - The ability is not on the top of the UI. @@ -81,12 +82,12 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode. - * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden. + * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden. * @throws { BusinessError } 16000011 - The context does not exist. * @throws { BusinessError } 16000012 - The application is controlled. * @throws { BusinessError } 16000013 - The application is controlled by EDM. @@ -114,7 +115,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -123,7 +124,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * @throws { BusinessError } 16000011 - The context does not exist. * @throws { BusinessError } 16000012 - The application is controlled. * @throws { BusinessError } 16000013 - The application is controlled by EDM. - * @throws { BusinessError } 16000019 - No matching ability is found. + * @throws { BusinessError } 16000019 - Can not match any component. * @throws { BusinessError } 16000050 - Internal error. * @throws { BusinessError } 16000053 - The ability is not on the top of the UI. * @throws { BusinessError } 16000055 - Installation-free timed out. @@ -149,7 +150,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -174,7 +175,8 @@ export default class ServiceExtensionContext extends ExtensionContext { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ startAbility(want: Want, callback: AsyncCallback<void>): void; @@ -188,12 +190,12 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode. - * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden. + * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden. * @throws { BusinessError } 16000011 - The context does not exist. * @throws { BusinessError } 16000050 - Internal error. * @throws { BusinessError } 16000053 - The ability is not on the top of the UI. @@ -219,7 +221,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -251,7 +253,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -259,7 +261,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * @throws { BusinessError } 16000011 - The context does not exist. * @throws { BusinessError } 16000012 - The application is controlled. * @throws { BusinessError } 16000013 - The application is controlled by EDM. - * @throws { BusinessError } 16000019 - No matching ability is found. + * @throws { BusinessError } 16000019 - Can not match any component. * @throws { BusinessError } 16000050 - Internal error. * @throws { BusinessError } 16000053 - The ability is not on the top of the UI. * @throws { BusinessError } 16000055 - Installation-free timed out. @@ -285,7 +287,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -309,7 +311,8 @@ export default class ServiceExtensionContext extends ExtensionContext { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void>): void; @@ -323,12 +326,12 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode. - * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden. + * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden. * @throws { BusinessError } 16000011 - The context does not exist. * @throws { BusinessError } 16000050 - Internal error. * @throws { BusinessError } 16000053 - The ability is not on the top of the UI. @@ -355,12 +358,12 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode. - * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden. + * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden. * @throws { BusinessError } 16000011 - The context does not exist. * @throws { BusinessError } 16000012 - The application is controlled. * @throws { BusinessError } 16000013 - The application is controlled by EDM. @@ -389,7 +392,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -398,7 +401,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * @throws { BusinessError } 16000011 - The context does not exist. * @throws { BusinessError } 16000012 - The application is controlled. * @throws { BusinessError } 16000013 - The application is controlled by EDM. - * @throws { BusinessError } 16000019 - No matching ability is found. + * @throws { BusinessError } 16000019 - Can not match any component. * @throws { BusinessError } 16000050 - Internal error. * @throws { BusinessError } 16000053 - The ability is not on the top of the UI. * @throws { BusinessError } 16000055 - Installation-free timed out. @@ -425,7 +428,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -450,7 +453,8 @@ export default class ServiceExtensionContext extends ExtensionContext { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ startAbility(want: Want, options?: StartOptions): Promise<void>; @@ -471,12 +475,12 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode. - * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden. + * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden. * @throws { BusinessError } 16000011 - The context does not exist. * @throws { BusinessError } 16000012 - The application is controlled. * @throws { BusinessError } 16000013 - The application is controlled by EDM. @@ -505,12 +509,12 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode. - * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden. + * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden. * @throws { BusinessError } 16000011 - The context does not exist. * @throws { BusinessError } 16000012 - The application is controlled. * @throws { BusinessError } 16000013 - The application is controlled by EDM. @@ -539,7 +543,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -574,7 +578,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -618,7 +622,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -651,7 +655,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -685,7 +689,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -729,12 +733,12 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode. - * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden. + * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden. * @throws { BusinessError } 16000011 - The context does not exist. * @throws { BusinessError } 16000012 - The application is controlled. * @throws { BusinessError } 16000013 - The application is controlled by EDM. @@ -764,7 +768,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -800,7 +804,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -846,12 +850,12 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode. - * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden. + * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden. * @throws { BusinessError } 16000011 - The context does not exist. * @throws { BusinessError } 16000012 - The application is controlled. * @throws { BusinessError } 16000013 - The application is controlled by EDM. @@ -882,7 +886,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -891,7 +895,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * @throws { BusinessError } 16000011 - The context does not exist. * @throws { BusinessError } 16000012 - The application is controlled. * @throws { BusinessError } 16000013 - The application is controlled by EDM. - * @throws { BusinessError } 16000019 - No matching ability is found. + * @throws { BusinessError } 16000019 - Can not match any component. * @throws { BusinessError } 16000050 - Internal error. * @throws { BusinessError } 16000053 - The ability is not on the top of the UI. * @throws { BusinessError } 16000055 - Installation-free timed out. @@ -920,7 +924,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -963,12 +967,12 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode. - * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden. + * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden. * @throws { BusinessError } 16000011 - The context does not exist. * @throws { BusinessError } 16000050 - Internal error. * @throws { BusinessError } 16000053 - The ability is not on the top of the UI. @@ -997,7 +1001,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -1032,7 +1036,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -1040,7 +1044,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * @throws { BusinessError } 16000011 - The context does not exist. * @throws { BusinessError } 16000012 - The application is controlled. * @throws { BusinessError } 16000013 - The application is controlled by EDM. - * @throws { BusinessError } 16000019 - No matching ability is found. + * @throws { BusinessError } 16000019 - Can not match any component. * @throws { BusinessError } 16000050 - Internal error. * @throws { BusinessError } 16000053 - The ability is not on the top of the UI. * @throws { BusinessError } 16000055 - Installation-free timed out. @@ -1069,7 +1073,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -1116,12 +1120,12 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode. - * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden. + * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden. * @throws { BusinessError } 16000011 - The context does not exist. * @throws { BusinessError } 16000012 - The application is controlled. * @throws { BusinessError } 16000013 - The application is controlled by EDM. @@ -1153,7 +1157,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -1162,7 +1166,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * @throws { BusinessError } 16000011 - The context does not exist. * @throws { BusinessError } 16000012 - The application is controlled. * @throws { BusinessError } 16000013 - The application is controlled by EDM. - * @throws { BusinessError } 16000019 - No matching ability is found. + * @throws { BusinessError } 16000019 - Can not match any component. * @throws { BusinessError } 16000050 - Internal error. * @throws { BusinessError } 16000053 - The ability is not on the top of the UI. * @throws { BusinessError } 16000055 - Installation-free timed out. @@ -1192,7 +1196,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -1258,7 +1262,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -1287,7 +1291,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -1300,7 +1304,8 @@ export default class ServiceExtensionContext extends ExtensionContext { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ startServiceExtensionAbility(want: Want, callback: AsyncCallback<void>): void; @@ -1341,7 +1346,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -1370,7 +1375,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -1383,7 +1388,8 @@ export default class ServiceExtensionContext extends ExtensionContext { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ startServiceExtensionAbility(want: Want): Promise<void>; @@ -1428,7 +1434,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -1459,7 +1465,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -1517,7 +1523,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -1548,7 +1554,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -1600,7 +1606,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000011 - The context does not exist. @@ -1648,7 +1654,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000011 - The context does not exist. @@ -1701,7 +1707,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000011 - The context does not exist. @@ -1754,7 +1760,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000011 - The context does not exist. @@ -1774,7 +1780,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode. * @throws { BusinessError } 16000011 - The context does not exist. @@ -1796,7 +1802,8 @@ export default class ServiceExtensionContext extends ExtensionContext { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ terminateSelf(callback: AsyncCallback<void>): void; @@ -1805,7 +1812,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * * @returns { Promise<void> } The promise returned by the function. * @throws { BusinessError } 16000001 - The specified ability does not exist. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode. * @throws { BusinessError } 16000011 - The context does not exist. @@ -1825,7 +1832,8 @@ export default class ServiceExtensionContext extends ExtensionContext { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ terminateSelf(): Promise<void>; @@ -1868,7 +1876,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -1928,7 +1936,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -1986,7 +1994,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -2015,7 +2023,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. * @throws { BusinessError } 16000011 - The context does not exist. @@ -2046,7 +2054,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -2072,12 +2080,12 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode. - * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden. + * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden. * @throws { BusinessError } 16000011 - The context does not exist. * @throws { BusinessError } 16000050 - Internal error. * @throws { BusinessError } 16000053 - The ability is not on the top of the UI. @@ -2103,7 +2111,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -2135,7 +2143,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -2172,12 +2180,12 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode. - * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden. + * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden. * @throws { BusinessError } 16000011 - The context does not exist. * @throws { BusinessError } 16000050 - Internal error. * @throws { BusinessError } 16000053 - The ability is not on the top of the UI. @@ -2203,7 +2211,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -2234,7 +2242,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -2270,12 +2278,12 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode. - * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden. + * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden. * @throws { BusinessError } 16000011 - The context does not exist. * @throws { BusinessError } 16000050 - Internal error. * @throws { BusinessError } 16000053 - The ability is not on the top of the UI. @@ -2302,7 +2310,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -2335,7 +2343,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -2374,7 +2382,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000050 - Internal error. * @throws { BusinessError } 16200001 - The caller has been released. * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -2417,7 +2425,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000050 - Internal error. * @throws { BusinessError } 16200001 - The caller has been released. * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -2460,7 +2468,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * @throws { BusinessError } 202 - The application is not system-app, can not use system-api. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. - * @throws { BusinessError } 16300007 - The target free-installation task does not exist. + * @throws { BusinessError } 16300007 - The target free install task does not exist. * @throws { BusinessError } 16000011 - The context does not exist. * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -2485,7 +2493,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000008 - The crowdtesting application expires. * @throws { BusinessError } 16000011 - The context does not exist. @@ -2514,7 +2522,7 @@ export default class ServiceExtensionContext extends ExtensionContext { * @throws { BusinessError } 201 - The application does not have permission to call the interface. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component * @throws { BusinessError } 16000011 - The context does not exist. * @throws { BusinessError } 16000012 - The application is controlled. * @throws { BusinessError } 16000050 - Internal error. @@ -2566,3 +2574,5 @@ export default class ServiceExtensionContext extends ExtensionContext { */ startUIAbilities(wantList: Array<Want>): Promise<void>; } +export default ServiceExtensionContext; + diff --git a/api/application/UIAbilityContext.d.ts b/api/application/UIAbilityContext.d.ts index 7a890c250369b3f82053114e0aae32c50b7bac3d..01fd3dbca0eac50291665d479b5d63e64cafca8b 100644 --- a/api/application/UIAbilityContext.d.ts +++ b/api/application/UIAbilityContext.d.ts @@ -18,7 +18,6 @@ * @kit AbilityKit */ -/*** if arkts 1.1 */ import { ConnectOptions } from '../ability/connectOptions'; import { HapModuleInfo } from '../bundleManager/HapModuleInfo'; import OpenLinkOptions from '../@ohos.app.ability.OpenLinkOptions'; @@ -32,7 +31,6 @@ import type ConfigurationConstant from '../@ohos.app.ability.ConfigurationConsta import type UIServiceProxy from './UIServiceProxy'; import type UIServiceExtensionConnectCallback from './UIServiceExtensionConnectCallback'; import type AbilityStartCallback from './AbilityStartCallback'; -/*** endif */ import { AbilityInfo } from '../bundleManager/AbilityInfo'; import { AbilityResult } from '../ability/abilityResult'; import { AsyncCallback } from '../@ohos.base'; @@ -126,7 +124,8 @@ declare class UIAbilityContext extends Context { * @stagemodelonly * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ currentHapModuleInfo: HapModuleInfo; @@ -804,7 +803,8 @@ declare class UIAbilityContext extends Context { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ openLink(link: string, options?: OpenLinkOptions, callback?: AsyncCallback<AbilityResult>): Promise<void>; @@ -1285,7 +1285,8 @@ declare class UIAbilityContext extends Context { * @throws { BusinessError } 16000080 - Creating a new instance is not supported. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ startAbilityByCall(want: Want): Promise<Caller>; @@ -2909,7 +2910,8 @@ declare class UIAbilityContext extends Context { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ startServiceExtensionAbility(want: Want, callback: AsyncCallback<void>): void; @@ -2989,7 +2991,8 @@ declare class UIAbilityContext extends Context { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ startServiceExtensionAbility(want: Want): Promise<void>; @@ -3893,7 +3896,8 @@ declare class UIAbilityContext extends Context { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ isTerminating(): boolean; @@ -4578,7 +4582,8 @@ declare class UIAbilityContext extends Context { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ requestModalUIExtension(pickerWant: Want, callback: AsyncCallback<void>): void; @@ -4619,7 +4624,8 @@ declare class UIAbilityContext extends Context { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ requestModalUIExtension(pickerWant: Want): Promise<void>; @@ -4658,7 +4664,8 @@ declare class UIAbilityContext extends Context { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ moveAbilityToBackground(): Promise<void>; diff --git a/api/application/UIExtensionContext.d.ts b/api/application/UIExtensionContext.d.ts index 8a371f4f83365fe02fbbed1db91c57c9f6601b80..7c157b438212ee30ae212f5eccbc74d46feacd2a 100755 --- a/api/application/UIExtensionContext.d.ts +++ b/api/application/UIExtensionContext.d.ts @@ -153,7 +153,8 @@ declare class UIExtensionContext extends ExtensionContext { * @throws { BusinessError } 16200001 - The caller has been released. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ startAbility(want: Want, callback: AsyncCallback<void>): void; @@ -262,7 +263,8 @@ declare class UIExtensionContext extends ExtensionContext { * @throws { BusinessError } 16200001 - The caller has been released. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void>): void; @@ -377,7 +379,8 @@ declare class UIExtensionContext extends ExtensionContext { * @throws { BusinessError } 16200001 - The caller has been released. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ startAbility(want: Want, options?: StartOptions): Promise<void>; diff --git a/api/application/UIServiceExtensionContext.d.ts b/api/application/UIServiceExtensionContext.d.ts index f4be665a63d6cafac4d156cf6b28ed28b5cf8dac..fe290050e2c9a715f6755af8649f148cc610341e 100644 --- a/api/application/UIServiceExtensionContext.d.ts +++ b/api/application/UIServiceExtensionContext.d.ts @@ -50,7 +50,7 @@ export default class UIServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -59,7 +59,7 @@ export default class UIServiceExtensionContext extends ExtensionContext { * @throws { BusinessError } 16000011 - The context does not exist. * @throws { BusinessError } 16000012 - The application is controlled. * @throws { BusinessError } 16000013 - The application is controlled by EDM. - * @throws { BusinessError } 16000019 - No matching ability is found. + * @throws { BusinessError } 16000019 - Can not match any component. * @throws { BusinessError } 16000050 - Internal error. * @throws { BusinessError } 16000053 - The ability is not on the top of the UI. * @throws { BusinessError } 16000055 - Installation-free timed out. @@ -121,7 +121,7 @@ export default class UIServiceExtensionContext extends ExtensionContext { * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Failed to start the invisible ability. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. diff --git a/api/application/VpnExtensionContext.d.ts b/api/application/VpnExtensionContext.d.ts index 6838b6aeb0daea70915fd2b2c86ad4a262764626..0439e414fcd54ed90ba5264bdb024d2b23b1ab70 100644 --- a/api/application/VpnExtensionContext.d.ts +++ b/api/application/VpnExtensionContext.d.ts @@ -26,7 +26,8 @@ import ExtensionContext from './ExtensionContext'; * @extends ExtensionContext * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export default class VpnExtensionContext extends ExtensionContext { diff --git a/api/application/WindowExtensionContext.d.ts b/api/application/WindowExtensionContext.d.ts index 107da461c617badf90a110ed713a19c0300afbde..06fa71d2e9dd2a65df4d4335232415e930d7541a 100644 --- a/api/application/WindowExtensionContext.d.ts +++ b/api/application/WindowExtensionContext.d.ts @@ -20,7 +20,12 @@ import { AsyncCallback } from '../@ohos.base'; import ExtensionContext from './ExtensionContext'; +/*** if arkts 1.1 */ import Want from '../@ohos.application.Want'; +/*** endif */ +/*** if arkts 1.2 */ +import Want from '../@ohos.app.ability.Want'; +/*** endif */ import StartOptions from '../@ohos.app.ability.StartOptions'; /** @@ -31,9 +36,10 @@ import StartOptions from '../@ohos.app.ability.StartOptions'; * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi * @stagemodelonly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ -export default class WindowExtensionContext extends ExtensionContext { +declare class WindowExtensionContext extends ExtensionContext { /** * Window extension uses this method to start a specific ability. * @@ -59,7 +65,8 @@ export default class WindowExtensionContext extends ExtensionContext { * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void>): void; @@ -88,7 +95,9 @@ export default class WindowExtensionContext extends ExtensionContext { * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ startAbility(want: Want, options?: StartOptions): Promise<void>; } +export default WindowExtensionContext; diff --git a/api/arkui/AttributeUpdater.d.ts b/api/arkui/AttributeUpdater.d.ts index bdf4d6439652f02f619dad98b61721c048be9e53..52b3a41a02bbb37ba57712145db89d4dd4cd27fe 100644 --- a/api/arkui/AttributeUpdater.d.ts +++ b/api/arkui/AttributeUpdater.d.ts @@ -33,7 +33,7 @@ declare type Initializer<T> = () => T; /** * Defines a modifier which can update attributes to native side. * - * @implements AttributeModifier<T> + * @implements { AttributeModifier<T> } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -96,3 +96,77 @@ export declare class AttributeUpdater<T, C = Initializer<T>> implements Attribut */ onComponentChanged(component: T): void; } + +/** + * function that returns by the function updateConstructorParams. + * + * @typedef { function } Initializer<T> + * @param { Object[] } params + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +export type Initializer<T> = (...params: Object[]) => T; + +/** + * Defines a modifier which can update attributes to native side. + * + * @implements AttributeModifier<T> + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +export declare class AttributeUpdater<T> implements AttributeModifier<T> { + /** + * Defines a function for initialization. + * + * @param { T } instance + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + initializeModifier(instance: T): void; + + /** + * Get attribute of the modifier. + * + * @returns { T | undefined } The attribute of the modifier. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get attribute(): T | undefined; + + /** + * Used to update constructor params. + * + * @type { Initializer<T> } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get updateConstructorParams(): Initializer<T>; + + /** + * Defines a function executed when component changed. + * + * @param { T } component + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onComponentChanged(component: T): void; +} diff --git a/api/arkui/BuilderNode.d.ts b/api/arkui/BuilderNode.d.ts index 0c6f7755c14db5e8a2dc591fefd3f6a48698775c..e5f00a4aaf673e78d7f3825c9617ddabcd49950e 100644 --- a/api/arkui/BuilderNode.d.ts +++ b/api/arkui/BuilderNode.d.ts @@ -21,6 +21,10 @@ import { UIContext } from '../@ohos.arkui.UIContext'; import { FrameNode } from './FrameNode'; import { Size } from './Graphics'; +/*** if arkts 1.2 */ +import { TouchEvent } from './component/common'; +import { WrappedBuilder } from './component/builder'; +/*** endif */ /** * Render type of the node using for indicating that @@ -35,30 +39,25 @@ import { Size } from './Graphics'; * Render type of the node using for indicating that * if the node will be shown on the display or rendered to a texture * - * <p><strong>NOTE</strong>: - * <br>Currently, the <em>RENDER_TYPE_TEXTURE</em> type takes effect only for the XComponentNode and the BuilderNode - * <br>holding a component tree whose root node is a custom component. - * <br>In the case of BuilderNode, the following custom components that function as the root node support texture export: - * <br>Badge, Blank, Button, CanvasGradient, CanvasPattern, CanvasRenderingContext2D, Canvas, CheckboxGroup, Checkbox, - * <br>Circle, ColumnSplit, Column, ContainerSpan, Counter, DataPanel, Divider, Ellipse, Flex, Gauge, Hyperlink, - * <br>ImageBitmap, ImageData, Image, Line, LoadingProgress, Marquee, Matrix2D, OffscreenCanvasRenderingContext2D, - * <br>OffscreenCanvas, Path2D, Path, PatternLock, Polygon, Polyline, Progress, QRCode, Radio, Rating, Rect, - * <br>RelativeContainer, RowSplit, Row, Shape, Slider, Span, Stack, TextArea, TextClock, TextInput, TextTimer, Text, - * <br>Toggle, Video (without support for full-screen playback), Web, XComponent - * <br>The following components support texture export since API version 12: DatePicker, ForEach, Grid, IfElse, - * <br>LazyForEach, List, Scroll, Swiper, TimePicker, @Component decorated custom components, NodeContainer, - * <br>and FrameNode and RenderNode mounted to a NodeContainer. - * </p> + * @enum { number } Render type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 -For details, see Rendering and Drawing Video and Button Components at the Same Layer. +/** + * Render type of the node using for indicating that + * if the node will be shown on the display or rendered to a texture * * @enum { number } Render type * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since 20 + * @arkts 1.1&1.2 */ -declare enum NodeRenderType { +export declare enum NodeRenderType { /** * Display type.The node will be shown on the display. * @@ -72,7 +71,8 @@ declare enum NodeRenderType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ RENDER_TYPE_DISPLAY = 0, @@ -87,7 +87,8 @@ declare enum NodeRenderType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ RENDER_TYPE_TEXTURE = 1, } @@ -107,7 +108,8 @@ declare enum NodeRenderType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface RenderOptions { /** @@ -123,7 +125,8 @@ export interface RenderOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ selfIdealSize?: Size; @@ -138,7 +141,8 @@ export interface RenderOptions { * @type { ?NodeRenderType } type - Render type of the node * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type?: NodeRenderType; @@ -154,7 +158,8 @@ export interface RenderOptions { * @type { ?string } surfaceId - surfaceId of a consumer who can receive the texture of the Node * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ surfaceId?: string; } @@ -167,7 +172,8 @@ export interface RenderOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface BuildOptions { @@ -180,7 +186,8 @@ export interface BuildOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ nestingBuilderSupported?: boolean; @@ -209,13 +216,13 @@ export interface BuildOptions { } /** - * Defines the event type used for posting. + * Defines BuilderNode. * * @typedef { TouchEvent | MouseEvent | AxisEvent } InputEventType * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since 11 */ declare type InputEventType = TouchEvent | MouseEvent | AxisEvent; @@ -230,7 +237,9 @@ declare type InputEventType = TouchEvent | MouseEvent | AxisEvent; * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ /** * Defines BuilderNode. @@ -244,9 +253,10 @@ declare type InputEventType = TouchEvent | MouseEvent | AxisEvent; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since 20 + * @arkts 1.1&1.2 */ -export class BuilderNode<Args extends Object[]> { +export declare class BuilderNode<Args extends Object[]> { /** * Constructor. * When the content generated by the BuilderNode is embedded in another RenderNode for display, that is, the @@ -284,7 +294,8 @@ export class BuilderNode<Args extends Object[]> { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(uiContext: UIContext, options?: RenderOptions); @@ -335,7 +346,8 @@ export class BuilderNode<Args extends Object[]> { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ build(builder: WrappedBuilder<Args>, arg?: Object): void; @@ -360,7 +372,8 @@ export class BuilderNode<Args extends Object[]> { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ build(builder: WrappedBuilder<Args>, arg: Object, options: BuildOptions): void; @@ -385,7 +398,8 @@ export class BuilderNode<Args extends Object[]> { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ update(arg: Object): void; @@ -406,7 +420,8 @@ export class BuilderNode<Args extends Object[]> { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getFrameNode(): FrameNode | null; @@ -467,7 +482,8 @@ export class BuilderNode<Args extends Object[]> { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ postTouchEvent(event: TouchEvent): boolean; @@ -487,7 +503,8 @@ export class BuilderNode<Args extends Object[]> { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dispose(): void; @@ -499,7 +516,8 @@ export class BuilderNode<Args extends Object[]> { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ reuse(param?: Object): void; @@ -509,7 +527,8 @@ export class BuilderNode<Args extends Object[]> { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ recycle(): void; @@ -524,7 +543,8 @@ export class BuilderNode<Args extends Object[]> { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ updateConfiguration(): void; diff --git a/api/arkui/CommonModifier.d.ets b/api/arkui/CommonModifier.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..14994f1d25f08adc194ddce38e2bb480e46015e4 --- /dev/null +++ b/api/arkui/CommonModifier.d.ets @@ -0,0 +1,34 @@ +/* + * Copyright (c) 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 + */ + + +/** + * Defines Common Modifier + * + * @extends CommonAttribute + * @implements AttributeModifier + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 +*/ +export declare class CommonModifier { + + +} diff --git a/api/arkui/CommonModifier.d.ts b/api/arkui/CommonModifier.d.ts index 624b065b12bcc27d5824872078e067ab8e7ff7c2..061bb41d399212d341e2654113873648904769b7 100755 --- a/api/arkui/CommonModifier.d.ts +++ b/api/arkui/CommonModifier.d.ts @@ -27,7 +27,8 @@ * @implements AttributeModifier<CommonAttribute> * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ /** * Defines Common Modifier @@ -38,7 +39,8 @@ * @crossplatform * @atomicservice * @since 20 - */ + * @arkts 1.1&1.2 +*/ export declare class CommonModifier extends CommonAttribute implements AttributeModifier<CommonAttribute> { /** @@ -51,4 +53,16 @@ export declare class CommonModifier extends CommonAttribute implements Attribute * @since 12 */ applyNormalAttribute?(instance: CommonAttribute): void; + + /** + * Defines the normal update attribute function. + * + * @param { CommonAttribute } instance + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + applyNormalAttribute(instance: CommonAttribute): void; } diff --git a/api/arkui/ComponentContent.d.ts b/api/arkui/ComponentContent.d.ts index 7f82d51114ccd3c229bc6eb79cc1c0e65adbd7ac..328fef3889788c5f706d01665d362427a4266f4b 100644 --- a/api/arkui/ComponentContent.d.ts +++ b/api/arkui/ComponentContent.d.ts @@ -18,10 +18,19 @@ * @kit ArkUI */ +/*** if arkts 1.1 */ import { BuildOptions } from './BuilderNode'; import { Content } from './Content'; import { UIContext } from '../@ohos.arkui.UIContext'; import { WrappedBuilder } from 'wrappedBuilderObject'; +/*** endif */ + +/*** if arkts 1.2 */ +import { BuildOptions } from './BuilderNode'; +import { Content } from './Content'; +import { UIContext } from '../@ohos.arkui.UIContext'; +import { WrappedBuilder } from './component/common'; +/*** endif */ /** * Defines ComponentContent. @@ -112,6 +121,7 @@ export class ComponentContent<T extends Object> extends Content{ * @crossplatform * @atomicservice * @since 12 + * @arkts 1.2 */ dispose(): void; @@ -147,3 +157,141 @@ export class ComponentContent<T extends Object> extends Content{ */ isDisposed(): boolean; } + +/*** if arkts 1.2 */ +/** + * Defines ComponentContent. + * + * @extends Content + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +export declare class ComponentContent<T extends Object = object> extends Content { + /** + * Constructor. + * + * @param { UIContext } uiContext - uiContext used to create the ComponentContent + * @param { WrappedBuilder<Array<Object>> } builder - Defined the builder will be called to build ComponentContent. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(uiContext: UIContext, builder: WrappedBuilder<Array<Object>>); + + /** + * Constructor. + * + * @param { UIContext } uiContext - uiContext used to create the ComponentContent + * @param { WrappedBuilder<Array<Object>> } builder - Defined the builder will be called to build ComponentContent. + * @param { T } args - Parameters used to update the ComponentContent. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(uiContext: UIContext, builder: WrappedBuilder<Array<Object>>, args: T); + + /** + * Constructor. + * + * @param { UIContext } uiContext - uiContext used to create the ComponentContent + * @param { WrappedBuilder<Array<Object>> } builder - Defined the builder will be called to build ComponentContent. + * @param { T } args - Parameters used to update the ComponentContent. + * @param { BuildOptions } options - Defined the options will be used when build. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(uiContext: UIContext, builder: WrappedBuilder<Array<Object>>, args: T, options: BuildOptions); + + + /** + * Update the ComponentContent based on the provided parameters. + * + * @param { T } args - Parameters used to update the ComponentContent, which must match the types required by the builder bound to the ComponentContent. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + update(args: T): void; + + /** + * Reuse the ComponentContent based on the provided parameters. + * + * @param { Object } [param] - Parameters for reusing ComponentContent. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + reuse(param?: Object): void; + + /** + * Recycle the ComponentContent. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + recycle(): void; + + /** + * Dispose the ComponentContent immediately. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + dispose(): void; + + /** + * Get if the ComponentContent is disposed. + * + * @returns { boolean } - Returns true if the node is disposed, false otherwise. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + isDisposed(): boolean; + + /** + * Notify ComponentContent to update the configuration to trigger a reload of the ComponentContent. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + updateConfiguration(): void; + + /** + * Set if the ComponentContent inherits the freezing policy of the parent CustomComponent, ComponentContent, or BuilderNode. + * + * @param { boolean } enabled - If the ComponentContent inherits the freezing policy of the parent CustomComponent, ComponentContent, or BuilderNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + inheritFreezeOptions(enabled: boolean): void; +} +/*** endif */ diff --git a/api/arkui/Content.d.ts b/api/arkui/Content.d.ts index 8c3d9518534b4dd76b01c3fc07c325e42ce42543..69f9e3f543ac5f04e432004f3b8b08902aaa33c9 100644 --- a/api/arkui/Content.d.ts +++ b/api/arkui/Content.d.ts @@ -24,7 +24,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export abstract class Content{ } diff --git a/api/arkui/FrameNode.d.ts b/api/arkui/FrameNode.d.ts index 7060a1a92490099e0694eb870bfec0817beb52a5..cf0cebf81bdf6911d03a54c623dd5a91f15d32de 100644 --- a/api/arkui/FrameNode.d.ts +++ b/api/arkui/FrameNode.d.ts @@ -3244,7 +3244,8 @@ declare class NodeAdapter { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ static attachNodeAdapter(adapter: NodeAdapter, node: FrameNode): boolean; /** @@ -3254,7 +3255,8 @@ declare class NodeAdapter { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ static detachNodeAdapter(node: FrameNode): void; diff --git a/api/arkui/Graphics.d.ts b/api/arkui/Graphics.d.ts index 19adb28e61e85820a9354ac07bc9cbc4c096c46d..010e1bb6bcdb99360103e8dff6ac54c51c71399e 100644 --- a/api/arkui/Graphics.d.ts +++ b/api/arkui/Graphics.d.ts @@ -21,6 +21,11 @@ import drawing from '../@ohos.graphics.drawing'; import type common2D from '../@ohos.graphics.common2D'; import { Resource } from '../global/resource'; +/*** if arkts 1.2 */ +import { ColorSpace } from './component/enums'; +/*** endif */ + + /** * Size info. * Returns the width and height of the component. The default unit is vp, but APIs that use the Size type may specify a @@ -40,7 +45,8 @@ import { Resource } from '../global/resource'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface Size { /** @@ -62,7 +68,8 @@ export interface Size { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width: number; @@ -85,7 +92,8 @@ export interface Size { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ height: number; } @@ -106,7 +114,16 @@ export interface Size { * @atomicservice * @since 12 */ -export class DrawContext { +/** + * Defines DrawContext. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +export declare class DrawContext { /** * Get size of the DrawContext. @@ -114,7 +131,8 @@ export class DrawContext { * @returns { Size } The size of the DrawContext. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * Get size of the DrawContext. @@ -123,7 +141,8 @@ export class DrawContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get size(): Size; @@ -134,7 +153,8 @@ export class DrawContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get sizeInPixel(): Size; @@ -144,7 +164,8 @@ export class DrawContext { * @returns { drawing.Canvas } The canvas of the DrawContext. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * Get canvas of the DrawContext. @@ -153,7 +174,8 @@ export class DrawContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get canvas(): drawing.Canvas; } @@ -173,7 +195,8 @@ export class DrawContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface Vector2 { /** @@ -193,7 +216,8 @@ interface Vector2 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ x: number @@ -214,7 +238,8 @@ interface Vector2 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ y: number } @@ -226,7 +251,8 @@ interface Vector2 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface Vector2T<T> { @@ -237,7 +263,8 @@ interface Vector2 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ x: T @@ -248,7 +275,8 @@ interface Vector2 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ y: T } @@ -268,7 +296,8 @@ interface Vector2 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface Vector3 { /** @@ -288,7 +317,8 @@ interface Vector3 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ x: number; @@ -309,7 +339,8 @@ interface Vector3 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ y: number; @@ -330,7 +361,8 @@ interface Vector3 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ z: number; } @@ -352,7 +384,8 @@ interface Vector3 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type Matrix4 = [ number, @@ -390,7 +423,8 @@ export type Matrix4 = [ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type Offset = Vector2; @@ -411,7 +445,8 @@ export type Offset = Vector2; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type Position = Vector2; @@ -422,7 +457,8 @@ export type Position = Vector2; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type PositionT<T> = Vector2T<T>; @@ -445,7 +481,8 @@ export type PositionT<T> = Vector2T<T>; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type Pivot = Vector2; @@ -466,7 +503,8 @@ export type Pivot = Vector2; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type Scale = Vector2; @@ -487,7 +525,8 @@ export type Scale = Vector2; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type Translation = Vector2; @@ -508,7 +547,8 @@ export type Translation = Vector2; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type Rotation = Vector3; @@ -527,7 +567,8 @@ export type Rotation = Vector3; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export declare interface Frame { /** @@ -549,7 +590,8 @@ export declare interface Frame { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ x: number; @@ -572,7 +614,8 @@ export declare interface Frame { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ y: number; @@ -595,7 +638,8 @@ export declare interface Frame { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width: number; @@ -618,7 +662,8 @@ export declare interface Frame { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ height: number; } @@ -630,7 +675,8 @@ export declare interface Frame { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface Edges<T> { /** @@ -640,7 +686,8 @@ export interface Edges<T> { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ left: T, @@ -651,7 +698,8 @@ export interface Edges<T> { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ right: T, @@ -662,7 +710,8 @@ export interface Edges<T> { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ top: T, @@ -673,7 +722,8 @@ export interface Edges<T> { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bottom: T } @@ -687,7 +737,17 @@ export interface Edges<T> { * @atomicservice * @since 12 */ -declare enum LengthUnit { +/** + * Defines the Length Unit. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +export declare enum LengthUnit { /** * Logical pixel used in Ace1.0. It's based on frontend design width. * For example, when a frontend with 750px design width running on a @@ -696,7 +756,8 @@ declare enum LengthUnit { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PX = 0, @@ -706,7 +767,8 @@ declare enum LengthUnit { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ VP = 1, @@ -717,7 +779,8 @@ declare enum LengthUnit { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FP = 2, @@ -728,7 +791,8 @@ declare enum LengthUnit { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PERCENT = 3, @@ -738,7 +802,8 @@ declare enum LengthUnit { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LPX = 4, } @@ -750,7 +815,8 @@ declare enum LengthUnit { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface SizeT<T> { /** @@ -760,7 +826,8 @@ export interface SizeT<T> { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width: T; @@ -771,7 +838,8 @@ export interface SizeT<T> { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ height: T; } @@ -783,17 +851,19 @@ export interface SizeT<T> { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export enum LengthMetricsUnit { /** - * The default length metrics unit, in vp. + * The default length metrics unit. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 0, @@ -803,7 +873,8 @@ export enum LengthMetricsUnit { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PX = 1 } @@ -817,7 +888,16 @@ export enum LengthMetricsUnit { * @atomicservice * @since 12 */ -declare class LengthMetrics { +/** + * Defines the Length Metrics. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +export declare class LengthMetrics { /** * Constructor. * If the unit parameter is omitted or explicitly set to undefined, the default unit VP is used. @@ -829,7 +909,8 @@ declare class LengthMetrics { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(value: number, unit?:LengthUnit); @@ -843,7 +924,8 @@ declare class LengthMetrics { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static px(value: number): LengthMetrics; @@ -857,7 +939,8 @@ declare class LengthMetrics { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static vp(value: number): LengthMetrics; @@ -871,7 +954,8 @@ declare class LengthMetrics { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static fp(value: number): LengthMetrics; @@ -886,7 +970,8 @@ declare class LengthMetrics { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static percent(value: number): LengthMetrics; @@ -900,7 +985,8 @@ declare class LengthMetrics { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static lpx(value: number): LengthMetrics; @@ -915,7 +1001,8 @@ declare class LengthMetrics { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static resource(value: Resource): LengthMetrics; @@ -927,7 +1014,8 @@ declare class LengthMetrics { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ public unit: LengthUnit; @@ -938,7 +1026,8 @@ declare class LengthMetrics { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ public value: number; } @@ -951,7 +1040,16 @@ declare class LengthMetrics { * @atomicservice * @since 12 */ -declare class ColorMetrics { +/** + * Defines the ColorMetrics class. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +export declare class ColorMetrics { /** * Instantiate the ColorMetrics class using color number * @@ -961,7 +1059,8 @@ declare class ColorMetrics { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static numeric(value: number): ColorMetrics; @@ -980,7 +1079,8 @@ declare class ColorMetrics { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static rgba(red: number, green: number, blue: number, alpha?: number): ColorMetrics; @@ -1014,7 +1114,8 @@ declare class ColorMetrics { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static resourceColor(color: ResourceColor): ColorMetrics; @@ -1027,7 +1128,8 @@ declare class ColorMetrics { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ blendColor(overlayColor: ColorMetrics): ColorMetrics; @@ -1040,7 +1142,8 @@ declare class ColorMetrics { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get color(): string; @@ -1052,7 +1155,8 @@ declare class ColorMetrics { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get red(): number; @@ -1064,7 +1168,8 @@ declare class ColorMetrics { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get green(): number; @@ -1076,7 +1181,8 @@ declare class ColorMetrics { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get blue(): number; @@ -1088,7 +1194,8 @@ declare class ColorMetrics { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get alpha(): number; } @@ -1100,7 +1207,8 @@ declare class ColorMetrics { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface Corners<T> { /** @@ -1110,7 +1218,8 @@ interface Corners<T> { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ topLeft: T, @@ -1121,7 +1230,8 @@ interface Corners<T> { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ topRight: T, @@ -1132,7 +1242,8 @@ interface Corners<T> { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bottomLeft: T, @@ -1143,7 +1254,8 @@ interface Corners<T> { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bottomRight: T } @@ -1155,7 +1267,8 @@ interface Corners<T> { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type CornerRadius = Corners<Vector2>; @@ -1166,7 +1279,8 @@ export type CornerRadius = Corners<Vector2>; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type BorderRadiuses = Corners<number>; @@ -1177,7 +1291,8 @@ export type BorderRadiuses = Corners<number>; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type Rect = common2D.Rect; @@ -1188,7 +1303,8 @@ export type Rect = common2D.Rect; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 +* @since arkts {'1.1':'12','1.2':'20'} +* @arkts 1.1&1.2 */ export interface RoundRect { /** @@ -1198,7 +1314,8 @@ export interface RoundRect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ rect: Rect, @@ -1209,7 +1326,8 @@ export interface RoundRect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ corners: CornerRadius } @@ -1221,28 +1339,31 @@ export interface RoundRect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface Circle { /** - * The x-coordinate of the center of the Circle, in px. + * The x-coordinate of the center of the Circle. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ centerX: number, /** - * The y-coordinate of the center of the Circle, in px. + * The y-coordinate of the center of the Circle. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ centerY: number, @@ -1254,7 +1375,8 @@ export interface Circle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radius: number } @@ -1266,7 +1388,8 @@ export interface Circle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface CommandPath { /** @@ -1278,7 +1401,8 @@ export interface CommandPath { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ commands: string } @@ -1289,7 +1413,8 @@ export interface CommandPath { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export declare class ShapeMask { /** @@ -1298,7 +1423,8 @@ export declare class ShapeMask { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -1309,7 +1435,8 @@ export declare class ShapeMask { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setRectShape(rect: Rect): void; @@ -1320,7 +1447,8 @@ export declare class ShapeMask { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setRoundRectShape(roundRect: RoundRect): void; @@ -1331,7 +1459,8 @@ export declare class ShapeMask { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setCircleShape(circle: Circle): void; @@ -1342,7 +1471,8 @@ export declare class ShapeMask { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setOvalShape(oval: Rect): void; @@ -1353,7 +1483,8 @@ export declare class ShapeMask { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setCommandPath(path: CommandPath): void; @@ -1366,7 +1497,8 @@ export declare class ShapeMask { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fillColor: number; @@ -1379,7 +1511,8 @@ export declare class ShapeMask { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ strokeColor: number; @@ -1392,7 +1525,8 @@ export declare class ShapeMask { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ strokeWidth: number; } @@ -1404,7 +1538,8 @@ export declare class ShapeMask { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export declare class ShapeClip { /** @@ -1413,7 +1548,8 @@ export declare class ShapeClip { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -1424,7 +1560,8 @@ export declare class ShapeClip { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setRectShape(rect: Rect): void; @@ -1435,7 +1572,8 @@ export declare class ShapeClip { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setRoundRectShape(roundRect: RoundRect): void; @@ -1446,7 +1584,8 @@ export declare class ShapeClip { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setCircleShape(circle: Circle): void; @@ -1457,7 +1596,8 @@ export declare class ShapeClip { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setOvalShape(oval: Rect): void; @@ -1468,7 +1608,8 @@ export declare class ShapeClip { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setCommandPath(path: CommandPath): void; } @@ -1484,7 +1625,18 @@ export declare class ShapeClip { * @atomicservice * @since 12 */ -export function edgeColors(all: number): Edges<number>; +/** + * Obtain a object with all edges are set to the same color. + * + * @param { number } all - The edge color will be set. + * @returns { Edges<number> } - The object with all edges are set to the same color. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +export declare function edgeColors(all: number): Edges<number>; /** * Obtain a object with all edges are set to the same width. @@ -1497,7 +1649,18 @@ export function edgeColors(all: number): Edges<number>; * @atomicservice * @since 12 */ -export function edgeWidths(all: number): Edges<number>; +/** + * Obtain a object with all edges are set to the same width. + * + * @param { number } all - The edge width will be set. + * @returns { Edges<number> } - The object with all edges are set to the same width. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +export declare function edgeWidths(all: number): Edges<number>; /** * Obtain a object with all edges are set to the same style. @@ -1509,7 +1672,18 @@ export function edgeWidths(all: number): Edges<number>; * @atomicservice * @since 12 */ -export function borderStyles(all: BorderStyle): Edges<BorderStyle>; +/** + * Obtain a object with all edges are set to the same style. + * + * @param { BorderStyle } all - The edge style will be set. + * @returns { Edges<BorderStyle> } - The object with all edges are set to the same style. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +export declare function borderStyles(all: BorderStyle): Edges<BorderStyle>; /** * Obtain a BorderRadiuses object with all edges are set to the same radius. @@ -1523,4 +1697,15 @@ export function borderStyles(all: BorderStyle): Edges<BorderStyle>; * @atomicservice * @since 12 */ -export function borderRadiuses(all: number): BorderRadiuses; +/** + * Obtain a BorderRadiuses object with all edges are set to the same radius. + * + * @param { number } all - The edge radius will be set. + * @returns { BorderRadiuses } - The BorderRadiuses object. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +export declare function borderRadiuses(all: number): BorderRadiuses; diff --git a/api/arkui/NodeContent.d.ts b/api/arkui/NodeContent.d.ts index e06835abe94df227251dd0126c95cb1f84c539a4..93879e947f232a11b004442ddc556e65e6248bc4 100644 --- a/api/arkui/NodeContent.d.ts +++ b/api/arkui/NodeContent.d.ts @@ -30,14 +30,25 @@ import { FrameNode } from './FrameNode'; * @atomicservice * @since 12 */ -export class NodeContent extends Content{ +/** + * NodeContent is the entity encapsulation of the node content. + * + * @extends Content + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +export declare class NodeContent extends Content { /** * constructor * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -48,7 +59,8 @@ export class NodeContent extends Content{ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ addFrameNode(node: FrameNode): void; @@ -59,7 +71,8 @@ export class NodeContent extends Content{ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ removeFrameNode(node: FrameNode): void; } diff --git a/api/arkui/NodeController.d.ts b/api/arkui/NodeController.d.ts index a1c3a8f0911e986cda281c9d34991e43e4a47717..6799347e863bd8eb883843be03c4fd04cc544b50 100644 --- a/api/arkui/NodeController.d.ts +++ b/api/arkui/NodeController.d.ts @@ -39,7 +39,17 @@ import { Size } from './Graphics'; * @atomicservice * @since 12 */ -export abstract class NodeController { +/** + * Defined the controller of node container.Provides lifecycle callbacks for the associated NodeContainer + * and methods to control the child node of the NodeContainer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +export declare abstract class NodeController { /** * MakeNode Method. Used to build a node tree and return the a FrameNode or null, and * attach the return result to the associated NodeContainer. @@ -61,7 +71,8 @@ export abstract class NodeController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ abstract makeNode(uiContext: UIContext): FrameNode | null; @@ -84,6 +95,18 @@ export abstract class NodeController { */ aboutToResize?(size: Size): void; + /** + * AboutToResize Method. Executed when the associated NodeContainer performs the measure method. + * + * @param { Size } size - size used to resize + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + aboutToResize(size: Size): void; + /** * AboutToAppear Method. Executed when the associated NodeContainer is aboutToAppear. * @@ -101,6 +124,17 @@ export abstract class NodeController { */ aboutToAppear?(): void; + /** + * AboutToAppear Method. Executed when the associated NodeContainer is aboutToAppear. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + aboutToAppear(): void; + /** * AboutToDisappear Method. Executed when the associated NodeContainer is aboutToDisappear. * @@ -118,6 +152,17 @@ export abstract class NodeController { */ aboutToDisappear?(): void; + /** + * AboutToDisappear Method. Executed when the associated NodeContainer is aboutToDisappear. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + aboutToDisappear(): void; + /** * Rebuild Method. Used to invoke the makeNode method. * @@ -154,6 +199,18 @@ export abstract class NodeController { */ onTouchEvent?(event: TouchEvent): void; + /** + * OnTouchEvent Method. Executed when associated NodeContainer is touched. + * + * @param { TouchEvent } event - The TouchEvent when associated NodeContainer is touched. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onTouchEvent(event: TouchEvent): void; + /** * OnAttach Method. Executed when the associated NodeContainer is attached to the main tree. * @@ -164,6 +221,17 @@ export abstract class NodeController { */ onAttach?(): void; + /** + * OnAttach Method. Executed when the associated NodeContainer is attached to the main tree. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onAttach(): void; + /** * OnDetach Method. Executed when the associated NodeContainer is detached from the main tree. * @@ -174,6 +242,17 @@ export abstract class NodeController { */ onDetach?(): void; + /** + * OnDetach Method. Executed when the associated NodeContainer is detached from the main tree. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onDetach(): void; + /** * OnWillBind Method. Executed before the NodeController is bound to a NodeContainer. * @@ -185,6 +264,18 @@ export abstract class NodeController { */ onWillBind?(containerId: number): void; + /** + * OnWillBind Method. Executed before the NodeController is bound to a NodeContainer. + * + * @param { number } containerId - the uniqueId of the NodeContainer. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onWillBind(containerId: number): void; + /** * OnWillUnbind Method. Executed before the NodeController is unbind with the NodeContainer. * @@ -196,6 +287,18 @@ export abstract class NodeController { */ onWillUnbind?(containerId: number): void; + /** + * OnWillUnbind Method. Executed before the NodeController is unbind with the NodeContainer. + * + * @param { number } containerId - the uniqueId of the NodeContainer. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onWillUnbind(containerId: number): void; + /** * OnBind Method. Executed after the NodeController is bound to a NodeContainer. * @@ -207,6 +310,18 @@ export abstract class NodeController { */ onBind?(containerId: number): void; + /** + * OnBind Method. Executed when the NodeController is bound to a NodeContainer. + * + * @param { number } containerId - the uniqueId of the NodeContainer. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onBind(containerId: number): void; + /** * OnUnbind Method. Executed after the NodeController is unbind with the NodeContainer. * @@ -217,4 +332,16 @@ export abstract class NodeController { * @since 18 */ onUnbind?(containerId: number): void; + + /** + * OnUnbind Method. Executed when the NodeController is unbind with the NodeContainer. + * + * @param { number } containerId - the uniqueId of the NodeContainer. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onUnbind(containerId: number): void; } diff --git a/api/arkui/RenderNode.d.ts b/api/arkui/RenderNode.d.ts index b4571b3548afe2028f832b80e8f368f1c8b08e8a..18d3ed7b6666065ecf641eb85a88ff910635002c 100644 --- a/api/arkui/RenderNode.d.ts +++ b/api/arkui/RenderNode.d.ts @@ -34,7 +34,16 @@ import { DrawContext, Size, Offset, Position, Pivot, Scale, Translation, Matrix4 * @atomicservice * @since 12 */ -export class RenderNode { +/** + * Defines RenderNode. Contains node tree operations and render property operations on node. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +export declare class RenderNode { /** * Constructor. * @@ -48,7 +57,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -67,7 +77,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ appendChild(node: RenderNode): void; @@ -88,7 +99,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ insertChildAfter(child: RenderNode, sibling: RenderNode | null): void; @@ -107,7 +119,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ removeChild(node: RenderNode): void; @@ -124,7 +137,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ clearChildren(): void; @@ -145,7 +159,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getChild(index: number): RenderNode | null; @@ -166,7 +181,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getFirstChild(): RenderNode | null; @@ -185,7 +201,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getNextSibling(): RenderNode | null; @@ -204,7 +221,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getPreviousSibling(): RenderNode | null; @@ -223,7 +241,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ set backgroundColor(color: number); @@ -243,7 +262,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get backgroundColor(): number; @@ -262,7 +282,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ set clipToFrame(useClip: boolean); @@ -282,7 +303,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get clipToFrame(): boolean; @@ -301,7 +323,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ set opacity(value: number); @@ -321,7 +344,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get opacity(): number; @@ -340,7 +364,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ set size(size: Size); @@ -360,7 +385,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get size(): Size; @@ -379,7 +405,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ set position(position: Position); @@ -399,7 +426,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get position(): Position; @@ -418,7 +446,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ set frame(frame: Frame); @@ -438,7 +467,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get frame(): Frame; @@ -457,7 +487,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ set pivot(pivot: Pivot); @@ -477,7 +508,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get pivot(): Pivot; @@ -496,7 +528,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ set scale(scale: Scale); @@ -516,7 +549,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get scale(): Scale; @@ -535,7 +569,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ set translation(translation: Translation); @@ -555,7 +590,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get translation(): Translation; @@ -574,7 +610,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ set rotation(rotation: Rotation); @@ -594,7 +631,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get rotation(): Rotation; @@ -613,7 +651,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ set transform(transform: Matrix4); @@ -633,7 +672,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get transform(): Matrix4; @@ -652,7 +692,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ set shadowColor(color: number); @@ -672,7 +713,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get shadowColor(): number; @@ -691,7 +733,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ set shadowOffset(offset: Offset); @@ -711,7 +754,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get shadowOffset(): Offset; @@ -722,7 +766,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ set label(label: string); @@ -733,7 +778,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get label(): string; @@ -752,7 +798,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ set shadowAlpha(alpha: number); @@ -772,7 +819,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get shadowAlpha(): number; @@ -791,7 +839,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ set shadowElevation(elevation: number); @@ -811,7 +860,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get shadowElevation(): number; @@ -830,7 +880,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ set shadowRadius(radius: number); @@ -850,7 +901,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get shadowRadius(): number; @@ -861,7 +913,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ set borderStyle(style: Edges<BorderStyle>); @@ -872,7 +925,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get borderStyle(): Edges<BorderStyle>; @@ -883,7 +937,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ set borderWidth(width: Edges<number>); @@ -895,7 +950,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get borderWidth(): Edges<number>; @@ -906,7 +962,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ set borderColor(color: Edges<number>); @@ -918,7 +975,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get borderColor(): Edges<number>; @@ -929,7 +987,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ set borderRadius(radius: BorderRadiuses); @@ -941,7 +1000,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get borderRadius(): BorderRadiuses; @@ -952,7 +1012,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ set shapeMask(shapeMask: ShapeMask); @@ -963,7 +1024,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get shapeMask(): ShapeMask; @@ -974,7 +1036,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ set shapeClip(shapeClip: ShapeClip); @@ -985,7 +1048,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.clip * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get shapeClip(): ShapeClip; @@ -996,7 +1060,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ set markNodeGroup(isNodeGroup: boolean); @@ -1008,7 +1073,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get markNodeGroup(): boolean; @@ -1027,7 +1093,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ draw(context: DrawContext): void; @@ -1044,7 +1111,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ invalidate(): void; @@ -1054,7 +1122,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dispose(): void; @@ -1065,7 +1134,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ set lengthMetricsUnit(unit: LengthMetricsUnit); @@ -1077,7 +1147,8 @@ export class RenderNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get lengthMetricsUnit(): LengthMetricsUnit; diff --git a/api/arkui/component/builder.d.ets b/api/arkui/component/builder.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..5ab59f4382737d1f4d89ef4d2ef355966701a1dc --- /dev/null +++ b/api/arkui/component/builder.d.ets @@ -0,0 +1,46 @@ +/* + * 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 + * @arkts 1.2 + */ + +import { memo, ComponentBuilder, __memo_context_type, __memo_id_type } from "../stateManagement/runtime"; + +/** + * Defines the CustomBuilder Type. + * + * @typedef { @memo (() => void) } CustomBuilder + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ +export type CustomBuilder = @memo (() => void); + + +/** + * Defines the PageMapBuilder Type. + * + * @typedef { @memo ((name: string, param: Object | null | undefined) => void) } PageMapBuilder + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ +export type PageMapBuilder = @memo ((name: string, param: Object | null | undefined) => void) \ No newline at end of file diff --git a/api/arkui/component/lazyForEach.d.ets b/api/arkui/component/lazyForEach.d.ets index 1d7d311c0e04248b21048c45c02635bd74c55ba0..39bd332049f0c454a8826d05d629d69b7904eda2 100644 --- a/api/arkui/component/lazyForEach.d.ets +++ b/api/arkui/component/lazyForEach.d.ets @@ -621,6 +621,15 @@ export interface IDataSource<T> { */ export interface LazyForEachAttribute {} +/** + * declare UILazyForEachAttribute + * + * interface UILazyForEachAttribute + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface UILazyForEachAttribute {} + /** * Enter the value to obtain the LazyForEach. * @@ -639,4 +648,4 @@ export declare function LazyForEach<T>(dataSource: IDataSource<T>, @memo itemGenerator: (item: T, index: number) => void, keyGenerator?: (item: T, index: number) => string, -): LazyForEachAttribute \ No newline at end of file +): UILazyForEachAttribute \ No newline at end of file diff --git a/api/arkui/component/repeat.d.ets b/api/arkui/component/repeat.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..fcbbca917fb32ad89b14b5e652e594d594e630ca --- /dev/null +++ b/api/arkui/component/repeat.d.ets @@ -0,0 +1,260 @@ +/* + * 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 + */ + + +import { memo, ComponentBuilder, __memo_context_type, __memo_id_type } from './../stateManagement/runtime' + +/** + * Indicates the type of Repeat's Data Source. + * + * @typedef { Array<T> | ReadonlyArray<T> | Readonly<Array<T>> } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ +type RepeatArray<T> = Array<T> | ReadonlyArray<T> | Readonly<Array<T>>; +/** + * Function that return typed string to render one template. + * + * @typedef {function} TemplateTypedFunc<T> + * @param { T } item - data item. + * @param {number} index - data index number in array. + * @returns { string } template type. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +type TemplateTypedFunc<T> = (item: T, index: number) => string; +/** + * Define builder function to render one template type. + * + * @typedef {function} RepeatItemBuilder<T> + * @param { RepeatItem<T> } repeatItem - the repeat item builder function. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +@memo +type RepeatItemBuilder<T> = (repeatItem: RepeatItem<T>) => void; + +/** + * Construct a new type for each item. + * + * @interface RepeatItem + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ +export interface RepeatItem<T> { + /** + * The origin data. + * + * @type { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + item: T; + /** + * index of each item. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + index: number; +} + +/** + * Define the options of repeat virtualScroll to implement reuse and lazy loading. + * + * @interface VirtualScrollOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export interface VirtualScrollOptions { + /** + * Total data count. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + totalCount?: number; + /** + * Reuse or not. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + reusable?: boolean; + /** + * Data lazy loading + * + * @param { number } index + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onLazyLoading?: (index: number) => void; + /** + * The function of total data count. + * + * @returns { number } Returns the total data count. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onTotalCount?: () => number; +} + +/** + * Define a builder template option parameter. + * + * @interface TemplateOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export interface TemplateOptions { + /** + * The cached number of each template. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + cachedCount?: number; +} + +/** + * Defines the Repeat component attribute functions. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ +export interface UIRepeatAttribute<T> { + /** + * Executes itemGenerator of each item. + * + * @param { RepeatItemBuilder<T> } itemGenerator + * @returns { UIRepeatAttribute<T> } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + @memo + each(itemGenerator: RepeatItemBuilder<T>): this; + /** + * Obtains key of each item. + * + * @param { function } keyGenerator + * @returns { UIRepeatAttribute<T> } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + @memo + key(keyGenerator: (item: T, index: number) => string): this; + /** + * Enable UI lazy loading when scroll up or down. + * + * @param { VirtualScrollOptions } virtualScrollOptions that defines the options of repeat virtual scroll to implement reuse and lazy loading. + * @returns { UIRepeatAttribute<T> } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + @memo + virtualScroll(virtualScrollOptions?: VirtualScrollOptions): this; + /** + * Type builder function to render specific type of data item. + * + * @param { string } type that defines the template id. + * @param { RepeatItemBuilder<T> } itemBuilder that defines UI builder function. + * @param { TemplateOptions } templateOptions that defines a builder template option parameter. + * @returns { UIRepeatAttribute<T> } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + @memo + template(type: string, itemBuilder: RepeatItemBuilder<T>, templateOptions?: TemplateOptions): this; + /** + * Typed function to render specific type of data item. + * + * @param { TemplateTypedFunc<T> } typedFunc that define template typed function. + * @returns { UIRepeatAttribute<T> } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + @memo + templateId(typedFunc: TemplateTypedFunc<T>): this; +} + +/** + * Indicates the type of Repeat. + * + * @typedef { function } RepeatInterface + * @param { RepeatArray<T> } arr - The Data Source + * @returns { UIRepeatAttribute<T> } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ +@memo +@ComponentBuilder +export declare function Repeat<T>(arr: RepeatArray<T>): UIRepeatAttribute<T> \ No newline at end of file diff --git a/api/arkui/external/resource.d.ets b/api/arkui/external/resource.d.ets index bb0b7820277c46d5135199363170f2d4336d26ae..e813467998abc7dd471cda423391cd5c3203598c 100644 --- a/api/arkui/external/resource.d.ets +++ b/api/arkui/external/resource.d.ets @@ -18,7 +18,7 @@ * @arkts 1.2 */ -import { Resource as __Resource__ } from "../../global/resource"; +import { Resource as __Resource__ } from '../../global/resource'; export type Resource = __Resource__; diff --git a/api/arkui/stateManagement/decorators/decoratorConsume.d.ets b/api/arkui/stateManagement/decorators/decoratorConsume.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..bedeb8b5decf039688cd5ade1aeee0582ee0bc8e --- /dev/null +++ b/api/arkui/stateManagement/decorators/decoratorConsume.d.ets @@ -0,0 +1,35 @@ +/* + * 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 + * @arkts 1.2 + */ + +import { DecoratedV1VariableBase, IDecoratedMutableVariable } from '../base/decoratorBase'; +import { ProvideDecoratedVariable } from './decoratorProvide' +import { WatchIdType, WatchFuncType } from './decoratorWatch'; + +export declare class ConsumeDecoratedVariable<T> extends DecoratedV1VariableBase<T> + implements IDecoratedMutableVariable<T> { + public constructor( + varName: string, + provideAlias: string, + source: ProvideDecoratedVariable<T>, + watchFunc?: WatchFuncType + ) + public get(): T + public set(newValue: T): void +} \ No newline at end of file diff --git a/api/arkui/stateManagement/decorators/decoratorObjectLink.d.ets b/api/arkui/stateManagement/decorators/decoratorObjectLink.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..c943219773e1e504d79c8f8a142bd5f1a88b4992 --- /dev/null +++ b/api/arkui/stateManagement/decorators/decoratorObjectLink.d.ets @@ -0,0 +1,29 @@ +/* + * 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 + * @arkts 1.2 + */ + +import { DecoratedV1VariableBase, IDecoratedImmutableVariable, IDecoratedUpdatableVariable } from '../base/decoratorBase'; +import { WatchFuncType } from './decoratorWatch'; + +export declare class ObjectLinkDecoratedVariable<T> extends DecoratedV1VariableBase<T> + implements IDecoratedImmutableVariable<T>, IDecoratedUpdatableVariable<T> { + public constructor(varName: string, parentInitValue: T, watchFunc?: WatchFuncType) + public get(): T + public update(newValue: T): void +} \ No newline at end of file diff --git a/api/arkui/stateManagement/decorators/decoratorProvide.d.ets b/api/arkui/stateManagement/decorators/decoratorProvide.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..eea12b02491de14e7753f0ebb3ddc86361fa84d9 --- /dev/null +++ b/api/arkui/stateManagement/decorators/decoratorProvide.d.ets @@ -0,0 +1,29 @@ +/* + * 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 + * @arkts 1.2 + */ + +import { DecoratedV1VariableBase, IDecoratedMutableVariable } from '../base/decoratorBase'; +import { WatchIdType, WatchFuncType } from './decoratorWatch'; + +export declare class ProvideDecoratedVariable<T> extends DecoratedV1VariableBase<T> + implements IDecoratedMutableVariable<T> { + public constructor(varName: string, provideAlias: string, initValue: T, watchFunc?: WatchFuncType) + public get(): T + public set(newValue: T): void +} \ No newline at end of file diff --git a/api/bundleManager/BundlePackInfo.d.ts b/api/bundleManager/BundlePackInfo.d.ts index ad82c132717b4e4d43c0a72d438c8b39029e3789..e8ea4a275cc09f3759fafc4a4653de1eaef176d8 100644 --- a/api/bundleManager/BundlePackInfo.d.ts +++ b/api/bundleManager/BundlePackInfo.d.ts @@ -24,7 +24,8 @@ * @typedef BundlePackInfo * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface BundlePackInfo { /** @@ -34,7 +35,8 @@ export interface BundlePackInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly packages: Array<PackageConfig>; @@ -45,7 +47,8 @@ export interface BundlePackInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly summary: PackageSummary; } @@ -56,7 +59,8 @@ export interface BundlePackInfo { * @typedef PackageConfig * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface PackageConfig { /** @@ -66,7 +70,8 @@ export interface PackageConfig { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly deviceTypes: Array<string>; @@ -77,7 +82,8 @@ export interface PackageConfig { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly name: string; @@ -88,7 +94,8 @@ export interface PackageConfig { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly moduleType: string; @@ -99,7 +106,8 @@ export interface PackageConfig { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly deliveryWithInstall: boolean; } @@ -110,7 +118,8 @@ export interface PackageConfig { * @typedef PackageSummary * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface PackageSummary { /** @@ -120,7 +129,8 @@ export interface PackageSummary { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly app: BundleConfigInfo; @@ -131,7 +141,8 @@ export interface PackageSummary { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly modules: Array<ModuleConfigInfo>; } @@ -142,7 +153,8 @@ export interface PackageSummary { * @typedef BundleConfigInfo * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface BundleConfigInfo { /** @@ -152,7 +164,8 @@ export interface BundleConfigInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly bundleName: string; @@ -163,7 +176,8 @@ export interface BundleConfigInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly version: Version; } @@ -174,7 +188,8 @@ export interface BundleConfigInfo { * @typedef ExtensionAbility * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface ExtensionAbility { /** @@ -184,7 +199,8 @@ export interface ExtensionAbility { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly name: string; @@ -195,7 +211,8 @@ export interface ExtensionAbility { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly forms: Array<AbilityFormInfo>; } @@ -206,7 +223,8 @@ export interface ExtensionAbility { * @typedef ModuleConfigInfo * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface ModuleConfigInfo { /** @@ -216,7 +234,8 @@ export interface ModuleConfigInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly mainAbility: string; @@ -227,7 +246,8 @@ export interface ModuleConfigInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly apiVersion: ApiVersion; @@ -238,7 +258,8 @@ export interface ModuleConfigInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly deviceTypes: Array<string>; @@ -249,7 +270,8 @@ export interface ModuleConfigInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly distro: ModuleDistroInfo; @@ -260,7 +282,8 @@ export interface ModuleConfigInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly abilities: Array<ModuleAbilityInfo>; @@ -271,7 +294,8 @@ export interface ModuleConfigInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly extensionAbilities: Array<ExtensionAbility>; } @@ -282,7 +306,8 @@ export interface ModuleConfigInfo { * @typedef ModuleDistroInfo * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface ModuleDistroInfo { /** @@ -292,7 +317,8 @@ export interface ModuleDistroInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly deliveryWithInstall: boolean; @@ -303,7 +329,8 @@ export interface ModuleDistroInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly installationFree: boolean; @@ -314,7 +341,8 @@ export interface ModuleDistroInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly moduleName: string; @@ -325,7 +353,8 @@ export interface ModuleDistroInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly moduleType: string; } @@ -336,7 +365,8 @@ export interface ModuleDistroInfo { * @typedef ModuleAbilityInfo * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface ModuleAbilityInfo { /** @@ -346,7 +376,8 @@ export interface ModuleAbilityInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly name: string; @@ -357,7 +388,8 @@ export interface ModuleAbilityInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly label: string; @@ -368,7 +400,8 @@ export interface ModuleAbilityInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly exported: boolean; @@ -379,7 +412,8 @@ export interface ModuleAbilityInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly forms: Array<AbilityFormInfo>; } @@ -390,7 +424,8 @@ export interface ModuleAbilityInfo { * @typedef AbilityFormInfo * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface AbilityFormInfo { /** @@ -400,7 +435,8 @@ export interface AbilityFormInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly name: string; @@ -411,7 +447,8 @@ export interface AbilityFormInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly type: string; @@ -422,7 +459,8 @@ export interface AbilityFormInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly updateEnabled: boolean; @@ -433,7 +471,8 @@ export interface AbilityFormInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly scheduledUpdateTime: string; @@ -444,7 +483,8 @@ export interface AbilityFormInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly updateDuration: number; @@ -455,7 +495,8 @@ export interface AbilityFormInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly supportDimensions: Array<string>; @@ -466,7 +507,8 @@ export interface AbilityFormInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly defaultDimension: string; } @@ -477,7 +519,8 @@ export interface AbilityFormInfo { * @typedef Version * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface Version { /** @@ -487,7 +530,8 @@ export interface Version { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly minCompatibleVersionCode: number; @@ -498,7 +542,8 @@ export interface Version { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly name: string; @@ -509,7 +554,8 @@ export interface Version { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly code: number; } @@ -520,7 +566,8 @@ export interface Version { * @typedef ApiVersion * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface ApiVersion { /** @@ -530,7 +577,8 @@ export interface ApiVersion { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly releaseType: string; @@ -541,7 +589,8 @@ export interface ApiVersion { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly compatible: number; @@ -552,7 +601,8 @@ export interface ApiVersion { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly target: number; } diff --git a/api/bundleManager/DispatchInfo.d.ts b/api/bundleManager/DispatchInfo.d.ts index 601b9d2382b6c4a14f44ddac3448faf59eb4c7af..779cc44c4e786af38cf0881243a44ab1190fc7fa 100644 --- a/api/bundleManager/DispatchInfo.d.ts +++ b/api/bundleManager/DispatchInfo.d.ts @@ -24,7 +24,8 @@ * @typedef DispatchInfo * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface DispatchInfo { /** @@ -34,7 +35,8 @@ export interface DispatchInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly version: string; @@ -45,7 +47,8 @@ export interface DispatchInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly dispatchAPIVersion: string; } diff --git a/api/bundleManager/LauncherAbilityInfo.d.ts b/api/bundleManager/LauncherAbilityInfo.d.ts index 5544a7347bb705468b9fa34a07da8d6cf2b65848..de21df51c03b956c2faaed879ddd7729fae0bf5b 100644 --- a/api/bundleManager/LauncherAbilityInfo.d.ts +++ b/api/bundleManager/LauncherAbilityInfo.d.ts @@ -26,7 +26,8 @@ import { ElementName } from './ElementName'; * * @typedef LauncherAbilityInfo * @syscap SystemCapability.BundleManager.BundleFramework.Launcher - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface LauncherAbilityInfo { /** @@ -35,7 +36,8 @@ export interface LauncherAbilityInfo { * @type { ApplicationInfo } * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Launcher - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly applicationInfo: ApplicationInfo; @@ -45,7 +47,8 @@ export interface LauncherAbilityInfo { * @type { ElementName } * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Launcher - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly elementName: ElementName; @@ -55,7 +58,8 @@ export interface LauncherAbilityInfo { * @type { number } * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Launcher - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly labelId: number; @@ -65,7 +69,8 @@ export interface LauncherAbilityInfo { * @type { number } * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Launcher - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly iconId: number; @@ -75,7 +80,8 @@ export interface LauncherAbilityInfo { * @type { number } * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Launcher - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly userId: number; @@ -85,7 +91,8 @@ export interface LauncherAbilityInfo { * @type { number } * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Launcher - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly installTime: number; } diff --git a/api/bundleManager/LauncherAbilityResourceInfo.d.ts b/api/bundleManager/LauncherAbilityResourceInfo.d.ts index 0210a04e1b467f956a7717ee30cad93f1443537f..abd40bfb99b0dc43126fca492a2b71bc05567e91 100644 --- a/api/bundleManager/LauncherAbilityResourceInfo.d.ts +++ b/api/bundleManager/LauncherAbilityResourceInfo.d.ts @@ -26,7 +26,8 @@ import { DrawableDescriptor } from './../@ohos.arkui.drawableDescriptor'; * @typedef LauncherAbilityResourceInfo * @syscap SystemCapability.BundleManager.BundleFramework.Resource * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface LauncherAbilityResourceInfo { /** @@ -36,7 +37,8 @@ export interface LauncherAbilityResourceInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Resource * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly bundleName: string; @@ -47,7 +49,8 @@ export interface LauncherAbilityResourceInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Resource * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly moduleName: string; @@ -58,7 +61,8 @@ export interface LauncherAbilityResourceInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Resource * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly abilityName: string; @@ -69,7 +73,8 @@ export interface LauncherAbilityResourceInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Resource * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly icon: string; @@ -80,7 +85,8 @@ export interface LauncherAbilityResourceInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Resource * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly label: string; @@ -102,7 +108,8 @@ export interface LauncherAbilityResourceInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Resource * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly appIndex: number; } diff --git a/api/bundleManager/OverlayModuleInfo.d.ts b/api/bundleManager/OverlayModuleInfo.d.ts index 39621a9515cb6855e6344aaba8d768ef570b665c..aa2b660c735da319af4dd9fb5ce87de77e1713bc 100755 --- a/api/bundleManager/OverlayModuleInfo.d.ts +++ b/api/bundleManager/OverlayModuleInfo.d.ts @@ -23,7 +23,8 @@ * * @typedef OverlayModuleInfo * @syscap SystemCapability.BundleManager.BundleFramework.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface OverlayModuleInfo { /** @@ -32,7 +33,8 @@ export interface OverlayModuleInfo { * @type { string } * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly bundleName: string; @@ -42,7 +44,8 @@ export interface OverlayModuleInfo { * @type { string } * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly moduleName: string; @@ -52,7 +55,8 @@ export interface OverlayModuleInfo { * @type { string } * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly targetModuleName: string; @@ -62,7 +66,8 @@ export interface OverlayModuleInfo { * @type { number } * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly priority: number; @@ -72,7 +77,8 @@ export interface OverlayModuleInfo { * @type { number } * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly state: number; } diff --git a/api/commonEvent/commonEventData.d.ts b/api/commonEvent/commonEventData.d.ts index 76b9db4030fe2e06ff00bce865a348315dbb2945..24833aee31f7b56fecac1d79f1bb12bf6c2b4805 100644 --- a/api/commonEvent/commonEventData.d.ts +++ b/api/commonEvent/commonEventData.d.ts @@ -14,19 +14,19 @@ */ /** - * @file Common event data. + * @file The data of the commonEvent * @kit BasicServicesKit */ /** - * Common event data. + * the data of the commonEvent * * @typedef CommonEventData * @syscap SystemCapability.Notification.CommonEvent * @since 7 */ /** - * Common event data. + * the data of the commonEvent * * @typedef CommonEventData * @syscap SystemCapability.Notification.CommonEvent @@ -37,14 +37,14 @@ */ export interface CommonEventData { /** - * Name of the common event that is being received. + * event type * * @type { string } * @syscap SystemCapability.Notification.CommonEvent * @since 7 */ /** - * Name of the common event that is being received. + * event type * * @type { string } * @syscap SystemCapability.Notification.CommonEvent @@ -56,14 +56,14 @@ export interface CommonEventData { event: string; /** - * Bundle name. This parameter is left empty by default. + * bundle name * * @type { ?string } * @syscap SystemCapability.Notification.CommonEvent * @since 7 */ /** - * Bundle name. This parameter is left empty by default. + * bundle name * * @type { ?string } * @syscap SystemCapability.Notification.CommonEvent @@ -74,8 +74,7 @@ export interface CommonEventData { bundleName?: string; /** - * Common event data received by the subscriber. The value of this field is the same as that of the code field in - * CommonEventPublishData when the publisher uses commonEventManager.publish to publish a common event. The default value is 0. + * The custom result code of the common event. * * @type { ?number } * @default 0 @@ -83,8 +82,7 @@ export interface CommonEventData { * @since 7 */ /** - * Common event data received by the subscriber. The value of this field is the same as that of the code field in - * CommonEventPublishData when the publisher uses commonEventManager.publish to publish a common event. The default value is 0. + * The custom result code of the common event. * * @type { ?number } * @default 0 @@ -96,16 +94,14 @@ export interface CommonEventData { code?: number; /** - * Common event data received by the subscriber. The value of this field is the same as that of the data field in - * CommonEventPublishData when the publisher uses commonEventManager.publish to publish a common event. + * The custom result data of the common event. * * @type { ?string } * @syscap SystemCapability.Notification.CommonEvent * @since 7 */ /** - * Common event data received by the subscriber. The value of this field is the same as that of the data field in - * CommonEventPublishData when the publisher uses commonEventManager.publish to publish a common event. + * The custom result data of the common event. * * @type { ?string } * @syscap SystemCapability.Notification.CommonEvent @@ -113,8 +109,7 @@ export interface CommonEventData { * @since 11 */ /** - * Common event data received by the subscriber. The value of this field is the same as that of the data field in - * CommonEventPublishData when the publisher uses commonEventManager.publish to publish a common event. + * The custom result data of the common event. * * @type { ?string } * @syscap SystemCapability.Notification.CommonEvent @@ -126,16 +121,14 @@ export interface CommonEventData { data?: string; /** - * Additional information about the common event received by the subscriber. The value of this field is the same as - * that of the parameters field in CommonEventPublishData when the publisher uses commonEventManager.publish to publish a common event. + * The description of the parameters in a common event. * * @type { ?object } * @syscap SystemCapability.Notification.CommonEvent * @since 7 */ /** - * Additional information about the common event received by the subscriber. The value of this field is the same as - * that of the parameters field in CommonEventPublishData when the publisher uses commonEventManager.publish to publish a common event. + * The description of the parameters in a common event. * * @type { ?object } * @syscap SystemCapability.Notification.CommonEvent diff --git a/api/commonEvent/commonEventPublishData.d.ts b/api/commonEvent/commonEventPublishData.d.ts index 3a2ded096f3032349ebec217186ddfd4a82642f9..df0bbec243c94e9e9b65c771a0b7ad58f133de02 100644 --- a/api/commonEvent/commonEventPublishData.d.ts +++ b/api/commonEvent/commonEventPublishData.d.ts @@ -14,19 +14,19 @@ */ /** - * @file The CommonEventPublishData module provides APIs for defining common event content and attributes. + * @file Containing the common event content and attributes * @kit BasicServicesKit */ /** - * The CommonEventPublishData module provides APIs for defining common event content and attributes. + * containing the common event content and attributes * * @typedef CommonEventPublishData * @syscap SystemCapability.Notification.CommonEvent * @since 7 */ /** - * The CommonEventPublishData module provides APIs for defining common event content and attributes. + * containing the common event content and attributes * * @typedef CommonEventPublishData * @syscap SystemCapability.Notification.CommonEvent @@ -34,7 +34,7 @@ * @since 11 */ /** - * The CommonEventPublishData module provides APIs for defining common event content and attributes. + * containing the common event content and attributes * * @typedef CommonEventPublishData * @syscap SystemCapability.Notification.CommonEvent @@ -45,14 +45,14 @@ */ export interface CommonEventPublishData { /** - * Bundle name of the subscriber that can receive the common event. + * bundle name * * @type { ?string } * @syscap SystemCapability.Notification.CommonEvent * @since 7 */ /** - * Bundle name of the subscriber that can receive the common event. + * bundle name * * @type { ?string } * @syscap SystemCapability.Notification.CommonEvent @@ -63,7 +63,7 @@ export interface CommonEventPublishData { bundleName?: string; /** - * Common event data transferred by the publisher. The default value is 0. + * The custom result code of the common event. * * @type { ?number } * @default 0 @@ -71,7 +71,7 @@ export interface CommonEventPublishData { * @since 7 */ /** - * Common event data transferred by the publisher. The default value is 0. + * The custom result code of the common event. * * @type { ?number } * @default 0 @@ -83,14 +83,14 @@ export interface CommonEventPublishData { code?: number; /** - * Common event data transferred by the publisher. The data size cannot exceed 64 KB. + * The custom result data of the common event. * * @type { ?string } * @syscap SystemCapability.Notification.CommonEvent * @since 7 */ /** - * Common event data transferred by the publisher. The data size cannot exceed 64 KB. + * The custom result data of the common event. * * @type { ?string } * @syscap SystemCapability.Notification.CommonEvent @@ -98,7 +98,7 @@ export interface CommonEventPublishData { * @since 11 */ /** - * Common event data transferred by the publisher. The data size cannot exceed 64 KB. + * The custom result data of the common event. * * @type { ?string } * @syscap SystemCapability.Notification.CommonEvent @@ -110,14 +110,14 @@ export interface CommonEventPublishData { data?: string; /** - * Permissions required for subscribers to receive the common event. + * The permissions for subscribers. Only subscribers with required permissions can receive published common events. * * @type { ?Array<string> } * @syscap SystemCapability.Notification.CommonEvent * @since 7 */ /** - * Permissions required for subscribers to receive the common event. + * The permissions for subscribers. Only subscribers with required permissions can receive published common events. * * @type { ?Array<string> } * @syscap SystemCapability.Notification.CommonEvent @@ -128,7 +128,7 @@ export interface CommonEventPublishData { subscriberPermissions?: Array<string>; /** - * Whether the common event is an ordered one. + * Whether the type of a common event is ordered or not. * * @type { ?boolean } * @default false @@ -139,7 +139,7 @@ export interface CommonEventPublishData { isOrdered?: boolean; /** - * Whether the common event is a sticky one. Only system applications and system services are allowed to send sticky events. + * Whether the type of a common event is sticky or not. * * @permission ohos.permission.COMMONEVENT_STICKY * @type { ?boolean } @@ -151,14 +151,14 @@ export interface CommonEventPublishData { isSticky?: boolean; /** - * Additional information about the common event transferred by the publisher. + * The description of the parameters in a common event. * * @type { ?object } * @syscap SystemCapability.Notification.CommonEvent * @since 7 */ /** - * Additional information about the common event transferred by the publisher. + * The description of the parameters in a common event. * * @type { ?object } * @syscap SystemCapability.Notification.CommonEvent diff --git a/api/commonEvent/commonEventSubscribeInfo.d.ts b/api/commonEvent/commonEventSubscribeInfo.d.ts index 445248e1e273cf52d5fffa169186ceab1f9ddbc6..abbdd26809944522fa6b93095e249e1bc11460e8 100644 --- a/api/commonEvent/commonEventSubscribeInfo.d.ts +++ b/api/commonEvent/commonEventSubscribeInfo.d.ts @@ -14,19 +14,19 @@ */ /** - * @file The CommonEventSubscribeInfo module provides APIs for providing subscriber information. + * @file The information of the subscriber * @kit BasicServicesKit */ /** - * The CommonEventSubscribeInfo module provides APIs for providing subscriber information. + * the information of the subscriber * * @typedef CommonEventSubscribeInfo * @syscap SystemCapability.Notification.CommonEvent * @since 7 */ /** - * The CommonEventSubscribeInfo module provides APIs for providing subscriber information. + * the information of the subscriber * * @typedef CommonEventSubscribeInfo * @syscap SystemCapability.Notification.CommonEvent @@ -37,14 +37,14 @@ */ export interface CommonEventSubscribeInfo { /** - * Common events to subscribe to. + * Indicates the subscribed events. * * @type { Array<string> } * @syscap SystemCapability.Notification.CommonEvent * @since 7 */ /** - * Common events to subscribe to. + * Indicates the subscribed events. * * @type { Array<string> } * @syscap SystemCapability.Notification.CommonEvent @@ -56,14 +56,16 @@ export interface CommonEventSubscribeInfo { events: Array<string>; /** - * Permission of the publisher. The subscriber can receive only the events from the publisher with this permission. + * The permission that the publisher must have in order to send a common event to this subscriber. + * This subscriber receives only common events sent by publishers granted with this permission. * * @type { ?string } * @syscap SystemCapability.Notification.CommonEvent * @since 7 */ /** - * Permission of the publisher. The subscriber can receive only the events from the publisher with this permission. + * The permission that the publisher must have in order to send a common event to this subscriber. + * This subscriber receives only common events sent by publishers granted with this permission. * * @type { ?string } * @syscap SystemCapability.Notification.CommonEvent @@ -74,14 +76,14 @@ export interface CommonEventSubscribeInfo { publisherPermission?: string; /** - * Device ID. Use @ohos.deviceInfo to obtain the UDID as the device ID of the subscriber. Not supported currently. + * deviceId Indicates the device ID. The value must be an existing device ID on the same ohos network. * * @type { ?string } * @syscap SystemCapability.Notification.CommonEvent * @since 7 */ /** - * Device ID. Use @ohos.deviceInfo to obtain the UDID as the device ID of the subscriber. Not supported currently. + * deviceId Indicates the device ID. The value must be an existing device ID on the same ohos network. * * @type { ?string } * @syscap SystemCapability.Notification.CommonEvent @@ -92,16 +94,16 @@ export interface CommonEventSubscribeInfo { publisherDeviceId?: string; /** - * User ID. If this parameter is not specified, the default value, which is the ID of the current user, will be used. - * The value must be an existing user ID in the system. Use getOsAccountLocalId to obtain the system account ID and use it as the user ID of the subscriber. + * Indicates the user ID. This parameter is optional, and the default value is the ID of the + * current user. If this parameter is specified, the value must be an existing user ID in the system. * * @type { ?number } * @syscap SystemCapability.Notification.CommonEvent * @since 7 */ /** - * User ID. If this parameter is not specified, the default value, which is the ID of the current user, will be used. - * The value must be an existing user ID in the system. Use getOsAccountLocalId to obtain the system account ID and use it as the user ID of the subscriber. + * Indicates the user ID. This parameter is optional, and the default value is the ID of the + * current user. If this parameter is specified, the value must be an existing user ID in the system. * * @type { ?number } * @syscap SystemCapability.Notification.CommonEvent @@ -112,14 +114,14 @@ export interface CommonEventSubscribeInfo { userId?: number; /** - * Subscriber priority. The value ranges from –100 to +1000. If the value exceeds the upper or lower limit, the upper or lower limit is used. + * Indicates the subscriber priority. The value ranges from -100 to 1000. * * @type { ?number } * @syscap SystemCapability.Notification.CommonEvent * @since 7 */ /** - * Subscriber priority. The value ranges from –100 to +1000. If the value exceeds the upper or lower limit, the upper or lower limit is used. + * Indicates the subscriber priority. The value ranges from -100 to 1000. * * @type { ?number } * @syscap SystemCapability.Notification.CommonEvent @@ -130,7 +132,7 @@ export interface CommonEventSubscribeInfo { priority?: number; /** - * Bundle name of the publisher to subscribe to. + * Specify the publisher's bundleName to subscribe. * * @type { ?string } * @syscap SystemCapability.Notification.CommonEvent diff --git a/api/commonEvent/commonEventSubscriber.d.ts b/api/commonEvent/commonEventSubscriber.d.ts index 89ebf1d36653a7cef871b9ce264c6ee9038ee78d..f132b279b01b46355f16ab4f362394b17baf9c77 100644 --- a/api/commonEvent/commonEventSubscriber.d.ts +++ b/api/commonEvent/commonEventSubscriber.d.ts @@ -22,14 +22,14 @@ import { AsyncCallback } from './../@ohos.base'; import { CommonEventSubscribeInfo } from './commonEventSubscribeInfo'; /** - * The CommonEventSubscriber module provides APIs for describing the common event subscriber. + * the subscriber of common event * * @interface CommonEventSubscriber * @syscap SystemCapability.Notification.CommonEvent * @since 7 */ /** - * The CommonEventSubscriber module provides APIs for describing the common event subscriber. + * the subscriber of common event * * @interface CommonEventSubscriber * @syscap SystemCapability.Notification.CommonEvent @@ -39,279 +39,292 @@ import { CommonEventSubscribeInfo } from './commonEventSubscribeInfo'; */ export interface CommonEventSubscriber { /** - * Obtains the result code of an ordered common event. This API uses an asynchronous callback to return the result. + * Obtains the result code of the current ordered common event. * - * @param { AsyncCallback<number> } callback - Callback used to return the result. + * @param { AsyncCallback<number> } callback - Indicate the callback function to receive the common event. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.CommonEvent * @since 7 */ /** - * Obtains the result code of an ordered common event. This API uses an asynchronous callback to return the result. + * Obtains the result code of the current ordered common event. * - * @param { AsyncCallback<number> } callback - Callback used to return the result. + * @param { AsyncCallback<number> } callback - Indicate the callback function to receive the common event. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.CommonEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getCode(callback: AsyncCallback<number>): void; /** - * Obtains the result code of an ordered common event. This API uses a promise to return the result. + * Obtains the result code of the current ordered common event. * - * @returns { Promise<number> } Promise used to return the result. + * @returns { Promise<number> } Returns code of this common event * @syscap SystemCapability.Notification.CommonEvent * @since 7 */ /** - * Obtains the result code of an ordered common event. This API uses a promise to return the result. + * Obtains the result code of the current ordered common event. * - * @returns { Promise<number> } Promise used to return the result. + * @returns { Promise<number> } Returns code of this common event * @syscap SystemCapability.Notification.CommonEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getCode(): Promise<number>; /** - * Obtains the result code of an ordered common event. + * Obtains the result code of the current ordered common event. * - * @returns { number } Common event code. + * @returns { number } Returns code of this common event * @syscap SystemCapability.Notification.CommonEvent * @since 10 */ /** - * Obtains the result code of an ordered common event. + * Obtains the result code of the current ordered common event. * - * @returns { number } Common event code. + * @returns { number } Returns code of this common event * @syscap SystemCapability.Notification.CommonEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getCodeSync(): number; /** - * Sets the result code of an ordered common event. This API uses an asynchronous callback to return the result. + * Sets the result code of the current ordered common event. * - * @param { number } code - Common event code. - * @param { AsyncCallback<void> } callback - Callback used to return the result. + * @param { number } code - Indicates the custom result code to set. You can set it to any value. + * @param { AsyncCallback<void> } callback - Indicate the callback function to receive the common event. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.CommonEvent * @since 7 */ /** - * Sets the result code of an ordered common event. This API uses an asynchronous callback to return the result. + * Sets the result code of the current ordered common event. * - * @param { number } code - Common event code. - * @param { AsyncCallback<void> } callback - Callback used to return the result. + * @param { number } code - Indicates the custom result code to set. You can set it to any value. + * @param { AsyncCallback<void> } callback - Indicate the callback function to receive the common event. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.CommonEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ setCode(code: number, callback: AsyncCallback<void>): void; /** - * Sets the result code of an ordered common event. This API uses a promise to return the result. + * Sets the result code of the current ordered common event. * - * @param { number } code - Common event code. - * @returns { Promise<void> } Promise that returns no value. + * @param { number } code - Indicates the custom result code to set. You can set it to any value. + * @returns { Promise<void> } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.CommonEvent * @since 7 */ /** - * Sets the result code of an ordered common event. This API uses a promise to return the result. + * Sets the result code of the current ordered common event. * - * @param { number } code - Common event code. - * @returns { Promise<void> } Promise that returns no value. + * @param { number } code - Indicates the custom result code to set. You can set it to any value. + * @returns { Promise<void> } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.CommonEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ setCode(code: number): Promise<void>; /** - * Sets the result code of an ordered common event. + * Sets the result code of the current ordered common event. * - * @param { number } code - Common event code. + * @param { number } code - Indicates the custom result code to set. You can set it to any value. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.CommonEvent * @since 10 */ /** - * Sets the result code of an ordered common event. + * Sets the result code of the current ordered common event. * - * @param { number } code - Common event code. + * @param { number } code - Indicates the custom result code to set. You can set it to any value. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.CommonEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ setCodeSync(code: number): void; /** - * Obtains the result data of an ordered common event. This API uses an asynchronous callback to return the result. + * Obtains the result data of the current ordered common event. * - * @param { AsyncCallback<string> } callback - Callback used to return the result. + * @param { AsyncCallback<string> } callback - Indicate the callback function to receive the common event. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.CommonEvent * @since 7 */ /** - * Obtains the result data of an ordered common event. This API uses an asynchronous callback to return the result. + * Obtains the result data of the current ordered common event. * - * @param { AsyncCallback<string> } callback - Callback used to return the result. + * @param { AsyncCallback<string> } callback - Indicate the callback function to receive the common event. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.CommonEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getData(callback: AsyncCallback<string>): void; /** - * Obtains the result data of an ordered common event. This API uses a promise to return the result. + * Obtains the result data of the current ordered common event. * - * @returns { Promise<string> } Promise used to return the result. + * @returns { Promise<string> } Returns data of this common event * @syscap SystemCapability.Notification.CommonEvent * @since 7 */ /** - * Obtains the result data of an ordered common event. This API uses a promise to return the result. + * Obtains the result data of the current ordered common event. * - * @returns { Promise<string> } Promise used to return the result. + * @returns { Promise<string> } Returns data of this common event * @syscap SystemCapability.Notification.CommonEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getData(): Promise<string>; /** - * Obtains the result data of an ordered common event. + * Obtains the result data of the current ordered common event. * - * @returns { string } Common event data. + * @returns { string } Returns data of this common event * @syscap SystemCapability.Notification.CommonEvent * @since 10 */ /** - * Obtains the result data of an ordered common event. + * Obtains the result data of the current ordered common event. * - * @returns { string } Common event data. + * @returns { string } Returns data of this common event * @syscap SystemCapability.Notification.CommonEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getDataSync(): string; /** - * Sets the result data for an ordered common event. This API uses an asynchronous callback to return the result. + * Sets the result data of the current ordered common event. * - * @param { string } data - Common event data. - * @param { AsyncCallback<void> } callback - Callback used to return the result. + * @param { string } data - Indicates the custom result data to set. You can set it to any character string. + * @param { AsyncCallback<void> } callback - Indicate the callback function to receive the common event. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.CommonEvent * @since 7 */ /** - * Sets the result data for an ordered common event. This API uses an asynchronous callback to return the result. + * Sets the result data of the current ordered common event. * - * @param { string } data - Common event data. - * @param { AsyncCallback<void> } callback - Callback used to return the result. + * @param { string } data - Indicates the custom result data to set. You can set it to any character string. + * @param { AsyncCallback<void> } callback - Indicate the callback function to receive the common event. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.CommonEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ setData(data: string, callback: AsyncCallback<void>): void; /** - * Sets the result data for an ordered common event. This API uses a promise to return the result. + * Sets the result data of the current ordered common event. * - * @param { string } data - Common event data. - * @returns { Promise<void> } Promise that returns no value. + * @param { string } data - Indicates the custom result data to set. You can set it to any character string. + * @returns { Promise<void> } the promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.CommonEvent * @since 7 */ /** - * Sets the result data for an ordered common event. This API uses a promise to return the result. + * Sets the result data of the current ordered common event. * - * @param { string } data - Common event data. - * @returns { Promise<void> } Promise that returns no value. + * @param { string } data - Indicates the custom result data to set. You can set it to any character string. + * @returns { Promise<void> } the promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.CommonEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ setData(data: string): Promise<void>; /** - * Sets the result data for an ordered common event. + * Sets the result data of the current ordered common event. * - * @param { string } data - Common event data. + * @param { string } data - Indicates the custom result data to set. You can set it to any character string. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.CommonEvent * @since 10 */ /** - * Sets the result data for an ordered common event. + * Sets the result data of the current ordered common event. * - * @param { string } data - Common event data. + * @param { string } data - Indicates the custom result data to set. You can set it to any character string. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.CommonEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ setDataSync(data: string): void; /** - * Sets the result code and data of an ordered common event. This API uses an asynchronous callback to return the result. + * Sets the result of the current ordered common event. * - * @param { number } code - Common event code. - * @param { string } data - Common event data. - * @param { AsyncCallback<void> } callback - Callback used to return the result. + * @param { number } code - Indicates the custom result code to set. You can set it to any value. + * @param { string } data - Indicates the custom result data to set. You can set it to any character string. + * @param { AsyncCallback<void> } callback - Indicate the callback function to receive the common event. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.CommonEvent * @since 7 */ /** - * Sets the result code and data of an ordered common event. This API uses an asynchronous callback to return the result. + * Sets the result of the current ordered common event. * - * @param { number } code - Common event code. - * @param { string } data - Common event data. - * @param { AsyncCallback<void> } callback - Callback used to return the result. + * @param { number } code - Indicates the custom result code to set. You can set it to any value. + * @param { string } data - Indicates the custom result data to set. You can set it to any character string. + * @param { AsyncCallback<void> } callback - Indicate the callback function to receive the common event. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.CommonEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ setCodeAndData(code: number, data: string, callback: AsyncCallback<void>): void; /** - * Sets the result code and data of an ordered common event. This API uses a promise to return the result. + * Sets the result of the current ordered common event. * - * @param { number } code - Common event code. - * @param { string } data - Common event data. + * @param { number } code - Indicates the custom result code to set. You can set it to any value. + * @param { string } data - Indicates the custom result data to set. You can set it to any character string. * @returns { Promise<void> } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. @@ -319,265 +332,281 @@ export interface CommonEventSubscriber { * @since 7 */ /** - * Sets the result code and data of an ordered common event. This API uses a promise to return the result. + * Sets the result of the current ordered common event. * - * @param { number } code - Common event code. - * @param { string } data - Common event data. + * @param { number } code - Indicates the custom result code to set. You can set it to any value. + * @param { string } data - Indicates the custom result data to set. You can set it to any character string. * @returns { Promise<void> } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.CommonEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ setCodeAndData(code: number, data: string): Promise<void>; /** - * Sets the result code and data of an ordered common event. + * Sets the result of the current ordered common event. * - * @param { number } code - Common event code. - * @param { string } data - Common event data. + * @param { number } code - Indicates the custom result code to set. You can set it to any value. + * @param { string } data - Indicates the custom result data to set. You can set it to any character string. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.CommonEvent * @since 10 */ /** - * Sets the result code and data of an ordered common event. + * Sets the result of the current ordered common event. * - * @param { number } code - Common event code. - * @param { string } data - Common event data. + * @param { number } code - Indicates the custom result code to set. You can set it to any value. + * @param { string } data - Indicates the custom result data to set. You can set it to any character string. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.CommonEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ setCodeAndDataSync(code: number, data: string): void; /** - * Checks whether the current common event is an ordered common event. This API uses an asynchronous callback to return the result. + * Checks whether the current common event is an ordered common event. * - * @param { AsyncCallback<boolean> } callback - Callback used to return the result. Returns true if the common event is an ordered one; - * returns false otherwise. + * @param { AsyncCallback<boolean> } callback - Indicate the callback function to receive the common event. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.CommonEvent - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ isOrderedCommonEvent(callback: AsyncCallback<boolean>): void; /** - * Checks whether the current common event is an ordered common event. This API uses a promise to return the result. + * Checks whether the current common event is an ordered common event. * - * @returns { Promise<boolean> } Promise used to return the result. Returns true if the common event is an ordered one; returns false otherwise. + * @returns { Promise<boolean> } Returns true if this common event is ordered, false otherwise * @syscap SystemCapability.Notification.CommonEvent - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ isOrderedCommonEvent(): Promise<boolean>; /** * Checks whether the current common event is an ordered common event. * - * @returns { boolean } Returns true if the common event is an ordered one; returns false otherwise. + * @returns { boolean } Returns true if this common event is ordered, false otherwise * @syscap SystemCapability.Notification.CommonEvent - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ isOrderedCommonEventSync(): boolean; /** - * Checks whether a common event is a sticky one. This API uses an asynchronous callback to return the result. + * Checks whether the current common event is a sticky common event. * - * @param { AsyncCallback<boolean> } callback - Callback used to return the result. Returns true if the common event is a sticky one; returns false otherwise. + * @param { AsyncCallback<boolean> } callback - Indicate the callback function to receive the common event. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.CommonEvent - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ isStickyCommonEvent(callback: AsyncCallback<boolean>): void; /** - * Checks whether a common event is a sticky one. This API uses a promise to return the result. + * Checks whether the current common event is a sticky common event. * - * @returns { Promise<boolean> } Promise used to return the result. Returns true if the common event is a sticky one; returns false otherwise. + * @returns { Promise<boolean> } Returns true if this common event is sticky, false otherwise * @syscap SystemCapability.Notification.CommonEvent - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ isStickyCommonEvent(): Promise<boolean>; /** - * Checks whether a common event is a sticky one. + * Checks whether the current common event is a sticky common event. * - * @returns { boolean } Returns true if the common event is a sticky one; returns false otherwise. + * @returns { boolean } Returns true if this common event is sticky, false otherwise * @syscap SystemCapability.Notification.CommonEvent - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ isStickyCommonEventSync(): boolean; /** - * Aborts an ordered common event when used with finishCommonEvent. After the abort, the common event is not sent to the - * next subscriber. This API uses an asynchronous callback to return the result. + * Abort the current ordered common event. * - * @param { AsyncCallback<void> } callback - Callback used to return the result. + * @param { AsyncCallback<void> } callback - Indicate the callback function to receive the common event. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.CommonEvent - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ abortCommonEvent(callback: AsyncCallback<void>): void; /** - * Aborts an ordered common event when used with finishCommonEvent. After the abort, the common event is not sent to the - * next subscriber. This API uses a promise to return the result. + * Abort the current ordered common event. * - * @returns { Promise<void> } Promise that returns no value. + * @returns { Promise<void> } The promise returned by the function. * @syscap SystemCapability.Notification.CommonEvent - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ abortCommonEvent(): Promise<void>; /** - * Aborts an ordered common event when used with finishCommonEvent. After the abort, the common event is not sent to the next subscriber. + * Abort the current ordered common event. * * @syscap SystemCapability.Notification.CommonEvent - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ abortCommonEventSync(): void; /** - * Clears the aborted state of an ordered common event when used with finishCommonEvent. - * After the clearance, the common event is sent to the next subscriber. This API uses an asynchronous callback to return the result. + * Clears the abort state of the current ordered common event * - * @param { AsyncCallback<void> } callback - Callback used to return the result. + * @param { AsyncCallback<void> } callback - Indicate the callback function to receive the common event. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.CommonEvent - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ clearAbortCommonEvent(callback: AsyncCallback<void>): void; /** - * Clears the aborted state of an ordered common event when used with finishCommonEvent. - * After the clearance, the common event is sent to the next subscriber. This API uses a promise to return the result. + * Clears the abort state of the current ordered common event * - * @returns { Promise<void> } Promise that returns no value. + * @returns { Promise<void> } The promise returned by the function. * @syscap SystemCapability.Notification.CommonEvent - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ clearAbortCommonEvent(): Promise<void>; /** - * Clears the aborted state of an ordered common event when used with finishCommonEvent.After the clearance, the common event is sent to the next subscriber. + * Clears the abort state of the current ordered common event * * @syscap SystemCapability.Notification.CommonEvent - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ clearAbortCommonEventSync(): void; /** - * Checks whether this ordered common event should be aborted. This API uses an asynchronous callback to return the result. + * Checks whether the current ordered common event should be aborted. * - * @param { AsyncCallback<boolean> } callback - Callback used to return the result. Returns true if the ordered common event - * is in the aborted state; returns false otherwise. + * @param { AsyncCallback<boolean> } callback - Indicate the callback function to receive the common event. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.CommonEvent - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ getAbortCommonEvent(callback: AsyncCallback<boolean>): void; /** - * Checks whether this ordered common event should be aborted. This API uses a promise to return the result. + * Checks whether the current ordered common event should be aborted. * - * @returns { Promise<boolean> } Checks whether this ordered common event should be aborted. This API uses a promise to return the result. + * @returns { Promise<boolean> } Returns true if this common event is aborted, false otherwise * @syscap SystemCapability.Notification.CommonEvent - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ getAbortCommonEvent(): Promise<boolean>; /** - * Checks whether this ordered common event should be aborted. + * Checks whether the current ordered common event should be aborted. * - * @returns { boolean } Returns true if the ordered common event is in the aborted state; returns false otherwise. + * @returns { boolean } Returns true if this common event is aborted, false otherwise * @syscap SystemCapability.Notification.CommonEvent - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ getAbortCommonEventSync(): boolean; /** - * Obtains the subscriber information. This API uses an asynchronous callback to return the result. + * get the CommonEventSubscribeInfo of this CommonEventSubscriber. * - * @param { AsyncCallback<CommonEventSubscribeInfo> } callback - Callback used to return the result. + * @param { AsyncCallback<CommonEventSubscribeInfo> } callback - Indicate callback function to receive common event. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.CommonEvent * @since 7 */ /** - * Obtains the subscriber information. This API uses an asynchronous callback to return the result. + * get the CommonEventSubscribeInfo of this CommonEventSubscriber. * - * @param { AsyncCallback<CommonEventSubscribeInfo> } callback - Callback used to return the result. + * @param { AsyncCallback<CommonEventSubscribeInfo> } callback - Indicate callback function to receive common event. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.CommonEvent * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getSubscribeInfo(callback: AsyncCallback<CommonEventSubscribeInfo>): void; /** - * Obtains the subscriber information. This API uses a promise to return the result. + * get the CommonEventSubscribeInfo of this CommonEventSubscriber. * - * @returns { Promise<CommonEventSubscribeInfo> } Promise used to return the result. + * @returns { Promise<CommonEventSubscribeInfo> } Returns the commonEvent subscribe information * @syscap SystemCapability.Notification.CommonEvent * @since 7 */ /** - * Obtains the subscriber information. This API uses a promise to return the result. + * get the CommonEventSubscribeInfo of this CommonEventSubscriber. * - * @returns { Promise<CommonEventSubscribeInfo> } Promise used to return the result. + * @returns { Promise<CommonEventSubscribeInfo> } Returns the commonEvent subscribe information * @syscap SystemCapability.Notification.CommonEvent * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getSubscribeInfo(): Promise<CommonEventSubscribeInfo>; /** - * Obtains the subscriber information. + * Get the CommonEventSubscribeInfo of this CommonEventSubscriber. * - * @returns { CommonEventSubscribeInfo } Subscriber information. + * @returns { CommonEventSubscribeInfo } Returns the commonEvent subscribe information * @syscap SystemCapability.Notification.CommonEvent * @since 10 */ /** - * Obtains the subscriber information. + * Get the CommonEventSubscribeInfo of this CommonEventSubscriber. * - * @returns { CommonEventSubscribeInfo } Subscriber information. + * @returns { CommonEventSubscribeInfo } Returns the commonEvent subscribe information * @syscap SystemCapability.Notification.CommonEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getSubscribeInfoSync(): CommonEventSubscribeInfo; /** - * Finishes this ordered common event. This API uses an asynchronous callback to return the result. + * finish the current ordered common event. * - * @param { AsyncCallback<void> } callback - Callback used to return the result. + * @param { AsyncCallback<void> } callback - Indicate the callback function after ordered common event is finished. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * <br>2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ finishCommonEvent(callback: AsyncCallback<void>): void; /** - * Finishes this ordered common event. This API uses a promise to return the result. + * finish the current ordered common event. * - * @returns { Promise<void> } Promise that returns no value. + * @returns { Promise<void> } The promise returned by the function. * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ finishCommonEvent(): Promise<void>; } diff --git a/api/global/rawFileDescriptor.d.ts b/api/global/rawFileDescriptor.d.ts index 76d4c8959d6238fa8853eba9958b0585f00965fd..8a85921c4ffc92a83f150e140b2e31b8133bc260 100644 --- a/api/global/rawFileDescriptor.d.ts +++ b/api/global/rawFileDescriptor.d.ts @@ -16,7 +16,6 @@ /** * @file * @kit LocalizationKit - * @arkts 1.1&1.2 */ /** @@ -42,6 +41,7 @@ * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface RawFileDescriptor { /** @@ -65,6 +65,7 @@ export interface RawFileDescriptor { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ fd: number; @@ -89,6 +90,7 @@ export interface RawFileDescriptor { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ offset: number; @@ -113,6 +115,7 @@ export interface RawFileDescriptor { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ length: number; } \ No newline at end of file diff --git a/api/global/resource.d.ts b/api/global/resource.d.ts index bb8beb45be619634d4fbe9e81156794b9cf5972c..a4243da90883b9d9314645359e9f68a2d6172605 100644 --- a/api/global/resource.d.ts +++ b/api/global/resource.d.ts @@ -124,6 +124,18 @@ export interface Resource { */ params?: any[]; + /** + * Set params. + * + * @type { ?Array<Object | undefined> } + * @syscap SystemCapability.Global.ResourceManager + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + params?: Array<Object | undefined>; + /** * Set type. * diff --git a/api/notification/NotificationCommonDef.d.ts b/api/notification/NotificationCommonDef.d.ts index 6a48a3d1946ff71bbeefdc5331c39d2747783abc..37d26518cfa300a79fc3b3b98dae733b426f34fd 100644 --- a/api/notification/NotificationCommonDef.d.ts +++ b/api/notification/NotificationCommonDef.d.ts @@ -14,33 +14,36 @@ */ /** - * @file The NotificationCommonDef module provides APIs for describing the BundleOption information, that is, the bundle information of a specified application. + * @file Some common definitions * @kit NotificationKit */ /** - * The NotificationCommonDef module provides APIs for describing the BundleOption information, that is, the bundle information of a specified application. + * Describes a BundleOption. * * @typedef BundleOption * @syscap SystemCapability.Notification.Notification - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface BundleOption { /** - * Application name. + * bundle name * * @type { string } * @syscap SystemCapability.Notification.Notification - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ bundle: string; /** - * UID of an application, which is obtained from ApplicationInfo. The default value is 0. + * user id. * * @type { ?number } * @syscap SystemCapability.Notification.Notification - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ uid?: number; } diff --git a/api/notification/notificationActionButton.d.ts b/api/notification/notificationActionButton.d.ts index 79373514306b9e135e7c8b5076299cd3328b78e4..50a09dcb70cf712e43f0ceb2f45d78f8f7f569e4 100644 --- a/api/notification/notificationActionButton.d.ts +++ b/api/notification/notificationActionButton.d.ts @@ -14,19 +14,25 @@ */ /** - * @file The NotificationActionButton module provides APIs for describing the button displayed in the notification. + * @file Describes an action button displayed in a notification * @kit NotificationKit */ import { NotificationUserInput } from './notificationUserInput'; +/*** if arkts 1.1 */ import { WantAgent } from '../@ohos.wantAgent'; +/*** endif */ +/*** if arkts 1.2 */ +import { WantAgent } from '../@ohos.app.ability.wantAgent'; +/*** endif */ /** - * The NotificationActionButton module provides APIs for describing the button displayed in the notification. + * Describes an action button displayed in a notification. * * @typedef NotificationActionButton * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface NotificationActionButton { /** @@ -34,7 +40,8 @@ export interface NotificationActionButton { * * @type { string } * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ title: string; @@ -43,7 +50,8 @@ export interface NotificationActionButton { * * @type { WantAgent } * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ wantAgent: WantAgent; @@ -57,11 +65,22 @@ export interface NotificationActionButton { extras?: { [key: string]: any }; /** - * User input object. ID entered by a subscriber. + * Extra information of the button. + * + * @type { ?Record<string, Object> } + * @syscap SystemCapability.Notification.Notification + * @since 20 + * @arkts 1.2 + */ + extras?: Record<string, Object>; + + /** + * User input * * @type { ?NotificationUserInput } * @syscap SystemCapability.Notification.Notification - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ userInput?: NotificationUserInput; } diff --git a/api/notification/notificationContent.d.ts b/api/notification/notificationContent.d.ts index 473f641c633000a57221bd4a9fb022ef9f205961..bd11942eabca20454f01591ed1b2dbd34e52ab5b 100644 --- a/api/notification/notificationContent.d.ts +++ b/api/notification/notificationContent.d.ts @@ -14,7 +14,7 @@ */ /** - * @file The NotificationContent module provides APIs for defining the notification content. + * @file Some notification types and content * @kit NotificationKit */ @@ -22,7 +22,7 @@ import notification from '../@ohos.notification'; import image from '../@ohos.multimedia.image'; import { Resource } from '../global/resource'; import type notificationManager from '../@ohos.notificationManager'; -import type { WantAgent } from '../@ohos.wantAgent'; +import { WantAgent } from '../@ohos.wantAgent'; /** * Describes icon type. @@ -30,7 +30,8 @@ import type { WantAgent } from '../@ohos.wantAgent'; * @typedef { Resource | image.PixelMap } IconType * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ type IconType = Resource | image.PixelMap; @@ -47,129 +48,136 @@ type IconType = Resource | image.PixelMap; * @typedef NotificationBasicContent * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface NotificationBasicContent { /** - * Notification title. It cannot be empty or exceed 1024 bytes. Excess content will be truncated. + * Title of the normal text notification. + * * @type { string } * @syscap SystemCapability.Notification.Notification * @since 7 */ /** - * Notification title. It cannot be empty or exceed 1024 bytes. Excess content will be truncated. + * Title of the normal text notification. * * @type { string } * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ title: string; /** - * Notification content. It cannot be empty or exceed 3072 bytes. Excess content will be truncated. + * Content of the normal text notification. * * @type { string } * @syscap SystemCapability.Notification.Notification * @since 7 */ /** - * Notification content. It cannot be empty or exceed 3072 bytes. Excess content will be truncated. + * Content of the normal text notification. * * @type { string } * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ text: string; /** - * Additional information of the notification. It cannot exceed 3072 bytes. Excess content will be truncated. + * Additional information of the normal text notification. * * @type { ?string } * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ additionalText?: string; /** - * Picture of a notification displayed on the lock screen. Currently, only the live view notification is supported. - * The total number of the icon pixel bytes cannot exceed 192 KB (which is obtained through getPixelBytesNumber. - * The recommended icon size is 128 × 128 pixels. - * The display effect depends on the device capability and notification center UI style. + * Data image of the lock screen. * * @type { ?image.PixelMap } * @syscap SystemCapability.Notification.Notification - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ lockscreenPicture?: image.PixelMap; } /** - * Describes the long text notification. This API is inherited from NotificationBasicContent. + * Describes a long text notification. * * @typedef NotificationLongTextContent * @syscap SystemCapability.Notification.Notification * @since 7 */ /** - * Describes the long text notification. This API is inherited from NotificationBasicContent. + * Describes a long text notification. * * @extends NotificationBasicContent * @typedef NotificationLongTextContent * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface NotificationLongTextContent extends NotificationBasicContent { /** - * Long text of the notification. It cannot be an empty string and exceed 3072 bytes. Excess content will be truncated. + * Long text content of the notification. * * @type { string } * @syscap SystemCapability.Notification.Notification * @since 7 */ /** - * Long text of the notification. It cannot be an empty string and exceed 3072 bytes. Excess content will be truncated. + * Long text content of the notification. * * @type { string } * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ longText: string; /** - * Brief text of the notification. It cannot be empty or exceed 1024 bytes. Excess content will be truncated. + * Brief text of the long text notification. * * @type { string } * @syscap SystemCapability.Notification.Notification * @since 7 */ /** - * Brief text of the notification. It cannot be empty or exceed 1024 bytes. Excess content will be truncated. + * Brief text of the long text notification. * * @type { string } * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ briefText: string; /** - * Title of the notification in the expanded state. It cannot be empty or exceed 1024 bytes. Excess content will be truncated. + * Title that will be displayed for the long text notification when it is expanded. * * @type { string } * @syscap SystemCapability.Notification.Notification * @since 7 */ /** - * Title of the notification in the expanded state. It cannot be empty or exceed 1024 bytes. Excess content will be truncated. + * Title that will be displayed for the long text notification when it is expanded. * * @type { string } * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ expandedTitle: string; } @@ -180,7 +188,8 @@ export interface NotificationLongTextContent extends NotificationBasicContent { * @enum { number } * @syscap SystemCapability.Security.AccessToken * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum LiveViewStatus { /** @@ -188,7 +197,8 @@ export enum LiveViewStatus { * * @syscap SystemCapability.Security.AccessToken * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ LIVE_VIEW_CREATE = 0, /** @@ -196,7 +206,8 @@ export enum LiveViewStatus { * * @syscap SystemCapability.Security.AccessToken * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ LIVE_VIEW_INCREMENTAL_UPDATE = 1, /** @@ -204,7 +215,8 @@ export enum LiveViewStatus { * * @syscap SystemCapability.Security.AccessToken * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ LIVE_VIEW_END = 2, /** @@ -212,7 +224,8 @@ export enum LiveViewStatus { * * @syscap SystemCapability.Security.AccessToken * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ LIVE_VIEW_FULL_UPDATE = 3 } @@ -223,7 +236,8 @@ export enum LiveViewStatus { * @enum { number } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum LiveViewTypes { /** @@ -231,7 +245,8 @@ export enum LiveViewTypes { * * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ LIVE_VIEW_ACTIVITY = 0, /** @@ -239,7 +254,8 @@ export enum LiveViewTypes { * * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ LIVE_VIEW_INSTANT = 1, /** @@ -247,7 +263,8 @@ export enum LiveViewTypes { * * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ LIVE_VIEW_LONG_TERM = 2 } @@ -259,7 +276,8 @@ export enum LiveViewTypes { * @typedef NotificationLiveViewContent * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface NotificationLiveViewContent extends NotificationBasicContent { /** @@ -268,7 +286,8 @@ export interface NotificationLiveViewContent extends NotificationBasicContent { * @type { LiveViewStatus } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ status: LiveViewStatus; @@ -280,7 +299,8 @@ export interface NotificationLiveViewContent extends NotificationBasicContent { * @type { ?number } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ version?: number; @@ -290,7 +310,8 @@ export interface NotificationLiveViewContent extends NotificationBasicContent { * @type { ?Record<string, Object>} * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ extraInfo?: Record<string, Object>; @@ -300,7 +321,8 @@ export interface NotificationLiveViewContent extends NotificationBasicContent { * @type { ?Record<string, Array<image.PixelMap>> } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ pictureInfo?: Record<string, Array<image.PixelMap>>; @@ -310,162 +332,186 @@ export interface NotificationLiveViewContent extends NotificationBasicContent { * @type { ?boolean } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ isLocalUpdateOnly?: boolean; + + /** + * The WantAgent instance of the clickAction field in the live view extension area. + * + * @type { ?WantAgent } + * @syscap SystemCapability.Notification.Notification + * @systemapi + * @since arkts {'1.1':'20', '1.2':'20'} + * @arkts 1.1&1.2 + */ + extensionWantAgent?: WantAgent; } /** - * Describes the multi-line text notification. This API is inherited from NotificationBasicContent. + * Describes a multi-line text notification. * * @typedef NotificationMultiLineContent * @syscap SystemCapability.Notification.Notification * @since 7 */ /** - * Describes the multi-line text notification. This API is inherited from NotificationBasicContent. + * Describes a multi-line text notification. * * @extends NotificationBasicContent * @typedef NotificationMultiLineContent * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface NotificationMultiLineContent extends NotificationBasicContent { /** - * Brief text of the notification. It cannot be empty or exceed 1024 bytes. Excess content will be truncated. + * Brief text of the multi-line text notification. * * @type { string } * @syscap SystemCapability.Notification.Notification * @since 7 */ /** - * Brief text of the notification. It cannot be empty or exceed 1024 bytes. Excess content will be truncated. + * Brief text of the multi-line text notification. * * @type { string } * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ briefText: string; /** - * Title of the notification in the expanded state. It cannot be empty or exceed 1024 bytes. Excess content will be truncated. + * Brief text of the multi-line text notification. * * @type { string } * @syscap SystemCapability.Notification.Notification * @since 7 */ /** - * Title of the notification in the expanded state. It cannot be empty or exceed 1024 bytes. Excess content will be truncated. + * Brief text of the multi-line text notification. * * @type { string } * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ longTitle: string; /** - * Multi-line text of the notification. It cannot exceed 1024 bytes. Excess content will be truncated. + * Multi-line content of the multi-line text notification. * * @type { Array<string> } * @syscap SystemCapability.Notification.Notification * @since 7 */ /** - * Multi-line text of the notification. It cannot exceed 1024 bytes. Excess content will be truncated. + * Multi-line content of the multi-line text notification. * * @type { Array<string> } * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ lines: Array<string>; - + /** * Multi-line wantAgent of the multi-line text notification. + * * @permission ohos.permission.NOTIFICATION_AGENT_CONTROLLER * @type { ?Array<WantAgent> } * @syscap SystemCapability.Notification.Notification * @systemapi * @since 20 + * @arkts 1.2 */ lineWantAgents?: Array<WantAgent>; } /** - * Describes the picture-attached notification. This API is inherited from NotificationBasicContent. + * Describes a picture-attached notification. * * @extends NotificationBasicContent * @typedef NotificationPictureContent * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface NotificationPictureContent extends NotificationBasicContent { /** - * Brief text of the notification. It cannot be empty or exceed 1024 bytes. Excess content will be truncated. + * Multi-line content of the multi-line text notification. * * @type { string } * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ briefText: string; /** - * Title of the notification in the expanded state. It cannot be empty or exceed 1024 bytes. Excess content will be truncated. + * Title that will be displayed for the picture-attached notification when it is expanded. * * @type { string } * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ expandedTitle: string; /** - * Picture content of the notification. (The total number of bytes of image pixels cannot exceed 2 MB.) + * Picture to be included in a notification. * * @type { image.PixelMap } * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ picture: image.PixelMap; } /** - * Describes the system live view notification. A third-party application cannot directly create a notification of this type. - * After the system proxy creates a system live view, the third-party application releases a notification with the same ID to update the specified content. - * This API is inherited from NotificationBasicContent. + * Describes a system live view notification. * * @extends NotificationBasicContent * @typedef NotificationSystemLiveViewContent * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface NotificationSystemLiveViewContent extends NotificationBasicContent { /** - * Type code, which identifies the type of the service that invokes the API. + * type code of a system live view notification. * * @type { number } * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ typeCode: number; /** - * Capsule of the notification. + * capsule of a system live view notification. * * @type { ?NotificationCapsule } * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ capsule?: NotificationCapsule; /** - * Button in the notification. + * button of a system live view notification. * * @type { ?NotificationButton } * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ button?: NotificationButton; @@ -475,25 +521,28 @@ export interface NotificationSystemLiveViewContent extends NotificationBasicCont * @type { ?Array<NotificationIconButton> } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ cardButtons?: Array<NotificationIconButton>; /** - * Time of the notification. + * type of a system live view notification. * * @type { ?NotificationTime } * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ time?: NotificationTime; /** - * Progress of the notification. + * progress of a system live view notification. * * @type { ?NotificationProgress } * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ progress?: NotificationProgress; @@ -503,43 +552,48 @@ export interface NotificationSystemLiveViewContent extends NotificationBasicCont * @type { number } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ liveViewType?: LiveViewTypes; } /** - * Describe the notification capsule. + * Describes a system live view capsule type. * * @typedef NotificationCapsule * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface NotificationCapsule { /** - * Title of the capsule. + * Title displayed in this capsule. * * @type { ?string } * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ title?: string; /** - * Icon of the capsule. + * Icon displayed in this capsule. * * @type { ?image.PixelMap } * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ icon?: image.PixelMap; /** - * Background color of the capsule. + * Background color of this capsule. * * @type { ?string } * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor?: string; @@ -549,7 +603,8 @@ export interface NotificationCapsule { * @type { ?string } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ content?: string; @@ -559,7 +614,8 @@ export interface NotificationCapsule { * @type { ?number } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ time?: number; @@ -569,7 +625,8 @@ export interface NotificationCapsule { * @type { ?Array<NotificationIconButton> } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ capsuleButtons?: Array<NotificationIconButton>; } @@ -579,7 +636,8 @@ export interface NotificationCapsule { * * @typedef NotificationIconButton * @syscap SystemCapability.Notification.Notification - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface NotificationIconButton { @@ -589,7 +647,8 @@ export interface NotificationIconButton { * @type { string } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -599,7 +658,8 @@ export interface NotificationIconButton { * @type { IconType } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ iconResource: IconType; @@ -609,7 +669,8 @@ export interface NotificationIconButton { * @type { ?string } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ text?: string; @@ -619,142 +680,158 @@ export interface NotificationIconButton { * @type { ?boolean } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ hidePanel?: boolean; } /** - * Describes the notification button. + * Describes a system live view button type. * * @typedef NotificationButton * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface NotificationButton { /** - * Button names. A maximum of three names are supported. + * array of button names. * * @type { ?Array<string> } * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ names?: Array<string>; /** - * Button icons. A maximum of three icons are supported. + * array of button icons. * * @type { ?Array<image.PixelMap> } * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ icons?: Array<image.PixelMap>; /** - * Button icon resources. A maximum of three icon resources are supported. + * array of button icons resource. * * @type { ?Array<Resource> } * @syscap SystemCapability.Notification.Notification - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ iconsResource?: Array<Resource>; } /** - * Describes the notification timing information. + * Describes a system live view time type. * * @typedef NotificationTime * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface NotificationTime { /** - * Start time, in milliseconds. + * The initial time of this notification. * * @type { ?number } * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ initialTime?: number; /** - * Whether to count down. + * + * Count down the time. * * @type { ?boolean } * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ isCountDown?: boolean; /** - * Whether to pause the progress. + * The time is paused. * * @type { ?boolean } * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ isPaused?: boolean; /** - * Whether the time is displayed in the title. + * The time should be displayed in title. * * @type { ?boolean } * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ isInTitle?: boolean; } /** - * Describes the notification progress. + * Describes a system live view progress type. * * @typedef NotificationProgress * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface NotificationProgress { /** - * Maximum progress value. + * Max value of this progress. * * @type { ?number } * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ maxValue?: number; /** - * Current progress value. + * Current value of this progress. * * @type { ?number } * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ currentValue?: number; /** - * Whether to show the progress in percentage. + * Use percentage mode in this progress. * * @type { ?boolean } * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ isPercentage?: boolean; } /** - * Describes the notification contents. + * Describes notification types. * * @typedef NotificationContent * @syscap SystemCapability.Notification.Notification * @since 7 */ /** - * Describes the notification contents. + * Describes notification types. * * @typedef NotificationContent * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface NotificationContent { /** @@ -781,77 +858,82 @@ export interface NotificationContent { * @type { ?notificationManager.ContentType } * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ notificationContentType?: notificationManager.ContentType; /** - * Normal text. + * Normal text notification. * * @type { ?NotificationBasicContent } * @syscap SystemCapability.Notification.Notification * @since 7 */ /** - * Normal text. + * Normal text notification. * * @type { ?NotificationBasicContent } * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ normal?: NotificationBasicContent; /** - * Long text. + * Long text notification. * * @type { ?NotificationLongTextContent } * @syscap SystemCapability.Notification.Notification * @since 7 */ /** - * Long text. + * Long text notification. * * @type { ?NotificationLongTextContent } * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ longText?: NotificationLongTextContent; /** - * Multi-line text. + * Multi-line text notification. * * @type { ?NotificationMultiLineContent } * @syscap SystemCapability.Notification.Notification * @since 7 */ /** - * Multi-line text. + * Multi-line text notification. * * @type { ?NotificationMultiLineContent } * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ multiLine?: NotificationMultiLineContent; /** - * Picture-attached. + * Picture-attached notification. * * @type { ?NotificationPictureContent } * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ picture?: NotificationPictureContent; /** - * System live view. A third-party application cannot directly create a notification of this type. After the system proxy creates a system live view, - * the third-party application releases a notification with the same ID to update the specified content. + * System-live-view notification. * * @type { ?NotificationSystemLiveViewContent } * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ systemLiveView?: NotificationSystemLiveViewContent; @@ -861,7 +943,8 @@ export interface NotificationContent { * @type { ?NotificationLiveViewContent } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ liveView?: NotificationLiveViewContent; } diff --git a/api/notification/notificationFlags.d.ts b/api/notification/notificationFlags.d.ts index 3d5c2ea37b2acebafd92fe21f231548864145f43..e6360bc9ad0261fca928f7a20be1fc8c9dcc5c1b 100644 --- a/api/notification/notificationFlags.d.ts +++ b/api/notification/notificationFlags.d.ts @@ -14,12 +14,12 @@ */ /** - * @file The NotificationFlags module implements a NotificationFlags instance. + * @file Some states and flags for notifications * @kit NotificationKit */ /** - * Enumerates the notification flag statuses. + * The status of the notification flag. * * @enum { number } * @syscap SystemCapability.Notification.Notification @@ -27,55 +27,59 @@ * @since 8 */ /** - * Enumerates the notification flag statuses. + * The status of the notification flag. * * @enum { number } * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum NotificationFlagStatus { /** - * The default flag is used. The effect is the same as that of TYPE_OPEN. + * notification flag default value * * @syscap SystemCapability.Notification.Notification * @systemapi * @since 8 */ /** - * The default flag is used. The effect is the same as that of TYPE_OPEN. + * notification flag default value * * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ TYPE_NONE = 0, /** - * The notification flag is enabled. + * notification flag open * * @syscap SystemCapability.Notification.Notification * @systemapi * @since 8 */ /** - * The notification flag is enabled. + * notification flag open * * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ TYPE_OPEN = 1, /** - * The notification flag is disabled. + * notification flag close * * @syscap SystemCapability.Notification.Notification * @systemapi * @since 8 */ /** - * The notification flag is disabled. + * notification flag close * * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ TYPE_CLOSE = 2 } @@ -85,7 +89,8 @@ export enum NotificationFlagStatus { * * @typedef NotificationFlags * @syscap SystemCapability.Notification.Notification - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface NotificationFlags { /** @@ -94,7 +99,8 @@ export interface NotificationFlags { * @type { ?NotificationFlagStatus } * @readonly * @syscap SystemCapability.Notification.Notification - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly soundEnabled?: NotificationFlagStatus; @@ -104,7 +110,8 @@ export interface NotificationFlags { * @type { ?NotificationFlagStatus } * @readonly * @syscap SystemCapability.Notification.Notification - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly vibrationEnabled?: NotificationFlagStatus; @@ -115,7 +122,8 @@ export interface NotificationFlags { * @readonly * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly reminderFlags?: number; } diff --git a/api/notification/notificationRequest.d.ts b/api/notification/notificationRequest.d.ts index 708eea61c25797144ba703873ee203e3cf8f02d1..6228c18b7e247d88d733d8872009437769408790 100644 --- a/api/notification/notificationRequest.d.ts +++ b/api/notification/notificationRequest.d.ts @@ -18,16 +18,22 @@ * @kit NotificationKit */ -import notification from '../@ohos.notification'; import image from '../@ohos.multimedia.image'; import type notificationManager from '../@ohos.notificationManager'; import type notificationSubscribe from '../@ohos.notificationSubscribe'; -import { WantAgent } from '../@ohos.wantAgent'; import { NotificationContent } from './notificationContent'; import { NotificationActionButton } from './notificationActionButton'; import { NotificationTemplate } from './notificationTemplate'; import { NotificationFlags } from './notificationFlags'; +/*** if arkts 1.1 */ +import notification from '../@ohos.notification'; +import { WantAgent } from '../@ohos.wantAgent'; import type { BundleOption } from './NotificationCommonDef'; +/*** endif */ +/*** if arkts 1.2 */ +import { WantAgent } from '../@ohos.app.ability.wantAgent'; +import { BundleOption } from './NotificationCommonDef'; +/*** endif */ /** * Defines a NotificationRequest instance. @@ -42,7 +48,8 @@ import type { BundleOption } from './NotificationCommonDef'; * @typedef NotificationRequest * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface NotificationRequest { /** @@ -58,37 +65,36 @@ export interface NotificationRequest { * @type { NotificationContent } * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ content: NotificationContent; /** - * Notification ID. The default value is 0. If the same notification ID exists, the notification content is updated. + * Notification ID. * * @type { ?number } * @syscap SystemCapability.Notification.Notification * @since 7 */ /** - * Notification ID. The default value is 0. If the same notification ID exists, the notification content is updated. + * Notification ID. * * @type { ?number } * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ id?: number; /** - * Unique ID carried in a notification sent by an app, which is used for notification deduplication. - * If an app publishes notifications with the same appMessageId locally or on the cloud, the device displays only one message. - * Repeated notifications received later will be silenced and deduplicated, and will not be displayed or notified. - * The deduplication flag is valid only within 24 hours after the notification is published. After 24 hours or the device is restarted, - * the deduplication flag becomes invalid. + * Globally unique notification message ID defined by application. * * @type { ?string } * @syscap SystemCapability.Notification.Notification - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ appMessageId?: string; @@ -104,11 +110,12 @@ export interface NotificationRequest { slotType?: notification.SlotType; /** - * Notification slot type. The default value is OTHER_TYPES. + * Notification slot type. * * @type { ?notificationManager.SlotType } * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ notificationSlotType?: notificationManager.SlotType; @@ -125,7 +132,8 @@ export interface NotificationRequest { * @type { ?boolean } * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ isOngoing?: boolean; @@ -134,77 +142,72 @@ export interface NotificationRequest { * * @type { ?boolean } * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ isUnremovable?: boolean; /** - * Whether to update notifications only. - * - true: If a notification with the same ID exists, the notification is updated; otherwise, the notification fails to update and no notification is created. - * - false (default): If a notification with the same ID exists, the notification is updated; otherwise, a notification is created. + * Whether the notification can only be updated. * * @type { ?boolean } * @syscap SystemCapability.Notification.Notification - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ updateOnly?: boolean; /** - * Time when the notification is sent. This API is automatically generated by the system. Data format: timestamp, in milliseconds. + * Time when the notification is sent. * * @type { ?number } * @syscap SystemCapability.Notification.Notification * @since 7 */ /** - * Time when the notification is sent. This API is automatically generated by the system. Data format: timestamp, in milliseconds. + * Time when the notification is sent. * * @type { ?number } * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ deliveryTime?: number; /** - * Whether the notification is automatically cleared. This parameter is valid only when the notification carries wantAgent or actionButtons. - * - true (default): The current notification is automatically cleared after the notification or button is tapped. - * - false: The current notification is retained after the notification or button is tapped. + * Whether the notification is automatically cleared. * * @type { ?boolean } * @syscap SystemCapability.Notification.Notification * @since 7 */ /** - * Whether the notification is automatically cleared. This parameter is valid only when the notification carries wantAgent or actionButtons. - * - true (default): The current notification is automatically cleared after the notification or button is tapped. - * - false: The current notification is retained after the notification or button is tapped. + * Whether the notification is automatically cleared. * * @type { ?boolean } * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ tapDismissed?: boolean; /** - * Time when the notification is automatically cleared. Data format: timestamp, in milliseconds. - * For example, if a notification is to be cleared after being displayed for 3 seconds (3000 ms), - * you can set new Date().getTime() + 3000 to meet this requirement. + * Time when the notification is automatically cleared. * * @type { ?number } * @syscap SystemCapability.Notification.Notification * @since 7 */ /** - * Time when the notification is automatically cleared. Data format: timestamp, in milliseconds. - * For example, if a notification is to be cleared after being displayed for 3 seconds (3000 ms), - * you can set new Date().getTime() + 3000 to meet this requirement. + * Time when the notification is automatically cleared. * * @type { ?number } * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ autoDeletedTime?: number; @@ -213,12 +216,13 @@ export interface NotificationRequest { * * @type { ?WantAgent } * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ wantAgent?: WantAgent; /** - * Expand parameters to provide customized services for applications. + * Extended parameter. * * @type { ?object } * @syscap SystemCapability.Notification.Notification @@ -226,6 +230,16 @@ export interface NotificationRequest { */ extraInfo?: { [key: string]: any }; + /** + * Extended parameter. + * + * @type { ?object } + * @syscap SystemCapability.Notification.Notification + * @since 20 + * @arkts 1.2 + */ + extraInfo?: Record<string, Object>; + /** * Extended parameter. Recommendation system application usage. * @@ -241,7 +255,8 @@ export interface NotificationRequest { * * @type { ?number } * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ color?: number; @@ -250,30 +265,26 @@ export interface NotificationRequest { * * @type { ?boolean } * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ colorEnabled?: boolean; /** - * Whether to send a notification only once when the notification is published or updated. - * - true: A notification is sent only when the notification is published for the first time. For subsequent update, - * the notification mode is changed to LEVEL_MIN. - * - false (default): A notification is sent based on the configured notification mode. + * Whether the notification triggers an alert only once. * * @type { ?boolean } * @syscap SystemCapability.Notification.Notification * @since 7 */ /** - * Whether to send a notification only once when the notification is published or updated. - * - true: A notification is sent only when the notification is published for the first time. For subsequent update, - * the notification mode is changed to LEVEL_MIN. - * - false (default): A notification is sent based on the configured notification mode. + * Whether the notification triggers an alert only once. * * @type { ?boolean } * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ isAlertOnce?: boolean; @@ -282,7 +293,8 @@ export interface NotificationRequest { * * @type { ?boolean } * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ isStopwatch?: boolean; @@ -291,26 +303,28 @@ export interface NotificationRequest { * * @type { ?boolean } * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ isCountDown?: boolean; /** - * Whether the notification is displayed as a floating icon in the status bar. + * Whether the notification is displayed as a floating icon. * * @type { ?boolean } * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ isFloatingIcon?: boolean; /** - * Notification label. The label field can be used independently, or used together with ID as a notification identifier. ID is preferentially used. - * If the label is not empty when a notification is published, you need to specify the label when updating or deleting the notification. + * Notification label. * * @type { ?string } * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ label?: string; @@ -319,7 +333,8 @@ export interface NotificationRequest { * * @type { ?number } * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ badgeIconStyle?: number; @@ -336,36 +351,38 @@ export interface NotificationRequest { * @type { ?boolean } * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ showDeliveryTime?: boolean; /** - * Notification button. A notification can contain a maximum of two buttons by default. + * Buttons in the notification. Up to two buttons are allowed. * * @type { ?Array<NotificationActionButton> } * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ actionButtons?: Array<NotificationActionButton>; /** - * Small notification icon. Optional field. The total number of the icon pixel bytes cannot exceed 192 KB (which is - * obtained through getPixelBytesNumber. The recommended icon size is 128 px × 128 px. + * Small notification icon. * * @type { ?image.PixelMap } * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ smallIcon?: image.PixelMap; /** - * Large notification icon. Optional field. The total number of the icon pixel bytes cannot exceed 192 KB (which is - * obtained through getPixelBytesNumber. The recommended icon size is 128 px × 128 px. + * Large notification icon. * * @type { ?image.PixelMap } * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ largeIcon?: image.PixelMap; @@ -375,64 +392,70 @@ export interface NotificationRequest { * @type { ?image.PixelMap } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ overlayIcon?: image.PixelMap; /** - * Notification group name. This parameter is left blank by default. + * The group information for this notification. * * @type { ?string } * @syscap SystemCapability.Notification.Notification * @since 8 */ /** - * Notification group name. This parameter is left blank by default. + * The group information for this notification. * * @type { ?string } * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ groupName?: string; /** - * Name of the bundle that creates the notification. + * Read-only name of the package for which a notification is created. * * @type { ?string } * @readonly * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly creatorBundleName?: string; /** - * UID used for creating the notification. + * Read-only UID of the notification creator. * * @type { ?number } * @readonly * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly creatorUid?: number; /** - * PID used for creating the notification. + * Read-only PID of the notification creator. * * @type { ?number } * @readonly * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly creatorPid?: number; /** - * ID of the user who creates the notification. + * Read-only UserId of the notification creator. * * @type { ?number } * @readonly * @syscap SystemCapability.Notification.Notification - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly creatorUserId?: number; @@ -444,17 +467,16 @@ export interface NotificationRequest { * @syscap SystemCapability.Notification.Notification * @systemapi * @since 12 - * @deprecated since 15 - * @useinstead NotificationRequest#appInstanceKey */ readonly creatorInstanceKey?: number; /** - * Name of the custom ringtone file for application notifications. + * Obtain the prompt tone resource path of the notification. * * @type { ?string } * @syscap SystemCapability.Notification.Notification - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ sound?: string; @@ -464,17 +486,19 @@ export interface NotificationRequest { * @type { ?string } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ classification?: string; /** - * Unique ID of the notification. + * Obtains the unique hash code of a notification in the current application. * * @type { ?string } * @readonly * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly hashCode?: string; @@ -495,8 +519,10 @@ export interface NotificationRequest { * @default true * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ + isRemoveAllowed?: boolean; /** @@ -506,25 +532,28 @@ export interface NotificationRequest { * @readonly * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly source?: number; /** - * Notification template. + * Obtains the template of this notification. * * @type { ?NotificationTemplate } * @syscap SystemCapability.Notification.Notification - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ template?: NotificationTemplate; /** - * Distributed notification options. Not supported currently. + * The options to distributed notification. * * @type { ?DistributedOptions } * @syscap SystemCapability.Notification.Notification - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ distributedOption?: DistributedOptions; @@ -535,46 +564,47 @@ export interface NotificationRequest { * @readonly * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly deviceId?: string; /** - * Notification flags. + * Obtains the set of identifiers for the notification. * * @type { ?NotificationFlags } * @readonly * @syscap SystemCapability.Notification.Notification - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly notificationFlags?: NotificationFlags; /** - * WantAgent instance to which the notification will be redirected when it is removed. - * Currently, redirection to UIAbility is not supported. Only common events can be published (that is, actionType is set to 4). + * WantAgent instance to which the notification will be redirected when removing notification. * * @type { ?WantAgent } * @syscap SystemCapability.Notification.Notification - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ removalWantAgent?: WantAgent; /** - * Number of notifications displayed on the application icon. If the badgeNumber is set to 0, badges are cleared; - * if the value is greater than 99, 99+ is displayed on the badge. + * Number of notifications displayed on the app icon. * * @type { ?number } * @syscap SystemCapability.Notification.Notification * @since 9 */ /** - * Number of notifications displayed on the application icon. If the badgeNumber is set to 0, badges are cleared; - * if the value is greater than 99, 99+ is displayed on the badge. + * Number of notifications displayed on the app icon. * * @type { ?number } * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ badgeNumber?: number; @@ -584,7 +614,8 @@ export interface NotificationRequest { * @type { ?BundleOption } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ representativeBundle?: BundleOption; @@ -595,7 +626,8 @@ export interface NotificationRequest { * @readonly * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly agentBundle?: BundleOption; @@ -605,7 +637,8 @@ export interface NotificationRequest { * @type { ?UnifiedGroupInfo } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ unifiedGroupInfo?: UnifiedGroupInfo; @@ -615,7 +648,8 @@ export interface NotificationRequest { * @type { ?number } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ notificationControlFlags?: number; @@ -626,7 +660,8 @@ export interface NotificationRequest { * @readonly * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly appInstanceKey?: string; @@ -637,7 +672,8 @@ export interface NotificationRequest { * @default false * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ forceDistributed?: boolean; @@ -648,44 +684,49 @@ export interface NotificationRequest { * @default false * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ notDistributed?: boolean; } /** - * Describes distributed notification options. + * Describes distributed options. * * @typedef DistributedOptions * @syscap SystemCapability.Notification.Notification - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface DistributedOptions { /** - * Whether the notification is a distributed notification. + * Obtains whether is the distributed notification. * * @type { ?boolean } * @default true * @syscap SystemCapability.Notification.Notification - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ isDistributed?: boolean; /** - * List of the devices to which the notification can be synchronized. + * Obtains the types of devices to which the notification can be synchronized. * * @type { ?Array<string> } * @syscap SystemCapability.Notification.Notification - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ supportDisplayDevices?: Array<string>; /** - * List of the devices on which the notification can be opened. + * Obtains the devices on which notifications can be open. * * @type { ?Array<string> } * @syscap SystemCapability.Notification.Notification - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ supportOperateDevices?: Array<string>; @@ -696,7 +737,8 @@ export interface DistributedOptions { * @readonly * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly remindType?: number; } @@ -707,7 +749,8 @@ export interface DistributedOptions { * @typedef NotificationFilter * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface NotificationFilter { /** @@ -716,7 +759,8 @@ export interface NotificationFilter { * @type { BundleOption } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ bundle: BundleOption; @@ -726,7 +770,8 @@ export interface NotificationFilter { * @type { notificationSubscribe.NotificationKey } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ notificationKey: notificationSubscribe.NotificationKey; @@ -736,7 +781,8 @@ export interface NotificationFilter { * @type { ?Array<string> } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ extraInfoKeys?: Array<string>; } @@ -747,7 +793,8 @@ export interface NotificationFilter { * @typedef NotificationCheckRequest * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface NotificationCheckRequest { /** @@ -756,7 +803,8 @@ export interface NotificationCheckRequest { * @type { notificationManager.ContentType } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ contentType: notificationManager.ContentType; @@ -766,7 +814,8 @@ export interface NotificationCheckRequest { * @type { notificationManager.SlotType } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ slotType: notificationManager.SlotType; @@ -776,7 +825,8 @@ export interface NotificationCheckRequest { * @type { Array<string> } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ extraInfoKeys: Array<string>; } @@ -787,7 +837,8 @@ export interface NotificationCheckRequest { * @typedef UnifiedGroupInfo * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface UnifiedGroupInfo { /** @@ -796,7 +847,8 @@ export interface UnifiedGroupInfo { * @type { ?string } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ key?: string; @@ -806,7 +858,8 @@ export interface UnifiedGroupInfo { * @type { ?string } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ title?: string; @@ -816,7 +869,8 @@ export interface UnifiedGroupInfo { * @type { ?string } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ content?: string; @@ -826,7 +880,8 @@ export interface UnifiedGroupInfo { * @type { ?string } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ sceneName?: string; @@ -839,4 +894,15 @@ export interface UnifiedGroupInfo { * @since 12 */ extraInfo?: { [key: string]: any }; + + /** + * Other information is aggregated across applications. + * + * @type { ?object } + * @syscap SystemCapability.Notification.Notification + * @systemapi + * @since 20 + * @arkts 1.2 + */ + extraInfo?: Record<string, Object>; } diff --git a/api/notification/notificationSlot.d.ts b/api/notification/notificationSlot.d.ts index a6255c1ab429b8cefb9260ca9dfec4fd2d79f287..ae1066dd4cd16bdba624398c5f22a898127b0931 100644 --- a/api/notification/notificationSlot.d.ts +++ b/api/notification/notificationSlot.d.ts @@ -14,23 +14,28 @@ */ /** - * @file The NotificationSlot module provides APIs for defining the notification slot. + * @file Description of the notification channel * @kit NotificationKit */ +/*** if arkts 1.1 */ import notification from '../@ohos.notification'; +/*** endif */ +/*** if arkts 1.1&1.2 */ import type notificationManager from '../@ohos.notificationManager'; +/*** endif */ /** - * The NotificationSlot module provides APIs for defining the notification slot. + * Describes a NotificationSlot instance. * * @typedef NotificationSlot * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface NotificationSlot { /** - * Notification slot type. + * Obtains the type of a notification slot. * * @type { ?notification.SlotType } * @syscap SystemCapability.Notification.Notification @@ -45,107 +50,132 @@ export interface NotificationSlot { * * @type { ?notificationManager.SlotType } * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ notificationType?: notificationManager.SlotType; /** - * Notification level. + * Obtains the level of a notification slot * * @type { ?notification.SlotLevel } * @syscap SystemCapability.Notification.Notification * @since 7 + * @deprecated since 20 + * @useinstead NotificationSlot#notificationLevel */ level?: notification.SlotLevel; /** - * Notification slot description. + * SlotLevel is used to regulate the display behavior and alert mechanisms of notifications. + * Each value of SlotLevel determines whether the system displays notification icons in the status bar, + * shows banners, or plays prompt tones. + * + * @type { ?notificationManager.SlotLevel } + * @syscap SystemCapability.Notification.Notification + * @since arkts {'1.1':'20', '1.2':'20'} + * @arkts 1.1&1.2 + */ + notificationLevel?: notificationManager.SlotLevel; + + /** + * Obtains the description of a notification slot. * * @type { ?string } * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ desc?: string; /** - * Whether to display the badge. + * Obtains the application icon badge status of a notification slot. * * @type { ?boolean } * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ badgeFlag?: boolean; /** - * Whether to bypass DND mode in the system. + * Obtains whether DND mode is bypassed for a notification slot. * * @type { ?boolean } * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ bypassDnd?: boolean; /** - * Mode for displaying the notification on the lock screen. + * Whether and how to display notifications on the lock screen. * * @type { ?number } * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ lockscreenVisibility?: number; /** - * Whether to enable vibration for the notification. + * Obtains the vibration status of the notification slot. * * @type { ?boolean } * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ vibrationEnabled?: boolean; /** - * Notification alert tone. + * Obtains the prompt tone of the notification slot. * * @type { ?string } * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ sound?: string; /** - * Whether the indicator blinks for the notification. + * Obtains whether the notification light is enabled in a notification slot. * * @type { ?boolean } * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ lightEnabled?: boolean; /** - * Indicator color of the notification. + * Obtains the color of the notification light in a notification slot. * * @type { ?number } * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ lightColor?: number; /** - * Vibration mode of the notification. + * Obtains the vibration style of notifications in this notification slot. * * @type { ?Array<number> } * @syscap SystemCapability.Notification.Notification - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ vibrationValues?: Array<number>; /** - * Whether the notification slot is enabled. The value true means to enable the notification slot, and false means the opposite. + * Read-only enabled status in this notification slot. * * @type { ?boolean } * @readonly * @syscap SystemCapability.Notification.Notification - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly enabled?: boolean; @@ -156,7 +186,8 @@ export interface NotificationSlot { * @readonly * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly reminderMode?: number; @@ -167,7 +198,8 @@ export interface NotificationSlot { * @readonly * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly authorizedStatus?: number; } diff --git a/api/notification/notificationSorting.d.ts b/api/notification/notificationSorting.d.ts index 0a0669db3d6230f789bb948f6b57e186ab01b84a..b4aa0b9cd41712f8533d86fafc6115f1111acce2 100644 --- a/api/notification/notificationSorting.d.ts +++ b/api/notification/notificationSorting.d.ts @@ -26,7 +26,8 @@ import { NotificationSlot } from './notificationSlot'; * @typedef NotificationSorting * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface NotificationSorting { /** @@ -36,7 +37,8 @@ export interface NotificationSorting { * @readonly * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly slot: NotificationSlot; @@ -47,7 +49,8 @@ export interface NotificationSorting { * @readonly * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly hashCode: string; @@ -58,7 +61,8 @@ export interface NotificationSorting { * @readonly * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly ranking: number; } diff --git a/api/notification/notificationSortingMap.d.ts b/api/notification/notificationSortingMap.d.ts index 9ba685aa1d40a8ff38710f41b4c6a432c0dd9977..e4b6b7cd0bbeba152528c9f81faf3165c0b85bd7 100644 --- a/api/notification/notificationSortingMap.d.ts +++ b/api/notification/notificationSortingMap.d.ts @@ -26,9 +26,10 @@ import { NotificationSorting } from './notificationSorting'; * @typedef NotificationSortingMap * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ -interface NotificationSortingMap { +export interface NotificationSortingMap { /** * An array of notification sort information. * @@ -36,7 +37,8 @@ interface NotificationSortingMap { * @readonly * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly sortings: Record<string, NotificationSorting>; @@ -47,7 +49,8 @@ interface NotificationSortingMap { * @readonly * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly sortedHashCode: Array<string>; } diff --git a/api/notification/notificationSubscribeInfo.d.ts b/api/notification/notificationSubscribeInfo.d.ts index 12e41dd97db66b937affb15b894c576d2bc47d87..44c1c15cfbc26e2c8ad21f0c74a7ad58289ff6c4 100644 --- a/api/notification/notificationSubscribeInfo.d.ts +++ b/api/notification/notificationSubscribeInfo.d.ts @@ -26,7 +26,8 @@ import type notificationManager from '../@ohos.notificationManager'; * @typedef NotificationSubscribeInfo * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface NotificationSubscribeInfo { /** @@ -35,7 +36,8 @@ export interface NotificationSubscribeInfo { * @type { ?Array<string> } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ bundleNames?: Array<string>; @@ -45,7 +47,8 @@ export interface NotificationSubscribeInfo { * @type { ?number } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ userId?: number; @@ -55,7 +58,8 @@ export interface NotificationSubscribeInfo { * @type { ?string } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ deviceType?: string; @@ -75,7 +79,8 @@ export interface NotificationSubscribeInfo { * @type { ?number } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ filterLimit?: number; } diff --git a/api/notification/notificationSubscriber.d.ts b/api/notification/notificationSubscriber.d.ts index eae4b2f001be23fe065752750becd09cf99be9d6..2d1dbb35a92004e728515790038dba07496246fe 100644 --- a/api/notification/notificationSubscriber.d.ts +++ b/api/notification/notificationSubscriber.d.ts @@ -30,7 +30,8 @@ import type notificationManager from '../@ohos.notificationManager'; * @interface NotificationSubscriber * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface NotificationSubscriber { /** @@ -163,7 +164,8 @@ export interface NotificationSubscriber { * @typedef SubscribeCallbackData * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface SubscribeCallbackData { /** @@ -173,7 +175,8 @@ export interface SubscribeCallbackData { * @readonly * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly request: NotificationRequest; @@ -184,7 +187,8 @@ export interface SubscribeCallbackData { * @readonly * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly sortingMap?: NotificationSortingMap; @@ -195,7 +199,8 @@ export interface SubscribeCallbackData { * @readonly * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly reason?: number; @@ -206,7 +211,8 @@ export interface SubscribeCallbackData { * @readonly * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly sound?: string; @@ -217,7 +223,8 @@ export interface SubscribeCallbackData { * @readonly * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly vibrationValues?: Array<number>; } @@ -229,7 +236,8 @@ export interface SubscribeCallbackData { * @typedef EnabledNotificationCallbackData * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface EnabledNotificationCallbackData { /** @@ -239,7 +247,8 @@ export interface EnabledNotificationCallbackData { * @readonly * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly bundle: string; @@ -250,7 +259,8 @@ export interface EnabledNotificationCallbackData { * @readonly * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly uid: number; @@ -261,7 +271,8 @@ export interface EnabledNotificationCallbackData { * @readonly * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly enable: boolean; } @@ -272,7 +283,8 @@ export interface EnabledNotificationCallbackData { * @typedef BadgeNumberCallbackData * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface BadgeNumberCallbackData { /** @@ -282,7 +294,8 @@ export interface BadgeNumberCallbackData { * @readonly * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly bundle: string; @@ -293,7 +306,8 @@ export interface BadgeNumberCallbackData { * @readonly * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly uid: number; @@ -304,7 +318,8 @@ export interface BadgeNumberCallbackData { * @readonly * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly badgeNumber: number; @@ -328,7 +343,8 @@ export interface BadgeNumberCallbackData { * @readonly * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly appInstanceKey?: string; } @@ -349,3 +365,13 @@ export interface BadgeEnabledChangedCallback { */ (data: EnabledNotificationCallbackData): void; } + +/** + * Defines the BadgeEnabledChanged callback. + * @param { EnabledNotificationCallbackData } data + * @syscap SystemCapability.Notification.Notification + * @systemapi + * @since 20 + * @arkts 1.2 + */ +export type BadgeEnabledChangedCallback = (data: EnabledNotificationCallbackData) => void; diff --git a/api/notification/notificationTemplate.d.ts b/api/notification/notificationTemplate.d.ts index 045e95888d4e40e251ccf10145a09a49db0e7dac..f259df392b4eb4c165c5aeb3e72ed8f95599b8b2 100644 --- a/api/notification/notificationTemplate.d.ts +++ b/api/notification/notificationTemplate.d.ts @@ -14,36 +14,36 @@ */ /** - * @file The NotificationTemplate module describes the notification template. + * @file Describes a NotificationTemplate instance * @kit NotificationKit */ /** - * The NotificationTemplate module describes the notification template. + * Describes a NotificationTemplate instance. * * @typedef NotificationTemplate * @syscap SystemCapability.Notification.Notification - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface NotificationTemplate { /** - * Template name. Currently, only downloadTemplate is supported. + * Obtains the type of a notification template. * * @type { string } * @syscap SystemCapability.Notification.Notification - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ name: string; /** - * Template data. - * - title: title of the file. This parameter is mandatory, and the value is of the string type. - * - fileName: name of the file to be downloaded. This parameter is mandatory, and the value is of the string type. - * - progressValue: download progress. The value is a number. + * Obtains the data of a notification template. * * @type { Record<string, Object> } * @syscap SystemCapability.Notification.Notification - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ data: Record<string, Object>; } diff --git a/api/notification/notificationUserInput.d.ts b/api/notification/notificationUserInput.d.ts index 77b0e7833f9bf35e7f4b7187875b7e2f257b177f..8de1d4d353fe2a04a4018722bf75800cd5d5dd47 100644 --- a/api/notification/notificationUserInput.d.ts +++ b/api/notification/notificationUserInput.d.ts @@ -14,16 +14,17 @@ */ /** - * @file The NotificationUserInput module provides APIs for defining the notification user input. + * @file Describes a NotificationUserInput instance * @kit NotificationKit */ /** - * The NotificationUserInput module provides APIs for defining the notification user input. +* Describes a NotificationUserInput instance. * * @typedef NotificationUserInput * @syscap SystemCapability.Notification.Notification - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface NotificationUserInput { /** @@ -31,7 +32,8 @@ export interface NotificationUserInput { * * @type { string } * @syscap SystemCapability.Notification.Notification - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ inputKey: string; } diff --git a/api/permissions.d.ts b/api/permissions.d.ts index a9e958ed16eadcf079269fd8a68807b5dd20802a..5f05109a909737030c116f12dd25a85750bcd227 100644 --- a/api/permissions.d.ts +++ b/api/permissions.d.ts @@ -33,5 +33,6 @@ * @syscap SystemCapability.Security.AccessToken * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export type Permissions = string; \ No newline at end of file diff --git a/api/security/PermissionRequestResult.d.ts b/api/security/PermissionRequestResult.d.ts index 658359502f07753a16f96f931e4cc4cfb5352e71..60ee2b6a1b3889a048ea5e61ddd14ad292ea90ee 100644 --- a/api/security/PermissionRequestResult.d.ts +++ b/api/security/PermissionRequestResult.d.ts @@ -40,9 +40,10 @@ * @stagemodelonly * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ -export default class PermissionRequestResult { +declare class PermissionRequestResult { /** * The permissions passed in by the user. * @@ -68,7 +69,8 @@ export default class PermissionRequestResult { * @stagemodelonly * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ permissions: Array<string>; @@ -76,7 +78,7 @@ export default class PermissionRequestResult { * The results for the corresponding request permissions. The value 0 indicates that a * permission is granted, the value -1 indicates not, and the value 2 indicates the request is invalid. * - * @type { Array<number> } + * @type { Array<int> } * @syscap SystemCapability.Security.AccessToken * @stagemodelonly * @since 9 @@ -85,7 +87,7 @@ export default class PermissionRequestResult { * The results for the corresponding request permissions. The value 0 indicates that a * permission is granted, the value -1 indicates not, and the value 2 indicates the request is invalid. * - * @type { Array<number> } + * @type { Array<int> } * @syscap SystemCapability.Security.AccessToken * @stagemodelonly * @crossplatform @@ -95,14 +97,15 @@ export default class PermissionRequestResult { * The results for the corresponding request permissions. The value 0 indicates that a * permission is granted, the value -1 indicates not, and the value 2 indicates the request is invalid. * - * @type { Array<number> } + * @type { Array<int> } * @syscap SystemCapability.Security.AccessToken * @stagemodelonly * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - authResults: Array<number>; + authResults: Array<int>; /** * Specifies whether a dialog box is shown for each requested permission. @@ -112,7 +115,8 @@ export default class PermissionRequestResult { * @syscap SystemCapability.Security.AccessToken * @stagemodelonly * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ dialogShownResults?: Array<boolean>; @@ -126,12 +130,15 @@ export default class PermissionRequestResult { * 5 The permission cannot be requested in a pop-up window. * 12 The service is abnormal. * - * @type { ?Array<number> } + * @type { ?Array<int> } * @syscap SystemCapability.Security.AccessToken * @stagemodelonly * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - errorReasons?: Array<number>; -} \ No newline at end of file + errorReasons?: Array<int>; +} + +export default PermissionRequestResult; \ No newline at end of file diff --git a/api/tag/nfctech.d.ts b/api/tag/nfctech.d.ts index c8d7eff1e6f51c75375009172faeff5679fe41d4..ad360fb4578c8dc288ee56ae771080e06ab59654 100644 --- a/api/tag/nfctech.d.ts +++ b/api/tag/nfctech.d.ts @@ -39,7 +39,8 @@ import { AsyncCallback, Callback } from '../@ohos.base'; * @typedef NfcATag * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NfcATag extends TagSession { /** @@ -55,7 +56,8 @@ export interface NfcATag extends TagSession { * @returns { number } Returns the SAK of the NFC-A tag. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getSak(): number; @@ -72,7 +74,8 @@ export interface NfcATag extends TagSession { * @returns { number[] } Returns the ATQA of the NFC-A tag. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getAtqa(): number[]; } @@ -94,7 +97,8 @@ export interface NfcATag extends TagSession { * @typedef NfcBTag * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NfcBTag extends TagSession { /** @@ -110,7 +114,8 @@ export interface NfcBTag extends TagSession { * @returns { number[] } Returns the application data of the tag. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getRespAppData(): number[]; @@ -127,7 +132,8 @@ export interface NfcBTag extends TagSession { * @returns { number[] } Returns the protocol information of the tag. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getRespProtocol(): number[]; } @@ -149,7 +155,8 @@ export interface NfcBTag extends TagSession { * @typedef NfcFTag * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NfcFTag extends TagSession { /** @@ -165,7 +172,8 @@ export interface NfcFTag extends TagSession { * @returns { number[] } Returns the system code. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getSystemCode(): number[]; @@ -182,7 +190,8 @@ export interface NfcFTag extends TagSession { * @returns { number[] } Returns the PMm. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getPmm(): number[]; } @@ -204,7 +213,8 @@ export interface NfcFTag extends TagSession { * @typedef NfcVTag * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NfcVTag extends TagSession { /** @@ -220,7 +230,8 @@ export interface NfcVTag extends TagSession { * @returns { number } Returns the response flags. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getResponseFlags(): number; @@ -237,7 +248,8 @@ export interface NfcVTag extends TagSession { * @returns { number } Returns the response flags. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getDsfId(): number; } @@ -255,7 +267,8 @@ export interface NfcVTag extends TagSession { * @typedef IsoDepTag * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface IsoDepTag extends TagSession { /** @@ -273,7 +286,8 @@ export interface IsoDepTag extends TagSession { * @returns { number[] } Returns the Historical bytes, the length could be 0. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getHistoricalBytes(): number[]; @@ -292,7 +306,8 @@ export interface IsoDepTag extends TagSession { * @returns { number[] } Returns HiLayer Response bytes, the length could be 0. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getHiLayerResponse(): number[]; @@ -324,7 +339,8 @@ export interface IsoDepTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ isExtendedApduSupported(): Promise<boolean>; @@ -356,7 +372,8 @@ export interface IsoDepTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isExtendedApduSupported(callback: AsyncCallback<boolean>): void; } @@ -374,7 +391,8 @@ export interface IsoDepTag extends TagSession { * @typedef NdefMessage * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NdefMessage { /** @@ -390,7 +408,8 @@ export interface NdefMessage { * @returns { tag.NdefRecord[] } Records the list of NDEF records. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getNdefRecords(): tag.NdefRecord[]; } @@ -408,7 +427,8 @@ export interface NdefMessage { * @typedef NdefTag * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NdefTag extends TagSession { /** @@ -424,7 +444,8 @@ export interface NdefTag extends TagSession { * @returns { tag.NfcForumType } The type of NDEF tag. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getNdefTagType(): tag.NfcForumType; @@ -441,7 +462,8 @@ export interface NdefTag extends TagSession { * @returns { NdefMessage } The instance of NdefMessage. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getNdefMessage(): NdefMessage; @@ -458,7 +480,8 @@ export interface NdefTag extends TagSession { * @returns { boolean } Returns true if the tag is writable, otherwise returns false. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isNdefWritable(): boolean; @@ -490,7 +513,8 @@ export interface NdefTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ readNdef(): Promise<NdefMessage>; @@ -522,7 +546,8 @@ export interface NdefTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readNdef(callback: AsyncCallback<NdefMessage>): void; @@ -556,7 +581,8 @@ export interface NdefTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ writeNdef(msg: NdefMessage): Promise<void>; @@ -590,7 +616,8 @@ export interface NdefTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ writeNdef(msg: NdefMessage, callback: AsyncCallback<void>): void; @@ -613,7 +640,8 @@ export interface NdefTag extends TagSession { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ canSetReadOnly(): boolean; @@ -645,7 +673,8 @@ export interface NdefTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ setReadOnly(): Promise<void>; @@ -677,7 +706,8 @@ export interface NdefTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setReadOnly(callback: AsyncCallback<void>): void; @@ -704,7 +734,8 @@ export interface NdefTag extends TagSession { * <br> 3. Parameter verification failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getNdefTagTypeString(type: tag.NfcForumType): string; } @@ -722,7 +753,8 @@ export interface NdefTag extends TagSession { * @typedef MifareClassicTag * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface MifareClassicTag extends TagSession { /** @@ -759,7 +791,8 @@ export interface MifareClassicTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ authenticateSector(sectorIndex: number, key: number[], isKeyA: boolean): Promise<void>; @@ -797,7 +830,8 @@ export interface MifareClassicTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ authenticateSector(sectorIndex: number, key: number[], isKeyA: boolean, callback: AsyncCallback<void>): void; @@ -831,7 +865,8 @@ export interface MifareClassicTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ readSingleBlock(blockIndex: number): Promise<number[]>; @@ -865,7 +900,8 @@ export interface MifareClassicTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readSingleBlock(blockIndex: number, callback: AsyncCallback<number[]>): void; @@ -901,7 +937,8 @@ export interface MifareClassicTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ writeSingleBlock(blockIndex: number, data: number[]): Promise<void>; @@ -937,7 +974,8 @@ export interface MifareClassicTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ writeSingleBlock(blockIndex: number, data: number[], callback: AsyncCallback<void>): void; @@ -973,7 +1011,8 @@ export interface MifareClassicTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ incrementBlock(blockIndex: number, value: number): Promise<void>; @@ -1009,7 +1048,8 @@ export interface MifareClassicTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ incrementBlock(blockIndex: number, value: number, callback: AsyncCallback<void>): void; @@ -1045,7 +1085,8 @@ export interface MifareClassicTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ decrementBlock(blockIndex: number, value: number): Promise<void>; @@ -1081,7 +1122,8 @@ export interface MifareClassicTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ decrementBlock(blockIndex: number, value: number, callback: AsyncCallback<void>): void; @@ -1115,7 +1157,8 @@ export interface MifareClassicTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ transferToBlock(blockIndex: number): Promise<void>; @@ -1149,7 +1192,8 @@ export interface MifareClassicTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ transferToBlock(blockIndex: number, callback: AsyncCallback<void>): void; @@ -1183,7 +1227,8 @@ export interface MifareClassicTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ restoreFromBlock(blockIndex: number): Promise<void>; @@ -1217,7 +1262,8 @@ export interface MifareClassicTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ restoreFromBlock(blockIndex: number, callback: AsyncCallback<void>): void; @@ -1234,7 +1280,8 @@ export interface MifareClassicTag extends TagSession { * @returns { number } Returns the number of sectors. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getSectorCount(): number; @@ -1261,7 +1308,8 @@ export interface MifareClassicTag extends TagSession { * <br> 3. Parameter verification failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getBlockCountInSector(sectorIndex: number): number; @@ -1278,7 +1326,8 @@ export interface MifareClassicTag extends TagSession { * @returns { tag.MifareClassicType } Returns type of MifareClassic tag. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getType(): tag.MifareClassicType; @@ -1295,7 +1344,8 @@ export interface MifareClassicTag extends TagSession { * @returns { number } Returns the size of the tag. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getTagSize(): number; @@ -1312,7 +1362,8 @@ export interface MifareClassicTag extends TagSession { * @returns { boolean } Returns true if tag is emulated, otherwise false. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isEmulatedTag(): boolean; @@ -1339,7 +1390,8 @@ export interface MifareClassicTag extends TagSession { * <br> 3. Parameter verification failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getBlockIndex(sectorIndex: number): number; @@ -1366,7 +1418,8 @@ export interface MifareClassicTag extends TagSession { * <br> 3. Parameter verification failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getSectorIndex(blockIndex: number): number; } @@ -1384,7 +1437,8 @@ export interface MifareClassicTag extends TagSession { * @typedef MifareUltralightTag * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface MifareUltralightTag extends TagSession { /** @@ -1417,7 +1471,8 @@ export interface MifareUltralightTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ readMultiplePages(pageIndex: number): Promise<number[]>; @@ -1451,7 +1506,8 @@ export interface MifareUltralightTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readMultiplePages(pageIndex: number, callback: AsyncCallback<number[]>): void; @@ -1487,7 +1543,8 @@ export interface MifareUltralightTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ writeSinglePage(pageIndex: number, data: number[]): Promise<void>; @@ -1523,7 +1580,8 @@ export interface MifareUltralightTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ writeSinglePage(pageIndex: number, data: number[], callback: AsyncCallback<void>): void; @@ -1540,7 +1598,8 @@ export interface MifareUltralightTag extends TagSession { * @returns { tag.MifareUltralightType } Returns the type of MifareUltralight tag. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getType(): tag.MifareUltralightType; } @@ -1558,7 +1617,8 @@ export interface MifareUltralightTag extends TagSession { * @typedef NdefFormatableTag * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NdefFormatableTag extends TagSession { /** @@ -1591,7 +1651,8 @@ export interface NdefFormatableTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ format(message: NdefMessage): Promise<void>; @@ -1625,7 +1686,8 @@ export interface NdefFormatableTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ format(message: NdefMessage, callback: AsyncCallback<void>): void; @@ -1659,7 +1721,8 @@ export interface NdefFormatableTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ formatReadOnly(message: NdefMessage): Promise<void>; @@ -1693,7 +1756,8 @@ export interface NdefFormatableTag extends TagSession { * @throws { BusinessError } 3100204 - The Tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ formatReadOnly(message: NdefMessage, callback: AsyncCallback<void>): void; } @@ -1705,7 +1769,8 @@ export interface NdefFormatableTag extends TagSession { * @typedef BarcodeTag * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ export interface BarcodeTag extends TagSession { /** @@ -1718,7 +1783,8 @@ export interface BarcodeTag extends TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getBarcode(): Promise<ArrayBuffer>; } \ No newline at end of file diff --git a/api/tag/tagSession.d.ts b/api/tag/tagSession.d.ts index f7f4785f2d9dfb58526c2dbc17aa937424c0cffd..8770edaf5da1869df885130f8039b84d6fbb2119 100644 --- a/api/tag/tagSession.d.ts +++ b/api/tag/tagSession.d.ts @@ -38,7 +38,8 @@ import { AsyncCallback } from '../@ohos.base'; * @typedef TagSession * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface TagSession { /** @@ -85,7 +86,8 @@ export interface TagSession { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ connect(): void; @@ -119,7 +121,8 @@ export interface TagSession { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ resetConnection(): void; @@ -150,7 +153,8 @@ export interface TagSession { * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isConnected(): boolean; @@ -197,7 +201,8 @@ export interface TagSession { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setTimeout(timeout: number): void; @@ -234,7 +239,8 @@ export interface TagSession { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getTimeout(): number; @@ -300,7 +306,8 @@ export interface TagSession { * @throws { BusinessError } 3100204 - The tag I/O operation failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ transmit(data: number[]): Promise<number[]>; @@ -373,7 +380,8 @@ export interface TagSession { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getMaxTransmitSize(): number; } diff --git a/api/wantAgent/triggerInfo.d.ts b/api/wantAgent/triggerInfo.d.ts index 97daf1c0de1dffb5ac5a6270f56e5e71ef901f3b..3e4c45086a59a8b6b0dd7a6336c8b21caf8a039a 100644 --- a/api/wantAgent/triggerInfo.d.ts +++ b/api/wantAgent/triggerInfo.d.ts @@ -34,7 +34,8 @@ import StartOptions from '../@ohos.app.ability.StartOptions'; * @typedef TriggerInfo * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface TriggerInfo { /** @@ -50,7 +51,8 @@ export interface TriggerInfo { * @type { number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ code: number; @@ -77,7 +79,8 @@ export interface TriggerInfo { * @type { ?Want } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ want?: Want; @@ -98,7 +101,8 @@ export interface TriggerInfo { * @type { ?string } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ permission?: string; @@ -134,7 +138,8 @@ export interface TriggerInfo { * @type { ?Record<string, Object> } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ extraInfos?: Record<string, Object>; @@ -145,7 +150,8 @@ export interface TriggerInfo { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ startOptions?: StartOptions; } diff --git a/api/wantAgent/wantAgentInfo.d.ts b/api/wantAgent/wantAgentInfo.d.ts index baefab4368775e78ae4a9fd6f1a19294cfd14002..eb4ade5ca674a11445c31457faea7f8a13948f41 100644 --- a/api/wantAgent/wantAgentInfo.d.ts +++ b/api/wantAgent/wantAgentInfo.d.ts @@ -35,7 +35,8 @@ import type abilityWantAgent from '../@ohos.app.ability.wantAgent'; * @typedef WantAgentInfo * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface WantAgentInfo { /** @@ -51,7 +52,8 @@ export interface WantAgentInfo { * @type { Array<Want> } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ wants: Array<Want>; @@ -89,7 +91,8 @@ export interface WantAgentInfo { * @type { ?abilityWantAgent.OperationType } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ actionType?: abilityWantAgent.OperationType; @@ -106,7 +109,8 @@ export interface WantAgentInfo { * @type { number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ requestCode: number; @@ -144,7 +148,8 @@ export interface WantAgentInfo { * @type { ?Array<abilityWantAgent.WantAgentFlags> } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ actionFlags?: Array<abilityWantAgent.WantAgentFlags>; @@ -163,7 +168,8 @@ export interface WantAgentInfo { * @type { ?object } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ extraInfo?: { [key: string]: any }; diff --git a/arkts/@arkts.collections.d.ets b/arkts/@arkts.collections.d.ets index 49ccadf01003194c2fabcc328bd5881e91308dc5..a9e2ac4633f18f69a91abc79cd1f8de93bee0b3f 100644 --- a/arkts/@arkts.collections.d.ets +++ b/arkts/@arkts.collections.d.ets @@ -36,7 +36,7 @@ import lang from './@arkts.lang' * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @arkts 1.1 & 1.2 */ declare namespace collections { /** @@ -51,11 +51,11 @@ declare namespace collections { * @since 12 */ /** - * Describes the mapping function of the ArkTS typed array. + * Callback function used in the typed Array's 'from' function. * * @typedef { function } TypedArrayFromMapFn - * @param { FromElementType } value - Element that is currently traversed and used to construct an ArkTS typed array. - * @param { number } index - Index of the element. + * @param { FromElementType } value - The value in the original array. + * @param { number } index - The index in the original array. * @returns { ToElementType } The transformed value. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -77,12 +77,13 @@ declare namespace collections { * @since 12 */ /** - * Describes the assertion function of the ArkTS typed array. + * Callback function used in typed Array functions which needs to determine + * whether some element satisfies the specified predicate test * * @typedef { function } TypedArrayPredicateFn - * @param { ElementType } value - Element that is being traversed in the ArkTS typed array. - * @param { number } index - Index of the element. - * @param { ArrayType } array - ArkTS typed array that is being traversed. + * @param { ElementType } value - The value of the element. + * @param { number } index - The index of the element. + * @param { ArrayType } array - The array that the element belongs to. * @returns { boolean } True if the value meets the predicate, otherwise false. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -103,12 +104,12 @@ declare namespace collections { * @since 12 */ /** - * Describes the traversal function of the ArkTS typed array. + * Callback function used in typed Array functions that perform specific action for each element. * * @typedef { function } TypedArrayForEachCallback - * @param { ElementType } value - Element that is being traversed in the ArkTS typed array. - * @param { number } index - Index of the element. - * @param { ArrayType } array - ArkTS typed array that is being traversed. + * @param { ElementType } value - The value of the element. + * @param { number } index - The index of the element. + * @param { ArrayType } array - The array that the element belongs to. * @syscap SystemCapability.Utils.Lang * @crossplatform * @atomicservice @@ -130,12 +131,13 @@ declare namespace collections { * @since 12 */ /** - * Describes the conversion mapping function of the ArkTS typed array. + * Callback function used in typed Array functions that perform specific action for each element and + * produce corresponding new element. * * @typedef { function } TypedArrayMapCallback - * @param { ElementType } value - Element that is being mapped in the ArkTS typed array. - * @param { number } index - Index of the element. - * @param { ArrayType } array - ArkTS typed array that is being mapped. + * @param { ElementType } value - The value of the element. + * @param { number } index - The index of the element. + * @param { ArrayType } array - The array that the element belongs to. * @returns { ElementType } The result of the mapping. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -158,13 +160,13 @@ declare namespace collections { * @since 12 */ /** - * Describes the reduce function of the ArkTS typed array. + * Callback function used in typed Array functions that require a reduction. * * @typedef { function } TypedArrayReduceCallback - * @param { AccType } previousValue - Accumulated value of the current traversal. - * @param { ElementType } currentValue - Element that is being traversed in the ArkTS typed array. - * @param { number } currentIndex - Index of the element. - * @param { ArrayType } array - ArkTS typed array that is being traversed. + * @param { AccType } previousValue - The accumulator value. + * @param { ElementType } currentValue - The current element being processed in the array. + * @param { number } currentIndex - The index of the current element being processed in the array. + * @param { ArrayType } array - The array that the element belongs to. * @returns { AccType } The result of the reduction. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -185,11 +187,11 @@ declare namespace collections { * @since 12 */ /** - * Describes the sort function of the ArkTS typed array. + * Callback function used in the typed Array's 'sort' function. * * @typedef { function } TypedArrayCompareFn - * @param { ElementType } first - First element to be compared. - * @param { ElementType } second - Second element to be compared. + * @param { ElementType } first - The first element of the comparison. + * @param { ElementType } second - The second element of the comparison. * @returns { number } The result of the comparison. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -198,11 +200,11 @@ declare namespace collections { */ type TypedArrayCompareFn<ElementType> = (first: ElementType, second: ElementType) => number; /** - * Defines the ArkTS Array reduction function, which is used by the 'from' API of the Array class. + * Callback function used in the Array's 'from' function. * * @typedef { function } ArrayFromMapFn - * @param { FromElementType } value - Element that is being processed. - * @param { number } index - Index of the element in the ArkTS array. + * @param { FromElementType } value - The value in the original array. + * @param { number } index - The index in the original array. * @returns { ToElementType } The transformed value. * @syscap SystemCapability.Utils.Lang * @atomicservice @@ -211,13 +213,13 @@ declare namespace collections { type ArrayFromMapFn<FromElementType, ToElementType> = (value: FromElementType, index: number) => ToElementType; /** - * Defines the ArkTS Array reduction function, which is used by the 'some' and 'every' - * APIs of the Array class to determine whether array elements meet certain test conditions. + * Callback function used in Array functions which needs to determine + * whether some element satisfies the specified predicate test * * @typedef { function } ArrayPredicateFn - * @param { ElementType } value - Element that is being processed. - * @param { number } index - Index of the element in the ArkTS array. - * @param { ArrayType } array - ArkTS array that is being traversed. + * @param { ElementType } value - The value of the element. + * @param { number } index - The index of the element. + * @param { ArrayType } array - The array that the element belongs to. * @returns { boolean } True if the value meets the predicate, otherwise false. * @syscap SystemCapability.Utils.Lang * @atomicservice @@ -227,13 +229,13 @@ declare namespace collections { (value: ElementType, index: number, array: ArrayType) => boolean; /** - * Defines the ArkTS Array reduction function, which is used by the 'reduceRight' API of the Array class. + * Callback function used in Array functions that require a reduction. * * @typedef { function } ArrayReduceCallback - * @param { AccType } previousValue - Accumulated value of the current traversal. - * @param { ElementType } currentValue - Element that is being traversed in the ArkTS array. - * @param { number } currentIndex - Index of the element in the ArkTS array. - * @param { ArrayType } array - ArkTS array that is being traversed. + * @param { AccType } previousValue - The accumulator value. + * @param { ElementType } currentValue - The current element being processed in the array. + * @param { number } currentIndex - The index of the current element being processed in the array. + * @param { ArrayType } array - The array that the element belongs to. * @returns { AccType } The result of the reduction. * @syscap SystemCapability.Utils.Lang * @atomicservice @@ -250,8 +252,7 @@ declare namespace collections { * @since 12 */ /** - * 'ISendable' is the parent type of all sendable types except null and undefined. - * It does not have any necessary methods or properties. + * Redefines ISendable for convenience. * * @typedef { lang.ISendable } ISendable * @syscap SystemCapability.Utils.Lang @@ -270,7 +271,7 @@ declare namespace collections { * @since 12 */ /** - * An array-like object that can be concatenated. This API extends 'ISendable'. + * Represents an array-like object that can be concatenated. * * @interface ConcatArray * @extends ISendable @@ -313,10 +314,10 @@ declare namespace collections { * @since 12 */ /** - * Returns the element at a given index in this ConcatArray. + * Returns the item at that index. * - * @param { number } index - Index of the element. The index starts from zero. - * If the passed-in index is less than 0 or greater than or equal to the value of 'length', an error is thrown. + * @param { number } index - The zero-based index of the desired code unit. + * Throws error if index < 0 or index >= array.length. * @returns { T } The element in the ConcatArray matching the given index. * @readonly * @throws { BusinessError } 401 - Parameter error. Illegal index. @@ -339,10 +340,10 @@ declare namespace collections { * @since 12 */ /** - * Concatenates all elements in this array into a string, with a given separator. + * Adds all the elements of an ArkTS ConcatArray into a string, separated by the specified separator string. * - * @param { string } [separator] - Separator to be used. If no value is passed in, - * a comma (,) is used as the separator. + * @param { string } [separator] - A string used to separate one element of the array from + * the next in the resulting string. If omitted, the array elements are separated with a comma. * @returns { string } A string with all array elements joined. * If ConcatArray.length is 0, the empty string is returned. * @throws { BusinessError } 401 - Parameter error. Invalid separator. @@ -367,12 +368,13 @@ declare namespace collections { * @since 12 */ /** - * Selects a range of elements in this array to create an array. + * Returns a copy of a section of an ArkTS ConcatArray. * - * @param { number } [start] - Start index of the range. If a negative number is passed in, - * it refers to the index of 'start + array.length' The default value is '0'. - * @param { number } [end] - End index of the range (exclusive). If a negative number is passed in, - * it refers to the index of 'end + array.length'. The default value is the length of the ArkTS array. + * @param { number } [start] - The beginning index of the specified portion of the array. + * If start is undefined, then the slice begins at index 0. + * @param { number } [end] - The end index of the specified portion of the array. + * This is exclusive of the element at the index 'end'. + * If end is undefined, then the slice extends to the end of the array. * @returns { ConcatArray<T> } A new ConcatArray containing the extracted elements. * @throws { BusinessError } 401 - Parameter error. Invalid `start` or `end` parameters. * @syscap SystemCapability.Utils.Lang @@ -394,10 +396,10 @@ declare namespace collections { * @since 12 */ /** - * A linear data structure that is implemented on arrays and can be passed between ArkTS concurrent instances. - * Pass-by-reference is recommended for better transfer performance. - * This section uses the following to identify the use of generics: - * T: type, which can be any of the sendable data types. + * Array is a data structure that stores a collection of elements. + * If multiple threads access a Array instance concurrently, + * and at least one of the threads modifies the array structurally, + * it must be synchronized externally. * * @implements ConcatArray<T> * @syscap SystemCapability.Utils.Lang @@ -440,10 +442,10 @@ declare namespace collections { * @since 12 */ /** - * Creates an ArkTS array of a fixed length, with each element set to a given initial value. + * Creates an ArkTS Array with arrayLength elements initialized to initialValue. * - * @param { number } arrayLength - Length of the ArkTS array. - * @param { T } initialValue - Initial value of each element in the ArkTS array. + * @param { number } arrayLength - The length of the array. + * @param { T } initialValue - Element initial value that will be filled into the Array. * @returns { Array<T> } A new Array instance * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The create method cannot be bound. @@ -466,9 +468,9 @@ declare namespace collections { * @since 12 */ /** - * Creates an ArkTS array from an array-like object. + * Creates an ArkTS Array from an array-like object. * - * @param { ArrayLike<T> } arrayLike - Array-like object. + * @param { ArrayLike<T> } arrayLike - An array-like object to convert to an ArkTS Array. * @returns { Array<T> } A new Array instance * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The from method cannot be bound. @@ -492,12 +494,11 @@ declare namespace collections { * @since 12 */ /** - * Creates an ArkTS array from an iterable object. + * Creates an ArkTS Array from an iterable object. * - * @param { Iterable<T> } iterable - Array-like object. + * @param { Iterable<T> } iterable - An iterable object to convert to an ArkTS Array. * @returns { Array<T> } A new Array instance - * @throws { BusinessError } 401 - Parameter error: Possible causes: 1. Mandatory parameters are left unspecified; - * 2. Incorrect parameter types; 3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The from method cannot be bound. * @static * @syscap SystemCapability.Utils.Lang @@ -507,13 +508,12 @@ declare namespace collections { */ static from<T>(iterable: Iterable<T>): Array<T>; /** - * Creates an ArkTS array from an array-like object, and uses a custom function to process each array element. + * Creates an ArkTS Array from an array-like object. * - * @param { ArrayLike<T> | Iterable<T> } arrayLike - Array-like object. - * @param { ArrayFromMapFn<T, T> } mapFn - Functions used to process the array elements. + * @param { ArrayLike<T> | Iterable<T> } arrayLike - An object to convert to an ArkTS Array. + * @param { ArrayFromMapFn<T, T> } mapFn - A mapping function to call on every element of the array. * @returns { Array<T> } A new Array instance - * @throws { BusinessError } 401 - Parameter error: Possible causes: 1. Mandatory parameters are left unspecified; - * 2. Incorrect parameter types; 3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The from method cannot be bound. * @static * @syscap SystemCapability.Utils.Lang @@ -522,14 +522,12 @@ declare namespace collections { */ static from<T>(arrayLike: ArrayLike<T> | Iterable<T>, mapFn: ArrayFromMapFn<T, T>): Array<T>; /** - * Creates an ArkTS array from an array-like object, and uses a custom function to process each array element. - * The type of the elements in the array-like object can be different from that of the array elements. + * Creates an ArkTS Array from an array-like object. * - * @param { ArrayLike<U> | Iterable<U> } arrayLike - Array-like object. - * @param { ArrayFromMapFn<U, T> } mapFn - Functions used to process the array elements. + * @param { ArrayLike<U> | Iterable<U> } arrayLike - An object to convert to an ArkTS Array. + * @param { ArrayFromMapFn<U, T> } mapFn - A mapping function to call on every element of the object. * @returns { Array<T> } A new Array instance - * @throws { BusinessError } 401 - Parameter error: Possible causes: 1. Mandatory parameters are left unspecified; - * 2. Incorrect parameter types; 3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The from method cannot be bound. * @static * @syscap SystemCapability.Utils.Lang @@ -546,7 +544,7 @@ declare namespace collections { * @since 12 */ /** - * A constructor used to create an empty ArkTS array. + * A constructor used to create an ArkTS Array. * * @throws { BusinessError } 10200012 - The Array's constructor cannot be directly invoked. * @syscap SystemCapability.Utils.Lang @@ -567,10 +565,10 @@ declare namespace collections { * @since 12 */ /** - * A constructor used to create an ArkTS array with the given elements. + * A constructor used to create an ArkTS Array. * - * @param { T } first - First element to be included in the ArkTS array. - * @param { T[] } left - Remaining elements to be included in the ArkTS array. + * @param { T } first - First element when initializing an ArkTS Array. + * @param { T[] } left - Left elements when initializing an ArkTS Array. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200012 - The Array's constructor cannot be directly invoked. * @syscap SystemCapability.Utils.Lang @@ -590,9 +588,9 @@ declare namespace collections { * @since 12 */ /** - * A constructor used to create an ArkTS array with the given elements. + * A constructor used to create an ArkTS Array. * - * @param { T[] } items - Elements to be included in the ArkTS array. + * @param { T[] } items - Elements when initializing an ArkTS Array. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200012 - The Array's constructor cannot be directly invoked. * @syscap SystemCapability.Utils.Lang @@ -613,8 +611,8 @@ declare namespace collections { * @since 12 */ /** - * Removes the last element from this ArkTS array and returns that element. - * If the array is empty, undefined is returned and the array does not change. + * Removes the last element from an ArkTS array and returns it. + * If the array is empty, undefined is returned and the array is not modified. * * @returns { T | undefined } - The removed element from the array; undefined if the array is empty. * @throws { BusinessError } 10200011 - The pop method cannot be bound. @@ -638,9 +636,9 @@ declare namespace collections { * @since 12 */ /** - * Adds one or more elements to the end of this ArkTS array and returns the new length of the array. + * Appends new elements to the end of an ArkTS Array, and returns the new length of the array. * - * @param { T[] } items - Elements to add. + * @param { T[] } items - New elements to add to the ArkTS array. * @returns { number } - The new length property of the object upon which the method was called. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The push method cannot be bound. @@ -665,10 +663,10 @@ declare namespace collections { * @since 12 */ /** - * Concatenates all elements in this ArkTS array into a string, with a given separator. + * Adds all the elements of an ArkTS Array into a string, separated by the specified separator string. * - * @param { string } [separator] - Separator to be used. If no value is passed in, - * a comma (,) is used as the separator. + * @param { string } [separator] - A string used to separate one element of the array from + * the next in the resulting string. If omitted, the array elements are separated with a comma. * @returns { string } A string with all array elements joined. If Array.length is 0, the empty string is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The join method cannot be bound. @@ -691,8 +689,8 @@ declare namespace collections { * @since 12 */ /** - * Removes the first element from this ArkTS array and returns that element. - * If the array is empty, undefined is returned and the array does not change. + * Removes the first element from an ArkTS Array and returns it. + * If the array is empty, undefined is returned and the array is not modified. * * @returns { T | undefined } The removed element from the array; undefined if the array is empty * @throws { BusinessError } 10200011 - The shift method cannot be bound. @@ -716,9 +714,9 @@ declare namespace collections { * @since 12 */ /** - * Adds one or more elements to the beginning of this ArkTS array and returns the new length of the array. + * Inserts new elements at the start of an array, and returns the new length of the array. * - * @param { T[] } items - Elements to add. + * @param { T[] } items - Elements to insert at the start of the array. * @returns { number } The new length property of the object upon which the method was called. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The unshift method cannot be bound. @@ -752,10 +750,11 @@ declare namespace collections { * For both start and end, a negative index can be used to indicate an offset from the end of the array. * For example, -2 refers to the second to last element of the array. * - * @param { number } [start] - Start index of the range. If a negative number is passed in, - * it refers to the index of start + array.length. The default value is 0. - * @param { number } [end] - End index of the range (exclusive). If a negative number is passed in, - * it refers to the index of end + array.length. The default value is the length of the ArkTS array. + * @param { number } [start] - The beginning index of the specified portion of the array. + * If start is undefined, then the slice begins at index 0. + * @param { number } [end] - The end index of the specified portion of the array. + * This is exclusive of the element at the index 'end'. + * If end is undefined, then the slice extends to the end of the array. * @returns { Array<T> } A new array containing the extracted elements. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The slice method cannot be bound. @@ -781,7 +780,7 @@ declare namespace collections { * @since 12 */ /** - * Sorts elements in this ArkTS array and returns a new array. + * Sorts an array in place. This method mutates the array and returns a reference to the same array. * * @param { function } [compareFn] - Function used to determine the order of the elements. It is expected to return * a negative value if the first argument is less than the second argument, zero if they're equal, @@ -811,11 +810,11 @@ declare namespace collections { * @since 12 */ /** - * Returns the index of the first occurrence of a value in this ArkTS Array. - * If the value is not found, -1 is returned. + * Returns the index of the first occurrence of a value in an ArkTS Array, or -1 if it is not present. * - * @param { T } searchElement - Value to search for. - * @param { number } [fromIndex] - Index from which the search starts. The default value is 0. + * @param { T } searchElement - The value to locate in the array. + * @param { number } [fromIndex] - The array index at which to begin the search. + * If fromIndex is omitted, the search starts at index 0. * @returns { number } The first index of searchElement in the array; -1 if not found. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The indexOf method cannot be bound. @@ -839,9 +838,10 @@ declare namespace collections { * @since 12 */ /** - * Calls a callback function for each element in this ArkTS Array. + * Executes a provided function once for each value in the Array object. * - * @param { function } callbackFn - Callback function to run for each element. + * @param { function } callbackFn - A function that accepts up to three arguments. + * The function to be called for each element. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The forEach method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -866,10 +866,11 @@ declare namespace collections { * @since 12 */ /** - * Calls a callback function for each element in this ArkTS Array and returns a new array that - * contains the result of the callback function. + * Calls a defined callback function on each element of an ArkTS Array, + * and returns an array that contains the results. * - * @param { function } callbackFn - Callback function to run for each element. + * @param { function } callbackFn - A function that accepts up to three arguments. + * The map method calls the callbackFn function one time for each element in the array. * @returns { Array<U> } A new array with each element being the result of the callback function. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The map method cannot be bound. @@ -895,11 +896,10 @@ declare namespace collections { * @since 12 */ /** - * Returns a new array containing all elements that pass a test provided by a callback function. + * Returns the elements of an ArkTS Array that meet the condition specified in a callback function. * - * @param { function } predicate - Function that takes three arguments. It is used to filter elements. - * The value true means that the current element passes the test and should be retained in the new array. - * The value false means that the current element fails the test and should be excluded from the new array. + * @param { function } predicate - A function that accepts up to three arguments. + * The filter method calls the predicate function one time for each element in the array. * @returns { Array<T> } A shallow copy of the given containing just the elements that pass the test. * If no elements pass the test, an empty array is returned. * @throws { BusinessError } 401 - Parameter error. @@ -932,8 +932,8 @@ declare namespace collections { * The return value of the callback function is the accumulated result, * and is provided as an argument in the next call to the callback function. * - * @param { function } callbackFn - Function that takes four arguments. - * It performs an operation on each element and passes the result as an accumulated value to the next element. + * @param { function } callbackFn - A function that accepts up to four arguments. + * The reduce method calls the callbackFn function one time for each element in the array. * @returns { T } The value that results from running the "reducer" callback function to * completion over the entire array. * @throws { BusinessError } 401 - Parameter error. @@ -969,9 +969,11 @@ declare namespace collections { * The return value of the callback function is the accumulated result, * and is provided as an argument in the next call to the callback function. * - * @param { function } callbackFn - Function that takes four arguments. - * It performs an operation on each element and passes the result as an accumulated value to the next element. - * @param { U } initialValue - Initial value of the accumulator. + * @param { function } callbackFn - A function that accepts up to four arguments. + * The reduce method calls the callbackFn function one time for each element in the array. + * @param { U } initialValue - If initialValue is specified, + * it is used as the initial value to start the accumulation. + * The first call to the callbackFn function provides this value as an argument instead of an array value. * @returns { U } The value that results from running the "reducer" callback function to * completion over the entire array. * @throws { BusinessError } 401 - Parameter error. @@ -1002,10 +1004,10 @@ declare namespace collections { * @since 12 */ /** - * Returns the element at a given index in this ArkTS array. + * Returns the item located at the specified index. * - * @param { number } index - Index of the element. The index in an array always starts from 0 and is an integer. - * If a negative number is passed in, it refers to the index of index + array.length. + * @param { number } index - The zero-based index of the desired code unit. + * A negative index will count back from the last item. * @returns { T | undefined } The element in the array matching the given index. * Always returns undefined if index < -array.length or index >= array.length without * attempting to access the corresponding property. @@ -1028,7 +1030,7 @@ declare namespace collections { * @since 12 */ /** - * Obtains an iterator, each item of which is a JavaScript object. + * Returns an iterator that can be used to iterate over elements of type T. * * @returns { IterableIterator<T> } Iterator object. * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. @@ -1049,7 +1051,7 @@ declare namespace collections { * @since 12 */ /** - * Returns an iterator object that contains the key-value pair of each element in this ArkTS array. + * Returns an iterable of key, value pairs for every entry in the array * * @returns { IterableIterator<[number, T]> } A new iterable iterator object. * @throws { BusinessError } 10200011 - The entries method cannot be bound. @@ -1071,7 +1073,7 @@ declare namespace collections { * @since 12 */ /** - * Returns an iterator object that contains the key of each element in this ArkTS array. + * Returns an iterable of keys in the array * * @returns { IterableIterator<number> } A new iterable iterator object. * @throws { BusinessError } 10200011 - The keys method cannot be bound. @@ -1093,7 +1095,7 @@ declare namespace collections { * @since 12 */ /** - * Returns an iterator object that contains the value of each element in this ArkTS array. + * Returns an iterable of values in the array * * @returns { IterableIterator<T> } A new iterable iterator object. * @throws { BusinessError } 10200011 - The values method cannot be bound. @@ -1121,14 +1123,12 @@ declare namespace collections { * @since 12 */ /** - * Returns the value of the first element that passes a test provided by a callback function. - * If none of the elements pass the test, undefined is returned. + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. * - * @param { function } predicate - Function that takes three arguments. It is used to filter elements. - * The value true means that the current element meets the conditions, the traversal stops, - * and that element is returned. The value false means that the current element does not meet the condition, - * and the traversal continues until the element that meets the condition is found - * or the entire array is traversed. + * @param { function } predicate - Find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. + * If such an element is found, find immediately returns that element value. Otherwise, find returns undefined. * @returns { T | undefined } The first element in the array that satisfies the provided testing function. * Otherwise, undefined is returned. * @throws { BusinessError } 401 - Parameter error. @@ -1155,10 +1155,10 @@ declare namespace collections { * @since 12 */ /** - * Checks whether this ArkTS array contains an element and returns a Boolean value. + * Determines whether an array includes a certain element, returning true or false as appropriate. * - * @param { T } searchElement - Element to search for. - * @param { number } [fromIndex] - Index from which the search starts. The default value is 0. + * @param { T } searchElement - The element to search for. + * @param { number } [fromIndex] - The position in this array at which to begin searching for searchElement. * @returns { boolean } A boolean value which is true if the value searchElement is found within * the array (or the part of the array indicated by the index fromIndex, if specified). * @throws { BusinessError } 401 - Parameter error. @@ -1186,14 +1186,12 @@ declare namespace collections { * @since 12 */ /** - * Returns the index of the first element that passes a test provided by a callback function. - * If none of the elements pass the test, -1 is returned. + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. * - * @param { function } predicate - Function that takes three arguments. It is used to filter elements. - * The value true means that the current element meets the conditions, the traversal stops, - * and the index of that element is returned. The value false means that the current element does not - * meet the condition, and the traversal continues until the element that meets the condition is found - * or the entire array is traversed. + * @param { function } predicate - Find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. * @returns { number } The index of the first element in the array that passes the test. Otherwise, -1; * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The findIndex method cannot be bound. @@ -1221,12 +1219,13 @@ declare namespace collections { * @since 12 */ /** - * Fills elements in the specified range of this ArkTS array with a given value. + * Returns the this object after filling the section identified by start and end with value * - * @param { T } value - Value to fill in. - * @param { number } [start] - Start index of the range. The default value is 0. - * @param { number } [end] - End index of the range (exclusive). If no value is passed in, - * it refers to the last element of the array. + * @param { T } value - Value to fill array section with + * @param { number } [start] - Index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param { number } [end] - Index to stop filling the array at. If end is negative, it is treated as + * length+end. * @returns { Array<T> } The modified array, filled with value. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The fill method cannot be bound. @@ -1251,10 +1250,11 @@ declare namespace collections { * @since 12 */ /** - * Shrinks this ArkTS array to a given length. + * Shrinks the ArkTS array to the given arrayLength. * - * @param { number } arrayLength - New length of the array. - * If a value greater than or equal to the current array length is passed in, the array does not change. + * @param { number } arrayLength - The new Array length. + * Throws error when arrayLength < 0 or arrayLength > 2^32. + * If arrayLength > array.length, array remains unchanged. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The shrinkTo method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -1280,11 +1280,13 @@ declare namespace collections { * @since 12 */ /** - * Extends this array to a given length by adding elements with the specified initial value. + * Extends the ArkTS array to the given arrayLength, + * and appends new elements with given initialValue up to the arrayLength. * - * @param { number } arrayLength - New length of the array. - * If a value less than or equal to the current array length is passed in, the array does not change. - * @param { T } initialValue - Initial value of the elements to be added. + * @param { number } arrayLength - The new Array length. + * Throws error when arrayLength < 0 or arrayLength > 2^32. + * If arrayLength < array.length, array remains unchanged. + * @param { T } initialValue - Element initial value that will be appended to the array. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The extendTo method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -1307,10 +1309,10 @@ declare namespace collections { * @since 12 */ /** - * Returns the element at a given index in this array. + * Returns the item at that index. * - * @param { number } index - Index of the element. The index starts from zero. - * If the passed-in index is less than 0 or greater than or equal to the value of length, an error is thrown. + * @param { number } index - The zero-based index of the desired code unit. + * Throws error if index < 0 or index >= array.length. * @returns { T } The element in the array matching the given index. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200001 - The value of index is out of range. @@ -1333,9 +1335,9 @@ declare namespace collections { * @since 12 */ /** - * Concatenates this ArkTS array with one or more arrays. + * Concatenates two or more arrays. * - * @param { ConcatArray<T>[] } items - Arrays to concatenate. + * @param { ConcatArray<T>[] } items - The arrays to concatenate. * @returns { Array<T> } A new array containing the elements of the concatenated arrays. * @throws { BusinessError } 401 - Parameter error. Not a valid array. * @throws { BusinessError } 10200011 - The concat method cannot be bound. @@ -1362,10 +1364,10 @@ declare namespace collections { * @since 12 */ /** - * Removes elements from a specified position in an array. + * Removes elements from the array at the specified position. * - * @param { number } start - Index from which the removal starts. If -array.length =< start < 0, - * the removal starts from start + array.length. If start < -array.length, the removal starts from 0. + * @param { number } start - The zero-based index at which to start changing the contents of the array. + * All the elements from start to the end of the array will be deleted. * @returns { Array<T> } An array containing the deleted elements. * @throws { BusinessError } 401 - Parameter error.Possible causes: * 1.Mandatory parameters are left unspecified. @@ -1397,13 +1399,13 @@ declare namespace collections { * @since 12 */ /** - * Removes elements from a specified position in an array, and inserts new elements from the same position. + * Removes elements from the array and, if necessary, inserts new elements at the specified position. * - * @param { number } start - Index from which the removal starts. If -array.length =< start < 0, - * the removal starts from start + array.length. If start < -array.length, the removal starts from 0. - * @param { number } deleteCount - Number of elements to remove. - * @param { T[] } items - New elements to insert from the start position. - * If no value is passed in, only the elements in the array are removed. + * @param { number } start - The zero-based index at which to start changing the contents of the array. + * @param { number } deleteCount - The number of elements to remove from the array, + * starting at the index specified by the start parameter. + * @param { T[] } items - An array of elements to insert into the array, + * starting at the index specified by the start parameter. * @returns { Array<T> } An array containing the deleted elements. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified. @@ -1417,14 +1419,12 @@ declare namespace collections { */ splice(start: number, deleteCount: number, ...items: T[]): Array<T>; /** - * Check whether the input parameter is an ArkTS array. + * Check whether the value is an ArkTs Array. * - * @param { Object|undefined|null } value - Value to check. + * @param { Object|undefined|null } value - The value to be checked.. * @returns { boolean } Returns true if the value is an array; otherwise, returns false. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * 1. Mandatory parameters are left unspecified. - * 2. Incorrect parameter types. - * 3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + * <br>2. Incorrect parameter types; 3. Parameter verification failed. * @static * @syscap SystemCapability.Utils.Lang * @atomicservice @@ -1432,15 +1432,12 @@ declare namespace collections { */ static isArray(value: Object | undefined | null): boolean; /** - * Creates an ArkTS array with a variable number of parameters. + * Create an ArkTs Array containing these parameters. * - * @param { T[] } items - Array of elements used to create the array. - * The number of elements can be zero, one, or more. + * @param { T[] } items - A variable number of arguments that will be used as the elements of the new array. * @returns { Array<T> } Returns a new Array instance containing the specified elements. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * 1. Mandatory parameters are left unspecified. - * 2. Incorrect parameter types. - * 3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + * <br>2. Incorrect parameter types; 3. Parameter verification failed. * @static * @syscap SystemCapability.Utils.Lang * @atomicservice @@ -1448,18 +1445,14 @@ declare namespace collections { */ static of<T>(...items: T[]): Array<T>; /** - * Copies elements within a given range from this ArkTS array to another position in sequence. + * Copy elements inside an ArkTs Array and move them to another location. * - * @param { number } target - Index to copy the elements to. - * @param { number } start - Start index of the range. If a negative number is passed in, - * it refers to the index of start + array.length. - * @param { number } end - End index of the range. If a negative number is passed in, - * it refers to the index of end + array.length. The default value is the length of the ArkTS array. + * @param { number } target - The index at which to copy the elements. + * @param { number } start - The index to start copying elements from (default is 0). + * @param { number } end - The index to stop copying elements (default is the array's length). * @returns { Array<T> } Returns the modified array after the copy operation. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * 1. Mandatory parameters are left unspecified. - * 2. Incorrect parameter types. - * 3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + * <br>2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 10200011 - The copyWithin method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang @@ -1468,7 +1461,7 @@ declare namespace collections { */ copyWithin(target: number, start: number, end?: number): Array<T>; /** - * Reverses elements in this ArkTS array and returns a reference to the same array. + * Reverses the elements in an Array. * * @returns { Array<T> } The reference to the original typed array, now reversed. * <br>Note that the typed array is reversed in place, and no copy is made. @@ -1480,12 +1473,11 @@ declare namespace collections { */ reverse(): Array<T>; /** - * Obtains the index of the last occurrence of the specified value in in this ArkTS array. + * Find the last occurrence of a specified element in an ArkTs Array. * - * @param { T } searchElement - Value to search for. - * @param { number } fromIndex - Index from which the search starts. The default value is 0. - * If the index is greater than or equal to the length of the ArkTS array, -1 is returned. - * If a negative number is passed in, it refers to the index of fromIndex + array.length. + * @param { T } searchElement - Element to search for in the array.. + * @param { number } fromIndex - The index at which to start the search. The default is the last + * index of the array. <br>If this index is negative, it is treated as array.length + fromIndex. * @returns { number } Returns the last index of the specified element if found; otherwise, returns -1. * @throws { BusinessError } 10200001 - The value of fromIndex or toIndex is out of range. * @throws { BusinessError } 10200011 - The lastIndexOf method cannot be bound. @@ -1496,9 +1488,9 @@ declare namespace collections { */ lastIndexOf(searchElement: T, fromIndex?: number): number; /** - * Checks whether all elements in this ArkTS array meet a given condition. + * Tests whether all elements in an ArkTs Array meets a specified condition. * - * @param { ArrayPredicateFn<T, Array<T>> } predicate - Assertion function used for the test. + * @param { ArrayPredicateFn<T, Array<T>> } predicate - A function that is called for each element in the array. * @returns { boolean } Returns true if the callback function returns a truthy value for every element; * <br>otherwise, it returns false. If the array is empty, it returns true. * @throws { BusinessError } 10200011 - The every method cannot be bound. @@ -1509,9 +1501,9 @@ declare namespace collections { */ every(predicate: ArrayPredicateFn<T, Array<T>>): boolean; /** - * Checks whether this ArkTS array contains an element that meets certain conditions. + * Test whether at least one element in an ArkTs Array meets a specified condition. * - * @param { ArrayPredicateFn<T, Array<T> } predicate - Assertion function used for the test. + * @param { ArrayPredicateFn<T, Array<T> } predicate - A function that is called for each element in the array. * @returns { boolean } Returns true if the callback function returns a truthy value for any element; * <br>otherwise, it returns false. If the array is empty, it returns false. * @throws { BusinessError } 10200011 - The some method cannot be bound. @@ -1522,7 +1514,7 @@ declare namespace collections { */ some(predicate: ArrayPredicateFn<T, Array<T>>): boolean; /** - * Converts an ArkTS array into a string. + * Convert an ArkTs Array to a string. * * @returns { string } Returns a string representing the specified array and its elements, separated by commas. * @throws { BusinessError } 10200011 - The toString method cannot be bound. @@ -1533,9 +1525,7 @@ declare namespace collections { */ toString(): string; /** - * Generates a string that matches the cultural conversions of the current system locale. - * Each element converts itself to a string via its toLocaleString API, and these strings are then joined - * together in sequence with commas (,). + * Convert an ArkTs Array to a string, The elements are converted to string using their toLocaleString methods. * * @returns { string } Returns a string representing the specified array and its elements, separated by commas. * @throws { BusinessError } 10200011 - The toLocaleString method cannot be bound. @@ -1548,8 +1538,8 @@ declare namespace collections { /** * Reduce elements in an ArkTs Array from right to left. * - * @param { ArrayReduceCallback<U, T, Array<T>> } callbackFn - Function that takes four arguments. - * It performs an operation on each element and passes the result as an accumulated value to the next element. + * @param { ArrayReduceCallback<U, T, Array<T>> } callbackFn - A function that is called for each element + * in the array. * @param { U } initialValue - A value to use as the first argument to the first call of the callback. * <br>If no initial value is provided, the last element of the array will be used, * <br>and the callback will start with the second-to-last element. @@ -1567,8 +1557,8 @@ declare namespace collections { /** * Reduce elements in an ArkTs Array from right to left. * - * @param { ArrayReduceCallback<T, T, Array<T>> } callbackFn - Function that takes four arguments. - * It performs an operation on each element and passes the result as an accumulated value to the next element. + * @param { ArrayReduceCallback<T, T, Array<T>> } callbackFn - A function that is called for each element + * in the array. * @returns { T } Returns the single value that results from the reduction. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified. @@ -3511,7 +3501,7 @@ declare namespace collections { } /** - * The Uint8ClampedArray typed array represents an array of 8-bit unsigned integers clamped to 0–255. + * The Uint8ClampedArray typed array represents an array of 8-bit unsigned integers clamped to 0-255. * The contents are initialized to 0. * If multiple threads access a Uint8ClampedArray instance concurrently, * and at least one of the threads modifies the array structurally, @@ -3522,7 +3512,7 @@ declare namespace collections { * @since 12 */ /** - * The Uint8ClampedArray typed array represents an array of 8-bit unsigned integers clamped to 0–255. + * The Uint8ClampedArray typed array represents an array of 8-bit unsigned integers clamped to 0-255. * The contents are initialized to 0. * If multiple threads access a Uint8ClampedArray instance concurrently, * and at least one of the threads modifies the array structurally, @@ -11691,7 +11681,6 @@ declare namespace collections { */ static of(...items: number[]): Float32Array; } - /** * An ordered collections of bit values, which are either 0 or 1. * If multiple threads access a BitVector instance concurrently, diff --git a/build-tools/package_tools/.gitignore b/build-tools/package_tools/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..938479ff0fbade6dcfc52235ae86751f1e70814d --- /dev/null +++ b/build-tools/package_tools/.gitignore @@ -0,0 +1,3 @@ +package-lock.json +node_modules/ +package/ \ No newline at end of file diff --git a/build-tools/package_tools/main.ts b/build-tools/package_tools/main.ts new file mode 100644 index 0000000000000000000000000000000000000000..07b263e20cc95cc4d9a6e1f29df92492e349b516 --- /dev/null +++ b/build-tools/package_tools/main.ts @@ -0,0 +1,28 @@ +/* + * 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. + */ + +// import { Command } from "commander"; +// import { PackagingType } from "./model/Enums"; +// import { makePackagingOption } from "./utils/utils"; +import { packagingEntry } from "./src/PackagingEntry"; + +function main(type: string, inputDir: string, outputDir?: string): void { + // const program: Command = makePackagingOption('package_tools', '1.0.0', packagingEntry); + // program.parse(process.argv); + packagingEntry(type, inputDir, outputDir); +} + +// node package_tools.js type inputDir outputDir +main(process.argv[2], process.argv[3], process.argv[4]); \ No newline at end of file diff --git a/build-tools/package_tools/model/Constants.ts b/build-tools/package_tools/model/Constants.ts new file mode 100644 index 0000000000000000000000000000000000000000..5e61c2d4af17c588e2e4db0ffc2de5aeefa741b2 --- /dev/null +++ b/build-tools/package_tools/model/Constants.ts @@ -0,0 +1,62 @@ +/* + * 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. + */ + +import ts from "typescript"; +import { OperateType } from "./Enums"; + +export const OPERATE_MESSAGE_MAP: Map<string, string> = new Map<string, string>([ + [OperateType.DELETE_FILE, 'delete file message, reson $2'] + // TODO +]) + +export class fileDir { + // 处理的目录类型,ets代表处理的是1.1目录,ets2代表处理的是1.2目录里有@arkts 1.1&1.2标签的文件, + // noTagInEts2代表处理的是1.2目录里无标签的文件 + // static readonly DirType = { + // 'typeOne': 'ets', + // 'typeTwo': 'ets2', + // 'typeThree': 'noTagInEts2', + // }; + + // 1.2SDK兼容行打包方案过滤文件 + static readonly API_NO_TAGS_FILTER_LIST = [ + '@arkts.collections.d.ets', + '@arkts.lang.d.ets', + '@arkts.utils.d.ets' + ]; + + // 无需处理的文件路径 + static readonly NOT_COPY_DIR = ['build-tools', '.git', '.gitee']; + + // 所有API的节点类型 + static readonly apiNodeTypeArr = [ + ts.SyntaxKind.VariableStatement, + ts.SyntaxKind.MethodDeclaration, + ts.SyntaxKind.MethodSignature, + ts.SyntaxKind.FunctionDeclaration, + ts.SyntaxKind.Constructor, + ts.SyntaxKind.ConstructSignature, + ts.SyntaxKind.CallSignature, + ts.SyntaxKind.PropertyDeclaration, + ts.SyntaxKind.PropertySignature, + ts.SyntaxKind.EnumMember, + ts.SyntaxKind.EnumDeclaration, + ts.SyntaxKind.TypeAliasDeclaration, + ts.SyntaxKind.ClassDeclaration, + ts.SyntaxKind.InterfaceDeclaration, + ts.SyntaxKind.ModuleDeclaration, + ts.SyntaxKind.StructDeclaration + ]; +} \ No newline at end of file diff --git a/build-tools/package_tools/model/Enums.ts b/build-tools/package_tools/model/Enums.ts new file mode 100644 index 0000000000000000000000000000000000000000..6f78ccc91ab3742437ad9babadc13d4d0919ede1 --- /dev/null +++ b/build-tools/package_tools/model/Enums.ts @@ -0,0 +1,43 @@ +/* + * 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. + */ + +export enum PackagingType { + ETS = 'ets', + ETS2 = 'ets2', + NO_TAG_IN_ETS2 = 'noTagInEts2' +} + +export enum PackagingModelType { + ETS = 'ets', + ETS2 = 'ets2', + BOTH = 'both' +} + +export enum LogType { + INFO = 'info', + ERROR = 'error' +} + +export enum OperateType { + DELETE_FILE = 'delete_file', + COPY_FILE = 'copy_file', + DELETE_IF_STATEMENT = 'delete_if_statement', + ADD_USE_STATIC = 'add_use_static', + DELETE_ARKTS_TAG = 'delete_arkts_tag', + UPDATE_SINCE_TAG = 'update_since_tag', + DELETE_HISTORY_JSDOC = 'delete_history_jsdoc', + DELETE_DEPRECATED_API = 'delete_deprecated_api' + // TODO +} \ No newline at end of file diff --git a/build-tools/package_tools/model/FileModify.ts b/build-tools/package_tools/model/FileModify.ts new file mode 100644 index 0000000000000000000000000000000000000000..d8f7cc6105f44697d9112acbd1f10ab47deeb6f7 --- /dev/null +++ b/build-tools/package_tools/model/FileModify.ts @@ -0,0 +1,321 @@ +/* + * 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. + */ +import fs from 'fs'; +import path from 'path'; +import ts from 'typescript'; +import { PackagingType } from '../model/Enums'; +import { packagingEntry } from '../src/PackagingEntry'; + +export class getFile { + /** + * 判断文件是否为空 + * @param {*} node + */ + public static isEmptyFile(node: ts.Node) { + let isEmpty = true; + if (ts.isSourceFile(node) && node.statements) { + const needExportName = new Set(); + for (let i = 0; i < node.statements.length; i++) { + const statement = node.statements[i]; + if (ts.isExportDeclaration(statement) && statement.moduleSpecifier) { + isEmpty = false; + break; + } + if (this.judgeExportHasImport(statement, needExportName)) { + continue; + } + isEmpty = false; + break; + } + } + return isEmpty; + } + + /** + * 判断import节点和export节点。 + * 当前文本如果还有其他节点则不能删除, + * 如果只有import和export则判断是否export导出import节点 + * + * @param {*} statement + * @param {*} needExportName + * @returns + */ + public static judgeExportHasImport(statement: ts.Statement, needExportName: Set<any>) { + if (ts.isImportDeclaration(statement)) { + this.processImportDeclaration(statement, needExportName); + return true; + } else if (ts.isExportAssignment(statement) && + !needExportName.has(statement.expression.getText().toString())) { + return true; + } else if (ts.isExportDeclaration(statement)) { + return !statement.exportClause?.elements.some((element) => { + const exportName = element.propertyName ? + element.propertyName.escapedText.toString() : + element.name.escapedText.toString(); + return needExportName.has(exportName); + }); + } + return false; + } + + /** + * + * @param { string } apiPath 需要处理的api文件所在路径 + * @param { string } rootPath ets文件夹路径 + * @returns { Set<string> } 需要处理的api文件的相对于ets目录的路径 + */ + public static getApiFileName(apiPath: string, rootPath: string, allApiFilePathSet: Set<string>) { + const apiFilePathSet = new Set(); + const fileNames = fs.readdirSync(apiPath); + + fileNames.forEach(fileName => { + const apiFilePath = path.join(apiPath, fileName).replace(/\\/g, '/'); + const stat = fs.statSync(apiFilePath); + + if (stat.isDirectory()) { + this.getApiFileName(apiFilePath, rootPath, allApiFilePathSet); + } else { + const apiRelativePath = apiFilePath.replace(rootPath, ''); + allApiFilePathSet.add(apiRelativePath); + } + }); + + return apiFilePathSet; + } + + public static processImportDeclaration(statement: ts.Statement, needExportName: Set<string>) { + const importClause = statement.importClause; + if (!ts.isImportClause(importClause)) { + return; + } + if (importClause.name) { + needExportName.add(importClause.name.escapedText.toString()); + } + const namedBindings = importClause.namedBindings; + if (namedBindings !== undefined && ts.isNamedImports(namedBindings)) { + const elements = namedBindings.elements; + elements.forEach((element) => { + const exportName = element.propertyName ? + element.propertyName.escapedText.toString() : + element.name.escapedText.toString(); + needExportName.add(exportName); + }); + } + } + + /** + * + * @param { string } path 需要处理的api文件所在路径 + * @returns { boolean } 文件是否是ets类型 + */ + public static isEtsFile(path: string) { + return path.endsWith('d.ets'); + } + + /** + * + * @param { string } path 需要处理的api文件所在路径 + * @returns { boolean } 文件是否是ts类型 + */ + public static isTsFile(path: string) { + return path.endsWith('d.ts'); + } + + /** + * + * @param { string } path 需要处理的api文件所在路径 + * @returns { boolean } 验证是否存在ets类型文件 + */ + public static hasEtsFile(path: string) { + // 为StateManagement.d.ts设定白名单,在1.2打包的时候在Linux上有大小写不同的重名,碰到直接返回true + // TODO:白名单提出去 + if (path.includes('StateManagement.d.ts')) { + console.log('StateManagement.d.ts is in white list, return true. path = ', path); + return true; + } else { + return fs.existsSync(path.replace(/\.d\.[e]?ts$/g, '.d.ets')); + } + } + + /** + * + * @param { string } path 需要处理的api文件所在路径 + * @returns { boolean } 验证是否存在ts类型文件 + */ + public static hasTsFile(path: string) { + return fs.existsSync(path.replace(/\.d\.[e]?ts$/g, '.d.ts')); + } + + /** + * 判断新生成的文件内容有没有版权头 + * + * @param {*} fileText 新生成的文件内容 + * @returns + */ + public static hasCopyright(fileText: string) { + return /http(\:|\?:)\/\/www(\.|\/)apache\.org\/licenses\/LICENSE\-2\.0 | Copyright\s*\(c\)/gi.test(fileText); + } + + /** + * 判断node节点中是否有famodelonly/deprecated/arkts <=1.1标签 + * + * @param {*} node + * @returns + */ + public static judgeIsDeleteApi(node: ts.Node, dirType: string) { + const notesContent = node.getFullText().replace(node.getText(), '').replace(/[\s]/g, ''); + const notesArr = notesContent.split(/\/\*\*/); + const notesStr = notesArr[notesArr.length - 1]; + const sinceArr = notesStr.match(/@since\d+/); + let sinceVersion = 20; + + if (dirType === PackagingType.ETS) { + return /@arkts1.2/g.test(notesStr); + } + + if (sinceArr) { + sinceVersion = Number(sinceArr[0].replace('@since', '')); + } + + if (dirType === PackagingType.ETS2) { + return (/@deprecated/g.test(notesStr) && sinceVersion < 20) || /@arkts<=1.1/g.test(notesStr); + } + + if (dirType === PackagingType.NO_TAG_IN_ETS2) { + return !/@arkts1.2|@arkts1.1&1.2/g.test(notesStr); + } + + return false; + } + + + /** + * @param firstNode 获取的第一个node节点 + * @returns fileJSDoc + */ + public static getFileJsdoc(firstNode: ts.Node) { + const firstNodeJSDoc = firstNode.getFullText().replace(firstNode.getText(), ''); + const jsdocs = firstNodeJSDoc.split('*/'); + let fileJSDoc = ''; + for (let i = 0; i < jsdocs.length; i++) { + const jsdoc = jsdocs[i]; + if (/\@file/.test(jsdoc)) { + fileJSDoc = jsdoc; + break; + } + } + return fileJSDoc; + } +} + +export class writeFile { + /** + * + * @param { string } path 输出文件的路径 + * @param { string } path 需要文件内容 + */ + public static rewriteFileType(outputPath: string, fileContent: string) { + const outputDir = path.dirname(outputPath); + let newPath = outputPath; + let dirType = ''; + if (!fs.existsSync(outputDir)) { + fs.mkdirSync(outputDir, { recursive: true }); + } + + if (dirType !== PackagingType.ETS && getFile.isTsFile(outputPath)) { + newPath = outputPath.replace('.d.ts', '.d.ets'); + } + fs.writeFileSync(newPath, fileContent); + } + + /** + * 添加use static字符串 + * + * @param {*} fileContent 文件内容 + * @param {*} copyrightMessage 版权头内容 + * @returns + */ + public static addStaticString(fileContent: string, copyrightMessage: string) { + const hasStaticMessage = /use\s+static/g.test(fileContent); + const regex = /\/\*\r?\n\s*\*\s*Copyright[\s\S]*?limitations under the License\.\r?\n\s*\*\//g; + const staticMessage = 'use static'; + let newContent = fileContent; + if (!hasStaticMessage) { + const newfileJsdoc = `${copyrightMessage}'${staticMessage}'\r\n`; + newContent = newContent.replace(regex, newfileJsdoc); + } + return newContent; + } + + /** + * 拼接上被删除的文件注释 + * + * @param {*} deletionContent + * @param {*} sourceFile + * @param {*} dirType + * @returns + */ + public static joinFileJsdoc(deletionContent: string, sourceFile: ts.Node, dirType: string) { + const fileJsdoc = sourceFile.getFullText().replace(sourceFile.getText(), ''); + const copyrightMessage = getFile.hasCopyright(fileJsdoc.split('*/')[0]) ? fileJsdoc.split('*/')[0] + '*/\r\n' : ''; + const regx = /@kit | @file/g; + let kitMessage = ''; + + if (regx.test(fileJsdoc)) { + kitMessage = fileJsdoc.split('*/')[1] + '*/\r\n'; + } + let newContent = deletionContent; + const isHasCopyright = getFile.hasCopyright(deletionContent); + + if (!isHasCopyright && !regx.test(deletionContent)) { + newContent = copyrightMessage + kitMessage + deletionContent; + } else if (!isHasCopyright) { + newContent = copyrightMessage + deletionContent; + } else if (isHasCopyright && !/@kit | @file/g.test(deletionContent)) { + const joinFileJsdoc = copyrightMessage + kitMessage; + newContent = deletionContent.replace(copyrightMessage, joinFileJsdoc); + } + + if (dirType !== PackagingType.ETS) { + // TODO:添加use static字符串 + } + return newContent; + } +} + +export class deleteFile { + /** + * 删除指定的arkts标签 + * + * @param {*} fileContent 文件内容 + * @param {*} regx 删除的正则表达式 + * @returns + */ + public static deleteArktsTag(fileContent: string) { + const arktsTagRegx = /\*\s*@arkts\s+1.1&1.2\s*(\r|\n)\s*|\*\s*@arkts\s*1.2s*(\r|\n)\s*/g; + fileContent = fileContent.replace(arktsTagRegx, (substring, p1) => { + return ''; + }); + return fileContent; + } + + public static deleteSameNameFile(fullPath: string) { + try { + fs.unlinkSync(fullPath); + } catch (error) { + console.error('delete file failed: ', error); + } + } +} \ No newline at end of file diff --git a/build-tools/package_tools/model/LogModel.ts b/build-tools/package_tools/model/LogModel.ts new file mode 100644 index 0000000000000000000000000000000000000000..598a7cccf39bf66af13bb883d2208a6d7cc5455b --- /dev/null +++ b/build-tools/package_tools/model/LogModel.ts @@ -0,0 +1,126 @@ +/* + * 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. + */ + +import path from 'path'; +import fs from 'fs'; +import { LogType, OperateType, PackagingType } from './Enums'; + +export interface Position { + line: number; + column: number; +} + +interface LogBaseInterface { + print(): void; +} + +export class LogModel implements LogBaseInterface { + // 文件全路径 + private filePath: string; + // 文件名 + private fileName: string; + // 打包类型 + private packagingType: PackagingType; + // 位置信息 + private position: Position; + // 打包日志 + private packagingLog: PackagingBaseLog; + + constructor(filePath: string, fileName: string, packagingType: PackagingType, position: Position, packagingLog: PackagingBaseLog) { + this.filePath = filePath; + this.fileName = fileName; + this.packagingType = packagingType; + this.position = position; + this.packagingLog = packagingLog; + } + + print(): void { + + } +} + +export interface LogParameters { + filePath: string; + packagingType: PackagingType; + position: Position; + apiPath: string; + logType: LogType; + operateType?: OperateType; + errcode?: number; + errorMessage?: string; +} + +abstract class PackagingBaseLog { + // API路径 + private apiPath: string; + // 日志类型 + private logType: LogType; + // 日志信息 + private message?: string; + // 日志实例 + private logModel?: LogModel; + + constructor(apiPath: string, logType: LogType) { + this.apiPath = apiPath; + this.logType = logType; + } + + abstract getMessage(msg: string): string; + + static emitLog(logParam: LogParameters): void { + // TODO 日志唯一入口,构建LogModel实例化对象,并push到全局对象中(process.env/globalObject + const fileName: string = path.basename(logParam.filePath) + const logModelObject: LogModel = new LogModel(logParam.filePath, fileName, logParam.packagingType, logParam.position, this) + } + + updateMessage(msg: string): void { + // TODO + } + + abstract getPackagingLogInstance(logParam: LogParameters): PackagingBaseLog; +} + +export class PackagingError extends PackagingBaseLog { + private errcode: number; + private errorMessage: string; + + constructor(errcode: number, errorMessage: string, apiPath: string, logType: LogType) { + super(apiPath, logType); + this.errcode = errcode; + this.errorMessage = this.getMessage(errorMessage); + super.updateMessage(this.errorMessage); + } + getMessage(message: string): string { + // TODO 实现组装operateMessage的方法 + return '' + } +} + +export class PackagingLog extends PackagingBaseLog { + // 操作类型 + private type: OperateType; + private operateMessage: string; + + constructor(type: OperateType, operateMessage: string, apiPath: string, logType: LogType) { + super(apiPath, logType); + this.type = type; + this.operateMessage = this.getMessage(operateMessage); + super.updateMessage(this.operateMessage); + } + getMessage(message: string): string { + // TODO 实现组装operateMessage的方法 + return '' + } +} \ No newline at end of file diff --git a/build-tools/package_tools/model/PackagingModel.ts b/build-tools/package_tools/model/PackagingModel.ts new file mode 100644 index 0000000000000000000000000000000000000000..4c55aaa5faac71016a16f5df2de0dd8a3750c454 --- /dev/null +++ b/build-tools/package_tools/model/PackagingModel.ts @@ -0,0 +1,55 @@ +/* + * 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. + */ + +import { PackagingModelType } from "./Enums"; + +export class PackagingModel { + private apiName: string; + private type: PackagingModelType; + private etsPath: string; + private ets2Path: string; + + constructor(apiName: string, type: PackagingModelType, etsPath: string = '', ets2Path: string = '') { + this.apiName = apiName; + this.type = type; + this.etsPath = etsPath; + this.ets2Path = ets2Path; + } + + setApiName(apiName: string): void { + this.apiName = apiName; + } + getApiName(): string { + return this.apiName; + } + setType(type: PackagingModelType): void { + this.type = type; + } + getType(): PackagingModelType { + return this.type; + } + setEtsPath(etsPath: string): void { + this.etsPath = etsPath; + } + getEtsPath(): string { + return this.etsPath; + } + setEts2Path(ets2Path: string): void { + this.ets2Path = ets2Path; + } + getEts2Path(): string { + return this.ets2Path; + } +} \ No newline at end of file diff --git a/build-tools/package_tools/package.json b/build-tools/package_tools/package.json new file mode 100644 index 0000000000000000000000000000000000000000..4031720457dacda1a9231189428232a90048eda0 --- /dev/null +++ b/build-tools/package_tools/package.json @@ -0,0 +1,23 @@ +{ + "name": "package_tools", + "version": "1.0.0", + "description": "packagind tools for SDK1.2", + "main": "main.ts", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "pack": "webpack --mode=production" + }, + "author": "", + "license": "ISC", + "dependencies": { + "@types/node": "^22.13.14", + "commander": "^13.1.0", + "fs": "^0.0.1-security", + "path": "^0.12.7", + "terser-webpack-plugin": "^5.3.14", + "ts-loader": "^9.5.2", + "typescript": "npm:ohos-typescript@4.9.5-r5", + "webpack": "^5.98.0", + "webpack-cli": "^6.0.1" + } +} \ No newline at end of file diff --git a/build-tools/package_tools/src/PackagingEntry.ts b/build-tools/package_tools/src/PackagingEntry.ts new file mode 100644 index 0000000000000000000000000000000000000000..9dfe844c18553cdb9524295d4c09e8ff13e7bbb2 --- /dev/null +++ b/build-tools/package_tools/src/PackagingEntry.ts @@ -0,0 +1,80 @@ +/* + * 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. + */ + +import fs from 'fs'; +import path from 'path'; +import { PackagingType } from "../model/Enums"; +import { PackagingModel } from "../model/PackagingModel"; +import { getApiFileName } from "../utils/utils"; + +export function packagingEntry(type: string, inputDir: string, outputDir?: string): void { + // 获取全量API路径 + const allApiFileSet: Set<string> = collectApiFiles(inputDir); + + // 获取数据类集合 + const packagingData: PackagingModel[] = collectPackagingModels(allApiFileSet, type); + + // 处理API文件 + outputDir = outputDir ?? inputDir; + handleApiFileByType(packagingData, type, outputDir); +} + + +/** + * 获取全路径集合 + * + * @param {string} rootPath + */ +function collectApiFiles(rootPath: string): Set<string> { + const allApiFilePathSet: Set<string> = new Set<string>(); + const fileNames: string[] = fs.readdirSync(rootPath); + const apiRootPath = rootPath.replace(/\\/g, '/'); + fileNames.forEach(fileName => { + const apiPath: string = path.join(apiRootPath, fileName); + const stat: fs.Stats = fs.statSync(apiPath); + if (stat.isDirectory()) { + getApiFileName(apiPath, apiRootPath, allApiFilePathSet); + } else { + allApiFilePathSet.add(fileName); + } + }); + // 此处应收集文件全路径集合,不应分rootdir与realpath + return allApiFilePathSet; +} + +/** + * 获取数据类 + * + * @param {Set<string>} allApiFiles + * @param {PackagingType} type + */ +function collectPackagingModels(allApiFiles: Set<string>, type: string): PackagingModel[] { + const packagingData: PackagingModel[] = []; + for (const apiFiles of allApiFiles) { + // TODO new PackagingModel() + } + return packagingData; +} + +/** + * 根据传入的type值去处理文件 + * + * @param {PackagingModel[]} packagingData + * @param {PackagingType} type + * @param {string} outputDir + */ +function handleApiFileByType(packagingData: PackagingModel[], type: string, outputDir: string): void { + // TODO 当outputDir未传入时,默认修改入口路径 +} \ No newline at end of file diff --git a/build-tools/package_tools/src/handleApiMainPage.ts b/build-tools/package_tools/src/handleApiMainPage.ts new file mode 100644 index 0000000000000000000000000000000000000000..e82c768b8ea98b59b6a0d9baa568b48bc39b3f70 --- /dev/null +++ b/build-tools/package_tools/src/handleApiMainPage.ts @@ -0,0 +1,499 @@ +/* + * 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. + */ + +import { fileDir } from '../model/Constants'; +import { PackagingType } from '../model/Enums'; +import { deleteFile, getFile, writeFile } from '../model/FileModify'; + +import fs from 'fs'; +import path from 'path'; +import commander from 'commander'; +import ts from 'typescript'; + +// 处理的目录类型 +const deleteApiSet: Set<string | undefined> = new Set(); +let dirType: string = ''; + +/** + * 配置参数 + */ +export function start() { + const program = new commander.Command(); + program + .name('handleApiFile') + .version('0.0.1'); + program + .option('--path <string>', 'path name') + .option('--type <string>', 'handle type') + .option('--output [string]', 'output path') + .action((opts) => { + dirType = opts.type; + handleApiFiles(opts.path, opts.type, opts.output); + }); + program.parse(process.argv); +} + +/** + * 处理API文件的入口函数 + * + * @param {*} rootPath + * @param {*} type + */ +function handleApiFiles(rootPath: string, type: string, output: string) { + const allApiFilePathSet: Set<string> = new Set(); + const fileNames = fs.readdirSync(rootPath); + const apiRootPath = rootPath.replace(/\\/g, '/'); + fileNames.forEach(fileName => { + const apiPath = path.join(apiRootPath, fileName); + const stat = fs.statSync(apiPath); + if (fileDir.NOT_COPY_DIR.includes(fileName)) { + return; + } + + if (stat.isDirectory()) { + getFile.getApiFileName(apiPath, apiRootPath, allApiFilePathSet); + } else { + allApiFilePathSet.add(fileName); + } + + }); + + for (const apiRelativePath of allApiFilePathSet) { + try { + handleApiFileByType(apiRelativePath as string, rootPath, type, output); + } catch (error) { + console.log('error===>', error); + } + } +} + +/** + * 根据传入的type值去处理文件 + * + * @param {*} apiRelativePath + * @param {*} allApiFilePathSet + * @param {*} rootPath + * @param {*} type + * @returns + */ +function handleApiFileByType(apiRelativePath: string, rootPath: string, type: string, output: string) { + const fullPath = path.join(rootPath, apiRelativePath); + const isEndWithEts = getFile.isEtsFile(apiRelativePath); + const isEndWithTs = getFile.isTsFile(apiRelativePath); + const outputPath = output ? path.join(output, apiRelativePath) : fullPath; + const fileContent = fs.readFileSync(fullPath, 'utf-8'); + + if (!isEndWithEts && !isEndWithTs) { + writeFile.rewriteFileType(outputPath, fileContent); + return; + } + if (type === 'ets2' && !(getFile.hasEtsFile(fullPath) && isEndWithTs)) { + handleFileInSecondType(apiRelativePath, fullPath, type, output); + } else if (type === 'ets' && !(getFile.hasTsFile(fullPath) && isEndWithEts)) { + handleFileInFirstType(apiRelativePath, fullPath, type, output); + } +} + +/** + * 处理文件过滤 if arkts 1.1|1.2|1.1&1.2 定义 + * + * @param {*} type + * @param {*} fileContent + * @returns + */ +function handleArktsDefinition(type: string, fileContent: string) { + let regx = /\/\*\*\* if arkts 1\.1 \*\/\s*([\s\S]*?)\s*\/\*\*\* endif \*\//g; + let regx2 = /\/\*\*\* if arkts 1\.2 \*\/\s*([\s\S]*?)\s*\/\*\*\* endif \*\//g; + let regx3 = /\/\*\*\* if arkts 1\.1\&1\.2 \*\/\s*([\s\S]*?)\s*\/\*\*\* endif \*\//g; + fileContent = fileContent.replace(regx, (substring, p1) => { + return type === 'ets' ? p1 : ''; + }); + fileContent = fileContent.replace(regx2, (substring, p1) => { + if (type === 'ets2') { + return p1.replace(/(\s*)(\*\s\@since)/g, '$1* @arkts 1.2$1$2'); + } else { + return ''; + } + }); + fileContent = fileContent.replace(regx3, (substring, p1) => { + if (type === 'ets') { + return p1; + } else { + return p1.replace(/(\s*)(\*\s\@since)/g, '$1* @arkts 1.2$1$2'); + } + }); + return fileContent; +} + +/** + * 保留每个api最新一段jsdoc + * + * @param {*} fileContent + * @returns + */ +function saveLatestJsDoc(fileContent: string) { + let regx = /(\/\*[\s\S]*?\*\*\/)/g; + + fileContent = fileContent.split('').reverse().join(''); + let preset = 0; + fileContent = fileContent.replace(regx, (substring, p1, offset, str) => { + if (!/ecnis@\s*\*/g.test(substring)) { + return substring; + } + const preStr = str.substring(preset, offset); + preset = offset + substring.length; + if (/\S/g.test(preStr)) { + return substring; + } + return ''; + }); + fileContent = fileContent.split('').reverse().join(''); + return fileContent; +} + +/** + * 处理ets目录 + * + * @param {string} apiRelativePath + * @param {string} fullPath + * @returns + */ +function handleFileInFirstType(apiRelativePath: string, fullPath: string, type: string, output: string) { + const outputPath = output ? path.join(output, apiRelativePath) : fullPath; + let fileContent = fs.readFileSync(fullPath, 'utf-8'); + //删除使用/*** if arkts 1.2 */ + fileContent = handleArktsDefinition(type, fileContent); + + const sourceFile = ts.createSourceFile(path.basename(apiRelativePath), fileContent, ts.ScriptTarget.ES2017, true); + const secondRegx = /(?:@arkts1.2only|@arkts\s+>=\s*1.2|@arkts\s*1.2)/; + const thirdRegx = /(?:\*\s*@arkts\s+1.1&1.2\s*(\r|\n)\s*)/; + if (sourceFile.statements.length === 0) { + // reference文件识别不到首段jsdoc,全文匹配1.2标签,有的话直接删除 + if (secondRegx.test(sourceFile.getFullText())) { + return; + } + // 标有@arkts 1.1&1.2的声明文件,处理since版本号,删除@arkts 1.1&1.2标签 + if (thirdRegx.test(sourceFile.getFullText())) { + fileContent = handleSinceInFirstType(deleteFile.deleteArktsTag(fileContent)); + writeFile.rewriteFileType(outputPath, fileContent); + return; + } + + handleNoTagFileInFirstType(sourceFile, outputPath, fileContent); + return; + } + const firstNode = sourceFile.statements.find(statement => { + return !ts.isExpressionStatement(statement); + }); + + + if (firstNode) { + const firstJsdocText = getFile.getFileJsdoc(firstNode); + // 标有1.2标签的声明文件,不拷贝 + if (secondRegx.test(firstJsdocText)) { + return; + } + // 标有@arkts 1.1&1.2的声明文件,处理since版本号,删除@arkts 1.1&1.2标签 + if (thirdRegx.test(firstJsdocText)) { + fileContent = handleSinceInFirstType(deleteFile.deleteArktsTag(fileContent)); + writeFile.rewriteFileType(outputPath, fileContent); + return; + } + } + + handleNoTagFileInFirstType(sourceFile, outputPath, fileContent); +} + +/** + * 处理1.1目录中无arkts标签的文件 + * @param {*} sourceFile + * @param {*} outputPath + * @returns + */ +function handleNoTagFileInFirstType(sourceFile: ts.SourceFile, outputPath: string, fileContent: string) { + if (path.basename(outputPath) === 'index-full.d.ts') { + writeFile.rewriteFileType(outputPath, fileContent); + return; + } + fileContent = deleteApi(sourceFile); + + if (fileContent === '') { + return; + } + fileContent = deleteFile.deleteArktsTag(fileContent); + fileContent = writeFile.joinFileJsdoc(fileContent, sourceFile, dirType); + + fileContent = handleSinceInFirstType(fileContent); + writeFile.rewriteFileType(outputPath, fileContent); +} + + +/** + * 生成1.1目录里文件时,需要去掉since标签里的1.2版本号 + * + * @param {*} sourceFile + * @param {*} fullPath + */ +function handleSinceInFirstType(fileContent: string) { + const regx = /@since\s+arkts\s*(\{.*\})/g; + fileContent = fileContent.replace(regx, (substring, p1) => { + return '@since ' + JSON.parse(p1.replace(/'/g, '"'))['1.1']; + }); + return fileContent; +} + +/** + * 处理ets2目录 + * + * @param {string} fullPath 文件完整路径 + * @returns + */ +function handleFileInSecondType(apiRelativePath: string, fullPath: string, type: string, output: string) { + const secondRegx = /(?:@arkts1.2only|@arkts\s+>=\s*1.2|@arkts\s*1.2)/; + const thirdRegx = /(?:\*\s*@arkts\s+1.1&1.2\s*(\r|\n)\s*)/; + const arktsRegx = /\/\*\*\* if arkts (1.1&)?1.2 \*\/\s*([\s\S]*?)\s*\/\*\*\* endif \*\//g; + let fileContent = fs.readFileSync(fullPath, 'utf-8'); + let sourceFile = ts.createSourceFile(path.basename(fullPath), fileContent, ts.ScriptTarget.ES2017, true); + const outputPath = output ? path.join(output, apiRelativePath) : fullPath; + if (!secondRegx.test(fileContent) && !thirdRegx.test(fileContent) && arktsRegx.test(fileContent)) { + saveApiByArktsDefinition(sourceFile, fileContent, outputPath); + return; + } + //删除使用/*** if arkts 1.2 */ + fileContent = handleArktsDefinition(type, fileContent); + sourceFile = ts.createSourceFile(path.basename(fullPath), fileContent, ts.ScriptTarget.ES2017, true); + const regx = /(?:@arkts1.1only|@arkts\s+<=\s+1.1)/; + if (sourceFile.statements.length === 0) { + // 有1.2标签的文件,删除标记 + if (secondRegx.test(sourceFile.getFullText())) { + writeFile.rewriteFileType(outputPath, deleteFile.deleteArktsTag(fileContent)); + return; + } + // 处理标有@arkts 1.1&1.2的声明文件 + if (thirdRegx.test(sourceFile.getFullText())) { + handlehasTagFile(sourceFile, outputPath); + return; + } + // 处理既没有@arkts 1.2,也没有@arkts 1.1&1.2的声明文件 + handleNoTagFileInSecondType(sourceFile, outputPath); + return; + } + + const firstNode = sourceFile.statements.find(statement => { + return !ts.isExpressionStatement(statement); + }); + + if (firstNode) { + const firstJsdocText = getFile.getFileJsdoc(firstNode); + if (regx.test(firstJsdocText)) { + return; + } + // 有1.2标签的文件,删除标记 + if (secondRegx.test(firstJsdocText)) { + writeFile.rewriteFileType(outputPath, deleteFile.deleteArktsTag(fileContent)); + return; + } + // 处理标有@arkts 1.1&1.2的声明文件 + if (thirdRegx.test(firstJsdocText)) { + handlehasTagFile(sourceFile, outputPath); + return; + } + } + + // 处理既没有@arkts 1.2,也没有@arkts 1.1&1.2的声明文件 + handleNoTagFileInSecondType(sourceFile, outputPath); +} + +/** + * 处理有@arkts 1.1&1.2标签的文件 + * @param {*} outputPath + */ +function handlehasTagFile(sourceFile: ts.SourceFile, outputPath: string) { + dirType = PackagingType.ETS2; + let newContent = getDeletionContent(sourceFile); + if (newContent === '') { + return; + } + // 保留最后一段注释 + newContent = saveLatestJsDoc(newContent); + writeFile.rewriteFileType(outputPath, deleteFile.deleteArktsTag(newContent)); +} + +/** + * 处理1.2目录中无arkts标签的文件 + * @param {*} sourceFile + * @param {*} outputPath + * @returns + */ +function handleNoTagFileInSecondType(sourceFile: ts.SourceFile, outputPath: string) { + dirType = PackagingType.NO_TAG_IN_ETS2; + const arktsTagRegx = /\*\s*@arkts\s+1.1&1.2\s*(\r|\n)\s*|@arkts\s*1.2/g; + const fileContent = sourceFile.getFullText(); + // API未标@arkts 1.2或@arkts 1.1&1.2标签,删除文件 + if (!arktsTagRegx.test(fileContent)) { + if (!fileDir.API_NO_TAGS_FILTER_LIST.includes(path.basename(outputPath))) { + writeFile.rewriteFileType(outputPath, writeFile.joinFileJsdoc(fileContent, sourceFile, dirType)); + } + // TODO:api未标标签,删除文件 + return; + } + let newContent = getDeletionContent(sourceFile); + if (newContent === '') { + return; + } + // 保留最后一段注释 + newContent = saveLatestJsDoc(newContent); + newContent = deleteFile.deleteArktsTag(newContent); + writeFile.rewriteFileType(outputPath, newContent); +} + +/** + * 生成1.2目录里文件时,需要去掉since标签里的dynamic版本号 + * + * @param {*} fileContent + * @returns + */ +function handleSinceInSecondType(fileContent: string) { + const regx = /@since\s+arkts\s*(\{.*\})/g; + fileContent = fileContent.replace(regx, (substring, p1) => { + return '@since ' + JSON.parse(p1.replace(/'/g, '"'))['1.2']; + }); + return fileContent; +} + + +function getDeletionContent(sourceFile: ts.SourceFile) { + const deletionContent = deleteApi(sourceFile); + if (deletionContent === '') { + return ''; + } + let newContent = writeFile.joinFileJsdoc(deletionContent, sourceFile, dirType); + + // 处理since版本 + newContent = handleSinceInSecondType(newContent); + return newContent; +} + +function collectDeletionApiName(node: ts.Node) { + if (!ts.isImportClause(node)) { + deleteApiSet.add((node as ts.ImportClause).name?.getText()); + return; + } + if (ts.isImportDeclaration(node) && (node as ts.ImportDeclaration).importClause?.name) { + deleteApiSet.add((node as ts.ImportDeclaration).importClause?.name?.escapedText.toString()); + return; + } + const namedBindings = node.namedBindings; + if (namedBindings !== undefined && ts.isNamedImports(namedBindings)) { + const elements = namedBindings.elements; + elements.forEach((element) => { + const exportName = element.propertyName ? + element.propertyName.escapedText.toString() : + element.name.escapedText.toString(); + deleteApiSet.add(exportName); + }); + } +} + +/** + * 删除API + * @param {*} sourceFile + * @returns + */ +function deleteApi(sourceFile: ts.SourceFile) { + let result = ts.transform(sourceFile, [transformer]); + const newSourceFile = result.transformed[0]; + if (getFile.isEmptyFile(newSourceFile)) { + return ''; + } + + // 打印结果 + const printer = ts.createPrinter(); + let fileContent = printer.printFile(newSourceFile as ts.SourceFile); + result = ts.transform(newSourceFile, [transformExportApi]); + fileContent = printer.printFile(result.transformed[0] as ts.SourceFile); + deleteApiSet.clear(); + return fileContent.replace(/export\s*(?:type\s*)?\{\s*\}\s*(;)?/g, ''); +} + +// 创建 Transformer +const transformer = (context: ts.TransformationContext) => { + return (rootNode: ts.Node) => { + const visit = (node: ts.Node) => { + //struct节点下面会自动生成constructor节点, 置为undefined + if (node.kind === ts.SyntaxKind.Constructor && node.parent.kind === ts.SyntaxKind.StructDeclaration) { + return undefined; + } + // 判断是否为要删除的变量声明 + if (fileDir.apiNodeTypeArr.includes(node.kind) && getFile.judgeIsDeleteApi(node, dirType)) { + collectDeletionApiName(node); + // 删除该节点 + return undefined; + } + + // 非目标节点:继续遍历子节点 + return ts.visitEachChild(node, visit, context); + }; + return ts.visitNode(rootNode, visit); + }; +}; + +/** + * 没有arkts标签,但有if arkts 1.2和1.1&1.2的情况 + * @param {*} sourceFile + * @param {*} fileContent + * @param {*} outputPath + */ +function saveApiByArktsDefinition(sourceFile: ts.SourceFile, fileContent: string, outputPath: string) { + const regx = /\/\*\*\* if arkts (1.1&)?1.2 \*\/\s*([\s\S]*?)\s*\/\*\*\* endif \*\//g; + const regex = /\/\*\r?\n\s*\*\s*Copyright[\s\S]*?limitations under the License\.\r?\n\s*\*\//g; + const copyrightMessage = fileContent.match(regex)?.[0]; + const firstNode = sourceFile.statements.find(statement => { + return !ts.isExpressionStatement(statement); + }); + let fileJsdoc = firstNode ? getFile.getFileJsdoc(firstNode) + '*/\n' : ''; + let newContent = copyrightMessage + fileJsdoc + Array.from(fileContent.matchAll(regx), match => match[2]).join('\n'); + + writeFile.rewriteFileType(outputPath, saveLatestJsDoc(newContent)); +} + + +/** + * api被删除后,对应的export api也需要被删除 + * @param {*} context + * @returns + */ +const transformExportApi = (context: ts.TransformationContext) => { + return (rootNode: ts.Node) => { + const visit = (node: ts.Node) => { + //struct节点下面会自动生成constructor节点, 置为undefined + if (node.kind === ts.SyntaxKind.Constructor && node.parent.kind === ts.SyntaxKind.StructDeclaration) { + return undefined; + } + // 判断是否为要删除的变量声明 + if (ts.isExportAssignment(node) && deleteApiSet.has(node.expression.getText().toString())) { + return undefined; + } + + if (ts.isExportSpecifier(node) && deleteApiSet.has(node.name.escapedText.toString())) { + return undefined; + } + + // 非目标节点:继续遍历子节点 + return ts.visitEachChild(node, visit, context); + }; + return ts.visitNode(rootNode, visit); + }; +}; \ No newline at end of file diff --git a/build-tools/package_tools/tsconfig.json b/build-tools/package_tools/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..ef92221cff40dfaf8d8fedfee614a7f3feef1284 --- /dev/null +++ b/build-tools/package_tools/tsconfig.json @@ -0,0 +1,96 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig.json to read more about this file */ + /* Projects */ + // "incremental": true, /* Enable incremental compilation */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + /* Language and Environment */ + "target": "es2020", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "lib": [ + "es2015", + "es2020" + ], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */ + // "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + "resolveJsonModule": true, /* Enable importing .json files */ + // "noResolve": true, /* Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project. */ + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */ + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */ + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */ + // "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */ + // "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + // "skipLibCheck": true /* Skip type checking all .d.ts files. */ + } +} \ No newline at end of file diff --git a/build-tools/package_tools/utils/Log.ts b/build-tools/package_tools/utils/Log.ts new file mode 100644 index 0000000000000000000000000000000000000000..bf5736961a6f5ea18ddb52cc20fcdafc844a1e13 --- /dev/null +++ b/build-tools/package_tools/utils/Log.ts @@ -0,0 +1,16 @@ +/* + * 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. + */ + +// TODO 补充日志分析接口 \ No newline at end of file diff --git a/build-tools/package_tools/utils/Utils.ts b/build-tools/package_tools/utils/Utils.ts new file mode 100644 index 0000000000000000000000000000000000000000..3a92a624594f2f01a7b8680f90df4c1e403a7e1d --- /dev/null +++ b/build-tools/package_tools/utils/Utils.ts @@ -0,0 +1,66 @@ +/* + * 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. + */ + +import { Command } from 'commander'; +import fs from 'fs'; +import path from 'path'; +import { OperateType } from '../model/Enums'; +import { OPERATE_MESSAGE_MAP } from '../model/Constants'; + +export function makePackagingOption(name: string, version: string, customCallback: Function): Command { + const program: Command = new Command(); + program + .name(name) + .version(version); + program + .option('--path <string>', 'path name') + .option('--type <string>', 'handle type') + .action((opts) => { + customCallback(opts.path, opts.type); + }); + return program; +} + +/** + * + * @param { string } apiPath 需要处理的api文件所在路径 + * @param { string } rootPath ets文件夹路径 + * @returns { Set<string> } 需要处理的api文件的相对于ets目录的路径 + */ +export function getApiFileName(apiPath: string, rootPath: string, allApiFilePathSet: Set<string>) { + const apiFilePathSet: Set<string> = new Set<string>(); + const fileNames: string[] = fs.readdirSync(apiPath); + + fileNames.forEach((fileName: string) => { + const apiFilePath: string = path.join(apiPath, fileName).replace(/\\/g, '/'); + const stat: fs.Stats = fs.statSync(apiFilePath); + + if (stat.isDirectory()) { + getApiFileName(apiFilePath, rootPath, allApiFilePathSet); + } else { + const apiRelativePath: string = apiFilePath.replace(rootPath, ''); + allApiFilePathSet.add(apiRelativePath); + } + }); + return apiFilePathSet; +} + +export function getOperateMessage(operateType: OperateType, ...supplys: string[]): string { + const operateMessage: string | undefined = OPERATE_MESSAGE_MAP.get(operateType); + supplys.forEach((supply: string, index: number) => { + // TODO 替换$2 + }); + return operateMessage ?? ''; +} \ No newline at end of file diff --git a/build-tools/package_tools/webpack.config.js b/build-tools/package_tools/webpack.config.js new file mode 100644 index 0000000000000000000000000000000000000000..ddc7bcf8d6ef9ba13d9c9b7016f13bdae145c69e --- /dev/null +++ b/build-tools/package_tools/webpack.config.js @@ -0,0 +1,61 @@ +/* + * 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. + */ + +const path = require('path'); +const TerserPlugin = require('terser-webpack-plugin'); +const packageInfo = require('./package.json'); + +module.exports = (env, argv) => { + const config = { + name: 'package_tools', + target: 'node', + mode: 'none', + entry: './main.ts', + module: { + rules: [ + { + test: /\.ts$/, + include: path.resolve(__dirname, './'), + exclude: [/node_modules/, /test/], + loader: 'ts-loader', + options: { + onlyCompileBundledFiles: true, + }, + }, + { + test: /build\.json$/, + use: [ + { + loader: path.resolve(__dirname, 'loader/flavor.js'), + }, + ], + }, + ], + }, + resolve: { + extensions: ['.js', '.ts', '.json'], + }, + output: { + filename: `${packageInfo.name}.js`, + path: path.resolve(__dirname, './package'), + }, + optimization: { + minimize: true, + minimizer: [new TerserPlugin({ extractComments: false })], + }, + plugins: [] + }; + return config; +}; diff --git a/build-tools/permissions_converter/convert.js b/build-tools/permissions_converter/convert.js index 665a3a904ef319e4c154b6495f42ff440e0a3115..be4f15afb1e9e7d8468f53ca4269fcc6d07be176 100644 --- a/build-tools/permissions_converter/convert.js +++ b/build-tools/permissions_converter/convert.js @@ -82,11 +82,9 @@ const getPermissions = downloadPath => { try { const content = fs.readFileSync(downloadPath, { encoding: 'utf8' }); const configMap = JSON.parse(decodeURIComponent(content)); - return configMap.definePermissions.filter(permission => { - if (permission.availableType) { - return permission.availableType !== 'SERVICE'; - } - }); + if (configMap.module.definePermissions) { + return configMap.module.definePermissions; + } } catch (error) { console.error('Convert json file to object failed'); } diff --git a/kits/@kit.AVSessionKit.d.ts b/kits/@kit.AVSessionKit.d.ts index 8663f2bcbaddba754a63dc1643a6571e7cdbeaca..93753191f5c688df722bb4b4e555269de623b372 100644 --- a/kits/@kit.AVSessionKit.d.ts +++ b/kits/@kit.AVSessionKit.d.ts @@ -19,7 +19,7 @@ */ import AVCastPicker from '@ohos.multimedia.avCastPicker'; -import { AVInputCastPicker } from '@ohos.multimedia.avInputCastPicker'; +import AVInputCastPicker from '@ohos.multimedia.avInputCastPicker'; import { AVCastPickerState, AVCastPickerStyle, AVCastPickerColorMode } from '@ohos.multimedia.avCastPickerParam'; import avSession from '@ohos.multimedia.avsession'; import MediaControlExtensionAbility from '@ohos.app.ability.MediaControlExtensionAbility'; diff --git a/kits/@kit.ArkUI.d.ets b/kits/@kit.ArkUI.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..1d7094b312372a5a17964c154d2b45a9afc23f0a --- /dev/null +++ b/kits/@kit.ArkUI.d.ets @@ -0,0 +1,26 @@ +/* + * 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 + * @arkts 1.2 +*/ + +import promptAction from '@ohos.promptAction'; +import { ComponentContent } from '@ohos.arkui.node'; +export { promptAction, ComponentContent }; +export * from '@ohos.arkui.component'; +export * from '@ohos.arkui.stateManagement'; \ No newline at end of file diff --git a/kits/@kit.ArkUI.d.ts b/kits/@kit.ArkUI.d.ts index 1db4109b38343417b06902d51990f9454fdaf523..1ea5cfbdcd38df20be0966b2ced735b1ea80ead0 100644 --- a/kits/@kit.ArkUI.d.ts +++ b/kits/@kit.ArkUI.d.ts @@ -161,6 +161,8 @@ import { HoverModeStatus, OnHoverStatusChangeHandler, } from '@ohos.arkui.advanced.FoldSplitContainer'; +import { AppStorageV2, PersistenceV2, Type, UIUtils, ConnectOptions } from '@ohos.arkui.StateManagement'; +import { IDataSourcePrefetching, IPrefetcher, BasicPrefetcher } from '@ohos.arkui.Prefetcher'; import uiExtension from '@ohos.arkui.uiExtension'; import { FullScreenLaunchComponent } from '@ohos.arkui.advanced.FullScreenLaunchComponent'; import { AtomicServiceTabs, TabBarOptions, TabBarPosition, TabContentBuilder, OnContentWillChangeCallback } from '@ohos.atomicservice.AtomicServiceTabs'; diff --git a/kits/@kit.PerformanceAnalysisKit.d.ts b/kits/@kit.PerformanceAnalysisKit.d.ts index 2d9730b266ff62ac63c61bcbee3dd2240a8b3bc8..0e52f38c10c6db24007de5a85572e804cbdfe56b 100644 --- a/kits/@kit.PerformanceAnalysisKit.d.ts +++ b/kits/@kit.PerformanceAnalysisKit.d.ts @@ -18,6 +18,7 @@ * @kit PerformanceAnalysisKit */ +/*** if arkts 1.1&1.2 */ import FaultLogger from '@ohos.faultLogger'; import hiAppEvent from '@ohos.hiviewdfx.hiAppEvent'; import hichecker from '@ohos.hichecker'; @@ -33,3 +34,4 @@ export { FaultLogger, hiAppEvent, hiSysEvent, hiTraceChain, hiTraceMeter, hichecker, hidebug, hilog, logLibrary, jsLeakWatcher }; +/*** endif */