diff --git a/BUILD.gn b/BUILD.gn index e1313d198c90a92af6c117b1fa0c2d8633ce60b9..d71b8ea409f784ac5928d7a4862c37afc58845aa 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -59,6 +59,7 @@ ohos_copy("ets_component") { "api/@internal/component/ets/grid.d.ts", "api/@internal/component/ets/gridItem.d.ts", "api/@internal/component/ets/grid_container.d.ts", + "api/@internal/component/ets/hyperlink.d.ts", "api/@internal/component/ets/image.d.ts", "api/@internal/component/ets/image_animator.d.ts", "api/@internal/component/ets/index-full.d.ts", @@ -73,7 +74,6 @@ ohos_copy("ets_component") { "api/@internal/component/ets/page_transition.d.ts", "api/@internal/component/ets/panel.d.ts", "api/@internal/component/ets/path.d.ts", - "api/@internal/component/ets/piece.d.ts", "api/@internal/component/ets/polygon.d.ts", "api/@internal/component/ets/polyline.d.ts", "api/@internal/component/ets/progress.d.ts", @@ -90,7 +90,6 @@ ohos_copy("ets_component") { "api/@internal/component/ets/search.d.ts", "api/@internal/component/ets/select.d.ts", "api/@internal/component/ets/shape.d.ts", - "api/@internal/component/ets/sheet.d.ts", "api/@internal/component/ets/sidebar.d.ts", "api/@internal/component/ets/slider.d.ts", "api/@internal/component/ets/span.d.ts", @@ -107,6 +106,7 @@ ohos_copy("ets_component") { "api/@internal/component/ets/text_input.d.ts", "api/@internal/component/ets/text_picker.d.ts", "api/@internal/component/ets/text_timer.d.ts", + "api/@internal/component/ets/time_picker.d.ts", "api/@internal/component/ets/toggle.d.ts", "api/@internal/component/ets/units.d.ts", "api/@internal/component/ets/video.d.ts", @@ -172,6 +172,7 @@ ohos_declaration_template("ohos_declaration_common") { ohos_copy("internal_full") { sources = [ "api/common/@internal/console.d.ts", + "api/common/@internal/featureability.d.ts", "api/common/@internal/global.d.ts", "api/common/@internal/index.d.ts", "api/common/@internal/viewmodel.d.ts", @@ -184,6 +185,7 @@ ohos_copy("internal_full") { ohos_copy("internal_lite") { sources = [ "api/liteWearable/@internal/console.d.ts", + "api/liteWearable/@internal/featureability.d.ts", "api/liteWearable/@internal/global.d.ts", "api/liteWearable/@internal/index.d.ts", "api/liteWearable/@internal/viewmodel.d.ts", diff --git a/api/@internal/component/ets/alert_dialog.d.ts b/api/@internal/component/ets/alert_dialog.d.ts index e88783f82c4ab887efb0e3a43da1694c3e8d59b6..56f25ee6597851a4b30fd03e152a70bc925bda60 100644 --- a/api/@internal/component/ets/alert_dialog.d.ts +++ b/api/@internal/component/ets/alert_dialog.d.ts @@ -163,6 +163,10 @@ declare interface AlertDialogParamWithConfirm extends AlertDialogParam { }; } +/** + * Defines the dialog param with buttons. + * @since 7 + */ declare interface AlertDialogParamWithButtons extends AlertDialogParam { /** * First button. diff --git a/api/@internal/component/ets/alphabet_indexer.d.ts b/api/@internal/component/ets/alphabet_indexer.d.ts index a902431b34a4e76c5560ef87c6984665e4d08e17..42a4b1694a04863d01bae5fc71a2ace9462f4fe4 100644 --- a/api/@internal/component/ets/alphabet_indexer.d.ts +++ b/api/@internal/component/ets/alphabet_indexer.d.ts @@ -52,8 +52,9 @@ declare class AlphabetIndexerAttribute extends CommonMethod void): AlphabetIndexerAttribute; + onSelected(callback: (index: number) => void): AlphabetIndexerAttribute; /** * Definitions color. @@ -121,29 +122,35 @@ declare class AlphabetIndexerAttribute extends CommonMethod void): AlphabetIndexerAttribute; + /** * Index bar selection callback and return the strings which display on pop-up. * @since 8 */ - onRequestPopupData(event: (index: number) => Array): AlphabetIndexerAttribute; + onRequestPopupData(callback: (index: number) => Array): AlphabetIndexerAttribute; /** * Pop-up selection callback. * @since 8 */ - onPopupSelected(event: (index: number) => void): AlphabetIndexerAttribute; + onPopupSelect(callback: (index: number) => void): AlphabetIndexerAttribute; /** - * Select the index. + * Sets the selected index. * @since 8 */ - selectedIndex(index: number): AlphabetIndexerAttribute; + selected(index: number): AlphabetIndexerAttribute; /** * Position of the pop-up windows, relative to the midpoint of the top border of the indexer bar. * @since 8 */ - popupPosition(value: {offsetX: number, offsetY: number}): AlphabetIndexerAttribute; + popupPosition(value: Position): AlphabetIndexerAttribute; } declare const AlphabetIndexer: AlphabetIndexerInterface; diff --git a/api/@internal/component/ets/badge.d.ts b/api/@internal/component/ets/badge.d.ts index 5c7d354ea01658a414f44247bf54db64ed339079..6c6ef7b5936c4e46a99a4a1cd8780479c6f19028 100644 --- a/api/@internal/component/ets/badge.d.ts +++ b/api/@internal/component/ets/badge.d.ts @@ -145,5 +145,5 @@ interface BadgeInterface { */ declare class BadgeAttribute extends CommonMethod {} -declare const Badge: BadgeInterface +declare const Badge: BadgeInterface; declare const BadgeInstance: BadgeAttribute; diff --git a/api/@internal/component/ets/blank.d.ts b/api/@internal/component/ets/blank.d.ts index 4415acc8a0c39bede5a52cdd867183ef5e7d49dc..327a53ef07df5b396233d579af5981d57c9008cd 100644 --- a/api/@internal/component/ets/blank.d.ts +++ b/api/@internal/component/ets/blank.d.ts @@ -1,4 +1,4 @@ - /* +/* * Copyright (c) 2021 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. diff --git a/api/@internal/component/ets/button.d.ts b/api/@internal/component/ets/button.d.ts index 68f472819de0d9dea9b66e90fbf43ca6ecc76193..3ad3db720fe0169a43cd945cc9f01a02d853fcac 100644 --- a/api/@internal/component/ets/button.d.ts +++ b/api/@internal/component/ets/button.d.ts @@ -41,7 +41,7 @@ declare enum ButtonType { * Defines the button options. * @since 7 */ -declare interface ButtonOption { +declare interface ButtonOptions { /** * Describes the button style. * @since 7 @@ -70,13 +70,13 @@ interface ButtonInterface { * Create Button with Text child. * @since 7 */ - (options: ButtonOption): ButtonAttribute; + (options: ButtonOptions): ButtonAttribute; /** * Create Button with inner text label. * @since 7 */ - (label: ResourceStr, options?: ButtonOption): ButtonAttribute; + (label: ResourceStr, options?: ButtonOptions): ButtonAttribute; } /** @@ -127,5 +127,5 @@ declare class ButtonAttribute extends CommonMethod { fontFamily(value: string | Resource): ButtonAttribute; } -declare const Button: ButtonInterface +declare const Button: ButtonInterface; declare const ButtonInstance: ButtonAttribute; diff --git a/api/@internal/component/ets/calendar.d.ts b/api/@internal/component/ets/calendar.d.ts index 73af8ae5278a07e8f00f740823dda9548dc519f5..63569d81073600b4718ce87c33e435a764bbde85 100644 --- a/api/@internal/component/ets/calendar.d.ts +++ b/api/@internal/component/ets/calendar.d.ts @@ -102,7 +102,7 @@ interface CalendarDay { } /** - * Date object. + * Date object. * @since 7 * @systemapi */ diff --git a/api/@internal/component/ets/canvas.d.ts b/api/@internal/component/ets/canvas.d.ts index 37f1a30ba622a0e6caa02b7c87e23e65554b358e..45f68e8070149ba2fab45690d3b90d425155df87 100644 --- a/api/@internal/component/ets/canvas.d.ts +++ b/api/@internal/component/ets/canvas.d.ts @@ -1061,7 +1061,7 @@ declare class OffscreenCanvasRenderingContext2D extends CanvasRenderer { * @param settings Drawing attribute. For details, see {@link RenderingContextSettings}. * @since 8 */ - constructor(width: number, height: number,settings?: RenderingContextSettings); + constructor(width: number, height: number, settings?: RenderingContextSettings); } /** @@ -1116,5 +1116,6 @@ declare class CanvasAttribute extends CommonMethod { */ onReady(event: () => void): CanvasAttribute; } + declare const Canvas: CanvasInterface; declare const CanvasInstance: CanvasAttribute; diff --git a/api/@internal/component/ets/checkbox.d.ts b/api/@internal/component/ets/checkbox.d.ts index c66216a3398fc46911be175a9dc2eae4f8f4b4f0..adc255a0850ab69a12da8a844eed1e29690c0aeb 100644 --- a/api/@internal/component/ets/checkbox.d.ts +++ b/api/@internal/component/ets/checkbox.d.ts @@ -14,21 +14,21 @@ */ /** - * Defines the option of Checkbox. + * Defines the options of Checkbox. * @since 8 */ -declare interface CheckboxOption { +declare interface CheckboxOptions { /** * Current name of Checkbox. * @since 8 */ - name?: string; + name?: string; /** * Sets the group of Checkbox. * @since 8 */ - group?: string; + group?: string; } /** @@ -41,7 +41,7 @@ interface CheckboxInterface { * Called when the Checkbox component is used. * @since 8 */ - (options?: CheckboxOption): CheckboxAttribute; + (options?: CheckboxOptions): CheckboxAttribute; } /** @@ -53,13 +53,13 @@ declare class CheckboxAttribute extends CommonMethod { * setting whether checkbox is selected. * @since 8 */ - select(value: boolean): CheckboxAttribute; + select(value: boolean): CheckboxAttribute; /** * setting the display color of checkbox. * @since 8 */ - selectedColor(value: ResourceColor): CheckboxAttribute; + selectedColor(value: ResourceColor): CheckboxAttribute; /** * Called when the selection status changes. diff --git a/api/@internal/component/ets/checkboxgroup.d.ts b/api/@internal/component/ets/checkboxgroup.d.ts index 3fee2e97cd34e1d47790488a54af2448f3f52161..16695f09d2ee68c454c758613e1fe8726dfe006c 100644 --- a/api/@internal/component/ets/checkboxgroup.d.ts +++ b/api/@internal/component/ets/checkboxgroup.d.ts @@ -36,19 +36,19 @@ declare enum SelectStatus { } /** - * Defines the option of CheckboxGroup. + * Defines the options of CheckboxGroup. * @since 8 */ -declare interface CheckboxGroupOption { +declare interface CheckboxGroupOptions { /** * Setting the group of CheckboxGroup. * @since 8 */ - group?: string; + group?: string; } /** - * Defines the option of CheckboxGroupResult. + * Defines the options of CheckboxGroupResult. * @since 8 */ declare interface CheckboxGroupResult { @@ -56,12 +56,12 @@ declare interface CheckboxGroupResult { * Checkbox name. * @since 8 */ - name: Array; + name: Array; /** * Set the group of status. * @since 8 */ - status: SelectStatus; + status: SelectStatus; } /** @@ -73,7 +73,7 @@ interface CheckboxGroupInterface { * Called when the CheckboxGroup component is used. * @since 8 */ - (options?: CheckboxGroupOption): CheckboxGroupAttribute; + (options?: CheckboxGroupOptions): CheckboxGroupAttribute; } /** @@ -85,13 +85,13 @@ declare class CheckboxGroupAttribute extends CommonMethod PropertyDecorator; */ declare const Watch: (value: string) => PropertyDecorator; - /** * Defining Builder MethodDecorator * @since 7 @@ -177,6 +176,7 @@ declare interface Rectangle { /** * Defining isSystemplugin Constants. * @since 7 + * @systemapi */ declare const isSystemplugin: (...args: string[]) => any; @@ -194,10 +194,15 @@ declare function $rawfile(value: string): Resource; /** * global getContentStorage function - * @since 8 + * @since 9 */ declare function getContentStorage(value: any): ContentStorage; +/** + * Defines the context mock object. + * @since 8 + * @systemapi + */ declare type Context = any; /** @@ -206,29 +211,291 @@ declare type Context = any; */ declare function getContext(value: any): Context; -interface AnimateToParam { +/** + * Defines the animate function params. + * @since 7 + */ +declare interface AnimateParam { + /** + * Animation duration, in ms. + * @since 7 + */ 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. + * @since 7 + */ tempo?: number; + /** + * Animation curve. + * @since 7 + */ curve?: Curve | string; + /** + * Animation playback mode. By default, the animation is played from the beginning after the playback is complete. + * @since 7 + */ delay?: number; + /** + * Animation playback mode. By default, the animation is played from the beginning after the playback is complete. + * @since 7 + */ iterations?: number; + /** + * Animation playback mode. By default, the animation is played from the beginning after the playback is complete. + * @since 7 + */ playMode?: PlayMode; + /** + * Callback invoked when the animation playback is complete. + * @since 7 + */ onFinish?: () => void; } +/** + * Defines the motion path options. + * @since 7 + */ +declare interface MotionPathOptions { + /** + * The path info. + * @since 7 + */ + path: string; + /** + * The origin point info. + * @since 7 + */ + from?: number; + /** + * The distance point info. + * @since 7 + */ + to?: number; + /** + * The rotate info. + * @since 7 + */ + rotatable?: boolean; +} + +/** + * Defines the shard transition function params. + * @since 7 + */ +declare interface sharedTransitionOptions { + /** + * Animation duration, in ms. + * @since 7 + */ + duration?: number; + /** + * Animation duration, in ms. + * @since 7 + */ + curve?: Curve | string; + /** + * Animation playback mode. By default, the animation is played from the beginning after the playback is complete. + * @since 7 + */ + delay?: number; + /** + * The motion path info. + * @since 7 + */ + motionPath?: MotionPathOptions; + /** + * Z index info. + * @since 7 + */ + zIndex?: number; + /** + * the animate type. + * @since 7 + */ + type?: SharedTransitionEffectType; +} + +/** + * Defines the options of translate. + * @since 7 + */ +declare interface TranslateOptions { + /** + * The param of x direction. + * @since 7 + */ + x?: number | string; + /** + * The param of y direction. + * @since 7 + */ + y?: number | string; + /** + * The param of z direction. + * @since 7 + */ + z?: number | string; +} + +/** + * Defines the options of scale. + * @since 7 + */ +declare interface ScaleOptions { + /** + * The param of x direction. + * @since 7 + */ + x?: number; + /** + * The param of y direction. + * @since 7 + */ + y?: number; + /** + * The param of z direction. + * @since 7 + */ + z?: number; + /** + * The param of center point of x. + * @since 7 + */ + centerX?: number | string; + /** + * The param of center point of y. + * @since 7 + */ + centerY?: number | string; +} + +declare interface RotateOptions { + /** + * The param of x direction. + * @since 7 + */ + x?: number; + /** + * The param of y direction. + * @since 7 + */ + y?: number; + /** + * The param of z direction. + * @since 7 + */ + z?: number; + /** + * The param of center point of x. + * @since 7 + */ + centerX?: number | string; + /** + * The param of center point of y. + * @since 7 + */ + centerY?: number | string; + /** + * The param of angle. + * @since 7 + */ + angle: number | string; +} + +/** + * Defines the param of transition. + * @since 7 + */ +declare interface TransitionOptions { + /** + * Defines the param of type. + * @since 7 + */ + type?: TransitionType; + /** + * Defines the param of opacity. + * @since 7 + */ + opacity?: number; + /** + * Defines the param of translate. + * @since 7 + */ + translate?: TransitionOptions; + /** + * Defines the param of scale. + * @since 7 + */ + scale?: ScaleOptions; + /** + * Defines the param of rotate. + * @since 7 + */ + rotate?: RotateOptions; +} + /** * Define Preview property * @since 8 + * @systemapi */ interface PreviewParams { + /** + * Define Preview title + * @since 8 + * @systemapi + */ title?: string; + /** + * Define Preview width + * @since 8 + * @systemapi + */ width?: number; + /** + * Define Preview height + * @since 8 + * @systemapi + */ height?: number; + /** + * Define Preview locale + * @since 8 + * @systemapi + */ locale?: string; + /** + * Define Preview colorMode + * @since 8 + * @systemapi + */ colorMode?: string; + /** + * Define Preview deviceType + * @since 8 + * @systemapi + */ deviceType?: string; + /** + * Define Preview dpi + * @since 8 + * @systemapi + */ dpi?: number; + /** + * Define Preview orientation + * @since 8 + * @systemapi + */ orientation?: string; + /** + * Define Preview roundScreen + * @since 8 + * @systemapi + */ roundScreen?: boolean; } @@ -236,7 +503,7 @@ interface PreviewParams { * ItemDragInfo object description * @since 8 */ -interface ItemDragInfo { +declare interface ItemDragInfo { /** * Obtains the X coordinate of the drag window, in vp. * @since 8 @@ -254,7 +521,7 @@ interface ItemDragInfo { * DragItemInfo object description * @since 8 */ -interface DragItemInfo { +declare interface DragItemInfo { /** * Uses the pixelMap object for drawing. * @since 8 @@ -278,7 +545,7 @@ interface DragItemInfo { * Defining animation function. * @since 7 */ -declare function animateTo(value: AnimateToParam, event: () => void): void; +declare function animateTo(value: AnimateParam, event: () => void): void; /** * Converts a value in vp units to a value in px. @@ -320,7 +587,7 @@ declare function px2lpx(value: number): number; * Defines the event target. * @since 8 */ -interface EventTarget { +declare interface EventTarget { /** * Area of current target. * @since 8 @@ -356,7 +623,7 @@ declare enum SourceType { * Defines the base event. * @since 8 */ -interface BaseEvent { +declare interface BaseEvent { /** * Defines the current target which fires this event. * @since 8 @@ -380,7 +647,7 @@ interface BaseEvent { * The tap action triggers this method invocation. * @since 7 */ -interface ClickEvent extends BaseEvent { +declare interface ClickEvent extends BaseEvent { /** * X coordinate of the click point relative to the left edge of the device screen. * @since 7 @@ -410,7 +677,7 @@ interface ClickEvent extends BaseEvent { * The mouse click action triggers this method invocation. * @since 8 */ -interface MouseEvent extends BaseEvent { +declare interface MouseEvent extends BaseEvent { /** * Mouse button of the click event. * @since 8 @@ -458,7 +725,7 @@ interface MouseEvent extends BaseEvent { * Type of the touch event. * @since 7 */ -interface TouchObject { +declare interface TouchObject { /** * Type of the touch event. * @since 7 @@ -500,7 +767,7 @@ interface TouchObject { * Touch Action Function Parameters * @since 7 */ -interface TouchEvent extends BaseEvent { +declare interface TouchEvent extends BaseEvent { /** * Type of the touch event. * @since 7 @@ -526,13 +793,21 @@ interface TouchEvent extends BaseEvent { stopPropagation?: () => void; } +/** + * Defines the PixelMap type object for ui component. + * @since 7 + */ +declare type PixelMap = PixelMapMock; + /** * pixelmap object with release function. + * @systemapi * @since 7 */ -declare interface PixelMap { +declare interface PixelMapMock { /** * release function. + * @systemapi * @since 7 */ release(): void; @@ -542,7 +817,7 @@ declare interface PixelMap { * DragEvent object description * @since 7 */ -interface DragEvent { +declare interface DragEvent { /** * Obtains the X coordinate of the drag window, in vp. * @since 7 @@ -560,7 +835,7 @@ interface DragEvent { * KeyEvent object description: * @since 7 */ -interface KeyEvent { +declare interface KeyEvent { /** * Type of a key. * @since 7 @@ -615,7 +890,7 @@ interface KeyEvent { * Component State Styels. * @since 8 */ -interface StateStyels { +declare interface StateStyles { /** * Defines normal state styles. * @since 8 @@ -647,7 +922,11 @@ interface StateStyels { clicked?: any; } -interface PopupOption { +/** + * Defines the popup options. + * @since 7 + */ +declare interface PopupOptions { /** * Information in the pop-up window. * @since 7 @@ -703,7 +982,11 @@ interface PopupOption { onStateChange?: (event: { isVisible: boolean }) => void; } -interface CustomPopupOption { +/** + * Defines the custom popup options. + * @since 8 + */ +declare interface CustomPopupOptions { /** * builder of popup * @since 8 @@ -748,13 +1031,15 @@ interface CustomPopupOption { } /** - * CommonMethod + * CommonMethod. * @since 7 */ declare class CommonMethod { /** * constructor. + * @systemapi * @since 7 + * @ignore */ constructor(); @@ -772,7 +1057,6 @@ declare class CommonMethod { /** * Sets the response region of the current component. - * @devices phone, tablet, car * @since 8 */ responseRegion(value: Array | Rectangle): T; @@ -781,42 +1065,35 @@ declare class CommonMethod { * The size of the current component. * @since 7 */ - size(value: { width?: Length; height?: Length }): T; + size(value: SizeOptions): T; /** * constraint Size: * minWidth:minimum Width,maxWidth:maximum Width,minHeight:minimum Height ,maxHeight:maximum Height, * @since 7 */ - constraintSize(value: { - minWidth?: number | string | Resource; - maxWidth?: number | string | Resource; - minHeight?: number | string | Resource; - maxHeight?: number | string | Resource; - }): T; + constraintSize(value: ConstraintSizeOptions): T; /** * Sets the touchable of the current component - * @devices phone, tablet, car - * @since 8 + * @since 7 */ touchable(value: boolean): T; /** * layout Weight - * @devices phone, tablet, car. * @since 7 */ layoutWeight(value: number | string): T; /** - * Inner margin + * Inner margin. * @since 7 */ padding(value: Padding | Length): T; /** - * Outer Margin + * Outer Margin. * @since 7 */ margin(value: Margin | Length): T; @@ -825,32 +1102,27 @@ declare class CommonMethod { * Background color * @since 7 */ - backgroundColor(value: Color | number | string | Resource): T; + backgroundColor(value: ResourceColor): T; /** * Background image * src: Image address url * @since 7 */ - backgroundImage(src: string | Resource, repeat?: ImageRepeat): T; + backgroundImage(src: ResourceStr, repeat?: ImageRepeat): T; /** * Background image size * @since 7 */ - backgroundImageSize( - value: { - width?: number | string | Resource; - height?: number | string | Resource - } | ImageSize - ): T; + backgroundImageSize(value: SizeOptions | ImageSize): T; /** * Background image position * x:Horizontal coordinate;y:Vertical axis coordinate. * @since 7 */ - backgroundImagePosition(value: { x?: number | string | Resource; y?: number | string | Resource } | Alignment): T; + backgroundImagePosition(value: Position | Alignment): T; /** * Opacity @@ -863,12 +1135,7 @@ declare class CommonMethod { * width:Border width;color:Border color;radius:Border radius; * @since 7 */ - border(value: { - width?: number | string | Resource; - color?: Color | number | string | Resource; - radius?: number | string | Resource; - style?: BorderStyle; - }): T; + border(value: BorderOptions): T; /** * Border style @@ -880,19 +1147,19 @@ declare class CommonMethod { * Border width * @since 7 */ - borderWidth(value: number | string | Resource): T; + borderWidth(value: Length): T; /** * Border color * @since 7 */ - borderColor(value: Color | number | string | Resource): T; + borderColor(value: ResourceColor): T; /** * Border radius * @since 7 */ - borderRadius(value: number | string | Resource): T; + borderRadius(value: Length): T; /** * Trigger a click event when a click is clicked. @@ -934,68 +1201,31 @@ declare class CommonMethod { * Set focusable. * @since 8 */ - focusable(value: boolean): T; + focusable(value: boolean): T; /** * Trigger a event when got focus. * @since 8 */ - onFocus(event: () => void): T; + onFocus(event: () => void): T; /** * Trigger a event when lose focus. * @since 8 */ - onBlur(event: () => void): T; - - /** - * Trigger a event when focus move. - * @since 8 - */ - onFocusMove(event: (direction?: FocusDirection) => void): T; + onBlur(event: () => void): T; /** * animation * @since 7 */ - animation(value: { - duration?: number; - tempo?: number; - curve?: Curve | string; - delay?: number; - iterations?: number; - playMode?: PlayMode; - onFinish?: () => void; - }): T; + animation(value: AnimateParam): T; /** * Transition parameter * @since 7 */ - transition(value: { - type?: TransitionType; - opacity?: number; - translate?: { - x?: number | string; - y?: number | string; - z?: number | string; - }; - scale?: { - x?: number; - y?: number; - z?: number; - centerX?: number | string; - centerY?: number | string; - }; - rotate?: { - x?: number; - y?: number; - z?: number; - centerX?: number | string; - centerY?: number | string; - angle: number | string; - }; - }): T; + transition(value: TransitionOptions): T; /** * Bind gesture recognition. @@ -1099,13 +1329,13 @@ declare class CommonMethod { * When this parameter is set together with slide, slide takes effect by default. * @since 7 */ - translate(value: { x?: number | string; y?: number | string; z?: number | string }): T; + translate(value: TranslateOptions): T; /** * Sets the zoom effect during page transition. The value is the start point of entry and end point of exit. * @since 7 */ - scale(value: { x?: number; y?: number; z?: number; centerX?: number | string; centerY?: number | string }): T; + scale(value: ScaleOptions): T; /** * Default number of occupied columns, indicating the number of occupied grid columns when the number of columns (span) of the corresponding size is not set in the useSizeType attribute. @@ -1125,14 +1355,7 @@ declare class CommonMethod { * The values are the start point during insertion and the end point during deletion. * @since 7 */ - rotate(value: { - x?: number; - y?: number; - z?: number; - centerX?: number | string; - centerY?: number | string; - angle: number | string; - }): T; + rotate(value: RotateOptions): T; /** * Sets the transformation matrix for the current component. @@ -1153,7 +1376,7 @@ declare class CommonMethod { onDisAppear(event: () => void): T; /** - * This callback is triggered when the size or position of this component has changed. + * This callback is triggered when the size or position of this component change finished. * @param event event callback. * @since 8 */ @@ -1205,22 +1428,7 @@ declare class CommonMethod { * 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. * @since 7 */ - sharedTransition( - id: string, - options?: { - duration?: number; - curve?: Curve | string; - delay?: number; - motionPath?: { - path: string; - from?: number; - to?: number; - rotatable?: boolean; - }; - zIndex?: number; - type?: SharedTransitionEffectType; - }, - ): T; + sharedTransition(id: string, options?: sharedTransitionOptions): T; /** * Sets the sliding direction. The enumerated value supports logical AND (&) and logical OR (|). @@ -1238,20 +1446,20 @@ declare class CommonMethod { * position * @since 7 */ - position(value: { x?: number | string | Resource; y?: number | string | Resource }): T; + position(value: Position): T; /** * Sets the anchor point of the element when it is positioned. The base point is offset from the top start point of the element. * @since 7 */ - markAnchor(value: { x?: number | string | Resource; y?: number | string | Resource }): T; + markAnchor(value: Position): T; /** * 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. * @since 7 */ - offset(value: { x?: number | string | Resource; y?: number | string | Resource }): T; + offset(value: Position): T; /** * If the value is true, the component is available and can respond to operations such as clicking. @@ -1365,7 +1573,7 @@ declare class CommonMethod { * rotatble:Whether to follow the path for rotation. * @since 7 */ - motionPath(value: { path: string; from?: number; to?: number; rotatable?: boolean }): T; + motionPath(value: MotionPathOptions): T; /** * Add a shadow effect to the current component @@ -1394,6 +1602,8 @@ declare class CommonMethod { /** * Key. User can set an key to the component to identify it. * @since 8 + * @systemapi + * @test */ key(value: string): T; @@ -1413,7 +1623,7 @@ declare class CommonMethod { * Popup control * @since 7 */ - bindPopup(show: boolean, popup: PopupOption | CustomPopupOption): T; + bindPopup(show: boolean, popup: PopupOptions | CustomPopupOptions): T; /** * Menu control @@ -1425,13 +1635,13 @@ declare class CommonMethod { * ContextMenu control * @since 8 */ - bindContextMenu(content: CustomBuilder, responseType : ResponseType): T; + bindContextMenu(content: CustomBuilder, responseType: ResponseType): T; /** * Sets styles for component state. * @since 8 */ - stateStyles(value: StateStyels): T; + stateStyles(value: StateStyles): T; /** * id for distrubte identification. @@ -1441,13 +1651,13 @@ declare class CommonMethod { } /** - * CommonAttribute + * CommonAttribute for ide. * @since 7 */ declare class CommonAttribute extends CommonMethod {} /** - * CommonInterface + * CommonInterface for ide. * @since 7 */ interface CommonInterface { @@ -1455,13 +1665,13 @@ interface CommonInterface { } /** - * CommonInstance + * CommonInstance for ide. * @since 7 */ declare const CommonInstance: CommonAttribute; /** - * Common + * Common for ide. * @since 7 */ declare const Common: CommonInterface; @@ -1480,6 +1690,7 @@ declare class CommonShapeMethod extends CommonMethod { /** * constructor. * @since 7 + * @syetemapi */ constructor(); @@ -1487,13 +1698,13 @@ declare class CommonShapeMethod extends CommonMethod { * border Color * @since 7 */ - stroke(value: Color | number | string | Resource): T; + stroke(value: ResourceColor): T; /** * Fill color. * @since 7 */ - fill(value: Color | number | string | Resource): T; + fill(value: ResourceColor): T; /** * Offset from the start point of the border drawing. @@ -1535,7 +1746,7 @@ declare class CommonShapeMethod extends CommonMethod { * Sets the width of the dividing line. * @since 7 */ - strokeWidth(value: number | string | Resource): T; + strokeWidth(value: Length): T; /** * Indicates whether to enable anti-aliasing @@ -1572,16 +1783,38 @@ declare class CustomComponent { * @since 7 */ aboutToDisappear?(): void; + + /** + * onPageShow Method + * @since 7 + */ + onPageShow?(): void; + + /** + * onPageHide Method + * @since 7 + */ + onPageHide?(): void; + + /** + * onBackPress Method + * @since 7 + */ + onBackPress?(): void; } /** * View * @ignore ide should ignore this class + * @systemapi + * @since 7 */ declare class View { /** * Just use for generate tsbundle * @ignore ide should ignore this arrtibute + * @systemapi + * @since 7 */ create(value: any): any; } diff --git a/api/@internal/component/ets/custom_dialog_controller.d.ts b/api/@internal/component/ets/custom_dialog_controller.d.ts index f208a905785be27f76a992eedab3d378025097ff..c0686ea814e4b35b9b29656c644f81941aa2951e 100644 --- a/api/@internal/component/ets/custom_dialog_controller.d.ts +++ b/api/@internal/component/ets/custom_dialog_controller.d.ts @@ -15,10 +15,10 @@ /** - * Defines the option of CustomDialogController. + * Defines the options of CustomDialogController. * @since 7 */ -declare interface CustomDialogControllerOption { +declare interface CustomDialogControllerOptions { /** * Custom builder function. * @since 7 @@ -71,7 +71,7 @@ declare class CustomDialogController { * The constructor transfers parameter settings. * @since 7 */ - constructor(value: CustomDialogControllerOption); + constructor(value: CustomDialogControllerOptions); /** * Display the content of the customized pop-up window. If the content has been displayed, it does not take effect. diff --git a/api/@internal/component/ets/data_panel.d.ts b/api/@internal/component/ets/data_panel.d.ts index 82d6f4c68b00d7197d82962285509577acdf8e30..9a702b2b2ef3e159ad7ae81d09314f1afc86098e 100644 --- a/api/@internal/component/ets/data_panel.d.ts +++ b/api/@internal/component/ets/data_panel.d.ts @@ -33,10 +33,10 @@ declare enum DataPanelType { } /** - * Defines the option of DataPanel. + * Defines the options of DataPanel. * @since 7 */ -declare interface DataPanelOption { +declare interface DataPanelOptions { /** * Current data value. the max length is 9. * @since 7 @@ -65,7 +65,7 @@ interface DataPanelInterface { * Return a DataPanel. * @since 7 */ - (options: DataPanelOption): DataPanelAttribute; + (options: DataPanelOptions): DataPanelAttribute; } /** diff --git a/api/@internal/component/ets/date_picker.d.ts b/api/@internal/component/ets/date_picker.d.ts index d5c55b20326d52915413b59f6e530182066a9787..02c116589efa4388800628ddaedbebd30913fed4 100644 --- a/api/@internal/component/ets/date_picker.d.ts +++ b/api/@internal/component/ets/date_picker.d.ts @@ -13,24 +13,6 @@ * limitations under the License. */ -/** - * Defines the type of DatePicker. - * @since 8 - */ -declare enum DatePickerType { - /** - * Application hour and second - * @since 8 - */ - Time, - - /** - * Application data - * @since 8 - */ - Date, -} - /** * Defines the struct of DatePickerResult. * @since 8 @@ -53,49 +35,29 @@ declare interface DatePickerResult { * @since 8 */ day?: number; - - /** - * Application hour - * @since 8 - */ - hour?: number; - - /** - * Application minute - * @since 8 - */ - minute?: number; - - /** - * Application second - * @since 8 - */ - second?: number; } /** - * Defines the option of DatePicker. + * Defines the options of DatePicker. * @since 8 */ -declare interface DatePickerOption { +declare interface DatePickerOptions { /** * Specifies the start date of the date selector. + * @since 8 */ start?: Date; /** * Specifies the end date for the date selector. + * @since 8 */ end?: Date; /** * Specifies the date selector check date or time selector check time. + * @since 8 */ selected?: Date; - - /** - * Selector type, including date selector and time selector. By default, the date selector is used. - */ - type?: DatePickerType; } /** @@ -107,7 +69,7 @@ interface DatePickerInterface { * Defines the DatePicker constructor. * @since 8 */ - (options?: DatePickerOption): DatePickerAttribute; + (options?: DatePickerOptions): DatePickerAttribute; } /** @@ -121,12 +83,6 @@ declare class DatePickerAttribute extends CommonMethod { */ lunar(value: boolean): DatePickerAttribute; - /** - * Time Selector: indicates whether to display the 24-hour clock. - * @since 8 - */ - useMilitaryTime(value: boolean): DatePickerAttribute; - /** * This event is triggered when a DatePicker date or time is selected. * @since 8 @@ -135,20 +91,16 @@ declare class DatePickerAttribute extends CommonMethod { } /** - * Defines the DatePickerDialogOption for Data Picker Dialog. + * Defines the DatePickerDialogOptions for Data Picker Dialog. * @since 8 */ -declare interface DatePickerDialogOption extends DatePickerOption { +declare interface DatePickerDialogOptions extends DatePickerOptions { /** * Date selector: true: displays the lunar calendar. false: The lunar calendar is not displayed. * @since 8 */ lunar?: boolean; - /** - * Time Selector: indicates whether to display the 24-hour clock. - * @since 8 - */ - useMilitaryTime?: boolean; + /** * Called when the OK button in the dialog is clicked. * @since 8 @@ -175,7 +127,7 @@ declare class DatePickerDialog { * Invoking method display. * @since 8 */ - static show(options?: DatePickerDialogOption); + static show(options?: DatePickerDialogOptions); } declare const DatePicker: DatePickerInterface; diff --git a/api/@internal/component/ets/divider.d.ts b/api/@internal/component/ets/divider.d.ts index 4ee88aa42e24c44c25e9f4d0d61aa9e2edad3633..67ce98ac5debfff200f3423a798fb40e20f2e37f 100644 --- a/api/@internal/component/ets/divider.d.ts +++ b/api/@internal/component/ets/divider.d.ts @@ -13,7 +13,6 @@ * limitations under the License. */ - /** * Provides a divider component to separate different content blocks/content elements. * @since 7 @@ -57,5 +56,5 @@ declare class DividerAttribute extends CommonMethod { lineCap(value: LineCapStyle): DividerAttribute; } -declare const Divider: DividerInterface +declare const Divider: DividerInterface; declare const DividerInstance: DividerAttribute; diff --git a/api/@internal/component/ets/ellipse.d.ts b/api/@internal/component/ets/ellipse.d.ts index 2ba7cdbbba6274970b5ec0f5cdd74d899db71117..2b207f95085f3a4537fb8b0170f068ea2349999d 100644 --- a/api/@internal/component/ets/ellipse.d.ts +++ b/api/@internal/component/ets/ellipse.d.ts @@ -13,7 +13,6 @@ * limitations under the License. */ - /** * Ellipse drawing. * @since 7 diff --git a/api/@internal/component/ets/enums.d.ts b/api/@internal/component/ets/enums.d.ts index bf60ad002433926b4f6e0c48cd52646d85a7f623..518e2efabf457a584b22d6b2321ea1a507f7b164 100644 --- a/api/@internal/component/ets/enums.d.ts +++ b/api/@internal/component/ets/enums.d.ts @@ -274,13 +274,7 @@ declare enum MouseAction { * Triggered when the mouse is Hovered. * @since 8 */ - Hover, - - /** - * Triggered when the mouse status is None. - * @since 8 - */ - None, + Hover } /** @@ -457,60 +451,6 @@ declare enum PlayMode { AlternateReverse, } -/** - * This style allows you to set the window blurring degree and blurring style of the current component layout range, - * @since 7 - */ -declare enum BlurStyle { - /** - * Small range glow effect. - * @since 7 - */ - SmallLight, - - /** - * Medium range glow effect. - * @since 7 - */ - MediumLight, - - /** - * Wide range of luminous effects. - * @since 7 - */ - LargeLight, - - /** - * Super-range luminous effect. - * @since 7 - */ - XlargeLight, - - /** - * Small range of dark effects. - * @since 7 - */ - SmallDark, - - /** - * Medium range dark effect. - * @since 7 - */ - MediumDark, - - /** - * Wide range of dark effects. - * @since 7 - */ - LargeDark, - - /** - * Extra large range of dark effects. - * @since 7 - */ - XlargeDark, -} - /** * Type of a key. * @since 7 @@ -667,42 +607,6 @@ declare enum Direction { Auto, } -/** - * Sets the horizontal layout of elements. - * @since 8 - */ -declare enum FocusDirection { - /** - * From the key up. - * @since 8 - */ - Up, - - /** - * From the key down. - * @since 8 - */ - Down, - - /** - * From the key left. - * @since 8 - */ - Left, - - /** - * From the key right. - * @since 8 - */ - Right, - - /** - * From the key tab. - * @since 8 - */ - Tab, -} - /** * Used to set the status of the scroll bar. * @since 7 @@ -1449,7 +1353,7 @@ declare enum HoverEffect { * Highlight effect * @since 8 */ - Board, + Highlight, /** * None effect diff --git a/api/@internal/component/ets/flex.d.ts b/api/@internal/component/ets/flex.d.ts index 0e6bb92157dfb4a59f4214380a00e2bcea6ae5b2..a22e7c704c5c2801c0c660a4c5038bea99bdddb7 100644 --- a/api/@internal/component/ets/flex.d.ts +++ b/api/@internal/component/ets/flex.d.ts @@ -14,10 +14,10 @@ */ /** - * Defines the option of Flex. + * Defines the options of Flex. * @since 7 */ -declare interface FlexOption { +declare interface FlexOptions { /** * Sets the horizontal layout of elements. * @since 7 @@ -58,7 +58,7 @@ interface FlexInterface { * Defines the constructor of Flex. * @since 7 */ - (value?: FlexOption): FlexAttribute; + (value?: FlexOptions): FlexAttribute; } /** diff --git a/api/@internal/component/ets/for_each.d.ts b/api/@internal/component/ets/for_each.d.ts index d1e8c71767b13b0655f5eabebe878514378aa4b4..f6bf97cf24a4e5719cf5c22849edf0b8fdabfe8f 100644 --- a/api/@internal/component/ets/for_each.d.ts +++ b/api/@internal/component/ets/for_each.d.ts @@ -14,7 +14,7 @@ */ /** - * looping + * looping function. * @since 7 */ interface ForEachInterface { @@ -29,8 +29,4 @@ interface ForEachInterface { ): ForEachInterface; } -/** - * @devices phone, tablet, car - * @since 7 - */ declare const ForEach: ForEachInterface; diff --git a/api/@internal/component/ets/form_component.d.ts b/api/@internal/component/ets/form_component.d.ts index 1d3fa7dfdd56e0ff2605ab27801d6f5ecee3ff10..e94054f90fc62702d70c57a1d4e7993ddf680d4c 100644 --- a/api/@internal/component/ets/form_component.d.ts +++ b/api/@internal/component/ets/form_component.d.ts @@ -13,7 +13,6 @@ * limitations under the License. */ - /** * Defines the FormDimension enum. * @since 7 @@ -132,6 +131,13 @@ declare class FormComponentAttribute extends CommonMethod void): FormComponentAttribute; + + /** + * Uninstall Card. + * @since 7 + * @systemapi + */ + onUninstall(callback: (info: { id: number }) => void): FormComponentAttribute; } declare const FormComponent: FormComponentInterface; diff --git a/api/@internal/component/ets/gauge.d.ts b/api/@internal/component/ets/gauge.d.ts index 6002fadf1e2c2b76349bb05cdfe4bb2a0adb9e89..5186c6c7748337777aa9d14805ad6d5afb73b19a 100644 --- a/api/@internal/component/ets/gauge.d.ts +++ b/api/@internal/component/ets/gauge.d.ts @@ -62,5 +62,5 @@ declare class GaugeAttribute extends CommonMethod { strokeWidth(length: number): GaugeAttribute; } -declare const Gauge: GaugeInterface +declare const Gauge: GaugeInterface; declare const GaugeInstance: GaugeAttribute; diff --git a/api/@internal/component/ets/gesture.d.ts b/api/@internal/component/ets/gesture.d.ts index a91f87a8593303880f2d89e5434ca595ff355c55..0381bdf923a8fa8e03f30fca300c38acd6ed618d 100644 --- a/api/@internal/component/ets/gesture.d.ts +++ b/api/@internal/component/ets/gesture.d.ts @@ -13,30 +13,6 @@ * limitations under the License. */ -/** - * Creating an Object - * @since 7 - */ -declare enum GestureDirection { - /** - * Sliding in all directions. - * @since 7 - */ - All, - - /** - * Sliding horizontally. - * @since 7 - */ - Horizontal, - - /** - * Sliding Vertical - * @since 7 - */ - Vertical, -} - /** * Creating an Object * @since 7 @@ -341,10 +317,10 @@ interface LongPressGestureInterface { } /** - * Defines the PanGesture option. + * Defines the PanGesture options. * @since 7 */ -declare class PanGestureOption { +declare class PanGestureOptions { /** * Constructor parameters. * @since 7 @@ -379,7 +355,7 @@ interface PanGestureInterface { * Set the value. * @since 7 */ - (value?: { fingers?: number; direction?: PanDirection; distance?: number } | PanGestureOption): PanGestureInterface; + (value?: { fingers?: number; direction?: PanDirection; distance?: number } | PanGestureOptions): PanGestureInterface; /** * Pan gesture recognition success callback. diff --git a/api/@internal/component/ets/grid.d.ts b/api/@internal/component/ets/grid.d.ts index fb54634f35b985a9b9bedea76e1134248687a435..e58a4765bcee9799274ca04d52c879227b7de0d0 100644 --- a/api/@internal/component/ets/grid.d.ts +++ b/api/@internal/component/ets/grid.d.ts @@ -13,8 +13,8 @@ * limitations under the License. */ - /** + * Defines the grid interface. * @since 7 */ interface GridInterface { @@ -30,13 +30,30 @@ interface GridInterface { * @since 8 */ declare enum GridDirection { + /** + * The row direction. + * @since 8 + */ Row, + /** + * The column direction. + * @since 8 + */ Column, + /** + * The row reverse direction. + * @since 8 + */ RowReverse, - ColumnReverse + /** + * The column reverse direction. + * @since 8 + */ + ColumnReverse, } /** + * Defines the grid attibute functions. * @since 7 */ declare class GridAttribute extends CommonMethod { @@ -112,10 +129,10 @@ declare class GridAttribute extends CommonMethod { */ maxCount(value: number): GridAttribute; - /** - * minCount - * @since 8 - */ + /** + * minCount + * @since 8 + */ minCount(value: number): GridAttribute; /** @@ -166,8 +183,9 @@ declare class GridAttribute extends CommonMethod { * This callback is triggered when the drag behavior is stopped within the scope of the component. * @since 8 */ - onItemDrop(event: - (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void): GridAttribute; + onItemDrop( + event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void, + ): GridAttribute; } declare const Grid: GridInterface; diff --git a/api/@internal/component/ets/grid_container.d.ts b/api/@internal/component/ets/grid_container.d.ts index 86cacbe4285c3633a39b2a676310922122340997..28203fa47f53365ea30a523ac957abe7864e6577 100644 --- a/api/@internal/component/ets/grid_container.d.ts +++ b/api/@internal/component/ets/grid_container.d.ts @@ -50,10 +50,10 @@ declare enum SizeType { } /** - * Defines the option of GridContainer. + * Defines the options of GridContainer. * @since 7 */ -declare interface GridContainerOption { +declare interface GridContainerOptions { /** * Sets the total number of columns in the current layout. * @since 7 @@ -88,7 +88,7 @@ interface GridContainerInterface { * Defines the constructor of GridContainer. * @since 7 */ - (value?: GridContainerOption): GridContainerAttribute; + (value?: GridContainerOptions): GridContainerAttribute; } /** diff --git a/api/@internal/component/ets/sheet.d.ts b/api/@internal/component/ets/hyperlink.d.ts similarity index 48% rename from api/@internal/component/ets/sheet.d.ts rename to api/@internal/component/ets/hyperlink.d.ts index 59b190edb3a11f2084de9c2a82ec7ce0e579d985..40751b2d28b0228f41b5266b250b72122e8cc0e6 100644 --- a/api/@internal/component/ets/sheet.d.ts +++ b/api/@internal/component/ets/hyperlink.d.ts @@ -1,35 +1,43 @@ -/* - * Copyright (c) 2021 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. - */ - -/** - * Provides the interface for the sheet attributes. - * @since 8 - */ -interface SheetInterface { - /** - * Create sheet. - * @since 8 - */ - (): SheetAttribute; -} - -/** - * Declares sheet properties. - * @since 8 - */ -declare class SheetAttribute extends CommonMethod {} - -declare const Sheet: SheetInterface; -declare const SheetInstance: SheetAttribute; +/* + * Copyright (c) 2021 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. + */ + +/** + * Defines the hyperlink interface. + * @since 7 + */ +interface HyperlinkInterface { + /** + * Return to get Hyperlink. + * adress: Web page redirected by the hyperlink component. + * content: Hyperlinks in the hyperlink component display text. + * @since 7 + */ + (address: string | Resource, content?: string | Resource): HyperlinkAttribute; +} + +/** + * Defines the hyperlink attibute functions + * @since 7 + */ +declare class HyperlinkAttribute extends CommonMethod { + /** + * Set Color + * @since 7 + */ + color(value: Color | number | string | Resource): HyperlinkAttribute; +} + +declare const Hyperlink: HyperlinkInterface; +declare const HyperlinkInterface: HyperlinkAttribute; diff --git a/api/@internal/component/ets/image.d.ts b/api/@internal/component/ets/image.d.ts index 9474d5f7c62c2a75fe1ad39ad96b25cd967a8456..49465ff58cc663a6fa2f7d492f834889229dd104 100644 --- a/api/@internal/component/ets/image.d.ts +++ b/api/@internal/component/ets/image.d.ts @@ -171,12 +171,5 @@ declare class ImageAttribute extends CommonMethod { onFinish(event: () => void): ImageAttribute; } -/** - * @devices phone, tablet, car - * @since 7 - */ declare const Image: ImageInterface; -/** - * @since 7 - */ declare const ImageInstance: ImageAttribute; diff --git a/api/@internal/component/ets/image_animator.d.ts b/api/@internal/component/ets/image_animator.d.ts index c30d4db7291408156145ee3ef344ba6d1000dab7..aa269104fdb4ab6f8372db7265413d7b459cf3b4 100644 --- a/api/@internal/component/ets/image_animator.d.ts +++ b/api/@internal/component/ets/image_animator.d.ts @@ -14,6 +14,7 @@ */ /** + * Defines the ImageAnimator Interface. * @since 7 */ interface ImageAnimatorInterface { diff --git a/api/@internal/component/ets/index-full.d.ts b/api/@internal/component/ets/index-full.d.ts index f4427afcf654483824da3b49ebf35ca180bd7101..25e737704ec1431e8d9a54197941dfc40709c9f0 100644 --- a/api/@internal/component/ets/index-full.d.ts +++ b/api/@internal/component/ets/index-full.d.ts @@ -44,6 +44,7 @@ /// /// /// +/// /// /// /// @@ -58,7 +59,6 @@ /// /// /// -/// /// /// /// @@ -76,7 +76,6 @@ /// /// /// -/// /// /// /// @@ -92,6 +91,7 @@ /// /// /// +/// /// /// /// diff --git a/api/@internal/component/ets/lazy_for_each.d.ts b/api/@internal/component/ets/lazy_for_each.d.ts index 8498b93cb12817ebde6a80faffd21d5c1d44aea3..a027eab8aff3963214cdccde22447144c5a0ea07 100644 --- a/api/@internal/component/ets/lazy_for_each.d.ts +++ b/api/@internal/component/ets/lazy_for_each.d.ts @@ -27,53 +27,81 @@ declare interface DataChangeListener { /** * Data added. * @since 7 + * @deprecated since 8 */ onDataAdded(index: number): void; + /** + * Data added. + * @since 8 + */ + onDataAdd(index: number): void; + /** * Data moved. * @since 7 + * @deprecated since 8 */ onDataMoved(from: number, to: number): void; + /** + * Data moved. + * @since 8 + */ + onDataMove(from: number, to: number): void; + /** * Data deleted. * @since 7 + * @deprecated since 8 */ onDataDeleted(index: number): void; /** - * Data changed. + * Data deleted. + * @since 8 + */ + onDataDelete(index: number): void; + + /** + * Call when has data change. * @since 7 + * @deprecated since 8 */ onDataChanged(index: number): void; + + /** + * Call when has data change. + * @since 8 + */ + onDataChange(index: number): void; } /** - * Data changed. + * Developers need to implement this interface to provide data to LazyForEach component. * @since 7 */ declare interface IDataSource { /** - * Total count. + * Total data count. * @since 7 */ totalCount(): number; /** - * get data. + * Return the data of index. * @since 7 */ getData(index: number): any; /** - * register Data Change Listener + * Register data change listener. * @since 7 */ registerDataChangeListener(listener: DataChangeListener): void; /** - * unregister Data Change Listener + * Unregister data change listener. * @since 7 */ unregisterDataChangeListener(listener: DataChangeListener): void; @@ -95,7 +123,4 @@ interface LazyForEachInterface { ): LazyForEachInterface; } -/** - * @since 7 - */ declare const LazyForEach: LazyForEachInterface; diff --git a/api/@internal/component/ets/list.d.ts b/api/@internal/component/ets/list.d.ts index 8470f64a9b3a7f0d177c389ee4c49af0cba0d9e2..24845b0924b93892776455ee849c167a66825335 100644 --- a/api/@internal/component/ets/list.d.ts +++ b/api/@internal/component/ets/list.d.ts @@ -106,7 +106,7 @@ declare class ListAttribute extends CommonMethod { /** * Called when setting whether to enable chain linkage dynamic effect. - * @since 8 + * @since 7 */ chainAnimation(value: boolean): ListAttribute; @@ -185,8 +185,5 @@ declare class ListAttribute extends CommonMethod { onItemDrop(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void): ListAttribute; } -/** - * @since 7 - */ declare const List: ListInterface; declare const ListInstance: ListAttribute; diff --git a/api/@internal/component/ets/list_item.d.ts b/api/@internal/component/ets/list_item.d.ts index 96b1afa40ca04b93d1eaad56538f3b031a10ec81..c72b8b44caa401b3534af26f1870bc24d9706b49 100644 --- a/api/@internal/component/ets/list_item.d.ts +++ b/api/@internal/component/ets/list_item.d.ts @@ -113,4 +113,3 @@ declare class ListItemAttribute extends CommonMethod { */ declare const ListItemInstance: ListItemAttribute; declare const ListItem: ListItemInterface; - diff --git a/api/@internal/component/ets/loading_progress.d.ts b/api/@internal/component/ets/loading_progress.d.ts index 5bc3c49fd9143fc0c25ddbf99ba3344164968342..2d1ad14dfd53951a27783b7839fd3317c5ac59ba 100644 --- a/api/@internal/component/ets/loading_progress.d.ts +++ b/api/@internal/component/ets/loading_progress.d.ts @@ -37,8 +37,6 @@ declare enum LoadingProgressStyle { Orbital, } - - /** * Provides an interface for extending the loading progress. * @since 8 @@ -71,4 +69,4 @@ declare const LoadingProgress: LoadingProgressInterface; * Loading Progress Extensions on Declarative Classes * @since 8 */ - declare const LoadingProgressInstance: LoadingProgressAttribute \ No newline at end of file +declare const LoadingProgressInstance: LoadingProgressAttribute; diff --git a/api/@internal/component/ets/middle_class.d.ts b/api/@internal/component/ets/middle_class.d.ts index 69f31c3b81848fe95432ecf1c608e90137b451bd..6470485b21e0afefcdc48c33a5d8011c3fcd0e85 100644 --- a/api/@internal/component/ets/middle_class.d.ts +++ b/api/@internal/component/ets/middle_class.d.ts @@ -1,623 +1,2351 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - + * Copyright (c) 2021 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. + */ + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSAlphabetIndexerAttribute extends CommonMethod { - pop(): AlphabetIndexerAttribute; - debugLine(value: string): AlphabetIndexerAttribute; - create(value: { - arrayValue: Array; - selected: number; - }): AlphabetIndexerAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): AlphabetIndexerAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): AlphabetIndexerAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value: { arrayValue: Array; selected: number }): AlphabetIndexerAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSAnimatorAttribute extends CommonMethod { - create(value: string): AnimatorAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value: string): AnimatorAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSBadgeAttribute extends CommonMethod { - pop(): BadgeAttribute; - debugLine(value: string): BadgeAttribute; - create(value: BadgeParamWithNumber | BadgeParamWithString): BadgeAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): BadgeAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): BadgeAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value: BadgeParamWithNumber | BadgeParamWithString): BadgeAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSBlankAttribute extends CommonMethod { - create(min?: number | string): BlankAttribute; - pop(): BlankAttribute; - debugLine(value: string): BlankAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(min?: number | string): BlankAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): BlankAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): BlankAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSButtonAttribute extends CommonMethod { - createWithChild(label?: ResourceStr, options?: ButtonOption): ButtonAttribute; - createWithLabel(label?: ResourceStr, options?: ButtonOption): ButtonAttribute; - pop(): ButtonAttribute; - debugLine(value: string): ButtonAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + createWithChild(label?: ResourceStr, options?: ButtonOptions): ButtonAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + createWithLabel(label?: ResourceStr, options?: ButtonOptions): ButtonAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): ButtonAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): ButtonAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSCalendarAttribute { - create(value: { - date: { - year: number; - month: number; - day: number; - }; - currentData: MonthData; - preData: MonthData; - nextData: MonthData; - controller?: CalendarController; - }): CalendarAttribute; - pop(): CalendarAttribute; - debugLine(value: string): CalendarAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value: { + date: { + year: number; + month: number; + day: number; + }; + currentData: MonthData; + preData: MonthData; + nextData: MonthData; + controller?: CalendarController; + }): CalendarAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): CalendarAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): CalendarAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSCanvasAttribute extends CommonMethod { - create(context?: CanvasRenderingContext2D): CanvasAttribute; - pop(): CanvasAttribute; - debugLine(value: string): CanvasAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(context?: CanvasRenderingContext2D): CanvasAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): CanvasAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): CanvasAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSCheckboxAttribute extends CommonMethod { - create(options?: CheckboxOption): CheckboxAttribute; - pop(): CheckboxAttribute; - debugLine(value: string): CheckboxAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(options?: CheckboxOptions): CheckboxAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): CheckboxAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): CheckboxAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSCheckboxGroupAttribute extends CommonMethod { - create(options?: CheckboxGroupOption): CheckboxGroupAttribute; - pop(): CheckboxGroupAttribute; - debugLine(value: string): CheckboxGroupAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(options?: CheckboxGroupOptions): CheckboxGroupAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): CheckboxGroupAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): CheckboxGroupAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSCircleAttribute extends CommonShapeMethod { - create(value?: CircleOption): CircleAttribute; - debugLine(value: string): CircleAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value?: CircleOptions): CircleAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): CircleAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSColumnAttribute extends CommonMethod { - create(value?: { - space?: string | number; - }): ColumnAttribute; - pop(): ColumnAttribute; - debugLine(value: string): ColumnAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value?: { space?: string | number }): ColumnAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): ColumnAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): ColumnAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSColumnSplitAttribute extends CommonMethod { - create(): ColumnSplitAttribute; - pop(): ColumnSplitAttribute; - debugLine(value: string): ColumnSplitAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(): ColumnSplitAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): ColumnSplitAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): ColumnSplitAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSCounterAttribute extends CommonMethod { - create(): CounterAttribute; - pop(): CounterAttribute; - debugLine(value: string): CounterAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(): CounterAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): CounterAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): CounterAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSDataPanelAttribute extends CommonMethod { - create(options: DataPanelOption): DataPanelAttribute; - pop(): DataPanelAttribute; - debugLine(value: string): DataPanelAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(options: DataPanelOptions): DataPanelAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): DataPanelAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): DataPanelAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSDatePickerAttribute extends CommonMethod { - create(options?: DatePickerOption): DatePickerAttribute; - pop(): DatePickerAttribute; - debugLine(value: string): DatePickerAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(options?: DatePickerOptions): DatePickerAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): DatePickerAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): DatePickerAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSDividerAttribute extends CommonMethod { - create(): DividerAttribute; - debugLine(value: string): DividerAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(): DividerAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): DividerAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSEllipseAttribute extends CommonShapeMethod { - create(value?: { - width?: string | number; - height?: string | number; - }): EllipseAttribute; - debugLine(value: string): EllipseAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value?: { width?: string | number; height?: string | number }): EllipseAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): EllipseAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSFlexAttribute extends CommonMethod { - create(value?: FlexOption): FlexAttribute; - pop(): FlexAttribute; - debugLine(value: string): FlexAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value?: FlexOptions): FlexAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): FlexAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): FlexAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSForEachInterface { - create(arr: Array, itemGenerator: (item: any, index?: number) => void, keyGenerator?: (item: any, index?: number) => string): ForEachInterface; - pop(): ForEachInterface; - debugLine(value: string): ForEachInterface; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create( + arr: Array, + itemGenerator: (item: any, index?: number) => void, + keyGenerator?: (item: any, index?: number) => string, + ): ForEachInterface; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): ForEachInterface; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): ForEachInterface; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSFormComponentAttribute extends CommonMethod { - create(value: { - id: number; - name: string; - bundle: string; - ability: string; - module: string; - dimension?: FormDimension; - temporary?: boolean; - }): FormComponentAttribute; - debugLine(value: string): FormComponentAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value: { + id: number; + name: string; + bundle: string; + ability: string; + module: string; + dimension?: FormDimension; + temporary?: boolean; + }): FormComponentAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): FormComponentAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSGaugeAttribute extends CommonMethod { - create(options: { - value: number; - min?: number; - max?: number; - }): GaugeAttribute; - debugLine(value: string): GaugeAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(options: { value: number; min?: number; max?: number }): GaugeAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): GaugeAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSGridAttribute extends CommonMethod { - create(scroller?: Scroller): GridAttribute; - pop(): GridAttribute; - debugLine(value: string): GridAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(scroller?: Scroller): GridAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): GridAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): GridAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSGridItemAttribute extends CommonMethod { - create(): GridItemAttribute; - pop(): GridItemAttribute; - debugLine(value: string): GridItemAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(): GridItemAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): GridItemAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): GridItemAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSGridContainerAttribute extends ColumnAttribute { - create(value?: GridContainerOption): GridContainerAttribute; - pop(): GridContainerAttribute; - debugLine(value: string): GridContainerAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value?: GridContainerOptions): GridContainerAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): GridContainerAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): GridContainerAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSImageAttribute extends CommonMethod { - create(src: string | PixelMap | Resource): ImageAttribute; - debugLine(value: string): ImageAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(src: string | PixelMap | Resource): ImageAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): ImageAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSImageAnimatorAttribute extends CommonMethod { - create(): ImageAnimatorAttribute; - debugLine(value: string): ImageAnimatorAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(): ImageAnimatorAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): ImageAnimatorAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSLazyForEachInterface { - create(dataSource: IDataSource, itemGenerator: (item: any, index?: number) => void, keyGenerator?: (item: any, index?: number) => string): LazyForEachInterface; - pop(): LazyForEachInterface; - debugLine(value: string): LazyForEachInterface; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create( + dataSource: IDataSource, + itemGenerator: (item: any, index?: number) => void, + keyGenerator?: (item: any, index?: number) => string, + ): LazyForEachInterface; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): LazyForEachInterface; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): LazyForEachInterface; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSLineAttribute extends CommonShapeMethod { - create(value?: { - width?: string | number; - height?: string | number; - }): LineAttribute; - debugLine(value: string): LineAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value?: { width?: string | number; height?: string | number }): LineAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): LineAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSListAttribute extends CommonMethod { - create(value?: { - initialIndex?: number; - space?: number | string; - scroller?: Scroller; - }): ListAttribute; - pop(): ListAttribute; - debugLine(value: string): ListAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value?: { initialIndex?: number; space?: number | string; scroller?: Scroller }): ListAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): ListAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): ListAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSListItemAttribute extends CommonMethod { - create(value?: string): ListItemAttribute; - pop(): ListItemAttribute; - debugLine(value: string): ListItemAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value?: string): ListItemAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): ListItemAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): ListItemAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSLoadingProgressAttribute extends CommonMethod { - create(): LoadingProgressAttribute; - debugLine(value: string): LoadingProgressAttribute; - color(value: ResourceColor): LoadingProgressAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(): LoadingProgressAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): LoadingProgressAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + color(value: ResourceColor): LoadingProgressAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSMarqueeAttribute extends CommonMethod { - create(value: { - start: boolean; - step?: number; - loop?: number; - fromStart?: boolean; - src: string; - }): MarqueeAttribute; - pop(): MarqueeAttribute; - debugLine(value: string): MarqueeAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value: { start: boolean; step?: number; loop?: number; fromStart?: boolean; src: string }): MarqueeAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): MarqueeAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): MarqueeAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSNavigationAttribute extends CommonMethod { - create(): NavigationAttribute; - pop(): NavigationAttribute; - debugLine(value: string): NavigationAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(): NavigationAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): NavigationAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): NavigationAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSNavigatorAttribute extends CommonMethod { - create(value?: { - target: string; - type?: NavigationType; - }): NavigatorAttribute; - pop(): NavigatorAttribute; - debugLine(value: string): NavigatorAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value?: { target: string; type?: NavigationType }): NavigatorAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): NavigatorAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): NavigatorAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSPageTransitionEnterInterface extends CommonTransition { - create(value: { - type?: RouteType; - duration?: number; - curve?: Curve | string; - delay?: number; - }): PageTransitionEnterInterface; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value: { + type?: RouteType; + duration?: number; + curve?: Curve | string; + delay?: number; + }): PageTransitionEnterInterface; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSPageTransitionExitInterface extends CommonTransition { - create(value: { - type?: RouteType; - duration?: number; - curve?: Curve | string; - delay?: number; - }): PageTransitionExitInterface; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value: { + type?: RouteType; + duration?: number; + curve?: Curve | string; + delay?: number; + }): PageTransitionExitInterface; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSPanelAttribute extends CommonMethod { - create(show: boolean): PanelAttribute; - pop(): PanelAttribute; - debugLine(value: string): PanelAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(show: boolean): PanelAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): PanelAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): PanelAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSPathAttribute extends CommonShapeMethod { - create(value?: { - width?: number | string; - height?: number | string; - commands?: string; - }): PathAttribute; - pop(): PathAttribute; - debugLine(value: string): PathAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value?: { width?: number | string; height?: number | string; commands?: string }): PathAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): PathAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): PathAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSPatternLockAttribute extends CommonMethod { - create(controller?: PatternLockController): TSPatternLockAttribute; - pop(): TSPatternLockAttribute; - debugLine(value: string): TSPatternLockAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(controller?: PatternLockController): TSPatternLockAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): TSPatternLockAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): TSPatternLockAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSPieceAttribute extends CommonMethod { - create(options?: { - content: string; - icon?: string; - }): PieceAttribute; - pop(): PieceAttribute; - debugLine(value: string): PieceAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(options?: { content: string; icon?: string }): PieceAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): PieceAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): PieceAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSPluginComponentAttribute extends CommonMethod { - create(value: { - template: PluginComponentTemplate; - data: any; - }): PluginComponentAttribute; - pop(): PluginComponentAttribute; - debugLine(value: string): PluginComponentAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value: { template: PluginComponentTemplate; data: any }): PluginComponentAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): PluginComponentAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): PluginComponentAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSPolygonAttribute extends CommonShapeMethod { - create(value?: { - width?: string | number; - height?: string | number; - }): PolygonAttribute; - debugLine(value: string): PolygonAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value?: { width?: string | number; height?: string | number }): PolygonAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): PolygonAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSPolylineAttribute extends CommonShapeMethod { - create(value?: { - width?: string | number; - height?: string | number; - }): PolylineAttribute; - debugLine(value: string): PolylineAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value?: { width?: string | number; height?: string | number }): PolylineAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): PolylineAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSProgressAttribute extends CommonMethod { - create(object: { - value: number; - total?: number; - style?: ProgressStyle; - }): ProgressAttribute; - debugLine(value: string): ProgressAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(object: { value: number; total?: number; style?: ProgressStyle }): ProgressAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): ProgressAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSQRCodeAttribute extends CommonMethod { - create(value: string): QRCodeAttribute; - pop(): QRCodeAttribute; - debugLine(value: string): QRCodeAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value: string): QRCodeAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): QRCodeAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): QRCodeAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSRadioAttribute extends CommonMethod { - create(options: RadioOption): RadioAttribute; - debugLine(value: string): RadioAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(options: RadioOptions): RadioAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): RadioAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSRatingAttribute extends CommonMethod { - create(options?: { - rating: number; - indicator?: boolean; - }): RatingAttribute; - pop(): RatingAttribute; - debugLine(value: string): RatingAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(options?: { rating: number; indicator?: boolean }): RatingAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): RatingAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): RatingAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSRectAttribute extends CommonShapeMethod { - create(value?: { - width?: number | string; - height?: number | string; - radius?: number | string | Array; - } | { - width?: number | string; - height?: number | string; - radiusWidth?: number | string; - radiusHeight?: number | string; - }): RectAttribute; - debugLine(value: string): RectAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create( + value?: + | { + width?: number | string; + height?: number | string; + radius?: number | string | Array; + } + | { + width?: number | string; + height?: number | string; + radiusWidth?: number | string; + radiusHeight?: number | string; + }, + ): RectAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): RectAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSRefreshAttribute extends CommonMethod { - create(value: { - refreshing: boolean; - offset?: number | string; - friction?: number | string; - }): RefreshAttribute; - pop(): RefreshAttribute; - debugLine(value: string): RefreshAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value: { refreshing: boolean; offset?: number | string; friction?: number | string }): RefreshAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): RefreshAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): RefreshAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSRowAttribute extends CommonMethod { - create(value?: { - space?: string | number; - }): RowAttribute; - pop(): RowAttribute; - debugLine(value: string): RowAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value?: { space?: string | number }): RowAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): RowAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): RowAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSRowSplitAttribute extends CommonMethod { - create(): RowSplitAttribute; - pop(): RowSplitAttribute; - debugLine(value: string): RowSplitAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(): RowSplitAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): RowSplitAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): RowSplitAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSScrollAttribute extends CommonMethod { - create(scroller?: Scroller): ScrollAttribute; - pop(): ScrollAttribute; - debugLine(value: string): ScrollAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(scroller?: Scroller): ScrollAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): ScrollAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): ScrollAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSScrollBarAttribute extends CommonMethod { - create(value: ScrollBarOption): ScrollBarAttribute; - pop(): ScrollBarAttribute; - debugLine(value: string): ScrollBarAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value: ScrollBarOptions): ScrollBarAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): ScrollBarAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): ScrollBarAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSSearchAttribute extends CommonMethod { - create(options?: { - value?: string; - placeholder?: string; - icon?: string; - controller?: SearchController; - }): SearchAttribute; - pop(): SearchAttribute; - debugLine(value: string): SearchAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(options?: { + value?: string; + placeholder?: string; + icon?: string; + controller?: SearchController; + }): SearchAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): SearchAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): SearchAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSSelectAttribute extends CommonMethod { - create(options: Array): SelectAttribute; - pop(): SelectAttribute; - debugLine(value: string): SelectAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(options: Array): SelectAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): SelectAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): SelectAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSShapeAttribute extends CommonMethod { - create(value?: PixelMap): ShapeAttribute; - pop(): ShapeAttribute; - debugLine(value: string): ShapeAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value?: PixelMap): ShapeAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): ShapeAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): ShapeAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSSheetAttribute extends CommonMethod { - create(): SheetAttribute; - pop(): SheetAttribute; - debugLine(value: string): SheetAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(): SheetAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): SheetAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): SheetAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSSliderAttribute extends CommonMethod { - create(options?: SliderOption): SliderAttribute; - debugLine(value: string): SliderAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(options?: SliderOptions): SliderAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): SliderAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSSpanAttribute extends CommonMethod { - create(value: string | Resource): SpanAttribute; - debugLine(value: string): SpanAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value: string | Resource): SpanAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): SpanAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSStackAttribute extends CommonMethod { - create(value?: { - alignContent?: Alignment; - }): StackAttribute; - pop(): StackAttribute; - debugLine(value: string): StackAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value?: { alignContent?: Alignment }): StackAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): StackAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): StackAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSStepperAttribute extends CommonMethod { - create(value?: { - index?: number; - }): StepperAttribute; - pop(): StepperAttribute; - debugLine(value: string): StepperAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value?: { index?: number }): StepperAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): StepperAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): StepperAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSStepperItemAttribute extends CommonMethod { - create(): StepperItemAttribute; - pop(): StepperItemAttribute; - debugLine(value: string): StepperItemAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(): StepperItemAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): StepperItemAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): StepperItemAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSSwiperAttribute extends CommonMethod { - create(controller?: SwiperController): SwiperAttribute; - pop(): SwiperAttribute; - debugLine(value: string): SwiperAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(controller?: SwiperController): SwiperAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): SwiperAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): SwiperAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSTabContentAttribute extends CommonMethod { - create(): TabContentAttribute; - pop(): TabContentAttribute; - debugLine(value: string): TabContentAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(): TabContentAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): TabContentAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): TabContentAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSTabsAttribute extends CommonMethod { - create(value?: { - barPosition?: BarPosition; - index?: number; - controller?: TabsController; - }): TabsAttribute; - pop(): TabsAttribute; - debugLine(value: string): TabsAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value?: { barPosition?: BarPosition; index?: number; controller?: TabsController }): TabsAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): TabsAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): TabsAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSTextAttribute extends CommonMethod { - create(content?: string | Resource): TextAttribute; - pop(): TextAttribute; - debugLine(value: string): TextAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(content?: string | Resource): TextAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): TextAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): TextAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSTextAreaAttribute extends CommonMethod { - create(value?: TextAreaOption): TextAreaAttribute; - debugLine(value: string): TextAreaAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value?: TextAreaOptions): TextAreaAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): TextAreaAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSTextClockAttribute extends CommonMethod { - create(options?: { - timeZoneOffset?: number; - controller?: TextClockController; - }): TextClockAttribute; - pop(): TextClockAttribute; - debugLine(value: string): TextClockAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(options?: { timeZoneOffset?: number; controller?: TextClockController }): TextClockAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): TextClockAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): TextClockAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSTextInputAttribute extends CommonMethod { - create(value?: TextInputOption): TextInputAttribute; - debugLine(value: string): TextInputAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value?: TextInputOptions): TextInputAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): TextInputAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSTextPickerAttribute extends CommonMethod { - create(options?: TextPickerOption): TextPickerAttribute; - pop(): TextPickerAttribute; - debugLine(value: string): TextPickerAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(options?: TextPickerOptions): TextPickerAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): TextPickerAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): TextPickerAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSTextTimerAttribute extends CommonMethod { - create(options?: TextTimerOption): TextTimerAttribute; - pop(): TextTimerAttribute; - debugLine(value: string): TextTimerAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(options?: TextTimerOptions): TextTimerAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): TextTimerAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): TextTimerAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSToggleAttribute extends CommonMethod { - create(options: { - type: ToggleType; - isOn?: boolean; - }): ToggleAttribute; - pop(): ToggleAttribute; - debugLine(value: string): ToggleAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(options: { type: ToggleType; isOn?: boolean }): ToggleAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): ToggleAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): ToggleAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSVideoAttribute extends CommonMethod { - create(value: { - src?: string | Resource; - previewUri?: string | PixelMap | Resource; - controller?: VideoController; - }): VideoAttribute; - debugLine(value: string): VideoAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value: { + src?: string | Resource; + previewUri?: string | PixelMap | Resource; + controller?: VideoController; + }): VideoAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): VideoAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSWebAttribute extends CommonMethod { - create(value: WebOptions): WebAttribute; - debugLine(value: string): WebAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value: WebOptions): WebAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): WebAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSXComponentAttribute extends CommonMethod { - create(value: { - id: string; - type: string; - libraryname?: string; - controller?: XComponentController; - }): XComponentAttribute; - debugLine(value: string): XComponentAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value: { + id: string; + type: string; + libraryname?: string; + controller?: XComponentController; + }): XComponentAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): XComponentAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSRichTextAttribute { - create(content: string): RichTextAttribute; - pop(): RichTextAttribute; - debugLine(value: string): RichTextAttribute; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(content: string): RichTextAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): RichTextAttribute; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + debugLine(value: string): RichTextAttribute; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSTapGestureInterface { - create(value?: { - count?: number; - fingers?: number; - }): TapGestureInterface; - pop(): TapGestureInterface; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value?: { count?: number; fingers?: number }): TapGestureInterface; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): TapGestureInterface; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSLongPressGestureInterface { - create(value?: { - fingers?: number; - repeat?: boolean; - duration?: number; - }): LongPressGestureInterface; - pop(): LongPressGestureInterface; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value?: { fingers?: number; repeat?: boolean; duration?: number }): LongPressGestureInterface; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): LongPressGestureInterface; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSPanGestureInterface { - create(value?: { - fingers?: number; - direction?: PanDirection; - distance?: number; - } | PanGestureOption): PanGestureInterface; - pop(): PanGestureInterface; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create( + value?: + | { + fingers?: number; + direction?: PanDirection; + distance?: number; + } + | PanGestureOptions, + ): PanGestureInterface; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): PanGestureInterface; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSSwipeGestureInterface { - create(value?: { - fingers?: number; - direction?: SwipeDirection; - speed?: number; - }): SwipeGestureInterface; - pop(): SwipeGestureInterface; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value?: { fingers?: number; direction?: SwipeDirection; speed?: number }): SwipeGestureInterface; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): SwipeGestureInterface; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSPinchGestureInterface { - create(value?: { - fingers?: number; - distance?: number; - }): PinchGestureInterface; - pop(): PinchGestureInterface; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value?: { fingers?: number; distance?: number }): PinchGestureInterface; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): PinchGestureInterface; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSRotationGestureInterface { - create(value?: { - fingers?: number; - angle?: number; - }): RotationGestureInterface; - pop(): RotationGestureInterface; -} - + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(value?: { fingers?: number; angle?: number }): RotationGestureInterface; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): RotationGestureInterface; +} + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ declare class TSGestureGroupInterface { - create(mode: GestureMode, ...gesture: GestureType[]): GestureGroupInterface; - pop(): GestureGroupInterface; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(mode: GestureMode, ...gesture: GestureType[]): GestureGroupInterface; + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): GestureGroupInterface; } diff --git a/api/@internal/component/ets/navigation.d.ts b/api/@internal/component/ets/navigation.d.ts index 5130791878169fc2b6cfd20c07717d0fbbebf6ed..420438d98b3d5d30151a4370cf261094f0572fd4 100644 --- a/api/@internal/component/ets/navigation.d.ts +++ b/api/@internal/component/ets/navigation.d.ts @@ -108,12 +108,6 @@ declare class NavigationAttribute extends CommonMethod { */ menus(value: Array | CustomBuilder): NavigationAttribute; - /** - * The amount of the menu in Navigation. - * @since 8 - */ - menuCount(value: number): NavigationAttribute; - /** * Tool bar * @since 8 @@ -127,10 +121,10 @@ declare class NavigationAttribute extends CommonMethod { hideToolBar(value: boolean): NavigationAttribute; /** - * Trigger a titleModeChanged event when title mode changed at free mode. + * Trigger callback when title mode change finished at free mode. * @since 8 */ - onTitleModeChanged(callback: (titleMode: NavigationTitleMode) => void): NavigationAttribute; + onTitleModeChange(callback: (titleMode: NavigationTitleMode) => void): NavigationAttribute; } declare const Navigation: NavigationInterface; diff --git a/api/@internal/component/ets/plugin_component.d.ts b/api/@internal/component/ets/plugin_component.d.ts index 99339284866b4290bd6f4bbee92236d7e1e83c89..47300deaa7180ff98c64873b247e881d45a013a2 100644 --- a/api/@internal/component/ets/plugin_component.d.ts +++ b/api/@internal/component/ets/plugin_component.d.ts @@ -18,7 +18,15 @@ * @since 8 */ interface PluginComponentTemplate { + /** + * Defines the plugin source name. + * @since 8 + */ source: string; + /** + * Defines the ability name. + * @since 8 + */ ability: string; } @@ -35,6 +43,7 @@ interface PluginComponentInterface { } /** + * Defines the plugin component attibute functions. * @since 8 */ declare class PluginComponentAttribute extends CommonMethod { diff --git a/api/@internal/component/ets/progress.d.ts b/api/@internal/component/ets/progress.d.ts index 5da637cf17327714a8e8f6be6087fa37276a5a75..a0ba3f6ca0bd05f475ac92ec79cfa29989236059 100644 --- a/api/@internal/component/ets/progress.d.ts +++ b/api/@internal/component/ets/progress.d.ts @@ -14,10 +14,10 @@ */ /** - * Defines style option for progress component. + * Defines style options for progress component. * @since 8 */ -declare interface ProgressStyleOption { +declare interface ProgressStyleOptions { /** * Defines the strokeWidth property. * @since 8 @@ -44,35 +44,30 @@ declare interface ProgressStyleOption { declare enum ProgressStyle { /** * Linear progress bar style. - * @devices phone, tablet, car. * @since 7 */ Linear, /** * Ring progress bar. - * @devices phone, tablet, car. * @since 8 */ Ring, /** * Eclipse progress bar. - * @devices phone, tablet, car. * @since 7 */ Eclipse, /** * ScaleRing progress bar. - * @devices phone, tablet, car. * @since 8 */ ScaleRing, /** * Capsule progress bar. - * @devices phone, tablet, car. * @since 8 */ Capsule, @@ -91,6 +86,7 @@ interface ProgressInterface { } /** + * Defines the progress attibute functions. * @since 7 */ declare class ProgressAttribute extends CommonMethod { @@ -110,7 +106,7 @@ declare class ProgressAttribute extends CommonMethod { * Called when the style of progress bar is set. * @since 8 */ - style(value: ProgressStyleOption): ProgressAttribute; + style(value: ProgressStyleOptions): ProgressAttribute; } declare const Progress: ProgressInterface; diff --git a/api/@internal/component/ets/qrcode.d.ts b/api/@internal/component/ets/qrcode.d.ts index 61eefc5700dbf0eb1e319b6cb2a7da8f53782371..ecae91dc558eae0032bdb9fcbeb1284cf5dcfbb8 100644 --- a/api/@internal/component/ets/qrcode.d.ts +++ b/api/@internal/component/ets/qrcode.d.ts @@ -26,6 +26,7 @@ interface QRCodeInterface { } /** + * Defines the qrcode attibute functions. * @since 7 */ declare class QRCodeAttribute extends CommonMethod { diff --git a/api/@internal/component/ets/radio.d.ts b/api/@internal/component/ets/radio.d.ts index d3d749404ce749014ed1822b78bc4bb0544b6469..3d1792846913e51addb2f770d56f6e7080f19769 100644 --- a/api/@internal/component/ets/radio.d.ts +++ b/api/@internal/component/ets/radio.d.ts @@ -15,20 +15,17 @@ /** * Input parameter for creating a radio box. - * @devices phone, tablet, car * @since 8 */ -declare interface RadioOption { +declare interface RadioOptions { /** * Radio group name. - * @devices phone, tablet, car * @since 8 */ group: string; /** * Radio name. - * @devices phone, tablet, car * @since 8 */ value: string; @@ -36,16 +33,14 @@ declare interface RadioOption { /** * Provides an interface for creating a radio box. - * @devices phone, tablet, car * @since 8 */ interface RadioInterface { /** * Called when a radio box is created. - * @devices phone, tablet, car * @since 8 */ - (options: RadioOption): RadioAttribute; + (options: RadioOptions): RadioAttribute; } /** @@ -55,14 +50,12 @@ interface RadioInterface { declare class RadioAttribute extends CommonMethod { /** * Called when the radio box is selected. - * @devices phone, tablet, car * @since 8 */ checked(value: boolean): RadioAttribute; /** * Called when the radio box selection status changes. - * @devices phone, tablet, car * @since 8 */ onChange(callback: (isChecked: boolean) => void): RadioAttribute; diff --git a/api/@internal/component/ets/rating.d.ts b/api/@internal/component/ets/rating.d.ts index 09f6740ec75c2a715de42f4595028888695ebe74..7dc8bac49645fcf78bcf7f39fad4be33bcf5fff7 100644 --- a/api/@internal/component/ets/rating.d.ts +++ b/api/@internal/component/ets/rating.d.ts @@ -26,6 +26,7 @@ interface RatingInterface { } /** + * Defines the rating attibute functions. * @since 7 */ declare class RatingAttribute extends CommonMethod { diff --git a/api/@internal/component/ets/rect.d.ts b/api/@internal/component/ets/rect.d.ts index 7ca9aa72fac29aa43129c2a22a796b93113732ea..a20aa44f461e338ca9b44fa8a72d873442127ee1 100644 --- a/api/@internal/component/ets/rect.d.ts +++ b/api/@internal/component/ets/rect.d.ts @@ -13,7 +13,6 @@ * limitations under the License. */ - /** * Provides an interface for drawing rectangles. * @since 7 diff --git a/api/@internal/component/ets/refresh.d.ts b/api/@internal/component/ets/refresh.d.ts index 648528bb7d179112856255d00e3e20e8aa3610f6..2475dc5518269b153f000bc91d96f73b576f7316 100644 --- a/api/@internal/component/ets/refresh.d.ts +++ b/api/@internal/component/ets/refresh.d.ts @@ -62,6 +62,7 @@ interface RefreshInterface { } /** + * Defines the refresh attibute functions. * @since 8 */ declare class RefreshAttribute extends CommonMethod { diff --git a/api/@internal/component/ets/row.d.ts b/api/@internal/component/ets/row.d.ts index 6d723e4b8baf61b87857b95aced6fc55cc2b89ae..f33801c37657346f16fd1c841a354bcf1e3d2136 100644 --- a/api/@internal/component/ets/row.d.ts +++ b/api/@internal/component/ets/row.d.ts @@ -26,6 +26,7 @@ interface RowInterface { } /** + * Defines the row attribute functions. * @since 7 */ declare class RowAttribute extends CommonMethod { @@ -39,7 +40,7 @@ declare class RowAttribute extends CommonMethod { * Called when the horizontal alignment is set. * @since 8 */ - justifyContent(value: FlexAlign): RowAttribute; + justifyContent(value: FlexAlign): RowAttribute; } declare const Row: RowInterface; diff --git a/api/@internal/component/ets/scroll.d.ts b/api/@internal/component/ets/scroll.d.ts index 7ea65ec436f8a53a0badd006ea19a777c2aff4c0..4779b3593c9b5022bc09238a5b8ebe6f9244be4b 100644 --- a/api/@internal/component/ets/scroll.d.ts +++ b/api/@internal/component/ets/scroll.d.ts @@ -101,6 +101,7 @@ interface ScrollInterface { } /** + * Defines the scroll attibute functions. * @since 7 */ declare class ScrollAttribute extends CommonMethod { diff --git a/api/@internal/component/ets/scroll_bar.d.ts b/api/@internal/component/ets/scroll_bar.d.ts index 0a722fca3961cb71eb90b318ef2530f62c8964a3..d8089e23b40238ad29c651a0e52c65f13cfd184e 100644 --- a/api/@internal/component/ets/scroll_bar.d.ts +++ b/api/@internal/component/ets/scroll_bar.d.ts @@ -32,10 +32,10 @@ declare enum ScrollBarDirection { } /** - * Defines the option of ScrollBar. + * Defines the options of ScrollBar. * @since 8 */ -declare interface ScrollBarOption { +declare interface ScrollBarOptions { /** * Sets the scroller of scroll bar. * @since 8 @@ -64,12 +64,14 @@ interface ScrollBarInterface { * Called when a ScrollBar container is set. * @since 8 */ - (value: ScrollBarOption): ScrollBarAttribute; + (value: ScrollBarOptions): ScrollBarAttribute; } /** + * Defines the scrollbar attibute functions. * @since 8 */ declare class ScrollBarAttribute extends CommonMethod {} + declare const ScrollBar: ScrollBarInterface; declare const ScrollBarInstance: ScrollBarAttribute; diff --git a/api/@internal/component/ets/select.d.ts b/api/@internal/component/ets/select.d.ts index 6b186318b05634f816572e5c863fd64a5a0c6bd4..0c03c35b06461598cfb0e71970cdb808bfd1108e 100644 --- a/api/@internal/component/ets/select.d.ts +++ b/api/@internal/component/ets/select.d.ts @@ -112,7 +112,7 @@ declare class SelectAttribute extends CommonMethod { * Callback for selecting an item from the select. * @since 8 */ - onSelected(event: (index: number, value?: string) => void): SelectAttribute; + onSelect(callback: (index: number, value?: string) => void): SelectAttribute; } declare const Select: SelectInterface; diff --git a/api/@internal/component/ets/sidebar.d.ts b/api/@internal/component/ets/sidebar.d.ts index bc58cec23911a267fd124cbdb48b0314a8523107..e38f1ad790401262cc06ccf9b87e908c06708fcc 100644 --- a/api/@internal/component/ets/sidebar.d.ts +++ b/api/@internal/component/ets/sidebar.d.ts @@ -1,33 +1,33 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ + * Copyright (c) 2021 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. + */ /** * Sets the sidebar style of showing * @since 8 */ declare enum SideBarContainerType { - /** - * The sidebar invisible - * @since 8 - */ - Embed, - /** - * The sidebar visible - * @since 8 - */ - Overlay + /** + * The sidebar invisible + * @since 8 + */ + Embed, + /** + * The sidebar visible + * @since 8 + */ + Overlay, } /** @@ -35,33 +35,37 @@ declare enum SideBarContainerType { * @since 8 */ declare interface ButtonStyle { - /** - * Set the left of control button - * @since 8 - */ - left?: number; - /** - * Set the top of control button - * @since 8 - */ - top?: number; - /** - * Set the width of control button - * @since 8 - */ - width?: number; + /** + * Set the left of control button + * @since 8 + */ + left?: number; + /** + * Set the top of control button + * @since 8 + */ + top?: number; + /** + * Set the width of control button + * @since 8 + */ + width?: number; - /** - * Set the heigth of control button - * @since 8 - */ - height?: number; + /** + * Set the heigth of control button + * @since 8 + */ + height?: number; - /** - * Set the button icon when sidebar status has changed - * @since 8 - */ - icons?: {shown:string | PixelMap | Resource, hidden: string | PixelMap | Resource, switching?: string | PixelMap | Resource} + /** + * Set the button icon when sidebar status has changed + * @since 8 + */ + icons?: { + shown: string | PixelMap | Resource; + hidden: string | PixelMap | Resource; + switching?: string | PixelMap | Resource; + }; } /** @@ -69,18 +73,17 @@ declare interface ButtonStyle { * @since 8 */ interface SideBarContainerInterface { - /** - * Called when showing the sidebar of a block entry. - * @since 8 - */ - (type?: SideBarContainerType): SideBarContainerAttribute; + /** + * Called when showing the sidebar of a block entry. + * @since 8 + */ + (type?: SideBarContainerType): SideBarContainerAttribute; } /** * The attribute function of sidebar * @since 8 */ - declare class SideBarContainerAttribute extends CommonMethod { /** * Callback showControlButton function when setting the status of sidebar @@ -98,7 +101,7 @@ declare class SideBarContainerAttribute extends CommonMethod void): SideBarContainerAttribute; @@ -122,4 +125,4 @@ declare class SideBarContainerAttribute extends CommonMethod extends IPropertySubscriber { /** * Provides a single attribute change user interface. * @since 7 + * @systemapi */ hasChanged(newValue: T): void; } /** + * Defines the subscribed abstract property. * @since 7 + * @systemapi */ declare abstract class SubscribedAbstractProperty { /** * Setting Subscribers. * @since 7 + * @systemapi */ protected subscribers_: Set; /** * Private user ID. * @since 7 + * @systemapi */ private id_; /** * Private user information. * @since 7 + * @systemapi */ private info_?; /** * @since 7 + * @systemapi */ constructor( /** - * Subscriber Information. + * Subscriber IPropertySubscriber. * @since 7 + * @systemapi */ subscribeMe?: IPropertySubscriber, + /** + * Subscriber info. + * @since 7 + * @systemapi + */ info?: string, ); /** * Called when the subscriber ID is entered. * @since 7 + * @systemapi */ id(): number; /** * Called when a subscriber information description is entered. * @since 7 + * @systemapi */ info(): string; /** * Called when data is obtained. * @since 7 + * @systemapi */ abstract get(): T; /** * Called when data is created. * @since 7 + * @systemapi */ abstract set(newValue: T): void; /** * Called when a two-way synchronization is created. * @since 7 + * @systemapi */ createTwoWaySync(subscribeMe?: IPropertySubscriber, info?: string): SyncedPropertyTwoWay; /** * Called when a one-way synchronization is created. * @since 7 + * @systemapi */ createOneWaySync(subscribeMe?: IPropertySubscriber, info?: string): SyncedPropertyOneWay; /** * Called when the subscriber is unlinked. * @since 7 + * @systemapi */ unlinkSuscriber(subscriberId: number): void; /** * Called when the notification has changed. * @since 7 + * @systemapi */ protected notifyHasChanged(newValue: T): void; /** * Called when the notification property is read. * @since 7 + * @systemapi */ protected notifyPropertyRead(): void; /** * Called when the number of users is queried. * @since 7 + * @systemapi */ numberOfSubscrbers(): number; } /** + * Defines the state value. * @since 7 + * @systemapi */ declare class SyncedPropertyTwoWay extends SubscribedAbstractProperty - implements ISinglePropertyChangeSubscriber { + implements ISinglePropertyChangeSubscriber +{ /** * Sources of synchronization attributes bidirectionally. * @since 7 + * @systemapi */ private source_; /** * constructor parameters. * @since 7 + * @systemapi */ constructor(source: SubscribedAbstractProperty, subscribeMe?: IPropertySubscriber, info?: string); /** * Called when processing information about to be deleted. * @since 7 + * @systemapi */ aboutToBeDeleted(unsubscribeMe?: IPropertySubscriber): void; /** * Information Changed. * @since 7 + * @systemapi */ hasChanged(newValue: T): void; /** * Called when data is obtained. * @since 7 + * @systemapi */ get(): T; /** * Called when data is created. * @since 7 + * @systemapi */ set(newValue: T): void; } /** + * Defines the prop state value. * @since 7 + * @systemapi */ declare class SyncedPropertyOneWay extends SubscribedAbstractProperty - implements ISinglePropertyChangeSubscriber { + implements ISinglePropertyChangeSubscriber +{ /** * Pack value for single-item binding. * @since 7 + * @systemapi */ private wrappedValue_; /** * Sources of synchronization attributes bidirectionally. * @since 7 + * @systemapi */ private source_; /** * Constructor parameters. * @since 7 + * @systemapi */ constructor(source: SubscribedAbstractProperty, subscribeMe?: IPropertySubscriber, info?: string); /** * Called when processing information about to be deleted. * @since 7 + * @systemapi */ aboutToBeDeleted(unsubscribeMe?: IPropertySubscriber): void; /** * Information Changed. * @since 7 + * @systemapi */ hasChanged(newValue: T): void; /** * Called when data is obtained. * @since 7 + * @systemapi */ get(): T; /** * Called when data is created. * @since 7 + * @systemapi */ set(newValue: T): void; } /** + * Defines the AppStorage interface. * @since 7 */ declare class AppStorage { @@ -313,12 +361,15 @@ declare class AppStorage { } /** + * Defines the Environment interface. * @since 7 */ declare class Environment { /** * Constructor. * @since 7 + * @systemapi + * @hide */ constructor(); @@ -347,23 +398,25 @@ declare class Environment { } /** + * Defines the ColorMode of device. * @since 7 */ declare enum ColorMode { /** - * Bright color. + * Light mode. * @since 7 */ LIGHT = 0, /** - * Dark. + * Dark mode. * @since 7 */ DARK, } /** + * Defines the LayoutDirection of device. * @since 7 */ declare enum LayoutDirection { @@ -371,7 +424,7 @@ declare enum LayoutDirection { * Elements are laid out from left to right. * @since 7 */ - LTR = 0, + LTR, /** * Elements are laid out from right to left. @@ -383,16 +436,19 @@ declare enum LayoutDirection { * Elements are laid out from auto. * @since 8 */ - Auto + Auto, } /** + * Defines the PersistentStorage interface. * @since 7 */ declare class PersistentStorage { /** * Constructor parameters. * @since 7 + * @systemapi + * @hide */ constructor(appStorage: AppStorage, storage: Storage); @@ -427,86 +483,114 @@ declare class PersistentStorage { } /** + * Defines the base class of storage. * @since 7 + * @systemapi */ declare class Storage { /** * Constructor parameters. * @since 7 + * @systemapi + * @hide */ constructor(needCrossThread?: boolean, file?: string); /** * Called when data is obtained. * @since 7 + * @systemapi + * @hide */ get(key: string): string | undefined; /** * Called when setting. * @since 7 + * @systemapi + * @hide */ set(key: string, val: any): void; /** * Called when data is cleared. * @since 7 + * @systemapi + * @hide */ clear(): void; /** * Called when data is deleted. * @since 7 + * @systemapi + * @hide */ delete(key: string): void; } /** + * Defines the Subscribale base class. * @since 7 + * @systemapi + * @hide */ declare abstract class SubscribaleAbstract { /** * Returns the ownership attribute set by the. * @since 7 + * @systemapi + * @hide */ private owningProperties_: Set; /** * Constructor. * @since 7 + * @systemapi + * @hide */ constructor(); /** * Called when the notification property has changed. * @since 7 + * @systemapi + * @hide */ protected notifyPropertyHasChanged(propName: string, newValue: any): void; /** * Called when adding an already owned property. * @since 7 + * @systemapi + * @hide */ public addOwningProperty(subscriber: IPropertySubscriber): void; /** * Called when an already owned property is deleted. * @since 7 + * @systemapi + * @hide */ public removeOwningProperty(property: IPropertySubscriber): void; /** * Called when an already owned property is deleted by ID * @since 7 + * @systemapi + * @hide */ public removeOwningPropertyById(subscriberId: number): void; } /** + * Defines the content storage interface. * @since 9 * @StageModelOnly */ - declare class ContentStorage { +declare class ContentStorage { /** * Called when a link is set. * @since 9 @@ -600,6 +684,9 @@ declare abstract class SubscribaleAbstract { } /** + * Used for ide. * @since 7 + * @systemapi + * @hide */ declare const appStorage: AppStorage; diff --git a/api/@internal/component/ets/stepper.d.ts b/api/@internal/component/ets/stepper.d.ts index 71338678597a559cd06a3b6ed8c7d736bd953b25..168d6d284137dc5f9de36532b19c3c44584b93b2 100644 --- a/api/@internal/component/ets/stepper.d.ts +++ b/api/@internal/component/ets/stepper.d.ts @@ -15,13 +15,11 @@ /** * Declare the stepper. - * @since 8 */ interface StepperInterface { /** * Called when the stepper component is used. - * @since 8 */ (value?: { index?: number }): StepperAttribute; @@ -34,35 +32,30 @@ interface StepperInterface { declare class StepperAttribute extends CommonMethod { /** * Callback when the finish label is clicked. - * @since 8 */ onFinish(callback: () => void): StepperAttribute; /** * Callback when the skip label is clicked. - * @since 8 */ onSkip(callback: () => void): StepperAttribute; /** * Callback when the change label is clicked. - * @since 8 */ onChange(callback: (prevIndex?: number, index?: number) => void): StepperAttribute; /** * Callback when the next label is clicked. - * @since 8 */ onNext(callback: (index?: number, pendingIndex?: number) => void): StepperAttribute; /** * Callback when the previous label is clicked. - * @since 8 */ 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 042417cf4c0c916adb3fb8713aec2995e6d24a15..c7e0976f37ad4b64da3ca52491c2b25d1f359978 100644 --- a/api/@internal/component/ets/stepper_item.d.ts +++ b/api/@internal/component/ets/stepper_item.d.ts @@ -15,34 +15,29 @@ /** * ItemState - * @devices phone, tablet, car * @since 8 */ declare enum ItemState { /** * Default State - * @devices phone, tablet, car * @since 8 */ Normal, /** * Disabled State - * @devices phone, tablet, car * @since 8 */ Disabled, /** * Waiting State - * @devices phone, tablet, car * @since 8 */ Waiting, /** * Skip State - * @devices phone, tablet, car * @since 8 */ Skip, @@ -50,53 +45,39 @@ declare enum ItemState { /** * Provides an interface for switching the stepperItem view on stepper container. - * @devices phone, tablet, car * @since 8 */ interface StepperItemInterface { /** * Called when the stepperItem component is used. - * @devices phone, tablet, car * @since 8 */ (): StepperItemAttribute; } /** - * @devices phone, tablet, car + * Defines the stepper item attrbute functions. * @since 8 */ declare class StepperItemAttribute extends CommonMethod { /** * Called when the value of stepperItem prevLabel is set - * @devices phone, tablet, car * @since 8 */ prevLabel(value: string): StepperItemAttribute; /** * Called when the value of stepperItem nextLabel is set - * @devices phone, tablet, car * @since 8 */ nextLabel(value: string): StepperItemAttribute; /** * Called when the value of stepperItem status is set - * @devices phone, tablet, car * @since 8 */ status(value?: ItemState): StepperItemAttribute; } -/** - * @devices phone, tablet, car - * @since 8 - */ declare const StepperItemInstance: StepperItemAttribute; - -/** - * @devices phone, tablet, car - * @since 8 - */ declare const StepperItem: StepperItemInterface; diff --git a/api/@internal/component/ets/swiper.d.ts b/api/@internal/component/ets/swiper.d.ts index 217295dd78a4a6df9dadf92fa98ba442b8ca901e..1a3f7ad21e13266ac548d3837f5493a408c2b669 100644 --- a/api/@internal/component/ets/swiper.d.ts +++ b/api/@internal/component/ets/swiper.d.ts @@ -38,7 +38,7 @@ declare class SwiperController { /** * Called when need to stop the swiper animation. - * @since 8 + * @since 7 */ finishAnimation(callback?: () => void); } @@ -128,6 +128,7 @@ declare interface IndicatorStyle { } /** + * Defines the swiper attibute functions. * @since 7 */ declare class SwiperAttribute extends CommonMethod { diff --git a/api/@internal/component/ets/tabs.d.ts b/api/@internal/component/ets/tabs.d.ts index 93b8933721bf9616710a4bb80e117f7a56152652..509d578ff2c4dfef3bf4bc344923f42932ad0be0 100644 --- a/api/@internal/component/ets/tabs.d.ts +++ b/api/@internal/component/ets/tabs.d.ts @@ -79,6 +79,7 @@ interface TabsInterface { } /** + * Defines the tabs attribute functions. * @since 7 */ declare class TabsAttribute extends CommonMethod { @@ -102,24 +103,14 @@ declare class TabsAttribute extends CommonMethod { /** * Called when the width of the bar graph is set. - * @since 7 - */ - barWidth(value: number): TabsAttribute; - - /** - * Called when the height of the bar graph is set. - * @since 7 - */ - barHeight(value: number): TabsAttribute; - - /** - * Called when the width of the bar graph is set. + * Notice: barWidth only supports Number type on 7, supports Length type since 8. * @since 8 */ barWidth(value: Length): TabsAttribute; /** * Called when the height of the bar graph is set. + * Notice: barHeight only supports Number type on 7, supports Length type since 8. * @since 8 */ barHeight(value: Length): TabsAttribute; diff --git a/api/@internal/component/ets/text.d.ts b/api/@internal/component/ets/text.d.ts index cdd575d2eba1f0b6bfc7f62042e04ea25c61cdc9..aa258e5c47a9c5179bc2d31f33ed1a4bbad793a2 100644 --- a/api/@internal/component/ets/text.d.ts +++ b/api/@internal/component/ets/text.d.ts @@ -13,7 +13,6 @@ * limitations under the License. */ - /** * Provides an interface for writing texts. * @since 7 @@ -121,11 +120,5 @@ declare class TextAttribute extends CommonMethod { baselineOffset(value: number | string): TextAttribute; } -/** - * @since 7 - */ declare const TextInstance: TextAttribute; -/** - * @since 7 - */ -declare const Text: TextInterface; \ No newline at end of file +declare const Text: TextInterface; diff --git a/api/@internal/component/ets/text_area.d.ts b/api/@internal/component/ets/text_area.d.ts index 0bd8669c821a44c3924129fea575ea9758e2ecf0..d5898a5ad82cd590cc3f7512fb67c2c3b1868c34 100644 --- a/api/@internal/component/ets/text_area.d.ts +++ b/api/@internal/component/ets/text_area.d.ts @@ -13,7 +13,6 @@ * limitations under the License. */ - /** * Provides the method of switching the cursor position. * @since 8 @@ -32,10 +31,10 @@ declare class TextAreaController { } /** - * Defines the option of TextArea. + * Defines the options of TextArea. * @since 7 */ -declare interface TextAreaOption { +declare interface TextAreaOptions { /** * The place holder text string. * @since 7 @@ -64,7 +63,7 @@ interface TextAreaInterface { * Called when writing multiple lines of text. * @since 7 */ - (value?: TextAreaOption): TextAreaAttribute; + (value?: TextAreaOptions): TextAreaAttribute; } /** @@ -134,7 +133,6 @@ declare class TextAreaAttribute extends CommonMethod { /** * Called when the input changes. - * @devices phone, tablet, car. * @since 7 */ onChange(callback: (value: string) => void): TextAreaAttribute; diff --git a/api/@internal/component/ets/text_clock.d.ts b/api/@internal/component/ets/text_clock.d.ts index 4d2fb2af1938c15ad8e4de17989be4b422ac12f6..a522bb3cc73cdec68cb760fc66414b84576a06d3 100644 --- a/api/@internal/component/ets/text_clock.d.ts +++ b/api/@internal/component/ets/text_clock.d.ts @@ -29,8 +29,8 @@ declare class TextClockController { */ start(); /** - * Provides a stop event for textclock. - * @since 8 + * Provides a stop event for textclock. + * @since 8 */ stop(); } @@ -47,7 +47,7 @@ interface TextClockInterface { * Where a negative value indicates the eastern time zone, for example, -8. * @since 8 */ - (options?: {timeZoneOffset?: number, controller?: TextClockController}): TextClockAttribute; + (options?: { timeZoneOffset?: number; controller?: TextClockController }): TextClockAttribute; } declare class TextClockAttribute extends CommonMethod { @@ -98,5 +98,4 @@ declare class TextClockAttribute extends CommonMethod { } declare const TextClock: TextClockInterface; - declare const TextClockInstance: TextClockAttribute; diff --git a/api/@internal/component/ets/text_input.d.ts b/api/@internal/component/ets/text_input.d.ts index 8ad8b036d2a55cb38120462ae1c69c43cd0b9d11..3d613331f2f1b28fd9dc58fff8211382b6851b00 100644 --- a/api/@internal/component/ets/text_input.d.ts +++ b/api/@internal/component/ets/text_input.d.ts @@ -13,7 +13,6 @@ * limitations under the License. */ - /** * Declare the type of input box * @since 7 @@ -98,10 +97,10 @@ declare class TextInputController { } /** - * Defines the option of TextInput. + * Defines the options of TextInput. * @since 7 */ -declare interface TextInputOption { +declare interface TextInputOptions { /** * The place holder text string. * @since 7 @@ -130,10 +129,11 @@ interface TextInputInterface { * Called when writing a single line of text. * @since 7 */ - (value?: TextInputOption): TextInputAttribute; + (value?: TextInputOptions): TextInputAttribute; } /** + * Defines the TextInput attribute functions. * @since 7 */ declare class TextInputAttribute extends CommonMethod { @@ -168,11 +168,18 @@ declare class TextInputAttribute extends CommonMethod { caretColor(value: ResourceColor): TextInputAttribute; /** - * Called when judging whether the text editing has changed. + * Called when judging whether the text editing change finished. * @since 7 + * @deprecated since 8 */ onEditChanged(callback: (isEditing: boolean) => void): TextInputAttribute; + /** + * Called when judging whether the text editing change finished. + * @since 8 + */ + onEditChange(callback: (isEditing: boolean) => void): TextInputAttribute; + /** * Called when submitted. * @since 7 diff --git a/api/@internal/component/ets/text_picker.d.ts b/api/@internal/component/ets/text_picker.d.ts index 8db6d4687d45dba790fed2ec386002c311ea08b8..9d91d8cf3e05453744de6d4d21efe3dc3df42d1e 100644 --- a/api/@internal/component/ets/text_picker.d.ts +++ b/api/@internal/component/ets/text_picker.d.ts @@ -14,10 +14,10 @@ */ /** - * Defines the option of TextPicker. + * Defines the options of TextPicker. * @since 8 */ -declare interface TextPickerOption { +declare interface TextPickerOptions { /** * Specifies the range of the text selector. */ @@ -40,7 +40,7 @@ interface TextPickerInterface { * Defines the TextPicker constructor. * @since 8 */ - (options?: TextPickerOption): TextPickerAttribute; + (options?: TextPickerOptions): TextPickerAttribute; } /** @@ -88,10 +88,10 @@ declare interface TextPickerResult { } /** - * Defines the TextPickerDialogOption for Text Picker Dialog. + * Defines the TextPickerDialogOptions for Text Picker Dialog. * @since 8 */ -declare interface TextPickerDialogOption extends TextPickerOption { +declare interface TextPickerDialogOptions extends TextPickerOptions { /** * Called when the default height of the selected element is set. * @since 8 @@ -123,7 +123,7 @@ declare class TextPickerDialog { * Invoking method display. * @since 8 */ - static show(options?: TextPickerDialogOption); + static show(options?: TextPickerDialogOptions); } declare const TextPicker: TextPickerInterface; diff --git a/api/@internal/component/ets/text_timer.d.ts b/api/@internal/component/ets/text_timer.d.ts index 3001ddf1eede63b200a8507c59d17d9c7352385a..bf49c7c7e087bd74c73a9881bf31fc8df78be87a 100644 --- a/api/@internal/component/ets/text_timer.d.ts +++ b/api/@internal/component/ets/text_timer.d.ts @@ -44,10 +44,10 @@ declare class TextTimerController { } /** - * Defines the option of TextTimer. + * Defines the options of TextTimer. * @since 8 */ -interface TextTimerOption { +interface TextTimerOptions { /** * Sets whether to countdown.The default value is false. * @since 8 @@ -77,7 +77,7 @@ interface TextTimerInterface { * Defines the TextTimer constructor. * @since 8 */ - (options?: TextTimerOption): TextTimerAttribute; + (options?: TextTimerOptions): TextTimerAttribute; } /** @@ -91,10 +91,10 @@ declare class TextTimerAttribute extends CommonMethod { * @since 8 */ format(value: string): TextTimerAttribute; - /** - * Called when the font color is set. - * @since 8 - */ + /** + * Called when the font color is set. + * @since 8 + */ fontColor(value: ResourceColor): TextTimerAttribute; /** * Called when the font size is set. @@ -106,15 +106,15 @@ declare class TextTimerAttribute extends CommonMethod { * @since 8 */ fontStyle(value: FontStyle): TextTimerAttribute; - /** - * Called when the fontWeight is set - * @since 8 - */ + /** + * Called when the fontWeight is set + * @since 8 + */ fontWeight(value: number | FontWeight | string): TextTimerAttribute; - /** - * Called when the fontFamily is set - * @since 8 - */ + /** + * Called when the fontFamily is set + * @since 8 + */ fontFamily(value: ResourceStr): TextTimerAttribute; /** * Called when the timer value is returned. diff --git a/api/@internal/component/ets/piece.d.ts b/api/@internal/component/ets/time_picker.d.ts similarity index 34% rename from api/@internal/component/ets/piece.d.ts rename to api/@internal/component/ets/time_picker.d.ts index 5e67176d8caf32f99dde768ddbc23051dcef3f3b..46846092967dc22bed93895c964682f08610a96c 100644 --- a/api/@internal/component/ets/piece.d.ts +++ b/api/@internal/component/ets/time_picker.d.ts @@ -13,83 +13,103 @@ * limitations under the License. */ - /** - * Sets the relative position of icons and text. + * Defines the struct of TimePickerResult. * @since 8 */ -declare enum IconPosition { +declare interface TimePickerResult { /** - * The icon is at the beginning of the text. + * Application hour * @since 8 */ - Start, + hour?: number; /** - * The icon is at the end of the text. + * Application minute * @since 8 */ - End, + minute?: number; } /** - * Provides text and icons for setting block entries. + * Defines the options of TimePicker. * @since 8 */ -interface PieceInterface { +declare interface TimePickerOptions { /** - * Called when setting the position of a block entry. - * @since 8 + * Specifies the time selector check time. */ - (options?: { content: string; icon?: string }): PieceAttribute; + selected?: Date; } /** + * Defines the TimePicker Component. * @since 8 */ -declare class PieceAttribute extends CommonMethod { +interface TimePickerInterface { /** - * Called when the relative position of the icon and the text is set. + * Defines the TimePicker constructor. * @since 8 */ - iconPosition(value: IconPosition): PieceAttribute; + (options?: TimePickerOptions): TimePickerAttribute; +} + +/** + * Defines the TimePicker attribute functions. + * @since 8 + */ +declare class TimePickerAttribute extends CommonMethod { /** - * Called when the value of Piece fontColor is set + * Time Selector: indicates whether to display the 24-hour clock. * @since 8 */ - fontColor(value: ResourceColor): PieceAttribute; + useMilitaryTime(value: boolean): TimePickerAttribute; + /** - * Called when the value of Piece fontSize is set + * This event is triggered when a TimePicker time is selected. * @since 8 */ - fontSize(value: Length): PieceAttribute; + onChange(callback: (value: TimePickerResult) => void): TimePickerAttribute; +} + +/** + * Defines the TimePickerDialogOptions for Data Picker Dialog. + * @since 8 + */ +declare interface TimePickerDialogOptions extends TimePickerOptions { /** - * Called when the value of Piece fontStyle is set + * Time Selector: indicates whether to display the 24-hour clock. * @since 8 */ - fontStyle(value: FontStyle): PieceAttribute; + useMilitaryTime?: boolean; /** - * Called when the value of Piece fontWeight is set + * Called when the OK button in the dialog is clicked. * @since 8 */ - fontWeight(value: number | FontWeight | string): PieceAttribute; + onAccept?: (value: TimePickerResult) => void; /** - * Called when the value of Piece fontFamily is set + * Called when the Cancel button in the dialog is clicked. * @since 8 */ - fontFamily(value: ResourceStr): PieceAttribute; + onCancel?: () => void; /** - * Called when the value of Piece showDelete is set + * This event is triggered when a TimePicker Time or time is selected in dialog. * @since 8 */ - showDelete(value: boolean): PieceAttribute; + onChange?: (value: TimePickerResult) => void; +} + +/** + * Defines TimePickerDialog which uses show method to show TimePicker dialog. + * @since 8 + */ +declare class TimePickerDialog { /** - * Default icon is invisible, - * Callback onClose function when icon is clicked + * Invoking method display. * @since 8 */ - onClose(callback: () => void): PieceAttribute; + static show(options?: TimePickerDialogOptions); } -declare const Piece: PieceInterface; -declare const PieceInstance: PieceAttribute; +declare const TimePicker: TimePickerInterface; +declare const TimePickerInstance: TimePickerAttribute; diff --git a/api/@internal/component/ets/toggle.d.ts b/api/@internal/component/ets/toggle.d.ts index bb8562b1a7898c4afdc86130e52e39b90270b609..b51b5b490ee4ce8f25d7959d29425192be4fb33c 100644 --- a/api/@internal/component/ets/toggle.d.ts +++ b/api/@internal/component/ets/toggle.d.ts @@ -38,6 +38,7 @@ declare enum ToggleType { } /** + * Defines the toggle interface. * @since 8 */ interface ToggleInterface { @@ -49,6 +50,7 @@ interface ToggleInterface { } /** + * Defines the toggle attibute functions * @since 8 */ declare class ToggleAttribute extends CommonMethod { diff --git a/api/@internal/component/ets/units.d.ts b/api/@internal/component/ets/units.d.ts index 0d9d5ba26b6f4f8c3ba12c1f6f61e86e47d8d245..1eeb8aeadfd7701427cffe2babd034041c6f3e2d 100644 --- a/api/@internal/component/ets/units.d.ts +++ b/api/@internal/component/ets/units.d.ts @@ -150,28 +150,99 @@ declare interface Area { * Defines the local position. * @since 8 */ - pos: Position; + position: Position; /** * Defines the global position. * @since 8 */ - globalPos: Position; + globalPosition: Position; } /** * Defines the position. - * @since 8 + * @since 7 */ declare interface Position { /** * Coordinate x of the Position. - * @since 8 + * @since 7 */ - x: Length; + x?: Length; /** * Coordinate y of the Position. - * @since 8 + * @since 7 + */ + y?: Length; +} + +/** + * Defines the constrain size options. + * @since 7 + */ +declare interface ConstraintSizeOptions { + /** + * Defines the min width. + * @since 7 + */ + minWidth?: Length; + /** + * Defines the max width. + * @since 7 + */ + maxWidth?: Length; + /** + * Defines the min height. + * @since 7 + */ + minHeight?: Length; + /** + * Defines the max height. + * @since 7 + */ + maxHeight?: Length; +} + +/** + * Defines the size options. + * @since 7 + */ +declare interface SizeOptions { + /** + * Defines the width. + * @since 7 + */ + width?: Length; + /** + * Defines the height. + * @since 7 + */ + height?: Length; +} + +/** + * Defines the options of border. + * @since 7 + */ +declare interface BorderOptions { + /** + * Defines the border width. + * @since 7 + */ + width?: Length; + /** + * Defines the border color. + * @since 7 + */ + color?: ResourceColor; + /** + * Defines the border radius. + * @since 7 + */ + radius?: Length; + /** + * Defines the border style. + * @since 7 */ - y: Length; + style?: BorderStyle; } diff --git a/api/@internal/component/ets/video.d.ts b/api/@internal/component/ets/video.d.ts index d80052caf7abe2400a29a624f146b22819f4e770..1672760d4bdd348513d46b9c2fcacd842593e3e0 100644 --- a/api/@internal/component/ets/video.d.ts +++ b/api/@internal/component/ets/video.d.ts @@ -36,7 +36,7 @@ declare enum SeekMode { */ ClosestKeyframe, - /** + /** * Seek to frames closest the time point. * @since 8 */ @@ -48,67 +48,69 @@ declare enum SeekMode { * @since 8 */ declare enum PlaybackSpeed { - /** - * 0.75x speed playback. - * @since 8 - */ - Speed_Forward_0_75_X, - - /** - * 1.00x speed playback. - * @since 8 - */ - Speed_Forward_1_00_X, - - /** - * 1.25x speed playback. - * @since 8 - */ - Speed_Forward_1_25_X, - - /** - * 1.75x speed playback. - * @since 8 - */ - Speed_Forward_1_75_X, - - /** - * 2.00x speed playback. - * @since 8 - */ - Speed_Forward_2_00_X, - } - - /** - * @since 7 - */ - interface VideoOption { - /** - * src of video. - * @since 7 - */ - src?: string | Resource; - - /** - * playback rate of video. - * @since 7 - */ - currentProgressRate?: number | string | PlaybackSpeed; - - /** - * preview uri of video. - * @since 8 - */ - previewUri?: string | PixelMap | Resource; - - /** - * controller of video. - * @since 7 - */ - controller?: VideoController; - } + /** + * 0.75x speed playback. + * @since 8 + */ + Speed_Forward_0_75_X, + + /** + * 1.00x speed playback. + * @since 8 + */ + Speed_Forward_1_00_X, + + /** + * 1.25x speed playback. + * @since 8 + */ + Speed_Forward_1_25_X, + + /** + * 1.75x speed playback. + * @since 8 + */ + Speed_Forward_1_75_X, + + /** + * 2.00x speed playback. + * @since 8 + */ + Speed_Forward_2_00_X, +} + +/** + * Defines the video options. + * @since 7 + */ +declare interface VideoOptions { + /** + * src of video. + * @since 7 + */ + src?: string | Resource; + + /** + * playback rate of video. + * @since 7 + */ + currentProgressRate?: number | string | PlaybackSpeed; + + /** + * preview uri of video. + * @since 7 + */ + previewUri?: string | PixelMap | Resource; + + /** + * controller of video. + * @since 7 + */ + controller?: VideoController; +} /** + * Defines the video controller. * @since 7 */ declare class VideoController { @@ -132,7 +134,7 @@ declare class VideoController { /** * Provides an event to stop playback. - * @since 6 + * @since 7 */ stop(); @@ -142,6 +144,18 @@ declare class VideoController { */ setCurrentTime(value: number); + /** + * Provides a full screen playback method. + * @since 7 + */ + requestFullscreen(value: boolean); + + /** + * Provides a method to exit full screen playback. + * @since 7 + */ + exitFullscreen(); + /** * Provide the progress method of video playback. * @since 8 @@ -150,6 +164,7 @@ declare class VideoController { } /** + * Defines the video interface. * @since 7 */ interface VideoInterface { @@ -157,10 +172,11 @@ interface VideoInterface { * Set the value. * @since 7 */ - (value: VideoOption): VideoAttribute; + (value: VideoOptions): VideoAttribute; } /** + * Defines the video attribute functions. * @since 7 */ declare class VideoAttribute extends CommonMethod { @@ -212,6 +228,11 @@ declare class VideoAttribute extends CommonMethod { */ onFinish(event: () => void): VideoAttribute; + /** + * Called when the video enters and exits the full screen. + * @since 7 + */ + onFullscreenChange(callback: (event?: { fullscreen: boolean }) => void): VideoAttribute; /** * Called when the video preparation is complete. * @since 7 diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts index 8a44e5f97d0bf1028744ad3db5e355f64d366318..d39d726d7dbceb18f7f28f64ac2b4f7ecf5f082b 100755 --- a/api/@internal/component/ets/web.d.ts +++ b/api/@internal/component/ets/web.d.ts @@ -263,7 +263,6 @@ declare class WebResourceRequest { isRedirect(): boolean; } - /** * Defines the web resource response. * @since 8 diff --git a/api/@internal/component/ets/xcomponent.d.ts b/api/@internal/component/ets/xcomponent.d.ts index 9cbc7cb1cd9c0f6264ff0072422e178da1e6d947..09c905ee32078dd1d1c018f7b2c95948809b8c43 100644 --- a/api/@internal/component/ets/xcomponent.d.ts +++ b/api/@internal/component/ets/xcomponent.d.ts @@ -45,12 +45,7 @@ interface XComponentInterface { * @since 8 * @systemapi */ - (value: { - id: string; - type: string; - libraryname?: string; - controller?: XComponentController; - }): XComponentAttribute; + (value: { id: string; type: string; libraryname?: string; controller?: XComponentController }): XComponentAttribute; } /** @@ -64,14 +59,14 @@ declare class XComponentAttribute extends CommonMethod { * @since 8 * @systemapi */ - onLoad(callback: (event?: object) => void): XComponentAttribute; + onLoad(callback: (event?: object) => void): XComponentAttribute; /** * Called when judging whether the xcomponent is destroyed. * @since 8 * @systemapi */ - onDestroy(event: () => void): XComponentAttribute; + onDestroy(event: () => void): XComponentAttribute; } declare const XComponent: XComponentInterface; diff --git a/api/@internal/global.d.ts b/api/@internal/global.d.ts index f8a32dee04535897b8a1024318d6399f79f4304e..81dbba645a9123cc5e98d00154ce1ea1808cbf59 100644 --- a/api/@internal/global.d.ts +++ b/api/@internal/global.d.ts @@ -13,67 +13,89 @@ * limitations under the License. */ +/** + * Defines the console info. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ export declare class console { + /** + * Prints "debug" logs. + * @param message Text to print. + * @since 7 + */ static debug(message: string, ...arguments: any[]): void; + + /** + * Prints "log" logs. + * @param message Text to print. + * @since 7 + */ static log(message: string, ...arguments: any[]): void; + + /** + * Prints "info" logs. + * @param message Text to print. + * @since 7 + */ static info(message: string, ...arguments: any[]): void; + + /** + * Prints "warn" logs. + * @param message Text to print. + * @since 7 + */ static warn(message: string, ...arguments: any[]): void; + + /** + * Prints "error" logs. + * @param message Text to print. + * @since 7 + */ static error(message: string, ...arguments: any[]): void; } -export interface Result { - code: number; - data: object; -} -export interface SubscribeMessageResponse { - deviceId: string; - bundleName: string; - abilityName: string; - message: string; -} -export interface CallAbilityParam { - bundleName: string; - abilityName: string; - messageCode: number; - abilityType: number; - data?: object; - syncOption?: number; -} -export interface SubscribeAbilityEventParam { - bundleName: string; - abilityName: string; - messageCode: number; - abilityType: number; - syncOption?: number; -} -export interface SendMessageOptions { - deviceId: string; - bundleName: string; - abilityName: string; - message?: string; - success?: () => void; - fail?: (data: string, code: number) => void; - complete?: () => void; -} -export interface SubscribeMessageOptions { - success?: (data: SubscribeMessageResponse) => void; - fail?: (data: string, code: number) => void; -} -export declare class FeatureAbility { - static callAbility(param: CallAbilityParam): Promise; - static subscribeAbilityEvent( - param: SubscribeAbilityEventParam, - func: Function - ): Promise; - static unsubscribeAbilityEvent( - param: SubscribeAbilityEventParam - ): Promise; - static sendMsg(options: SendMessageOptions): void; - static subscribeMsg(options: SubscribeMessageOptions): void; - static unsubscribeMsg(): void; -} + +/** + * Sets the interval for repeatedly calling a function. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @param handler Indicates the function to be called after the timer goes off. For devices of "tv", "phone, tablet", and "wearable" types, this parameter can be a function or string. For devices of "lite wearable" and "smartVision" types, this parameter must be a function. + * @param delay Indicates the interval between each two calls, in milliseconds. The function will be called after this delay. + * @param arguments Indicates additional arguments to pass to "handler" when the timer goes off. + * @returns Returns the timer ID. + * @since 7 + */ export declare function setInterval(handler: Function | string, delay: number, ...arguments: any[]): number; + +/** + * Sets a timer after which a function will be executed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @param handler Indicates the function to be called after the timer goes off. For devices of "tv", "phone, tablet", and "wearable" types, this parameter can be a function or string. For devices of "lite wearable" and "smartVision" types, this parameter must be a function. + * @param delay Indicates the delay (in milliseconds) after which the function will be called. If this parameter is left empty, default value "0" will be used, which means that the function will be called immediately or as soon as possible. + * @param arguments Indicates additional arguments to pass to "handler" when the timer goes off. + * @returns Returns the timer ID. + * @since 7 + */ export declare function setTimeout(handler: Function | string, delay?: number, ...arguments: any[]): number; + +/** + * Cancels the interval set by " setInterval()". + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @param intervalID Indicates the timer ID returned by "setInterval()". + * @since 7 + */ export declare function clearInterval(intervalID?: number): void; + +/** + * Cancels the timer set by "setTimeout()". + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @param timeoutID Indicates the timer ID returned by "setTimeout()". + * @since 7 + */ export declare function clearTimeout(timeoutID?: number): void; -export declare function createLocalParticleAbility(timeoutID?: number): any; + +/** + * Defining syscap function. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ export declare function canIUse(syscap: string): boolean; diff --git a/api/@ohos.animator.d.ts b/api/@ohos.animator.d.ts index 6ed9e0219b0253c60d6dfbc723d49f8cd1ebb346..3f4360181c446781c2a3284436bcfc7dc5f5265a 100644 --- a/api/@ohos.animator.d.ts +++ b/api/@ohos.animator.d.ts @@ -14,15 +14,14 @@ */ /** + * Defines the animator options. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @devices phone, tablet, wearable, tv, car * @since 6 */ export interface AnimatorOptions { /** * Duration of the animation, in milliseconds. * The default value is 0. - * @devices phone, tablet, wearable, tv, car * @since 6 */ duration: number; @@ -45,7 +44,6 @@ export interface AnimatorOptions { * cubic-bezier(x1, y1, x2, y2) You can customize an animation speed curve in the cubic-bezier() function. The x and y values of each input parameter must be between 0 and 1. * Step curve. The number must be set and only an integer is supported, step-position is optional. It can be set to start or end. The default value is end. * The default value is ease. - * @devices phone, tablet, wearable, tv, car * @since 6 */ easing: string; @@ -53,7 +51,6 @@ export interface AnimatorOptions { /** * Delay for the animation start. The default value indicates no delay. * The default value is 0. - * @devices phone, tablet, wearable, tv, car * @since 6 */ delay: number; @@ -62,7 +59,6 @@ export interface AnimatorOptions { * Whether to resume to the initial state after the animation is executed. * none: The initial state is restored after the animation is executed. * forwards: The state at the end of the animation (defined in the last key frame) is retained after the animation is executed. - * @devices phone, tablet, wearable, tv, car * @since 6 */ fill: "none" | "forwards" | "backwards" | "both"; @@ -70,7 +66,6 @@ export interface AnimatorOptions { /** * The animation playback mode. * The default value is "normal". - * @devices phone, tablet, wearable, tv, car * @since 6 */ direction: "normal" | "reverse" | "alternate" | "alternate-reverse"; @@ -78,7 +73,6 @@ export interface AnimatorOptions { /** * Number of times the animation will be played. number indicates a fixed number of playback operations, and -1 an unlimited number of playback operations. * The default value is 1. - * @devices phone, tablet, wearable, tv, car * @since 6 */ iterations: number; @@ -86,7 +80,6 @@ export interface AnimatorOptions { /** * Starting point of animator interpolation. * The default value is 0. - * @devices phone, tablet, wearable, tv, car * @since 6 */ begin: number; @@ -94,77 +87,74 @@ export interface AnimatorOptions { /** * Ending point of Dynamic Interpolation * The default value is 1. - * @devices phone, tablet, wearable, tv, car * @since 6 */ end: number; } +/** + * Defines the Animator result interface. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 6 + */ export interface AnimatorResult { /** * Update the options for current animator. * @param options Options. + * @since 6 */ update(options: AnimatorOptions): void; /** * Starts the animation. - * @devices phone, tablet, wearable, tv, car * @since 6 */ play(): void; /** * Ends the animation. - * @devices phone, tablet, wearable, tv, car * @since 6 */ finish(): void; /** * Pauses the animation. - * @devices phone, tablet, wearable, tv, car * @since 6 */ pause(): void; /** * Cancels the animation. - * @devices phone, tablet, wearable, tv, car * @since 6 */ cancel(): void; /** * Plays the animation in reverse direction. - * @devices phone, tablet, wearable, tv, car * @since 6 */ reverse(): void; /** * Trigger when vsync callback. * @param progress The current progress of animtion - * @devices phone, tablet, wearable, tv, car * @since 6 */ onframe: (progress: number) => void; /** * The animation is finished. - * @devices phone, tablet, wearable, tv, car * @since 6 */ onfinish: () => void; /** * The animation is canceled. - * @devices phone, tablet, wearable, tv, car * @since 6 */ oncancel: () => void; /** * The animation is repeated. - * @devices phone, tablet, wearable, tv, car * @since 6 */ onrepeat: () => void; } /** - * @devices phone, tablet, wearable, tv, car + * Defines the Animator class. + * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 * @import prompt from '@ohos.animator'; */ @@ -172,7 +162,6 @@ export default class Animator { /** * Create an animator object for custum animation. * @param options Options. - * @devices phone, tablet, wearable, tv, car * @since 6 */ static createAnimator(options: AnimatorOptions): AnimatorResult; diff --git a/api/@ohos.curves.d.ts b/api/@ohos.curves.d.ts index c4166aaf662edd5390f9136cdc292ed5ac716941..e3a377d6cea5acb289960fa17e9223cf55a1d2f8 100644 --- a/api/@ohos.curves.d.ts +++ b/api/@ohos.curves.d.ts @@ -17,13 +17,11 @@ * Contains interpolator functions such as initialization, third-order Bezier curves, and spring curves. * @import import Curves from '@ohos.curves' * @syscap SystemCapability.ArkUI.ArkUI.Full - * @devices phone, tablet, tv, wearable * @since 7 */ declare namespace curves { /** * enum Curve. - * @devices phone, tablet, tv, wearable * @since 7 */ enum Curve { @@ -44,28 +42,24 @@ declare namespace curves { /** * Initializes the interpolator curve when called. - * @devices phone, tablet, tv, wearable * @since 7 */ function init(curve?: Curve): string; /** * Constructs a step curve when called. - * @devices phone, tablet, tv, wearable * @since 7 */ function steps(count: number, end: boolean): string; /** * Constructs a third-order Bezier curve when called. - * @devices phone, tablet, tv, wearable * @since 7 */ function cubicBezier(x1: number, y1: number, x2: number, y2: number): string; /** * Constructs a spring curve when called. - * @devices phone, tablet, tv, wearable * @since 7 */ function spring(velocity: number, mass: number, stiffness: number, damping: number): string; diff --git a/api/@ohos.matrix4.d.ts b/api/@ohos.matrix4.d.ts index 30158cb8cc984c074fcdfb835113425b543d65b1..9f779cf3176abbfee0cd1df1608f02d20541aef6 100644 --- a/api/@ohos.matrix4.d.ts +++ b/api/@ohos.matrix4.d.ts @@ -17,33 +17,28 @@ * Used to do matrix operations * @import import Matrix4 from '@ohos.matrix4' * @syscap SystemCapability.ArkUI.ArkUI.Full - * @devices phone, tablet, tv, wearable * @since 7 */ declare namespace matrix4 { /** * Set translation parameters - * @devices phone, tablet, tv, wearable * @since 7 */ interface TranslateOption { /** * Indicates the translation distance of the x-axis, in px. - * @devices phone, tablet, tv, wearable * @since 7 */ x?: number; /** * Indicates the translation distance of the y-axis, in px. - * @devices phone, tablet, tv, wearable * @since 7 */ y?: number; /** * Indicates the translation distance of the z-axis, in px. - * @devices phone, tablet, tv, wearable * @since 7 */ z?: number; @@ -51,41 +46,35 @@ declare namespace matrix4 { /** * Set scaling parameters - * @devices phone, tablet, tv, wearable * @since 7 */ interface ScaleOption { /** * Zoom factor of the x-axis. - * @devices phone, tablet, tv, wearable * @since 7 */ x?: number; /** * Zoom factor of the y-axis. - * @devices phone, tablet, tv, wearable * @since 7 */ y?: number; /** * Zoom factor of the z-axis. - * @devices phone, tablet, tv, wearable * @since 7 */ z?: number; /** * Transform the x-axis coordinate of the center point. - * @devices phone, tablet, tv, wearable * @since 7 */ centerX?: number; /** * Transform the y-axis coordinate of the center point. - * @devices phone, tablet, tv, wearable * @since 7 */ centerY?: number; @@ -93,48 +82,41 @@ declare namespace matrix4 { /** * Set Rotation Parameters. - * @devices phone, tablet, tv, wearable * @since 7 */ interface RotateOption { /** * Axis of rotation vector x coordinate. - * @devices phone, tablet, tv, wearable * @since 7 */ x?: number; /** * Axis of rotation vector y coordinate. - * @devices phone, tablet, tv, wearable * @since 7 */ y?: number; /** * Axis of rotation vector z coordinate. - * @devices phone, tablet, tv, wearable * @since 7 */ z?: number; /** * Transform the x-axis coordinate of the center point. - * @devices phone, tablet, tv, wearable * @since 7 */ centerX?: number; /** * Transform the y-axis coordinate of the center point. - * @devices phone, tablet, tv, wearable * @since 7 */ centerY?: number; /** * Rotation angle. - * @devices phone, tablet, tv, wearable * @since 7 */ angle?: number; @@ -142,14 +124,12 @@ declare namespace matrix4 { /** * Matrix4Transit. - * @devices phone, tablet, tv, wearable * @since 7 */ interface Matrix4Transit { /** * Copy function of Matrix, which can copy a copy of the current matrix object. * @since 7 - * @devices phone, tablet, tv, wearable * @return Return to Matrix4Transit */ copy(): Matrix4Transit; @@ -157,7 +137,6 @@ declare namespace matrix4 { /** * The inverse function of Matrix returns an inverse matrix of the current matrix object, that is, the effect is exactly the opposite. * @since 7 - * @devices phone, tablet, tv, wearable * @return Return to Matrix4Transit */ invert(): Matrix4Transit; @@ -165,55 +144,68 @@ declare namespace matrix4 { /** * Matrix superposition function, which can superpose the effects of two matrices to generate a new matrix object. * @since 7 - * @devices phone, tablet, tv, wearable * @return Return to Matrix4Transit */ - combine(options:Matrix4Transit): Matrix4Transit; + combine(options: Matrix4Transit): Matrix4Transit; /** * Matrix translation function, which can add the x-axis, Y-axis, or Z-axis translation effect to the current matrix. * @since 7 - * @devices phone, tablet, tv, wearable * @return Return to Matrix4Transit */ - translate(options:TranslateOption): Matrix4Transit; + translate(options: TranslateOption): Matrix4Transit; /** * Scaling function of the Matrix, which can add the x-axis, Y-axis, or Z-axis scaling effect to the current matrix. * @since 7 - * @devices phone, tablet, tv, wearable * @return Return to Matrix4Transit */ - scale(options:ScaleOption): Matrix4Transit; + scale(options: ScaleOption): Matrix4Transit; - /* Rotation function of the Matrix. You can add the x-axis, Y-axis, or Z-axis rotation effect to the current matrix. + /** + * Rotation function of the Matrix. You can add the x-axis, Y-axis, or Z-axis rotation effect to the current matrix. * @since 7 - * @devices phone, tablet, tv, wearable * @return Return to Matrix4Transit */ - rotate(options:RotateOption): Matrix4Transit; + rotate(options: RotateOption): Matrix4Transit; /** * Matrix coordinate point conversion function, which can apply the current transformation effect to a coordinate point. * @since 7 - * @devices phone, tablet, tv, wearable * @return Return to Matrix4Transit */ - transformPoint(options:[number,number]): [number,number]; + transformPoint(options: [number, number]): [number, number]; } /** * Constructor of Matrix, which can create a fourth-order matrix based on the input parameters. The matrix is column-first. * @since 7 - * @devices phone, tablet, tv, wearable * @return Return to Matrix4Transit */ - function init(options: [number,number,number,number,number,number,number,number,number,number,number,number,number,number,number,number]): Matrix4Transit; + function init( + options: [ + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + ], + ): Matrix4Transit; /** * Matrix initialization function, which can return an identity matrix object. * @since 7 - * @devices phone, tablet, tv, wearable * @return Return to Matrix4Transit */ function identity(): Matrix4Transit; @@ -221,7 +213,6 @@ declare namespace matrix4 { /** * Copy function of Matrix, which can copy a copy of the current matrix object. * @since 7 - * @devices phone, tablet, tv, wearable * @return Return to Matrix4Transit */ function copy(): Matrix4Transit; @@ -229,7 +220,6 @@ declare namespace matrix4 { /** * The inverse function of Matrix returns an inverse matrix of the current matrix object, that is, the effect is exactly the opposite. * @since 7 - * @devices phone, tablet, tv, wearable * @return Return to Matrix4Transit */ function invert(): Matrix4Transit; @@ -237,42 +227,37 @@ declare namespace matrix4 { /** * Matrix superposition function, which can superpose the effects of two matrices to generate a new matrix object. * @since 7 - * @devices phone, tablet, tv, wearable * @return Return to Matrix4Transit */ - function combine(options:Matrix4Transit): Matrix4Transit; + function combine(options: Matrix4Transit): Matrix4Transit; /** * Matrix translation function, which can add the x-axis, Y-axis, or Z-axis translation effect to the current matrix. * @since 7 - * @devices phone, tablet, tv, wearable * @return Return to Matrix4Transit */ - function translate(options:TranslateOption): Matrix4Transit; + function translate(options: TranslateOption): Matrix4Transit; /** * Scaling function of the Matrix, which can add the x-axis, Y-axis, or Z-axis scaling effect to the current matrix. * @since 7 - * @devices phone, tablet, tv, wearable * @return Return to Matrix4Transit */ - function scale(options:ScaleOption): Matrix4Transit; + function scale(options: ScaleOption): Matrix4Transit; /** * Rotation function of the Matrix. You can add the x-axis, Y-axis, or Z-axis rotation effect to the current matrix. * @since 7 - * @devices phone, tablet, tv, wearable * @return Return to Matrix4Transit */ - function rotate(options:RotateOption): Matrix4Transit; + function rotate(options: RotateOption): Matrix4Transit; /** * Matrix coordinate point conversion function, which can apply the current transformation effect to a coordinate point. * @since 7 - * @devices phone, tablet, tv, wearable * @return Return to Matrix4Transit */ - function transformPoint(options:[number,number]): [number,number]; + function transformPoint(options: [number, number]): [number, number]; } -export default matrix4; \ No newline at end of file +export default matrix4; diff --git a/api/@ohos.mediaquery.d.ts b/api/@ohos.mediaquery.d.ts index 011ea459d14f1cff726090d1e3b405ae469d5157..475e5974cd70a91d1ae956835138c4bf9b61e2c9 100644 --- a/api/@ohos.mediaquery.d.ts +++ b/api/@ohos.mediaquery.d.ts @@ -19,7 +19,6 @@ import {Callback} from './basic'; * Used to do mediaquery operations. * @import import mediaquery from '@ohos.mediaquery' * @syscap SystemCapability.ArkUI.ArkUI.Full - * @devices phone, tablet, tv, wearable * @since 7 */ declare namespace mediaquery { diff --git a/api/@ohos.pasteboard.d.ts b/api/@ohos.pasteboard.d.ts index e1e14bcded6bb0fc22c2d3b13fcf6e486128b140..fd64ab9ab8cf9f4656d58599b87ceb6a70b3aa5d 100644 --- a/api/@ohos.pasteboard.d.ts +++ b/api/@ohos.pasteboard.d.ts @@ -18,7 +18,6 @@ import { Want } from './ability/want'; /** * systemPasteboard * @syscap SystemCapability.Miscservices.Pasteboard - * @devices phone, tablet, tv, wearable, car * @import import pasteboard from '@ohos.pasteboard'; */ declare namespace pasteboard { diff --git a/api/@ohos.prompt.d.ts b/api/@ohos.prompt.d.ts index 0cdce80386482f0bb27f39606b87d378238fd213..9d8afef0be55336a9409fccc55d6bd2a9a00a1a8 100644 --- a/api/@ohos.prompt.d.ts +++ b/api/@ohos.prompt.d.ts @@ -113,7 +113,6 @@ declare namespace prompt { } /** - * @devices tv, phone, tablet, wearable * @since 8 */ interface ActionMenuOptions { diff --git a/api/basic.d.ts b/api/basic.d.ts index e55591b491fb19f037b3c16c1bd5dfcef5dc6e30..66a84e73b9f18b2ff56f4d724b4da6c8ac3ba694 100755 --- a/api/basic.d.ts +++ b/api/basic.d.ts @@ -13,18 +13,50 @@ * limitations under the License. */ +/** + * Defines the basic callback. + * @since 6 + */ export interface Callback { - (data: T): void; + /** + * Defines the callback info. + * @since 6 + */ + (data: T): void; } - + +/** + * Defines the basic error callback. + * @since 6 + */ export interface ErrorCallback { - (err: T): void; + /** + * Defines the basic error callback. + * @since 6 + */ + (err: T): void; } +/** + * Defines the basic async callback. + * @since 6 + */ export interface AsyncCallback { - (err: BusinessError, data: T): void; + /** + * Defines the callback data. + * @since 6 + */ + (err: BusinessError, data: T): void; } +/** + * Defines the error interface. + * @since 6 + */ export interface BusinessError extends Error { - code: number; + /** + * Defines the basic error code. + * @since 6 + */ + code: number; } diff --git a/api/common/@internal/console.d.ts b/api/common/@internal/console.d.ts index f1eec6e6d8cc561a926c9883d15b91e5adc897d9..2c5c4430994a70f8abe7d01cf9a92c5563a04103 100644 --- a/api/common/@internal/console.d.ts +++ b/api/common/@internal/console.d.ts @@ -15,42 +15,36 @@ /** * @syscap SystemCapability.ArkUI.ArkUI.Lite - * @devices tv, phone, tablet, wearable, liteWearable, smartVision * @since 3 */ export declare class console { /** * Prints "debug" logs. * @param message Text to print. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision */ static debug(message: string, ...arguments: any[]): void; /** * Prints "log" logs. * @param message Text to print. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision */ static log(message: string, ...arguments: any[]): void; /** * Prints "info" logs. * @param message Text to print. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision */ static info(message: string, ...arguments: any[]): void; /** * Prints "warn" logs. * @param message Text to print. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision */ static warn(message: string, ...arguments: any[]): void; /** * Prints "error" logs. * @param message Text to print. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision */ static error(message: string, ...arguments: any[]): void; } diff --git a/api/common/@internal/featureability.d.ts b/api/common/@internal/featureability.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1827ba6cc2d3fd01b2adbe824560fba9b8570d60 --- /dev/null +++ b/api/common/@internal/featureability.d.ts @@ -0,0 +1,393 @@ +/* + * 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. + */ + +/** + * @since 5 + * @deprecated since 8 + */ +export interface Result { + /** + * Result code. + * @since 5 + */ + code: number; + + /** + * Returned data. + * @since 5 + */ + data: object; +} + +/** + * @since 5 + * @deprecated since 8 + */ +export interface SubscribeMessageResponse { + /** + * Peer device ID. + * @since 5 + */ + deviceId: string; + + /** + * Name of the bundle where the peer ability locates. The name is case sensitive. + * @since 5 + */ + bundleName: string; + + /** + * Peer ability name, which is case sensitive. + * @since 5 + */ + abilityName: string; + + /** + * Messages received from the device. + * @since 5 + */ + message: string; +} + +/** + * @since 5 + * @deprecated since 8 + */ +export interface CallAbilityParam { + /** + * Name of the bundle where the ability locates. The name is case sensitive and must be the same as that on the AA side. + * @since 5 + */ + bundleName: string; + + /** + * Ability name, which is case sensitive and must be the same as that on the AA side. + * @since 5 + */ + abilityName: string; + + /** + * Ability operation code, which defines the service function of an AA and must be consistent with the AA side. + * @since 5 + */ + messageCode: number; + + /** + * Ability type. Different types of abilities have different implementation on the AA side. + * 0: Ability, which has an independent lifecycle. The FA starts and requests an AA through an RPC. Such type of abilities are used to provide basic services for multiple FAs to call or are used when the abilities should run in the background. + * 1: Internal ability, which shares the same process with the FA and communicates with it by calling internal functions. Such type of abilities are used in scenarios that require low response latency and cannot be called by other FAs. + * @since 5 + */ + abilityType: number; + + /** + * Data sent to the ability. The data to carry differs depending on the service to be processed and its field name must be consistent with the AA side. + * @since 5 + */ + data?: object; + + /** + * Whether the request is synchronous or asynchronous. The synchronous mode is used by default. Currently, the asynchronous mode is available only for internal abilities. + * 0: Synchronous mode (default value) + * 1: Asynchronous mode + * @since 5 + */ + syncOption?: number; +} + +/** + * @since 5 + * @deprecated since 8 + */ +export interface SubscribeAbilityEventParam { + /** + * Name of the bundle where the ability locates. The name is case sensitive and must be the same as that on the AA side. + * @since 5 + */ + bundleName: string; + + /** + * Ability name, which is case sensitive and must be the same as that on the AA side. + * @since 5 + */ + abilityName: string; + + /** + * Ability operation code, which defines the service function of an AA and must be consistent with the AA side. + * @since 5 + */ + messageCode: number; + + /** + * Ability type. Different types of abilities have different implementation on the AA side. + * 0: Ability, which has an independent lifecycle. The FA starts and requests an AA through an RPC. Such type of abilities are used to provide basic services for multiple FAs to call or are used when the abilities should run in the background. + * 1: Internal ability, which shares the same process with the FA and communicates with it by calling internal functions. Such type of abilities are used in scenarios that require low response latency and cannot be called by other FAs. + * @since 5 + */ + abilityType: number; + + /** + * Whether the request is synchronous or asynchronous. The synchronous mode is used by default. Currently, the asynchronous mode is available only for internal abilities. + * 0: Synchronous mode (default value) + * 1: Asynchronous mode + * @since 5 + */ + syncOption?: number; +} + +/** + * @since 5 + * @deprecated since 8 + */ +export interface SendMessageOptions { + /** + * Destination device ID. + * @since 5 + */ + deviceId: string; + + /** + * Name of the destination bundle where the ability locates. The name is case sensitive. + * @since 5 + */ + bundleName: string; + + /** + * Destination ability name, which is case sensitive. + * @since 5 + */ + abilityName: string; + + /** + * Messages sent to the destination device. + * A maximum of 1 KB of data can be transmitted at a time. + * If more than 1 KB of data needs to be transmitted, split the messages into multiple parts to transmit. + * @since 5 + */ + message?: string; + + /** + * Called when the messages are sent successfully. + * @since 5 + */ + success?: () => void; + + /** + * Called when the messages fail to be sent. + * @since 5 + */ + fail?: (data: string, code: number) => void; + + /** + * Called when the execution is completed. + * @since 5 + */ + complete?: () => void; +} + +/** + * @since 5 + * @deprecated since 8 + */ +export interface SubscribeMessageOptions { + /** + * Called when the messages are sent successfully. + * @since 5 + */ + success?: (data: SubscribeMessageResponse) => void; + + /** + * Called when the messages fail to be sent. + * @since 5 + */ + fail?: (data: string, code: number) => void; +} + +/** + * @since 5 + * @deprecated since 8 + */ +export interface RequestParams { + /** + * The name of the bundle to start. It should be used with abilityname and case sensitive. + * @since 5 + */ + bundleName?: string; + + /** + * Ability name, which is case sensitive. + * @since 5 + */ + abilityName?: string; + + /** + * The list of entities to which the FA to be called. If it is not filled in, all entity lists will be found by default. It should be used with action. + * @since 5 + */ + entities?: Array; + + /** + * Without specifying the bundle name and ability name, you can start the application according to other properties with action. + * @since 5 + */ + action?: string; + + /** + * If more than one FA meets the conditions, the user can select the device from the popup. + * 0: Default. Select the FA to start from the local and remote devices. + * 1: start FA from the local device. + * @since 5 + */ + deviceType?: number; + + /** + * Data sent to the ability which need to be serializable. + * @since 5 + */ + data?: object; + + /** + * Configuration switch when start FA. + * @since 5 + */ + flag?: number; + + /** + * Specify the url of the page which the FA to be called. Use home page directly by default. + * @since 5 + */ + url?: string; +} + +/** + * @since 5 + * @deprecated since 8 + */ +export interface FinishWithResultParams { + /** + * Result code. + * @since 5 + */ + code: number; + + /** + * Returned data. + * @since 5 + */ + result: object; +} + +/** + * @since 5 + * @deprecated since 8 + */ +export declare class FeatureAbility { + /** + * Start a FA without callback result. + * @param request Indicates the request param. + * @returns A Promise object is returned, which contains the result of whether to call Ability's interface successfully. + * @since 5 + * @deprecated since 8 + */ + static startAbility(request: RequestParams): Promise; + + /** + * Start a FA with callback result. + * @param request Indicates the request param. + * @returns A Promise object is returned, which contains the result of the data FA returned. + * @since 5 + * @deprecated since 8 + */ + static startAbilityForResult(request: RequestParams): Promise; + + /** + * FA call the interface to destory itself and set the result as parameters. + * @param request Indicates the request param. + * @returns A Promise object is returned, which contains the result whether to callback successfully. + * @since 5 + * @deprecated since 8 + */ + static finishWithResult(param: FinishWithResultParams): Promise; + + /** + + * Get device information list. + * @param flag Default 0, get the information list of all devices in the network. + * @returns A Promise object is returned, which contains the result whether the device information list is obtained successfully. + * @since 5 + * @deprecated since 8 + */ + static getDeviceList(flag: number): Promise; + + /** + + * Calls an AA. + * @param param Indicates the request param. + * @returns A Promise object is returned, which contains the result data returned by the AA. The result is a JSON string. + * @since 5 + * @deprecated since 8 + */ + static callAbility(param: CallAbilityParam): Promise; + + /** + * Start FA migration. + * @returns A Promise object is returned, which contains the result data returned by the AA. The result is a JSON string. + * @since 5 + * @deprecated since 8 + */ + static continueAbility(): Promise; + + /** + * Subscribes to events of an AA. + * @param param Indicates the request param. + * @param func Indicates the event reporting callback. + * @returns A Promise object is returned, which contains the result data returned by the AA. The result is a JSON string. + * @since 5 + * @deprecated since 8 + */ + static subscribeAbilityEvent(param: SubscribeAbilityEventParam, func: Function): Promise; + + /** + * Unsubscribes from events of an AA. + * @param param Indicates the request param. + * @returns A Promise object is returned, which contains the result data returned by the AA. The result is a JSON string. + * @since 5 + * @deprecated since 8 + */ + static unsubscribeAbilityEvent(param: SubscribeAbilityEventParam): Promise; + + /** + * Sends messages to the destination device. + * @param options Options. + * @since 5 + * @deprecated since 8 + */ + static sendMsg(options: SendMessageOptions): void; + + /** + * Listens for messages sent from other devices. + * @param options Options. + * @since 5 + * @deprecated since 8 + */ + static subscribeMsg(options: SubscribeMessageOptions): void; + + /** + * Cancels the listening for messages sent from other devices. + * @since 5 + * @deprecated since 8 + */ + static unsubscribeMsg(): void; +} diff --git a/api/common/@internal/global.d.ts b/api/common/@internal/global.d.ts index 0f902fb46960a1d39f9ae8baa83cba0f166bbc64..226bb7d8c69cd892c5f1c403a37d149afd32d379 100644 --- a/api/common/@internal/global.d.ts +++ b/api/common/@internal/global.d.ts @@ -20,7 +20,6 @@ * @param delay Indicates the interval between each two calls, in milliseconds. The function will be called after this delay. * @param arguments Indicates additional arguments to pass to "handler" when the timer goes off. * @returns Returns the timer ID. - * @devices tv, phone, tablet, wearable * @since 3 */ export declare function setInterval(handler: Function | string, delay: number, ...arguments: any[]): number; @@ -32,16 +31,30 @@ export declare function setInterval(handler: Function | string, delay: number, . * @param delay Indicates the delay (in milliseconds) after which the function will be called. If this parameter is left empty, default value "0" will be used, which means that the function will be called immediately or as soon as possible. * @param arguments Indicates additional arguments to pass to "handler" when the timer goes off. * @returns Returns the timer ID. - * @devices tv, phone, tablet, wearable * @since 3 */ export declare function setTimeout(handler: Function | string, delay?: number, ...arguments: any[]): number; +/** + * Sets a vsync after which a function will be executed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @param handler Indicates the function to be called when the vsync trigger. + * @since 3 + */ +export declare function requestAnimationFrame(handler: Function): number; + +/** + * Cancels the vsync callback set by "requestAnimationFrame()". + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @param requestId Indicates the vsync callback ID returned by "requestAnimationFrame()". + * @since 3 + */ +export declare function cancelAnimationFrame(requestId: number): void; + /** * Cancels the interval set by " setInterval()". * @syscap SystemCapability.ArkUI.ArkUI.Lite * @param intervalID Indicates the timer ID returned by "setInterval()". - * @devices tv, phone, tablet, wearable, liteWearable, smartVision * @since 3 */ export declare function clearInterval(intervalID?: number): void; @@ -50,11 +63,19 @@ export declare function clearInterval(intervalID?: number): void; * Cancels the timer set by "setTimeout()". * @syscap SystemCapability.ArkUI.ArkUI.Lite * @param timeoutID Indicates the timer ID returned by "setTimeout()". - * @devices tv, phone, tablet, wearable, liteWearable, smartVision * @since 3 */ export declare function clearTimeout(timeoutID?: number): void; +/** + * Get the java interface instance. The java instance needs to register, otherwise it cannot be obtained. + * After obtaining the instance, you can call the function with the same name on the Java side. + * @param name Java interface name, including package path, such as com.example.test.timeinterfaceimpl. + * @returns A promise object is returned. The resolve callback is the object of PA. The reject callback returns the object containing code and error data. + * @since 5 + */ +export declare function createLocalParticleAbility(name?: string): any; + /** * Defining syscap function. * @since 8 @@ -64,7 +85,6 @@ export declare function canIUse(syscap: string): boolean; /** * Obtain the objects exposed in app.js * @syscap SystemCapability.ArkUI.ArkUI.Full - * @devices tv, phone, tablet, wearable, smartVision * @since 6 */ export declare function getApp(): object; @@ -72,127 +92,142 @@ export declare function getApp(): object; /** * You can create an Image object by calling new Image(). * @syscap SystemCapability.ArkUI.ArkUI.Full - * @devices tv, phone, tablet, wearable + * @since 4 */ export declare class Image { - /** - * Network address or local resource. The internal URI is supported. - * @devices tv, phone, tablet, wearable - */ - src: string; - /** - * Image width. - * @devices tv, phone, tablet, wearable - */ - width?: number; - /** - * Image height. - * @devices tv, phone, tablet, wearable - */ - height?: number; - /** - * Called when an image is successfully loaded. This function has no parameter. - * @devices tv, phone, tablet, wearable - */ - onload?: () => void; - /** - * Called when an image fails to be loaded. This function has no parameter. - * @devices tv, phone, tablet, wearable - */ - onerror?: () => void; + /** + * Network address or local resource. The internal URI is supported. + * @since 4 + */ + src: string; + /** + * Image width. + * @since 4 + */ + width?: number; + /** + * Image height. + * @since 4 + */ + height?: number; + /** + * Called when an image is successfully loaded. This function has no parameter. + * @since 4 + */ + onload?: () => void; + /** + * Called when an image fails to be loaded. This function has no parameter. + * @since 4 + */ + onerror?: () => void; } /** * An ImageData object is a common object that stores the actual pixel data of a Canvas object. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @devices tv, phone, tablet, wearable + * @since 4 */ export declare class ImageData { - /** - * Actual width of the ImageData object, in pixels. - * @devices tv, phone, tablet, wearable - */ - width: number; - /** - * Actual height of the ImageData object, in pixels. - * @devices tv, phone, tablet, wearable - */ - height: number; - /** - * A one-dimensional array of color values. The color values are sorted in the RGBA order and represented by integers from 0 to 255. - * @devices tv, phone, tablet, wearable - */ - data: Uint8ClampedArray; + /** + * Actual width of the ImageData object, in pixels. + * @since 4 + */ + width: number; + /** + * Actual height of the ImageData object, in pixels. + * @since 4 + */ + height: number; + /** + * A one-dimensional array of color values. The color values are sorted in the RGBA order and represented by integers from 0 to 255. + * @since 4 + */ + data: Uint8ClampedArray; } /** * OffscreenCanvas provides a Canvas object that can be rendered off-screen. * It works in both window and Web worker environments. * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 */ export declare class OffscreenCanvas { - /** - * The width of the offScreen Canvas object - * The height of the offScreen Canvas object - */ - constructor(width: number, height: number); - - /** - * The width of the offScreen Canvas object - */ - width: number; - - /** - * The height of the offScreen Canvas object - */ - height: number; - - /** - * Gets the context object for off-screen drawing. - * @param contextId creates a CanvasRenderingContext2D object representing a two-dimensional rendering context. - * @param options object representing a three-dimensional rendering context. - * @returns a render canvas for the offScreen Canvas object. - */ - getContext(contextId: "2d", options?: CanvasRenderingContext2DSettings): OffscreenCanvasRenderingContext2D; - - /** - * Converts the draw contents of the current off-screen draw object to a string in the form of a Blob. - * @param type indicating the image format. - * @param quality between 0 and 1 indicating image quality if the type option is image/jpeg or image/webp. - * @returns A Promise returning a Blob object representing the image contained in the canvas. - */ - toDataURL(type?: string, quality?: number): string; - - /** - * Converts the draw content in the current off-screen draw object to a Bitmap object. - * @returns Returns An ImageBitmap object. - */ - transferToImageBitmap(): ImageBitmap; + /** + * The width of the offScreen Canvas object + * The height of the offScreen Canvas object + * @since 7 + */ + constructor(width: number, height: number); + + /** + * The width of the offScreen Canvas object + * @since 7 + */ + width: number; + + /** + * The height of the offScreen Canvas object + * @since 7 + */ + height: number; + + /** + * Gets the context object for off-screen drawing. + * @param contextId creates a CanvasRenderingContext2D object representing a two-dimensional rendering context. + * @param options object representing a three-dimensional rendering context. + * @returns a render canvas for the offScreen Canvas object. + * @since 7 + */ + getContext(contextId: "2d", options?: CanvasRenderingContext2DSettings): OffscreenCanvasRenderingContext2D; + + /** + * Converts the draw contents of the current off-screen draw object to a string in the form of a Blob. + * @param type indicating the image format. + * @param quality between 0 and 1 indicating image quality if the type option is image/jpeg or image/webp. + * @returns A Promise returning a Blob object representing the image contained in the canvas. + * @since 7 + */ + toDataURL(type?: string, quality?: number): string; + + /** + * Converts the draw content in the current off-screen draw object to a Bitmap object. + * @returns Returns An ImageBitmap object. + * @since 7 + */ + transferToImageBitmap(): ImageBitmap; } /** + * Defines the ImageBitmap. * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 */ export declare class ImageBitmap { - /** - * The height of the Image Bitmap object - */ - readonly height: number; - - /** - * The width of the Image Bitmap object - */ - readonly width: number; + /** + * The height of the Image Bitmap object. + * @since 7 + */ + readonly height: number; + + /** + * The width of the Image Bitmap object. + * @since 7 + */ + readonly width: number; } /** * Conditional compilation for rich equipment * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 4 + * @systemapi */ export declare const STANDARD: string; /** * Conditional compilation for lite equipment * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 4 + * @systemapi */ export declare const LITE: string; diff --git a/api/common/@internal/global.d.ts.orig b/api/common/@internal/global.d.ts.orig new file mode 100644 index 0000000000000000000000000000000000000000..208039014f83bc147ff8d99f8214070e0e7d0ceb --- /dev/null +++ b/api/common/@internal/global.d.ts.orig @@ -0,0 +1,224 @@ +/* + * 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. + */ + +/** + * Sets the interval for repeatedly calling a function. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @param handler Indicates the function to be called after the timer goes off. For devices of "tv", "phone, tablet", and "wearable" types, this parameter can be a function or string. For devices of "lite wearable" and "smartVision" types, this parameter must be a function. + * @param delay Indicates the interval between each two calls, in milliseconds. The function will be called after this delay. + * @param arguments Indicates additional arguments to pass to "handler" when the timer goes off. + * @returns Returns the timer ID. + * @since 3 + */ +export declare function setInterval(handler: Function | string, delay: number, ...arguments: any[]): number; + +/** + * Sets a timer after which a function will be executed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @param handler Indicates the function to be called after the timer goes off. For devices of "tv", "phone, tablet", and "wearable" types, this parameter can be a function or string. For devices of "lite wearable" and "smartVision" types, this parameter must be a function. + * @param delay Indicates the delay (in milliseconds) after which the function will be called. If this parameter is left empty, default value "0" will be used, which means that the function will be called immediately or as soon as possible. + * @param arguments Indicates additional arguments to pass to "handler" when the timer goes off. + * @returns Returns the timer ID. + * @since 3 + */ +export declare function setTimeout(handler: Function | string, delay?: number, ...arguments: any[]): number; + +/** + * Sets a vsync after which a function will be executed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @param handler Indicates the function to be called when the vsync trigger. + * @since 3 + */ +export declare function requestAnimationFrame(handler: Function): number; + +/** + * Cancels the vsync callback set by "requestAnimationFrame()". + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @param requestId Indicates the vsync callback ID returned by "requestAnimationFrame()". + * @since 3 + */ +export declare function cancelAnimationFrame(requestId: number): void; + +/** + * Cancels the interval set by " setInterval()". + * @syscap SystemCapability.ArkUI.ArkUI.Lite + * @param intervalID Indicates the timer ID returned by "setInterval()". + * @since 3 + */ +export declare function clearInterval(intervalID?: number): void; + +/** + * Cancels the timer set by "setTimeout()". + * @syscap SystemCapability.ArkUI.ArkUI.Lite + * @param timeoutID Indicates the timer ID returned by "setTimeout()". + * @since 3 + */ +export declare function clearTimeout(timeoutID?: number): void; + +/** + * Defining syscap function. + * @since 8 + */ +export declare function canIUse(syscap: string): boolean; + +/** + * Obtain the objects exposed in app.js + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 6 + */ +export declare function getApp(): object; + +/** + * You can create an Image object by calling new Image(). + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 4 + */ +export declare class Image { + /** + * Network address or local resource. The internal URI is supported. + * @since 4 + */ + src: string; + /** + * Image width. + * @since 4 + */ + width?: number; + /** + * Image height. + * @since 4 + */ + height?: number; + /** + * Called when an image is successfully loaded. This function has no parameter. + * @since 4 + */ + onload?: () => void; + /** + * Called when an image fails to be loaded. This function has no parameter. + * @since 4 + */ + onerror?: () => void; +} + +/** + * An ImageData object is a common object that stores the actual pixel data of a Canvas object. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 4 + */ +export declare class ImageData { + /** + * Actual width of the ImageData object, in pixels. + * @since 4 + */ + width: number; + /** + * Actual height of the ImageData object, in pixels. + * @since 4 + */ + height: number; + /** + * A one-dimensional array of color values. The color values are sorted in the RGBA order and represented by integers from 0 to 255. + * @since 4 + */ + data: Uint8ClampedArray; +} + +/** + * OffscreenCanvas provides a Canvas object that can be rendered off-screen. + * It works in both window and Web worker environments. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ +export declare class OffscreenCanvas { + /** + * The width of the offScreen Canvas object + * The height of the offScreen Canvas object + * @since 7 + */ + constructor(width: number, height: number); + + /** + * The width of the offScreen Canvas object + * @since 7 + */ + width: number; + + /** + * The height of the offScreen Canvas object + * @since 7 + */ + height: number; + + /** + * Gets the context object for off-screen drawing. + * @param contextId creates a CanvasRenderingContext2D object representing a two-dimensional rendering context. + * @param options object representing a three-dimensional rendering context. + * @returns a render canvas for the offScreen Canvas object. + * @since 7 + */ + getContext(contextId: "2d", options?: CanvasRenderingContext2DSettings): OffscreenCanvasRenderingContext2D; + + /** + * Converts the draw contents of the current off-screen draw object to a string in the form of a Blob. + * @param type indicating the image format. + * @param quality between 0 and 1 indicating image quality if the type option is image/jpeg or image/webp. + * @returns A Promise returning a Blob object representing the image contained in the canvas. + * @since 7 + */ + toDataURL(type?: string, quality?: number): string; + + /** + * Converts the draw content in the current off-screen draw object to a Bitmap object. + * @returns Returns An ImageBitmap object. + * @since 7 + */ + transferToImageBitmap(): ImageBitmap; +} + +/** + * Defines the ImageBitmap. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ +export declare class ImageBitmap { + /** + * The height of the Image Bitmap object. + * @since 7 + */ + readonly height: number; + + /** + * The width of the Image Bitmap object. + * @since 7 + */ + readonly width: number; +} + +/** + * Conditional compilation for rich equipment + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 4 + * @systemapi + */ +export declare const STANDARD: string; + +/** + * Conditional compilation for lite equipment + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 4 + * @systemapi + */ +export declare const LITE: string; diff --git a/api/common/@internal/viewmodel.d.ts b/api/common/@internal/viewmodel.d.ts index 062a8d2c2a21601f2bd126cb8680da94ef70f70a..3e0cceef68ffb76bca8b4ef7350ee8f6f5e09b93 100644 --- a/api/common/@internal/viewmodel.d.ts +++ b/api/common/@internal/viewmodel.d.ts @@ -18,125 +18,130 @@ import { WebGLContextAttributes, WebGLRenderingContext } from "../webgl/webgl"; import { WebGL2RenderingContext } from "../webgl/webgl2"; /** + * Defines the foucs param. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @devices tv, phone, tablet, wearable + * @since 3 */ export interface FocusParamObj { /** - * @devices tv, phone, tablet, wearable + * Whether needs to focus. + * @since 3 */ focus: boolean; } /** * @syscap SystemCapability.ArkUI.ArkUI.Full - * @devices tv, phone, tablet, wearable + * @since 6 */ export interface RectObj { /** - * @devices tv, phone, tablet, wearable + * @since 6 */ width: number; /** - * @devices tv, phone, tablet, wearable + * @since 6 */ height: number; /** - * @devices tv, phone, tablet, wearable + * @since 6 */ left: number; /** - * @devices tv, phone, tablet, wearable + * @since 6 */ top: number; } /** * @syscap SystemCapability.ArkUI.ArkUI.Full - * @devices tv, phone, tablet, wearable + * @since 6 */ export interface ContextAttrOptions { + /** + * @since 6 + */ antialias: boolean; } /** * @syscap SystemCapability.ArkUI.ArkUI.Full - * @devices tv, phone, tablet, wearable + * @since 4 */ export interface AnimateStyle { /** * Width value applied to the component after the animation is executed. - * @devices tv, phone, tablet, wearable + * @since 4 */ width: number; /** * Height value applied to the component after the animation is executed. - * @devices tv, phone, tablet, wearable + * @since 4 */ height: number; /** * left offset applied to the component after the animation is executed. - * @devices tv, phone, tablet, wearable + * @since 4 */ left: number; /** * top offset applied to the component after the animation is executed. - * @devices tv, phone, tablet, wearable + * @since 4 */ top: number; /** * right offset applied to the component after the animation is executed. - * @devices tv, phone, tablet, wearable + * @since 4 */ right: number; /** * bottom offset applied to the component after the animation is executed. - * @devices tv, phone, tablet, wearable + * @since 4 */ bottom: number; /** * Background color applied to the component after the animation is executed. * The default value is none. - * @devices tv, phone, tablet, wearable + * @since 4 */ backgroundColor: string; /** * Opacity applied to the component. The value ranges from 0 to 1. * The default value is 1. - * @devices tv, phone, tablet, wearable + * @since 4 */ opacity: number; /** * The value format is "x y", in percentage or pixels. * The first value indicates the horizontal position, and the second value indicates the vertical position. * If only one value is specified, the other value is 50% by default. - * @devices tv, phone, tablet, wearable + * @since 4 */ backgroundPosition: string; /** * Origin position of the transformed element. * The first value indicates the x-axis position. The value can be left, center, right, a length, or percentage. * The second value indicates the y-axis position. The value can be top, center, bottom, a length, or a percentage. - * @devices tv, phone, tablet, wearable + * @since 4 */ transformOrigin: string; /** * Transformation type applied to an element. - * @devices tv, phone, tablet, wearable + * @since 4 */ transform: "none" | TransformObject; /** * The value of offset must be within (0.0,1.0] and sorted in ascending order if it is provided. * If there are only two frames, offset can be left empty. * If there are more than two frames, offset is mandatory. - * @devices tv, phone, tablet, wearable + * @since 4 */ offset?: number; } /** * @syscap SystemCapability.ArkUI.ArkUI.Full - * @devices tv, phone, tablet, wearable + * @since 4 */ export interface TransformObject { /** @@ -147,15 +152,9 @@ export interface TransformObject { * @param scaleY the scale value for y-axis * @param translateX the translate value for x-axis * @param translateY the translate value for y-axis - * @devices tv, phone, tablet, wearable + * @since 6 */ - matrix( - scaleX: number, - skewX: number, - skewY: number, - scaleY: number, - translateX: number, - translateY: number): void; + matrix(scaleX: number, skewX: number, skewY: number, scaleY: number, translateX: number, translateY: number): void; /** * Defines a 3D transformation using a 4x4 matrix of 16 values. * @param n00 the value of the 0 row and 0 column of the 4x4 matrix @@ -174,17 +173,31 @@ export interface TransformObject { * @param n31 the value of the 3 row and 1 column of the 4x4 matrix * @param n32 the value of the 3 row and 2 column of the 4x4 matrix * @param n33 the value of the 3 row and 3 column of the 4x4 matrix - * @devices tv, phone, tablet, wearable - */ - matrix3d(n00: number, n01: number, n02: number, n03: number, - n10: number, n11: number, n12: number, n13: number, - n20: number, n21: number, n22: number, n23: number, - n30: number, n31: number, n32: number, n33: number): void; + * @since 6 + */ + matrix3d( + n00: number, + n01: number, + n02: number, + n03: number, + n10: number, + n11: number, + n12: number, + n13: number, + n20: number, + n21: number, + n22: number, + n23: number, + n30: number, + n31: number, + n32: number, + n33: number, + ): void; /** * Defines 2D transformations for translation of the X and Y axes * @param x the translate value for x-axis * @param y the translate value for y-axis - * @devices tv, phone, tablet, wearable + * @since 4 */ translate(x: number, y: number): void; /** @@ -192,32 +205,32 @@ export interface TransformObject { * @param x the translate value for x-axis * @param y the translate value for y-axis * @param z the translate value for z-axis - * @devices tv, phone, tablet, wearable + * @since 6 */ translate3d(x: number, y: number, z: number): void; /** * Defines 2D transformations for translation of the X axes * @param x the translate value for x-axis - * @devices tv, phone, tablet, wearable + * @since 4 */ translateX(x: number): void; /** * Defines 2D transformations for translation of the Y axes * @param y the translate value for y-axis - * @devices tv, phone, tablet, wearable + * @since 4 */ translateY(y: number): void; /** * Defines 3D transformations for translation of the Z axes * @param z the translate value for z-axis - * @devices tv, phone, tablet, wearable + * @since 6 */ translateZ(z: number): void; /** * Defines 2D transformations for scaling of the X and Y axes * @param x the scale value for x-axis * @param y the scale value for y-axis - * @devices tv, phone, tablet, wearable + * @since 4 */ scale(x: number, y: number): void; /** @@ -225,31 +238,31 @@ export interface TransformObject { * @param x the scale value for x-axis * @param y the scale value for y-axis * @param z the scale value for z-axis - * @devices tv, phone, tablet, wearable + * @since 6 */ scale3d(x: number, y: number, z: number): void; /** * Defines 2D transformations for scaling of the X axes * @param x the scale value for x-axis - * @devices tv, phone, tablet, wearable + * @since 4 */ scaleX(x: number): void; /** * Defines 2D transformations for scaling of the Y axes * @param y the scale value for y-axis - * @devices tv, phone, tablet, wearable + * @since 4 */ scaleY(y: number): void; /** * Defines 3D transformations for scaling of the Z axes * @param z the scale value for z-axis - * @devices tv, phone, tablet, wearable + * @since 6 */ scaleZ(z: number): void; /** * Define the 2D rotation and specify the angle in the parameters. * @param angle the rotate value for z-axis - * @devices tv, phone, tablet, wearable + * @since 4 */ rotate(angle: number): void; /** @@ -258,63 +271,63 @@ export interface TransformObject { * @param y the vector value of the y-axis * @param z the vector value of the z-axis * @param angle the rotate value for x&y&z vector. - * @devices tv, phone, tablet, wearable + * @since 6 */ rotate3d(x: number, y: number, z: number, angle: number): void; /** * Defines 3D transformations for rotating of the X axes. * @param x the scale value for x-axis - * @devices tv, phone, tablet, wearable + * @since 4 */ rotateX(angle: number): void; /** * Defines 3D transformations for rotating of the Y axes. * @param y the scale value for y-axis - * @devices tv, phone, tablet, wearable + * @since 4 */ rotateY(angle: number): void; /** * Defines 3D transformations for rotating of the Z axes. * @param z the scale value for z-axis - * @devices tv, phone, tablet, wearable + * @since 6 */ rotateZ(angle: number): void; /** * Defines the 2D skew transition along the X and Y axes. * @param xAngle the angle of inclination along the x axis. * @param yAngle the angle of inclination along the y axis. - * @devices tv, phone, tablet, wearable + * @since 6 */ skew(xAngle: number, yAngle: number): void; /** * Defines the 2D skew transition along the X axes. * @param angle the angle of inclination along the x axis. - * @devices tv, phone, tablet, wearable + * @since 6 */ skewX(angle: number): void; /** * Defines the 2D skew transition along the Y axes. * @param angle the angle of inclination along the y axis. - * @devices tv, phone, tablet, wearable + * @since 6 */ skewY(angle: number): void; /** * Defines a perspective view for the 3D transformation element. * @param n the vertical distance from the observation point to the component plane. - * @devices tv, phone, tablet, wearable + * @since 6 */ perspective(verticalDistance: number): void; } /** * @syscap SystemCapability.ArkUI.ArkUI.Full - * @devices tv, phone, tablet, wearable + * @since 4 */ export interface AnimateOptions { /** * Duration of the animation, in milliseconds. * The default value is 0. - * @devices tv, phone, tablet, wearable + * @since 4 */ duration: number; @@ -336,28 +349,28 @@ export interface AnimateOptions { * cubic-bezier(x1, y1, x2, y2) You can customize an animation speed curve in the cubic-bezier() function. The x and y values of each input parameter must be between 0 and 1. * Step curve. The number must be set and only an integer is supported, step-position is optional. It can be set to start or end. The default value is end. * The default value is ease. - * @devices tv, phone, tablet, wearable + * @since 4 */ easing: string; /** * Delay for the animation start. The default value indicates no delay. * The default value is 0. - * @devices tv, phone, tablet, wearable + * @since 4 */ delay: number; /** * Number of times the animation will be played. number indicates a fixed number of playback operations, and Infinity indicates an unlimited number of playback operations. * The default value is 1. - * @devices tv, phone, tablet, wearable + * @since 4 */ iterations: number | string; /** * The animation playback mode. * The default value is "normal". - * @devices tv, phone, tablet, wearable + * @since 6 */ direction: "normal" | "reverse" | "alternate" | "alternate-reverse"; @@ -365,24 +378,24 @@ export interface AnimateOptions { * Whether to resume to the initial state after the animation is executed. * none: The initial state is restored after the animation is executed. * forwards: The state at the end of the animation (defined in the last key frame) is retained after the animation is executed. - * @devices tv, phone, tablet, wearable + * @since 4 */ fill: "none" | "forwards" | "backwards" | "both"; } /** * @syscap SystemCapability.ArkUI.ArkUI.Full - * @devices tv, phone, tablet, wearable + * @since 4 */ export interface AnimationResult { /** * Read-only attribute, which indicates whether the animation playback is complete. - * @devices tv, phone, tablet, wearable + * @since 4 */ finished: boolean; /** * Read-only attribute, which indicates whether an animation is waiting for the completion of other asynchronous operations (for example, start an animation with a delay). - * @devices tv, phone, tablet, wearable + * @since 4 */ pending: boolean; /** @@ -391,64 +404,64 @@ export interface AnimationResult { * running: The animation is running. * paused: The animation is paused. * finished: Animation playback ends. - * @devices tv, phone, tablet, wearable + * @since 4 */ playstate: string; /** * Animation start time. This attribute is similar to that of delay in the options parameters. - * @devices tv, phone, tablet, wearable + * @since 4 */ startTime: number; /** * Starts the animation. - * @devices tv, phone, tablet, wearable + * @since 4 */ play(): void; /** * Ends the animation. - * @devices tv, phone, tablet, wearable + * @since 4 */ finish(): void; /** * Pauses the animation. - * @devices tv, phone, tablet, wearable + * @since 4 */ pause(): void; /** * Cancels the animation. - * @devices tv, phone, tablet, wearable + * @since 4 */ cancel(): void; /** * Plays the animation in reverse direction. - * @devices tv, phone, tablet, wearable + * @since 4 */ reverse(): void; /** * The animation is started. - * @devices tv, phone, tablet, wearable + * @since 4 */ onstart: () => void; /** * The animation is finished. - * @devices tv, phone, tablet, wearable + * @since 4 */ onfinish: () => void; /** * The animation is canceled. - * @devices tv, phone, tablet, wearable + * @since 4 */ oncancel: () => void; /** * The animation is repeated. - * @devices tv, phone, tablet, wearable + * @since 4 */ onrepeat: () => void; } /** * @syscap SystemCapability.ArkUI.ArkUI.Full - * @devices tv, phone, tablet, wearable + * @since 4 */ export interface Element { /** @@ -457,7 +470,7 @@ export interface Element { * If focus is set to false, the focus is canceled for the component. * This attribute can be defaulted to true. * @param obj { focus: true | false } - * @devices tv, phone, tablet, wearable + * @since 4 */ focus(obj?: FocusParamObj): void; @@ -467,7 +480,7 @@ export interface Element { * If focus is set to false, the crown event focus is canceled. * This attribute can be defaulted to true. * @param obj { focus: true | false } - * @devices tv, phone, tablet, wearable + * @since 4 */ rotation(obj?: FocusParamObj): void; @@ -476,39 +489,38 @@ export interface Element { * @param keyframes keyframes is used to describe key frame parameters of the animation. * @param options Options. is used to describe animation parameters. * @returns This method returns the animation object. - * @devices tv, phone, tablet, wearable + * @since 4 */ - animate( - keyframes: Array, - options: AnimateOptions - ): AnimationResult; + animate(keyframes: Array, options: AnimateOptions): AnimationResult; /** * Obtains the size and position of the element. * @returns RectObj the size position of the element. - * @devices tv, phone, tablet, wearable + * @since 6 */ getBoundingClientRect(): RectObj; /** * Obtains attributes of the element. * @returns attributes of the element in json string. - * @devices tv, phone, tablet, wearable + * @since 8 + * @systemapi */ getInspector(): string; /** * If 0.5 is returned, 50% of the current component is visible. * @param radios Scope of Monitoring components. + * @since 6 */ - createIntersectionObserver(param: {ratios: Array}): observer; + createIntersectionObserver(param: { ratios: Array }): observer; - /** + /** * Adds a node to the end of the child node list of the current node. * @param child Subnode object to be added * @since 8 */ - addChild(child: Element): void + addChild(child: Element): void; /** * Sets the value of an attribute on a specified element. If the attribute already exists, update the value. Otherwise, a new attribute is added with the specified name and value. @@ -516,7 +528,7 @@ export interface Element { * @param value attribute value¡¢ * @since 8 */ - setAttribute(name: string, value: string): void + setAttribute(name: string, value: string): void; /** * Sets a style value on a specified element. If the style exists and the style value is valid, the setting is successful. Otherwise, the setting is invalid. @@ -525,20 +537,24 @@ export interface Element { * @returns If the setting is successful, true is returned. If the setting fails, false is returned. * @since 8 */ - setStyle(name: string, value: string): boolean + setStyle(name: string, value: string): boolean; } /** + * Defines the observer interface. * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 6 */ export interface observer { /** * Turn on the listener. + * @since 6 */ observe(callback: string): void; /** * Turn off the listenerr. + * @since 6 */ unobserve(): void; } @@ -546,85 +562,86 @@ export interface observer { /** * animation element * @syscap SystemCapability.ArkUI.ArkUI.Full - * @devices tv, phone, tablet, wearable + * @since 4 */ export interface AnimationElement extends Element { /** * Starts the animation. - * @devices tv, phone, tablet, wearable + * @since 4 */ play(): void; /** * Ends the animation. - * @devices tv, phone, tablet, wearable + * @since 4 */ finish(): void; /** * Pauses the animation. - * @devices tv, phone, tablet, wearable + * @since 4 */ pause(): void; /** * Cancels the animation. - * @devices tv, phone, tablet, wearable + * @since 4 */ cancel(): void; /** * Plays the animation in reverse direction. - * @devices tv, phone, tablet, wearable + * @since 4 */ reverse(): void; } /** * @syscap SystemCapability.ArkUI.ArkUI.Full - * @devices tv, phone, tablet, wearable + * @since 4 */ export interface ScrollParam { /** * Offset for scrolling in the horizontal direction, in px. - * @devices tv, phone, tablet, wearable + * @since 4 */ dx?: number; /** * Offset for scrolling in the vertical direction, in px. - * @devices tv, phone, tablet, wearable + * @since 4 */ dy?: number; /** * Whether a sliding animation is displayed when scroll position is changed. - * @devices tv, phone, tablet, wearable + * @since 4 */ smooth?: boolean; } /** * @syscap SystemCapability.ArkUI.ArkUI.Full - * @devices tv, phone, tablet, wearable + * @since 4 */ export interface CurrentOffsetResultValue { /** * Scrolling offset in the x-axis, in px. - * @devices tv, phone, tablet, wearable + * @since 4 */ x: number; /** * Scrolling offset in the y-axis, in px. - * @devices tv, phone, tablet, wearable + * @since 4 */ y: number; } /** * @syscap SystemCapability.ArkUI.ArkUI.Full - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @since 4 */ export interface ListScrollToOptions { /** * specified position. + * @since 4 */ index: number; } @@ -632,19 +649,18 @@ export interface ListScrollToOptions { /** * The component provides a list container. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @devices tv, phone, tablet, wearable */ export interface ListElement extends Element { /** * Scrolls the list to the position of the item at the specified index. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @since 4 */ scrollTo(position: ListScrollToOptions): void; /** * Scrolls the list for a certain distance. * This method applies only to smart TVs. - * @devices tv + * @since 4 */ scrollBy(data: ScrollParam): void; @@ -652,7 +668,7 @@ export interface ListElement extends Element { * If smooth is set to false (default value), the list is directly scrolled to the top. * If smooth is set to true, the list is smoothly scrolled to the top. * @param param - * @devices tv, phone, tablet, wearable + * @since 4 */ scrollTop(param: { smooth: boolean }): void; @@ -660,7 +676,7 @@ export interface ListElement extends Element { * If smooth is set to false (default value), the list is directly scrolled to the bottom. * If smooth is set to true, the list is smoothly scrolled to the bottom. * @param param - * @devices tv, phone, tablet, wearable + * @since 4 */ scrollBottom(param: { smooth: boolean }): void; @@ -670,7 +686,7 @@ export interface ListElement extends Element { * If smooth is set to false (default value), the list is directly scrolled to another page. * If smooth is set to true, the list is smoothly scrolled to another page. * @param params - * @devices tv, phone, tablet, wearable + * @since 4 */ scrollPage(params: { reverse: boolean; smooth: boolean }): void; @@ -680,14 +696,14 @@ export interface ListElement extends Element { * If smooth is set to false (default value), the list is directly scrolled. * If smooth is set to true, the list is smoothly scrolled. * @param params - * @devices tv, phone, tablet, wearable + * @since 4 */ scrollArrow(params: { reverse: boolean; smooth: boolean }): void; /** * Collapses a group. * @param param - * @devices tv, phone, tablet, wearable + * @since 4 */ collapseGroup(param: { /** @@ -700,7 +716,7 @@ export interface ListElement extends Element { /** * Expands a group. * @param param - * @devices tv, phone, tablet, wearable + * @since 4 */ expandGroup(param: { /** @@ -712,7 +728,7 @@ export interface ListElement extends Element { /** * Returns the offset of the current scrolling. The return value type is Object. - * @devices tv, phone, tablet, wearable + * @since 4 */ currentOffset(): CurrentOffsetResultValue; } @@ -720,12 +736,12 @@ export interface ListElement extends Element { /** * The component provides a swiper container. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @devices tv, phone, tablet, wearable + * @since 4 */ export interface SwiperElement extends Element { /** * Scrolls the child component to the position at the specified index. - * @devices tv, phone, tablet, wearable + * @since 4 */ swipeTo(position: { /** @@ -736,45 +752,46 @@ export interface SwiperElement extends Element { /** * Shows the next child component. - * @devices tv, phone, tablet, wearable + * @since 4 */ showNext(): void; /** * Shows the previous child component. - * @devices tv, phone, tablet, wearable + * @since 4 */ showPrevious(): void; } /** - * @devices tv, phone, tablet, wearable + * @since 6 * @syscap SystemCapability.ArkUI.ArkUI.Full */ export interface CameraTakePhotoOptions { /** * Picture quality. + * @since 6 */ quality: "high" | "normal" | "low"; /** * Callback function for successful interface invocation. * @param result the request execution result. - * @devices tv, phone, tablet, wearable + * @since 6 */ success?: (result: Object) => void; /** * Callback function for interface invocation failure. * @param result the request execution result. - * @devices tv, phone, tablet, wearable + * @since 6 */ fail?: (result: Object) => void; /** * Callback function at the end of the interface invoking (executed both successfully and unsuccessfully). * @param result the request execution result. - * @devices tv, phone, tablet, wearable + * @since 6 */ complete?: (result: Object) => void; } @@ -782,13 +799,13 @@ export interface CameraTakePhotoOptions { /** * The component provides preview and photographing functions. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @devices tv, phone, tablet, wearable + * @since 6 */ export interface CameraElement extends Element { /** * Take photos with specified parameters. * @param options the parameters of camera. - * @devices tv, phone, tablet, wearable + * @since 6 */ takePhoto(options: CameraTakePhotoOptions): void; } @@ -796,12 +813,12 @@ export interface CameraElement extends Element { /** * The component is a container for displaying web page content. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @devices tv, phone, tablet + * @since 6 */ export interface WebElement extends Element { /** * Reload the web page content - * @devices tv, phone, tablet + * @since 6 */ reload(): void; } @@ -809,17 +826,17 @@ export interface WebElement extends Element { /** * The component is a custom pop-up container. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @devices tv, phone, tablet, wearable + * @since 4 */ export interface DialogElement extends Element { /** * Shows a dialog box. - * @devices tv, phone, tablet, wearable + * @since 4 */ show(): void; /** * Closes a dialog box. - * @devices tv, phone, tablet, wearable + * @since 4 */ close(): void; } @@ -827,27 +844,27 @@ export interface DialogElement extends Element { /** * The component is used to provide an image frame animator. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @devices tv, phone, tablet, wearable + * @since 4 */ export interface ImageAnimatorElement extends Element { /** * Starts to play the frame animation of an image. If this method is called again, the playback starts from the first frame. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @since 4 */ start(): void; /** * Pauses the frame animation playback of an image. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @since 4 */ pause(): void; /** * Stops the frame animation playback of an image. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @since 4 */ stop(): void; /** * Resumes the frame animation playback of an image. - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @since 4 */ resume(): void; /** @@ -855,7 +872,7 @@ export interface ImageAnimatorElement extends Element { * Playing * Paused * Stopped - * @devices tv, phone, tablet, wearable, liteWearable, smartVision + * @since 4 */ getState(): "Playing" | "Paused" | "Stopped"; } @@ -864,18 +881,18 @@ export interface ImageAnimatorElement extends Element { * The component inserts scrolling text, which is displayed in a single line by default. * When the text length exceeds the display area of the component, the marquee effect is displayed. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @devices tv, phone, tablet, wearable + * @since 4 */ export interface MarqueeElement extends Element { /** * Starts scrolling. - * @devices tv, phone, tablet, wearable + * @since 4 */ start(): void; /** * Stops scrolling. - * @devices tv, phone, tablet, wearable + * @since 4 */ stop(): void; } @@ -883,7 +900,7 @@ export interface MarqueeElement extends Element { /** * The component provides menus as temporary pop-up windows to display operations that can be performed by users. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @devices tv, phone, tablet + * @since 4 */ export interface MenuElement extends Element { /** @@ -895,7 +912,7 @@ export interface MenuElement extends Element { * When the visible space on the right is insufficient, the menu is moved leftward. * When the visible space in the lower part is insufficient, the menu is moved upward. * @param position - * @devices tv, phone, tablet + * @since 4 */ show(position: { x: number; y: number }): void; } @@ -903,7 +920,7 @@ export interface MenuElement extends Element { /** * The component displays line charts, gauge charts, and bar charts. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @devices tv, phone, tablet, wearable + * @since 4 */ export interface ChartElement extends Element { /** @@ -911,7 +928,7 @@ export interface ChartElement extends Element { * The target sequence is specified based on serial, which is the subscript of the datasets array and starts from 0. * datasets[index].data is not updated. Only line charts support this attribute. * The value is incremented by 1 based on the horizontal coordinate and is related to the xAxis min/max setting. - * @devices tv, phone, tablet, wearable + * @since 4 */ append(params: { /** @@ -928,14 +945,14 @@ export interface ChartElement extends Element { /** * The component provides an interactive interface to receive user input, which is displayed in a single line by default. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @devices tv, phone, tablet, wearable + * @since 4 */ export interface InputElement extends Element { /** * Obtains or loses the focus of a component. * When the component type is set to text, email, date, time, number, or password, the input method can be displayed or collapsed. * @param param If focus is not passed, the default value true is used. - * @devices tv, phone, tablet, wearable + * @since 4 */ focus(param: { focus: boolean }): void; @@ -943,13 +960,13 @@ export interface InputElement extends Element { * Displays the error message. * This attribute is available when the component type is set to text, email, date, time, number, or password. * @param param - * @devices tv, phone, tablet, wearable + * @since 4 */ showError(param: { error: string }): void; /** * Deletes the previous character at the cursor position. - * @devices tv, phone, tablet, wearable + * @since 6 */ delete(): void; } @@ -957,7 +974,7 @@ export interface InputElement extends Element { /** * The