update api version for apis

Signed-off-by: yan-shuifeng <yanshuifeng@huawei.com>
Change-Id: I3bbaf8292bd5ed22fb9e77b233fab09f483ed260
This commit is contained in:
yan-shuifeng 2022-03-04 17:08:22 +08:00
parent 87f184aa88
commit 23e8d0f498
69 changed files with 3703 additions and 1551 deletions

@ -163,6 +163,10 @@ declare interface AlertDialogParamWithConfirm extends AlertDialogParam {
}; };
} }
/**
* Defines the dialog param with buttons.
* @since 7
*/
declare interface AlertDialogParamWithButtons extends AlertDialogParam { declare interface AlertDialogParamWithButtons extends AlertDialogParam {
/** /**
* First button. * First button.

@ -143,7 +143,7 @@ declare class AlphabetIndexerAttribute extends CommonMethod<AlphabetIndexerAttri
* Position of the pop-up windows, relative to the midpoint of the top border of the indexer bar. * Position of the pop-up windows, relative to the midpoint of the top border of the indexer bar.
* @since 8 * @since 8
*/ */
popupPosition(value: {offsetX: number, offsetY: number}): AlphabetIndexerAttribute; popupPosition(value: { offsetX: number; offsetY: number }): AlphabetIndexerAttribute;
} }
declare const AlphabetIndexer: AlphabetIndexerInterface; declare const AlphabetIndexer: AlphabetIndexerInterface;

@ -145,5 +145,5 @@ interface BadgeInterface {
*/ */
declare class BadgeAttribute extends CommonMethod<BadgeAttribute> {} declare class BadgeAttribute extends CommonMethod<BadgeAttribute> {}
declare const Badge: BadgeInterface declare const Badge: BadgeInterface;
declare const BadgeInstance: BadgeAttribute; declare const BadgeInstance: BadgeAttribute;

@ -1,4 +1,4 @@
/* /*
* Copyright (c) 2021 Huawei Device Co., Ltd. * Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

@ -127,5 +127,5 @@ declare class ButtonAttribute extends CommonMethod<ButtonAttribute> {
fontFamily(value: string | Resource): ButtonAttribute; fontFamily(value: string | Resource): ButtonAttribute;
} }
declare const Button: ButtonInterface declare const Button: ButtonInterface;
declare const ButtonInstance: ButtonAttribute; declare const ButtonInstance: ButtonAttribute;

@ -102,7 +102,7 @@ interface CalendarDay {
} }
/** /**
* Date object. * Date object.
* @since 7 * @since 7
* @systemapi * @systemapi
*/ */

@ -1061,7 +1061,7 @@ declare class OffscreenCanvasRenderingContext2D extends CanvasRenderer {
* @param settings Drawing attribute. For details, see {@link RenderingContextSettings}. * @param settings Drawing attribute. For details, see {@link RenderingContextSettings}.
* @since 8 * @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<CanvasAttribute> {
*/ */
onReady(event: () => void): CanvasAttribute; onReady(event: () => void): CanvasAttribute;
} }
declare const Canvas: CanvasInterface; declare const Canvas: CanvasInterface;
declare const CanvasInstance: CanvasAttribute; declare const CanvasInstance: CanvasAttribute;

@ -22,13 +22,13 @@ declare interface CheckboxOption {
* Current name of Checkbox. * Current name of Checkbox.
* @since 8 * @since 8
*/ */
name?: string; name?: string;
/** /**
* Sets the group of Checkbox. * Sets the group of Checkbox.
* @since 8 * @since 8
*/ */
group?: string; group?: string;
} }
/** /**
@ -53,13 +53,13 @@ declare class CheckboxAttribute extends CommonMethod<CheckboxAttribute> {
* setting whether checkbox is selected. * setting whether checkbox is selected.
* @since 8 * @since 8
*/ */
select(value: boolean): CheckboxAttribute; select(value: boolean): CheckboxAttribute;
/** /**
* setting the display color of checkbox. * setting the display color of checkbox.
* @since 8 * @since 8
*/ */
selectedColor(value: ResourceColor): CheckboxAttribute; selectedColor(value: ResourceColor): CheckboxAttribute;
/** /**
* Called when the selection status changes. * Called when the selection status changes.

@ -44,7 +44,7 @@ declare interface CheckboxGroupOption {
* Setting the group of CheckboxGroup. * Setting the group of CheckboxGroup.
* @since 8 * @since 8
*/ */
group?: string; group?: string;
} }
/** /**
@ -56,12 +56,12 @@ declare interface CheckboxGroupResult {
* Checkbox name. * Checkbox name.
* @since 8 * @since 8
*/ */
name: Array<string>; name: Array<string>;
/** /**
* Set the group of status. * Set the group of status.
* @since 8 * @since 8
*/ */
status: SelectStatus; status: SelectStatus;
} }
/** /**
@ -85,13 +85,13 @@ declare class CheckboxGroupAttribute extends CommonMethod<CheckboxGroupAttribute
* setting whether all checkbox is selected. * setting whether all checkbox is selected.
* @since 8 * @since 8
*/ */
selectAll(value: boolean): CheckboxGroupAttribute; selectAll(value: boolean): CheckboxGroupAttribute;
/** /**
* setting the display color of checkbox. * setting the display color of checkbox.
* @since 8 * @since 8
*/ */
selectedColor(value: ResourceColor): CheckboxGroupAttribute; selectedColor(value: ResourceColor): CheckboxGroupAttribute;
/** /**
* Called when the selection status changes. * Called when the selection status changes.

@ -96,7 +96,6 @@ declare const StorageLink: (value: string) => PropertyDecorator;
*/ */
declare const Watch: (value: string) => PropertyDecorator; declare const Watch: (value: string) => PropertyDecorator;
/** /**
* Defining Builder MethodDecorator * Defining Builder MethodDecorator
* @since 7 * @since 7
@ -177,6 +176,7 @@ declare interface Rectangle {
/** /**
* Defining isSystemplugin Constants. * Defining isSystemplugin Constants.
* @since 7 * @since 7
* @systemapi
*/ */
declare const isSystemplugin: (...args: string[]) => any; declare const isSystemplugin: (...args: string[]) => any;
@ -198,6 +198,11 @@ declare function $rawfile(value: string): Resource;
*/ */
declare function getContentStorage(value: any): ContentStorage; declare function getContentStorage(value: any): ContentStorage;
/**
* Defines the context mock object.
* @since 8
* @systemapi
*/
declare type Context = any; declare type Context = any;
/** /**
@ -206,29 +211,291 @@ declare type Context = any;
*/ */
declare function getContext(value: any): Context; 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; 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; tempo?: number;
/**
* Animation curve.
* @since 7
*/
curve?: Curve | string; curve?: Curve | string;
/**
* Animation playback mode. By default, the animation is played from the beginning after the playback is complete.
* @since 7
*/
delay?: number; delay?: number;
/**
* Animation playback mode. By default, the animation is played from the beginning after the playback is complete.
* @since 7
*/
iterations?: number; iterations?: number;
/**
* Animation playback mode. By default, the animation is played from the beginning after the playback is complete.
* @since 7
*/
playMode?: PlayMode; playMode?: PlayMode;
/**
* Callback invoked when the animation playback is complete.
* @since 7
*/
onFinish?: () => void; onFinish?: () => void;
} }
/**
* Defines the motion path option.
* @since 7
*/
declare interface MotionPathOption {
/**
* 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 sharedTransitionOption {
/**
* 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?: MotionPathOption;
/**
* Z index info.
* @since 7
*/
zIndex?: number;
/**
* the animate type.
* @since 7
*/
type?: SharedTransitionEffectType;
}
/**
* Defines the option of translate.
* @since 7
*/
declare interface TranslateOption {
/**
* 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 option of scale.
* @since 7
*/
declare interface ScaleOption {
/**
* 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 RotateOption {
/**
* 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 TransitionOption {
/**
* 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?: TransitionOption;
/**
* Defines the param of scale.
* @since 7
*/
scale?: ScaleOption;
/**
* Defines the param of rotate.
* @since 7
*/
rotate?: RotateOption;
}
/** /**
* Define Preview property * Define Preview property
* @since 8 * @since 8
* @systemapi
*/ */
interface PreviewParams { interface PreviewParams {
/**
* Define Preview title
* @since 8
* @systemapi
*/
title?: string; title?: string;
/**
* Define Preview width
* @since 8
* @systemapi
*/
width?: number; width?: number;
/**
* Define Preview height
* @since 8
* @systemapi
*/
height?: number; height?: number;
/**
* Define Preview locale
* @since 8
* @systemapi
*/
locale?: string; locale?: string;
/**
* Define Preview colorMode
* @since 8
* @systemapi
*/
colorMode?: string; colorMode?: string;
/**
* Define Preview deviceType
* @since 8
* @systemapi
*/
deviceType?: string; deviceType?: string;
/**
* Define Preview dpi
* @since 8
* @systemapi
*/
dpi?: number; dpi?: number;
/**
* Define Preview orientation
* @since 8
* @systemapi
*/
orientation?: string; orientation?: string;
/**
* Define Preview roundScreen
* @since 8
* @systemapi
*/
roundScreen?: boolean; roundScreen?: boolean;
} }
@ -236,7 +503,7 @@ interface PreviewParams {
* ItemDragInfo object description * ItemDragInfo object description
* @since 8 * @since 8
*/ */
interface ItemDragInfo { declare interface ItemDragInfo {
/** /**
* Obtains the X coordinate of the drag window, in vp. * Obtains the X coordinate of the drag window, in vp.
* @since 8 * @since 8
@ -254,7 +521,7 @@ interface ItemDragInfo {
* DragItemInfo object description * DragItemInfo object description
* @since 8 * @since 8
*/ */
interface DragItemInfo { declare interface DragItemInfo {
/** /**
* Uses the pixelMap object for drawing. * Uses the pixelMap object for drawing.
* @since 8 * @since 8
@ -278,7 +545,7 @@ interface DragItemInfo {
* Defining animation function. * Defining animation function.
* @since 7 * @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. * 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. * Defines the event target.
* @since 8 * @since 8
*/ */
interface EventTarget { declare interface EventTarget {
/** /**
* Area of current target. * Area of current target.
* @since 8 * @since 8
@ -356,7 +623,7 @@ declare enum SourceType {
* Defines the base event. * Defines the base event.
* @since 8 * @since 8
*/ */
interface BaseEvent { declare interface BaseEvent {
/** /**
* Defines the current target which fires this event. * Defines the current target which fires this event.
* @since 8 * @since 8
@ -380,7 +647,7 @@ interface BaseEvent {
* The tap action triggers this method invocation. * The tap action triggers this method invocation.
* @since 7 * @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. * X coordinate of the click point relative to the left edge of the device screen.
* @since 7 * @since 7
@ -410,7 +677,7 @@ interface ClickEvent extends BaseEvent {
* The mouse click action triggers this method invocation. * The mouse click action triggers this method invocation.
* @since 8 * @since 8
*/ */
interface MouseEvent extends BaseEvent { declare interface MouseEvent extends BaseEvent {
/** /**
* Mouse button of the click event. * Mouse button of the click event.
* @since 8 * @since 8
@ -458,7 +725,7 @@ interface MouseEvent extends BaseEvent {
* Type of the touch event. * Type of the touch event.
* @since 7 * @since 7
*/ */
interface TouchObject { declare interface TouchObject {
/** /**
* Type of the touch event. * Type of the touch event.
* @since 7 * @since 7
@ -500,7 +767,7 @@ interface TouchObject {
* Touch Action Function Parameters * Touch Action Function Parameters
* @since 7 * @since 7
*/ */
interface TouchEvent extends BaseEvent { declare interface TouchEvent extends BaseEvent {
/** /**
* Type of the touch event. * Type of the touch event.
* @since 7 * @since 7
@ -527,12 +794,20 @@ interface TouchEvent extends BaseEvent {
} }
/** /**
* pixelmap object with release function. * Defines the PixelMap type object for ui component.
* @since 7 * @since 7
*/ */
declare class PixelMap { declare type PixelMap = PixelMapMock;
/**
* pixelmap object with release function.
* @systemapi
* @since 7
*/
declare class PixelMapMock {
/** /**
* release function. * release function.
* @systemapi
* @since 7 * @since 7
*/ */
release(): void; release(): void;
@ -542,7 +817,7 @@ declare class PixelMap {
* DragEvent object description * DragEvent object description
* @since 7 * @since 7
*/ */
interface DragEvent { declare interface DragEvent {
/** /**
* Obtains the X coordinate of the drag window, in vp. * Obtains the X coordinate of the drag window, in vp.
* @since 7 * @since 7
@ -560,7 +835,7 @@ interface DragEvent {
* KeyEvent object description: * KeyEvent object description:
* @since 7 * @since 7
*/ */
interface KeyEvent { declare interface KeyEvent {
/** /**
* Type of a key. * Type of a key.
* @since 7 * @since 7
@ -615,7 +890,7 @@ interface KeyEvent {
* Component State Styels. * Component State Styels.
* @since 8 * @since 8
*/ */
interface StateStyels { declare interface StateStyels {
/** /**
* Defines normal state styles. * Defines normal state styles.
* @since 8 * @since 8
@ -647,7 +922,11 @@ interface StateStyels {
clicked?: any; clicked?: any;
} }
interface PopupOption { /**
* Defines the popup options.
* @since 7
*/
declare interface PopupOption {
/** /**
* Information in the pop-up window. * Information in the pop-up window.
* @since 7 * @since 7
@ -703,7 +982,11 @@ interface PopupOption {
onStateChange?: (event: { isVisible: boolean }) => void; onStateChange?: (event: { isVisible: boolean }) => void;
} }
interface CustomPopupOption { /**
* Defines the custom popup option.
* @since 8
*/
declare interface CustomPopupOption {
/** /**
* builder of popup * builder of popup
* @since 8 * @since 8
@ -748,13 +1031,15 @@ interface CustomPopupOption {
} }
/** /**
* CommonMethod * CommonMethod.
* @since 7 * @since 7
*/ */
declare class CommonMethod<T> { declare class CommonMethod<T> {
/** /**
* constructor. * constructor.
* @systemapi
* @since 7 * @since 7
* @ignore
*/ */
constructor(); constructor();
@ -772,7 +1057,6 @@ declare class CommonMethod<T> {
/** /**
* Sets the response region of the current component. * Sets the response region of the current component.
* @devices phone, tablet, car
* @since 8 * @since 8
*/ */
responseRegion(value: Array<Rectangle> | Rectangle): T; responseRegion(value: Array<Rectangle> | Rectangle): T;
@ -781,42 +1065,35 @@ declare class CommonMethod<T> {
* The size of the current component. * The size of the current component.
* @since 7 * @since 7
*/ */
size(value: { width?: Length; height?: Length }): T; size(value: SizeOptions): T;
/** /**
* constraint Size * constraint Size
* minWidthminimum WidthmaxWidthmaximum WidthminHeightminimum Height maxHeightmaximum Height * minWidthminimum WidthmaxWidthmaximum WidthminHeightminimum Height maxHeightmaximum Height
* @since 7 * @since 7
*/ */
constraintSize(value: { constraintSize(value: ConstraintSizeOptions): T;
minWidth?: number | string | Resource;
maxWidth?: number | string | Resource;
minHeight?: number | string | Resource;
maxHeight?: number | string | Resource;
}): T;
/** /**
* Sets the touchable of the current component * Sets the touchable of the current component
* @devices phone, tablet, car
* @since 8 * @since 8
*/ */
touchable(value: boolean): T; touchable(value: boolean): T;
/** /**
* layout Weight * layout Weight
* @devices phone, tablet, car.
* @since 7 * @since 7
*/ */
layoutWeight(value: number | string): T; layoutWeight(value: number | string): T;
/** /**
* Inner margin * Inner margin.
* @since 7 * @since 7
*/ */
padding(value: Padding | Length): T; padding(value: Padding | Length): T;
/** /**
* Outer Margin * Outer Margin.
* @since 7 * @since 7
*/ */
margin(value: Margin | Length): T; margin(value: Margin | Length): T;
@ -825,32 +1102,27 @@ declare class CommonMethod<T> {
* Background color * Background color
* @since 7 * @since 7
*/ */
backgroundColor(value: Color | number | string | Resource): T; backgroundColor(value: ResourceColor): T;
/** /**
* Background image * Background image
* src: Image address url * src: Image address url
* @since 7 * @since 7
*/ */
backgroundImage(src: string | Resource, repeat?: ImageRepeat): T; backgroundImage(src: ResourceStr, repeat?: ImageRepeat): T;
/** /**
* Background image size * Background image size
* @since 7 * @since 7
*/ */
backgroundImageSize( backgroundImageSize(value: SizeOptions | ImageSize): T;
value: {
width?: number | string | Resource;
height?: number | string | Resource
} | ImageSize
): T;
/** /**
* Background image position * Background image position
* x:Horizontal coordinate;y:Vertical axis coordinate. * x:Horizontal coordinate;y:Vertical axis coordinate.
* @since 7 * @since 7
*/ */
backgroundImagePosition(value: { x?: number | string | Resource; y?: number | string | Resource } | Alignment): T; backgroundImagePosition(value: Position | Alignment): T;
/** /**
* Opacity * Opacity
@ -863,12 +1135,7 @@ declare class CommonMethod<T> {
* width:Border width;color:Border color;radius:Border radius; * width:Border width;color:Border color;radius:Border radius;
* @since 7 * @since 7
*/ */
border(value: { border(value: BorderOption): T;
width?: number | string | Resource;
color?: Color | number | string | Resource;
radius?: number | string | Resource;
style?: BorderStyle;
}): T;
/** /**
* Border style * Border style
@ -880,19 +1147,19 @@ declare class CommonMethod<T> {
* Border width * Border width
* @since 7 * @since 7
*/ */
borderWidth(value: number | string | Resource): T; borderWidth(value: Length): T;
/** /**
* Border color * Border color
* @since 7 * @since 7
*/ */
borderColor(value: Color | number | string | Resource): T; borderColor(value: ResourceColor): T;
/** /**
* Border radius * Border radius
* @since 7 * @since 7
*/ */
borderRadius(value: number | string | Resource): T; borderRadius(value: Length): T;
/** /**
* Trigger a click event when a click is clicked. * Trigger a click event when a click is clicked.
@ -934,68 +1201,38 @@ declare class CommonMethod<T> {
* Set focusable. * Set focusable.
* @since 8 * @since 8
*/ */
focusable(value: boolean): T; focusable(value: boolean): T;
/** /**
* Trigger a event when got focus. * Trigger a event when got focus.
* @since 8 * @since 8
*/ */
onFocus(event: () => void): T; onFocus(event: () => void): T;
/** /**
* Trigger a event when lose focus. * Trigger a event when lose focus.
* @since 8 * @since 8
*/ */
onBlur(event: () => void): T; onBlur(event: () => void): T;
/** /**
* Trigger a event when focus move. * Trigger a event when focus move.
* @since 8 * @since 8
* @systemapi
*/ */
onFocusMove(event: (direction?: FocusDirection) => void): T; onFocusMove(event: (direction?: FocusDirection) => void): T;
/** /**
* animation * animation
* @since 7 * @since 7
*/ */
animation(value: { animation(value: AnimateParam): T;
duration?: number;
tempo?: number;
curve?: Curve | string;
delay?: number;
iterations?: number;
playMode?: PlayMode;
onFinish?: () => void;
}): T;
/** /**
* Transition parameter * Transition parameter
* @since 7 * @since 7
*/ */
transition(value: { transition(value: TransitionOption): T;
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;
/** /**
* Bind gesture recognition. * Bind gesture recognition.
@ -1099,13 +1336,13 @@ declare class CommonMethod<T> {
* When this parameter is set together with slide, slide takes effect by default. * When this parameter is set together with slide, slide takes effect by default.
* @since 7 * @since 7
*/ */
translate(value: { x?: number | string; y?: number | string; z?: number | string }): T; translate(value: TranslateOption): T;
/** /**
* Sets the zoom effect during page transition. The value is the start point of entry and end point of exit. * Sets the zoom effect during page transition. The value is the start point of entry and end point of exit.
* @since 7 * @since 7
*/ */
scale(value: { x?: number; y?: number; z?: number; centerX?: number | string; centerY?: number | string }): T; scale(value: ScaleOption): 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. * 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 +1362,7 @@ declare class CommonMethod<T> {
* The values are the start point during insertion and the end point during deletion. * The values are the start point during insertion and the end point during deletion.
* @since 7 * @since 7
*/ */
rotate(value: { rotate(value: RotateOption): T;
x?: number;
y?: number;
z?: number;
centerX?: number | string;
centerY?: number | string;
angle: number | string;
}): T;
/** /**
* Sets the transformation matrix for the current component. * Sets the transformation matrix for the current component.
@ -1205,22 +1435,7 @@ declare class CommonMethod<T> {
* If the components of the two pages are configured with the same ID, the shared element transition is performed during transition. If the parameter is set to an empty string, the shared element transition does not occur. For details about the options parameter, see the options parameter description. * If the components of the two pages are configured with the same ID, the shared element transition is performed during transition. If the parameter is set to an empty string, the shared element transition does not occur. For details about the options parameter, see the options parameter description.
* @since 7 * @since 7
*/ */
sharedTransition( sharedTransition(id: string, options?: sharedTransitionOption): T;
id: string,
options?: {
duration?: number;
curve?: Curve | string;
delay?: number;
motionPath?: {
path: string;
from?: number;
to?: number;
rotatable?: boolean;
};
zIndex?: number;
type?: SharedTransitionEffectType;
},
): T;
/** /**
* Sets the sliding direction. The enumerated value supports logical AND (&) and logical OR (|). * Sets the sliding direction. The enumerated value supports logical AND (&) and logical OR (|).
@ -1238,20 +1453,20 @@ declare class CommonMethod<T> {
* position * position
* @since 7 * @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. * 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 * @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. * 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. * Setting this attribute does not affect the layout of the parent container. The position is adjusted only during drawing.
* @since 7 * @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. * If the value is true, the component is available and can respond to operations such as clicking.
@ -1365,7 +1580,7 @@ declare class CommonMethod<T> {
* rotatble:Whether to follow the path for rotation. * rotatble:Whether to follow the path for rotation.
* @since 7 * @since 7
*/ */
motionPath(value: { path: string; from?: number; to?: number; rotatable?: boolean }): T; motionPath(value: MotionPathOption): T;
/** /**
* Add a shadow effect to the current component * Add a shadow effect to the current component
@ -1394,6 +1609,8 @@ declare class CommonMethod<T> {
/** /**
* Key. User can set an key to the component to identify it. * Key. User can set an key to the component to identify it.
* @since 8 * @since 8
* @systemapi
* @test
*/ */
key(value: string): T; key(value: string): T;
@ -1425,7 +1642,7 @@ declare class CommonMethod<T> {
* ContextMenu control * ContextMenu control
* @since 8 * @since 8
*/ */
bindContextMenu(content: CustomBuilder, responseType : ResponseType): T; bindContextMenu(content: CustomBuilder, responseType: ResponseType): T;
/** /**
* Sets styles for component state. * Sets styles for component state.
@ -1441,13 +1658,13 @@ declare class CommonMethod<T> {
} }
/** /**
* CommonAttribute * CommonAttribute for ide.
* @since 7 * @since 7
*/ */
declare class CommonAttribute extends CommonMethod<CommonAttribute> {} declare class CommonAttribute extends CommonMethod<CommonAttribute> {}
/** /**
* CommonInterface * CommonInterface for ide.
* @since 7 * @since 7
*/ */
interface CommonInterface { interface CommonInterface {
@ -1455,13 +1672,13 @@ interface CommonInterface {
} }
/** /**
* CommonInstance * CommonInstance for ide.
* @since 7 * @since 7
*/ */
declare const CommonInstance: CommonAttribute; declare const CommonInstance: CommonAttribute;
/** /**
* Common * Common for ide.
* @since 7 * @since 7
*/ */
declare const Common: CommonInterface; declare const Common: CommonInterface;
@ -1480,6 +1697,7 @@ declare class CommonShapeMethod<T> extends CommonMethod<T> {
/** /**
* constructor. * constructor.
* @since 7 * @since 7
* @syetemapi
*/ */
constructor(); constructor();
@ -1487,13 +1705,13 @@ declare class CommonShapeMethod<T> extends CommonMethod<T> {
* border Color * border Color
* @since 7 * @since 7
*/ */
stroke(value: Color | number | string | Resource): T; stroke(value: ResourceColor): T;
/** /**
* Fill color. * Fill color.
* @since 7 * @since 7
*/ */
fill(value: Color | number | string | Resource): T; fill(value: ResourceColor): T;
/** /**
* Offset from the start point of the border drawing. * Offset from the start point of the border drawing.
@ -1535,7 +1753,7 @@ declare class CommonShapeMethod<T> extends CommonMethod<T> {
* Sets the width of the dividing line. * Sets the width of the dividing line.
* @since 7 * @since 7
*/ */
strokeWidth(value: number | string | Resource): T; strokeWidth(value: Length): T;
/** /**
* Indicates whether to enable anti-aliasing * Indicates whether to enable anti-aliasing
@ -1577,11 +1795,15 @@ declare class CustomComponent {
/** /**
* View * View
* @ignore ide should ignore this class * @ignore ide should ignore this class
* @systemapi
* @since 7
*/ */
declare class View { declare class View {
/** /**
* Just use for generate tsbundle * Just use for generate tsbundle
* @ignore ide should ignore this arrtibute * @ignore ide should ignore this arrtibute
* @systemapi
* @since 7
*/ */
create(value: any): any; create(value: any): any;
} }

@ -80,20 +80,24 @@ declare interface DatePickerResult {
declare interface DatePickerOption { declare interface DatePickerOption {
/** /**
* Specifies the start date of the date selector. * Specifies the start date of the date selector.
* @since 8
*/ */
start?: Date; start?: Date;
/** /**
* Specifies the end date for the date selector. * Specifies the end date for the date selector.
* @since 8
*/ */
end?: Date; end?: Date;
/** /**
* Specifies the date selector check date or time selector check time. * Specifies the date selector check date or time selector check time.
* @since 8
*/ */
selected?: Date; selected?: Date;
/** /**
* Selector type, including date selector and time selector. By default, the date selector is used. * Selector type, including date selector and time selector. By default, the date selector is used.
* @since 8
*/ */
type?: DatePickerType; type?: DatePickerType;
} }

@ -13,7 +13,6 @@
* limitations under the License. * limitations under the License.
*/ */
/** /**
* Provides a divider component to separate different content blocks/content elements. * Provides a divider component to separate different content blocks/content elements.
* @since 7 * @since 7
@ -57,5 +56,5 @@ declare class DividerAttribute extends CommonMethod<DividerAttribute> {
lineCap(value: LineCapStyle): DividerAttribute; lineCap(value: LineCapStyle): DividerAttribute;
} }
declare const Divider: DividerInterface declare const Divider: DividerInterface;
declare const DividerInstance: DividerAttribute; declare const DividerInstance: DividerAttribute;

@ -13,7 +13,6 @@
* limitations under the License. * limitations under the License.
*/ */
/** /**
* Ellipse drawing. * Ellipse drawing.
* @since 7 * @since 7

@ -457,60 +457,6 @@ declare enum PlayMode {
AlternateReverse, 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. * Type of a key.
* @since 7 * @since 7

@ -14,7 +14,7 @@
*/ */
/** /**
* looping * looping function.
* @since 7 * @since 7
*/ */
interface ForEachInterface { interface ForEachInterface {
@ -29,8 +29,4 @@ interface ForEachInterface {
): ForEachInterface; ): ForEachInterface;
} }
/**
* @devices phone, tablet, car
* @since 7
*/
declare const ForEach: ForEachInterface; declare const ForEach: ForEachInterface;

@ -13,7 +13,6 @@
* limitations under the License. * limitations under the License.
*/ */
/** /**
* Defines the FormDimension enum. * Defines the FormDimension enum.
* @since 7 * @since 7
@ -134,10 +133,10 @@ declare class FormComponentAttribute extends CommonMethod<FormComponentAttribute
onRouter(callback: (info: any) => void): FormComponentAttribute; onRouter(callback: (info: any) => void): FormComponentAttribute;
/** /**
* Uninstall Card. * Uninstall Card.
* @since 7 * @since 7
* @systemapi * @systemapi
*/ */
onUninstall(callback: (info: { id: number }) => void): FormComponentAttribute; onUninstall(callback: (info: { id: number }) => void): FormComponentAttribute;
} }

@ -62,5 +62,5 @@ declare class GaugeAttribute extends CommonMethod<GaugeAttribute> {
strokeWidth(length: number): GaugeAttribute; strokeWidth(length: number): GaugeAttribute;
} }
declare const Gauge: GaugeInterface declare const Gauge: GaugeInterface;
declare const GaugeInstance: GaugeAttribute; declare const GaugeInstance: GaugeAttribute;

@ -13,30 +13,6 @@
* limitations under the License. * 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 * Creating an Object
* @since 7 * @since 7

@ -13,8 +13,8 @@
* limitations under the License. * limitations under the License.
*/ */
/** /**
* Defines the grid interface.
* @since 7 * @since 7
*/ */
interface GridInterface { interface GridInterface {
@ -30,13 +30,30 @@ interface GridInterface {
* @since 8 * @since 8
*/ */
declare enum GridDirection { declare enum GridDirection {
/**
* The row direction.
* @since 8
*/
Row, Row,
/**
* The column direction.
* @since 8
*/
Column, Column,
/**
* The row reverse direction.
* @since 8
*/
RowReverse, RowReverse,
ColumnReverse /**
* The column reverse direction.
* @since 8
*/
ColumnReverse,
} }
/** /**
* Defines the grid attibute functions.
* @since 7 * @since 7
*/ */
declare class GridAttribute extends CommonMethod<GridAttribute> { declare class GridAttribute extends CommonMethod<GridAttribute> {
@ -112,10 +129,10 @@ declare class GridAttribute extends CommonMethod<GridAttribute> {
*/ */
maxCount(value: number): GridAttribute; maxCount(value: number): GridAttribute;
/** /**
* minCount * minCount
* @since 8 * @since 8
*/ */
minCount(value: number): GridAttribute; minCount(value: number): GridAttribute;
/** /**
@ -166,8 +183,9 @@ declare class GridAttribute extends CommonMethod<GridAttribute> {
* This callback is triggered when the drag behavior is stopped within the scope of the component. * This callback is triggered when the drag behavior is stopped within the scope of the component.
* @since 8 * @since 8
*/ */
onItemDrop(event: onItemDrop(
(event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void): GridAttribute; event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void,
): GridAttribute;
} }
declare const Grid: GridInterface; declare const Grid: GridInterface;

@ -171,12 +171,5 @@ declare class ImageAttribute extends CommonMethod<ImageAttribute> {
onFinish(event: () => void): ImageAttribute; onFinish(event: () => void): ImageAttribute;
} }
/**
* @devices phone, tablet, car
* @since 7
*/
declare const Image: ImageInterface; declare const Image: ImageInterface;
/**
* @since 7
*/
declare const ImageInstance: ImageAttribute; declare const ImageInstance: ImageAttribute;

@ -14,6 +14,7 @@
*/ */
/** /**
* Defines the ImageAnimator Interface.
* @since 7 * @since 7
*/ */
interface ImageAnimatorInterface { interface ImageAnimatorInterface {

@ -50,7 +50,7 @@ declare interface DataChangeListener {
} }
/** /**
* Data changed. * Data changed.
* @since 7 * @since 7
*/ */
declare interface IDataSource { declare interface IDataSource {
@ -95,7 +95,4 @@ interface LazyForEachInterface {
): LazyForEachInterface; ): LazyForEachInterface;
} }
/**
* @since 7
*/
declare const LazyForEach: LazyForEachInterface; declare const LazyForEach: LazyForEachInterface;

@ -185,8 +185,5 @@ declare class ListAttribute extends CommonMethod<ListAttribute> {
onItemDrop(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void): ListAttribute; onItemDrop(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void): ListAttribute;
} }
/**
* @since 7
*/
declare const List: ListInterface; declare const List: ListInterface;
declare const ListInstance: ListAttribute; declare const ListInstance: ListAttribute;

@ -113,4 +113,3 @@ declare class ListItemAttribute extends CommonMethod<ListItemAttribute> {
*/ */
declare const ListItemInstance: ListItemAttribute; declare const ListItemInstance: ListItemAttribute;
declare const ListItem: ListItemInterface; declare const ListItem: ListItemInterface;

@ -37,8 +37,6 @@ declare enum LoadingProgressStyle {
Orbital, Orbital,
} }
/** /**
* Provides an interface for extending the loading progress. * Provides an interface for extending the loading progress.
* @since 8 * @since 8
@ -71,4 +69,4 @@ declare const LoadingProgress: LoadingProgressInterface;
* Loading Progress Extensions on Declarative Classes * Loading Progress Extensions on Declarative Classes
* @since 8 * @since 8
*/ */
declare const LoadingProgressInstance: LoadingProgressAttribute declare const LoadingProgressInstance: LoadingProgressAttribute;

File diff suppressed because it is too large Load Diff

@ -18,7 +18,15 @@
* @since 8 * @since 8
*/ */
interface PluginComponentTemplate { interface PluginComponentTemplate {
/**
* Defines the plugin source name.
* @since 8
*/
source: string; source: string;
/**
* Defines the ability name.
* @since 8
*/
ability: string; ability: string;
} }
@ -35,6 +43,7 @@ interface PluginComponentInterface {
} }
/** /**
* Defines the plugin component attibute functions.
* @since 8 * @since 8
*/ */
declare class PluginComponentAttribute extends CommonMethod<PluginComponentAttribute> { declare class PluginComponentAttribute extends CommonMethod<PluginComponentAttribute> {

@ -44,35 +44,30 @@ declare interface ProgressStyleOption {
declare enum ProgressStyle { declare enum ProgressStyle {
/** /**
* Linear progress bar style. * Linear progress bar style.
* @devices phone, tablet, car.
* @since 7 * @since 7
*/ */
Linear, Linear,
/** /**
* Ring progress bar. * Ring progress bar.
* @devices phone, tablet, car.
* @since 8 * @since 8
*/ */
Ring, Ring,
/** /**
* Eclipse progress bar. * Eclipse progress bar.
* @devices phone, tablet, car.
* @since 7 * @since 7
*/ */
Eclipse, Eclipse,
/** /**
* ScaleRing progress bar. * ScaleRing progress bar.
* @devices phone, tablet, car.
* @since 8 * @since 8
*/ */
ScaleRing, ScaleRing,
/** /**
* Capsule progress bar. * Capsule progress bar.
* @devices phone, tablet, car.
* @since 8 * @since 8
*/ */
Capsule, Capsule,
@ -91,6 +86,7 @@ interface ProgressInterface {
} }
/** /**
* Defines the progress attibute functions.
* @since 7 * @since 7
*/ */
declare class ProgressAttribute extends CommonMethod<ProgressAttribute> { declare class ProgressAttribute extends CommonMethod<ProgressAttribute> {

@ -26,6 +26,7 @@ interface QRCodeInterface {
} }
/** /**
* Defines the qrcode attibute functions.
* @since 7 * @since 7
*/ */
declare class QRCodeAttribute extends CommonMethod<QRCodeAttribute> { declare class QRCodeAttribute extends CommonMethod<QRCodeAttribute> {

@ -15,20 +15,17 @@
/** /**
* Input parameter for creating a radio box. * Input parameter for creating a radio box.
* @devices phone, tablet, car
* @since 8 * @since 8
*/ */
declare interface RadioOption { declare interface RadioOption {
/** /**
* Radio group name. * Radio group name.
* @devices phone, tablet, car
* @since 8 * @since 8
*/ */
group: string; group: string;
/** /**
* Radio name. * Radio name.
* @devices phone, tablet, car
* @since 8 * @since 8
*/ */
value: string; value: string;
@ -36,13 +33,11 @@ declare interface RadioOption {
/** /**
* Provides an interface for creating a radio box. * Provides an interface for creating a radio box.
* @devices phone, tablet, car
* @since 8 * @since 8
*/ */
interface RadioInterface { interface RadioInterface {
/** /**
* Called when a radio box is created. * Called when a radio box is created.
* @devices phone, tablet, car
* @since 8 * @since 8
*/ */
(options: RadioOption): RadioAttribute; (options: RadioOption): RadioAttribute;
@ -55,14 +50,12 @@ interface RadioInterface {
declare class RadioAttribute extends CommonMethod<RadioAttribute> { declare class RadioAttribute extends CommonMethod<RadioAttribute> {
/** /**
* Called when the radio box is selected. * Called when the radio box is selected.
* @devices phone, tablet, car
* @since 8 * @since 8
*/ */
checked(value: boolean): RadioAttribute; checked(value: boolean): RadioAttribute;
/** /**
* Called when the radio box selection status changes. * Called when the radio box selection status changes.
* @devices phone, tablet, car
* @since 8 * @since 8
*/ */
onChange(callback: (isChecked: boolean) => void): RadioAttribute; onChange(callback: (isChecked: boolean) => void): RadioAttribute;

@ -26,6 +26,7 @@ interface RatingInterface {
} }
/** /**
* Defines the rating attibute functions.
* @since 7 * @since 7
*/ */
declare class RatingAttribute extends CommonMethod<RatingAttribute> { declare class RatingAttribute extends CommonMethod<RatingAttribute> {

@ -13,7 +13,6 @@
* limitations under the License. * limitations under the License.
*/ */
/** /**
* Provides an interface for drawing rectangles. * Provides an interface for drawing rectangles.
* @since 7 * @since 7

@ -62,6 +62,7 @@ interface RefreshInterface {
} }
/** /**
* Defines the refresh attibute functions.
* @since 8 * @since 8
*/ */
declare class RefreshAttribute extends CommonMethod<RefreshAttribute> { declare class RefreshAttribute extends CommonMethod<RefreshAttribute> {

@ -26,6 +26,7 @@ interface RowInterface {
} }
/** /**
* Defines the row attribute functions.
* @since 7 * @since 7
*/ */
declare class RowAttribute extends CommonMethod<RowAttribute> { declare class RowAttribute extends CommonMethod<RowAttribute> {
@ -39,7 +40,7 @@ declare class RowAttribute extends CommonMethod<RowAttribute> {
* Called when the horizontal alignment is set. * Called when the horizontal alignment is set.
* @since 8 * @since 8
*/ */
justifyContent(value: FlexAlign): RowAttribute; justifyContent(value: FlexAlign): RowAttribute;
} }
declare const Row: RowInterface; declare const Row: RowInterface;

@ -101,6 +101,7 @@ interface ScrollInterface {
} }
/** /**
* Defines the scroll attibute functions.
* @since 7 * @since 7
*/ */
declare class ScrollAttribute extends CommonMethod<ScrollAttribute> { declare class ScrollAttribute extends CommonMethod<ScrollAttribute> {

@ -68,8 +68,10 @@ interface ScrollBarInterface {
} }
/** /**
* Defines the scrollbar attibute functions.
* @since 8 * @since 8
*/ */
declare class ScrollBarAttribute extends CommonMethod<ScrollBarAttribute> {} declare class ScrollBarAttribute extends CommonMethod<ScrollBarAttribute> {}
declare const ScrollBar: ScrollBarInterface; declare const ScrollBar: ScrollBarInterface;
declare const ScrollBarInstance: ScrollBarAttribute; declare const ScrollBarInstance: ScrollBarAttribute;

@ -1,33 +1,33 @@
/* /*
* Copyright (c) 2021 Huawei Device Co., Ltd. * Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
/** /**
* Sets the sidebar style of showing * Sets the sidebar style of showing
* @since 8 * @since 8
*/ */
declare enum SideBarContainerType { declare enum SideBarContainerType {
/** /**
* The sidebar invisible * The sidebar invisible
* @since 8 * @since 8
*/ */
Embed, Embed,
/** /**
* The sidebar visible * The sidebar visible
* @since 8 * @since 8
*/ */
Overlay Overlay,
} }
/** /**
@ -35,33 +35,37 @@ declare enum SideBarContainerType {
* @since 8 * @since 8
*/ */
declare interface ButtonStyle { declare interface ButtonStyle {
/** /**
* Set the left of control button * Set the left of control button
* @since 8 * @since 8
*/ */
left?: number; left?: number;
/** /**
* Set the top of control button * Set the top of control button
* @since 8 * @since 8
*/ */
top?: number; top?: number;
/** /**
* Set the width of control button * Set the width of control button
* @since 8 * @since 8
*/ */
width?: number; width?: number;
/** /**
* Set the heigth of control button * Set the heigth of control button
* @since 8 * @since 8
*/ */
height?: number; height?: number;
/** /**
* Set the button icon when sidebar status has changed * Set the button icon when sidebar status has changed
* @since 8 * @since 8
*/ */
icons?: {shown:string | PixelMap | Resource, hidden: string | PixelMap | Resource, switching?: string | PixelMap | Resource} icons?: {
shown: string | PixelMap | Resource;
hidden: string | PixelMap | Resource;
switching?: string | PixelMap | Resource;
};
} }
/** /**
@ -69,18 +73,17 @@ declare interface ButtonStyle {
* @since 8 * @since 8
*/ */
interface SideBarContainerInterface { interface SideBarContainerInterface {
/** /**
* Called when showing the sidebar of a block entry. * Called when showing the sidebar of a block entry.
* @since 8 * @since 8
*/ */
(type?: SideBarContainerType): SideBarContainerAttribute; (type?: SideBarContainerType): SideBarContainerAttribute;
} }
/** /**
* The attribute function of sidebar * The attribute function of sidebar
* @since 8 * @since 8
*/ */
declare class SideBarContainerAttribute extends CommonMethod<SideBarContainerAttribute> { declare class SideBarContainerAttribute extends CommonMethod<SideBarContainerAttribute> {
/** /**
* Callback showControlButton function when setting the status of sidebar * Callback showControlButton function when setting the status of sidebar
@ -122,4 +125,4 @@ declare class SideBarContainerAttribute extends CommonMethod<SideBarContainerAtt
} }
declare const SideBarContainer: SideBarContainerInterface; declare const SideBarContainer: SideBarContainerInterface;
declare const SideBarContainerInstance: SideBarContainerAttribute; declare const SideBarContainerInstance: SideBarContainerAttribute;

@ -13,7 +13,6 @@
* limitations under the License. * limitations under the License.
*/ */
/** /**
* Declare sliderstyle * Declare sliderstyle
* @since 7 * @since 7
@ -23,7 +22,7 @@ declare enum SliderStyle {
* The slider is on the slide rail. * The slider is on the slide rail.
* @since 7 * @since 7
*/ */
OutSet = 0, OutSet,
/** /**
* The slider is in the slide rail. * The slider is in the slide rail.
@ -41,7 +40,7 @@ declare enum SliderChangeMode {
* Start dragging the slider. * Start dragging the slider.
* @since 7 * @since 7
*/ */
Begin = 0, Begin,
/** /**
* Drag the slider. * Drag the slider.

@ -16,220 +16,268 @@
/** /**
* Provides an interface for attribute subscribers. * Provides an interface for attribute subscribers.
* @since 7 * @since 7
* @systemapi
*/ */
interface IPropertySubscriber { interface IPropertySubscriber {
/** /**
* Called when the ID of the property subscriber is queried. * Called when the ID of the property subscriber is queried.
* @since 7 * @since 7
* @systemapi
*/ */
id(): number; id(): number;
/** /**
* Provides a single attribute change user interface. * Provides a single attribute change user interface.
* @since 7 * @since 7
* @systemapi
*/ */
aboutToBeDeleted(owningView?: IPropertySubscriber): void; aboutToBeDeleted(owningView?: IPropertySubscriber): void;
} }
/** /**
* Defines the subscriber.
* @since 7 * @since 7
* @systemapi
*/ */
interface ISinglePropertyChangeSubscriber<T> extends IPropertySubscriber { interface ISinglePropertyChangeSubscriber<T> extends IPropertySubscriber {
/** /**
* Provides a single attribute change user interface. * Provides a single attribute change user interface.
* @since 7 * @since 7
* @systemapi
*/ */
hasChanged(newValue: T): void; hasChanged(newValue: T): void;
} }
/** /**
* Defines the subscribed abstract property.
* @since 7 * @since 7
* @systemapi
*/ */
declare abstract class SubscribedAbstractProperty<T> { declare abstract class SubscribedAbstractProperty<T> {
/** /**
* Setting Subscribers. * Setting Subscribers.
* @since 7 * @since 7
* @systemapi
*/ */
protected subscribers_: Set<number>; protected subscribers_: Set<number>;
/** /**
* Private user ID. * Private user ID.
* @since 7 * @since 7
* @systemapi
*/ */
private id_; private id_;
/** /**
* Private user information. * Private user information.
* @since 7 * @since 7
* @systemapi
*/ */
private info_?; private info_?;
/** /**
* @since 7 * @since 7
* @systemapi
*/ */
constructor( constructor(
/** /**
* Subscriber Information. * Subscriber IPropertySubscriber.
* @since 7 * @since 7
* @systemapi
*/ */
subscribeMe?: IPropertySubscriber, subscribeMe?: IPropertySubscriber,
/**
* Subscriber info.
* @since 7
* @systemapi
*/
info?: string, info?: string,
); );
/** /**
* Called when the subscriber ID is entered. * Called when the subscriber ID is entered.
* @since 7 * @since 7
* @systemapi
*/ */
id(): number; id(): number;
/** /**
* Called when a subscriber information description is entered. * Called when a subscriber information description is entered.
* @since 7 * @since 7
* @systemapi
*/ */
info(): string; info(): string;
/** /**
* Called when data is obtained. * Called when data is obtained.
* @since 7 * @since 7
* @systemapi
*/ */
abstract get(): T; abstract get(): T;
/** /**
* Called when data is created. * Called when data is created.
* @since 7 * @since 7
* @systemapi
*/ */
abstract set(newValue: T): void; abstract set(newValue: T): void;
/** /**
* Called when a two-way synchronization is created. * Called when a two-way synchronization is created.
* @since 7 * @since 7
* @systemapi
*/ */
createTwoWaySync(subscribeMe?: IPropertySubscriber, info?: string): SyncedPropertyTwoWay<T>; createTwoWaySync(subscribeMe?: IPropertySubscriber, info?: string): SyncedPropertyTwoWay<T>;
/** /**
* Called when a one-way synchronization is created. * Called when a one-way synchronization is created.
* @since 7 * @since 7
* @systemapi
*/ */
createOneWaySync(subscribeMe?: IPropertySubscriber, info?: string): SyncedPropertyOneWay<T>; createOneWaySync(subscribeMe?: IPropertySubscriber, info?: string): SyncedPropertyOneWay<T>;
/** /**
* Called when the subscriber is unlinked. * Called when the subscriber is unlinked.
* @since 7 * @since 7
* @systemapi
*/ */
unlinkSuscriber(subscriberId: number): void; unlinkSuscriber(subscriberId: number): void;
/** /**
* Called when the notification has changed. * Called when the notification has changed.
* @since 7 * @since 7
* @systemapi
*/ */
protected notifyHasChanged(newValue: T): void; protected notifyHasChanged(newValue: T): void;
/** /**
* Called when the notification property is read. * Called when the notification property is read.
* @since 7 * @since 7
* @systemapi
*/ */
protected notifyPropertyRead(): void; protected notifyPropertyRead(): void;
/** /**
* Called when the number of users is queried. * Called when the number of users is queried.
* @since 7 * @since 7
* @systemapi
*/ */
numberOfSubscrbers(): number; numberOfSubscrbers(): number;
} }
/** /**
* Defines the state value.
* @since 7 * @since 7
* @systemapi
*/ */
declare class SyncedPropertyTwoWay<T> declare class SyncedPropertyTwoWay<T>
extends SubscribedAbstractProperty<T> extends SubscribedAbstractProperty<T>
implements ISinglePropertyChangeSubscriber<T> { implements ISinglePropertyChangeSubscriber<T>
{
/** /**
* Sources of synchronization attributes bidirectionally. * Sources of synchronization attributes bidirectionally.
* @since 7 * @since 7
* @systemapi
*/ */
private source_; private source_;
/** /**
* constructor parameters. * constructor parameters.
* @since 7 * @since 7
* @systemapi
*/ */
constructor(source: SubscribedAbstractProperty<T>, subscribeMe?: IPropertySubscriber, info?: string); constructor(source: SubscribedAbstractProperty<T>, subscribeMe?: IPropertySubscriber, info?: string);
/** /**
* Called when processing information about to be deleted. * Called when processing information about to be deleted.
* @since 7 * @since 7
* @systemapi
*/ */
aboutToBeDeleted(unsubscribeMe?: IPropertySubscriber): void; aboutToBeDeleted(unsubscribeMe?: IPropertySubscriber): void;
/** /**
* Information Changed. * Information Changed.
* @since 7 * @since 7
* @systemapi
*/ */
hasChanged(newValue: T): void; hasChanged(newValue: T): void;
/** /**
* Called when data is obtained. * Called when data is obtained.
* @since 7 * @since 7
* @systemapi
*/ */
get(): T; get(): T;
/** /**
* Called when data is created. * Called when data is created.
* @since 7 * @since 7
* @systemapi
*/ */
set(newValue: T): void; set(newValue: T): void;
} }
/** /**
* Defines the prop state value.
* @since 7 * @since 7
* @systemapi
*/ */
declare class SyncedPropertyOneWay<T> declare class SyncedPropertyOneWay<T>
extends SubscribedAbstractProperty<T> extends SubscribedAbstractProperty<T>
implements ISinglePropertyChangeSubscriber<T> { implements ISinglePropertyChangeSubscriber<T>
{
/** /**
* Pack value for single-item binding. * Pack value for single-item binding.
* @since 7 * @since 7
* @systemapi
*/ */
private wrappedValue_; private wrappedValue_;
/** /**
* Sources of synchronization attributes bidirectionally. * Sources of synchronization attributes bidirectionally.
* @since 7 * @since 7
* @systemapi
*/ */
private source_; private source_;
/** /**
* Constructor parameters. * Constructor parameters.
* @since 7 * @since 7
* @systemapi
*/ */
constructor(source: SubscribedAbstractProperty<T>, subscribeMe?: IPropertySubscriber, info?: string); constructor(source: SubscribedAbstractProperty<T>, subscribeMe?: IPropertySubscriber, info?: string);
/** /**
* Called when processing information about to be deleted. * Called when processing information about to be deleted.
* @since 7 * @since 7
* @systemapi
*/ */
aboutToBeDeleted(unsubscribeMe?: IPropertySubscriber): void; aboutToBeDeleted(unsubscribeMe?: IPropertySubscriber): void;
/** /**
* Information Changed. * Information Changed.
* @since 7 * @since 7
* @systemapi
*/ */
hasChanged(newValue: T): void; hasChanged(newValue: T): void;
/** /**
* Called when data is obtained. * Called when data is obtained.
* @since 7 * @since 7
* @systemapi
*/ */
get(): T; get(): T;
/** /**
* Called when data is created. * Called when data is created.
* @since 7 * @since 7
* @systemapi
*/ */
set(newValue: T): void; set(newValue: T): void;
} }
/** /**
* Defines the AppStorage interface.
* @since 7 * @since 7
*/ */
declare class AppStorage { declare class AppStorage {
@ -313,12 +361,15 @@ declare class AppStorage {
} }
/** /**
* Defines the Environment interface.
* @since 7 * @since 7
*/ */
declare class Environment { declare class Environment {
/** /**
* Constructor. * Constructor.
* @since 7 * @since 7
* @systemapi
* @hide
*/ */
constructor(); constructor();
@ -347,23 +398,25 @@ declare class Environment {
} }
/** /**
* Defines the ColorMode of device.
* @since 7 * @since 7
*/ */
declare enum ColorMode { declare enum ColorMode {
/** /**
* Bright color. * Light mode.
* @since 7 * @since 7
*/ */
LIGHT = 0, LIGHT = 0,
/** /**
* Dark. * Dark mode.
* @since 7 * @since 7
*/ */
DARK, DARK,
} }
/** /**
* Defines the LayoutDirection of device.
* @since 7 * @since 7
*/ */
declare enum LayoutDirection { declare enum LayoutDirection {
@ -371,7 +424,7 @@ declare enum LayoutDirection {
* Elements are laid out from left to right. * Elements are laid out from left to right.
* @since 7 * @since 7
*/ */
LTR = 0, LTR,
/** /**
* Elements are laid out from right to left. * Elements are laid out from right to left.
@ -383,16 +436,19 @@ declare enum LayoutDirection {
* Elements are laid out from auto. * Elements are laid out from auto.
* @since 8 * @since 8
*/ */
Auto Auto,
} }
/** /**
* Defines the PersistentStorage interface.
* @since 7 * @since 7
*/ */
declare class PersistentStorage { declare class PersistentStorage {
/** /**
* Constructor parameters. * Constructor parameters.
* @since 7 * @since 7
* @systemapi
* @hide
*/ */
constructor(appStorage: AppStorage, storage: Storage); constructor(appStorage: AppStorage, storage: Storage);
@ -427,86 +483,114 @@ declare class PersistentStorage {
} }
/** /**
* Defines the base class of storage.
* @since 7 * @since 7
* @systemapi
*/ */
declare class Storage { declare class Storage {
/** /**
* Constructor parameters. * Constructor parameters.
* @since 7 * @since 7
* @systemapi
* @hide
*/ */
constructor(needCrossThread?: boolean, file?: string); constructor(needCrossThread?: boolean, file?: string);
/** /**
* Called when data is obtained. * Called when data is obtained.
* @since 7 * @since 7
* @systemapi
* @hide
*/ */
get(key: string): string | undefined; get(key: string): string | undefined;
/** /**
* Called when setting. * Called when setting.
* @since 7 * @since 7
* @systemapi
* @hide
*/ */
set(key: string, val: any): void; set(key: string, val: any): void;
/** /**
* Called when data is cleared. * Called when data is cleared.
* @since 7 * @since 7
* @systemapi
* @hide
*/ */
clear(): void; clear(): void;
/** /**
* Called when data is deleted. * Called when data is deleted.
* @since 7 * @since 7
* @systemapi
* @hide
*/ */
delete(key: string): void; delete(key: string): void;
} }
/** /**
* Defines the Subscribale base class.
* @since 7 * @since 7
* @systemapi
* @hide
*/ */
declare abstract class SubscribaleAbstract { declare abstract class SubscribaleAbstract {
/** /**
* Returns the ownership attribute set by the. * Returns the ownership attribute set by the.
* @since 7 * @since 7
* @systemapi
* @hide
*/ */
private owningProperties_: Set<number>; private owningProperties_: Set<number>;
/** /**
* Constructor. * Constructor.
* @since 7 * @since 7
* @systemapi
* @hide
*/ */
constructor(); constructor();
/** /**
* Called when the notification property has changed. * Called when the notification property has changed.
* @since 7 * @since 7
* @systemapi
* @hide
*/ */
protected notifyPropertyHasChanged(propName: string, newValue: any): void; protected notifyPropertyHasChanged(propName: string, newValue: any): void;
/** /**
* Called when adding an already owned property. * Called when adding an already owned property.
* @since 7 * @since 7
* @systemapi
* @hide
*/ */
public addOwningProperty(subscriber: IPropertySubscriber): void; public addOwningProperty(subscriber: IPropertySubscriber): void;
/** /**
* Called when an already owned property is deleted. * Called when an already owned property is deleted.
* @since 7 * @since 7
* @systemapi
* @hide
*/ */
public removeOwningProperty(property: IPropertySubscriber): void; public removeOwningProperty(property: IPropertySubscriber): void;
/** /**
* Called when an already owned property is deleted by ID * Called when an already owned property is deleted by ID
* @since 7 * @since 7
* @systemapi
* @hide
*/ */
public removeOwningPropertyById(subscriberId: number): void; public removeOwningPropertyById(subscriberId: number): void;
} }
/** /**
* Defines the content storage interface.
* @since 9 * @since 9
* @StageModelOnly * @StageModelOnly
*/ */
declare class ContentStorage { declare class ContentStorage {
/** /**
* Called when a link is set. * Called when a link is set.
* @since 9 * @since 9
@ -600,6 +684,9 @@ declare abstract class SubscribaleAbstract {
} }
/** /**
* Used for ide.
* @since 7 * @since 7
* @systemapi
* @hide
*/ */
declare const appStorage: AppStorage; declare const appStorage: AppStorage;

@ -15,13 +15,11 @@
/** /**
* Declare the stepper. * Declare the stepper.
* @since 8 * @since 8
*/ */
interface StepperInterface { interface StepperInterface {
/** /**
* Called when the stepper component is used. * Called when the stepper component is used.
* @since 8 * @since 8
*/ */
(value?: { index?: number }): StepperAttribute; (value?: { index?: number }): StepperAttribute;
@ -34,35 +32,30 @@ interface StepperInterface {
declare class StepperAttribute extends CommonMethod<StepperAttribute> { declare class StepperAttribute extends CommonMethod<StepperAttribute> {
/** /**
* Callback when the finish label is clicked. * Callback when the finish label is clicked.
* @since 8 * @since 8
*/ */
onFinish(callback: () => void): StepperAttribute; onFinish(callback: () => void): StepperAttribute;
/** /**
* Callback when the skip label is clicked. * Callback when the skip label is clicked.
* @since 8 * @since 8
*/ */
onSkip(callback: () => void): StepperAttribute; onSkip(callback: () => void): StepperAttribute;
/** /**
* Callback when the change label is clicked. * Callback when the change label is clicked.
* @since 8 * @since 8
*/ */
onChange(callback: (prevIndex?: number, index?: number) => void): StepperAttribute; onChange(callback: (prevIndex?: number, index?: number) => void): StepperAttribute;
/** /**
* Callback when the next label is clicked. * Callback when the next label is clicked.
* @since 8 * @since 8
*/ */
onNext(callback: (index?: number, pendingIndex?: number) => void): StepperAttribute; onNext(callback: (index?: number, pendingIndex?: number) => void): StepperAttribute;
/** /**
* Callback when the previous label is clicked. * Callback when the previous label is clicked.
* @since 8 * @since 8
*/ */
onPrevious(callback: (index?: number, pendingIndex?: number) => void): StepperAttribute; onPrevious(callback: (index?: number, pendingIndex?: number) => void): StepperAttribute;

@ -15,34 +15,29 @@
/** /**
* ItemState * ItemState
* @devices phone, tablet, car
* @since 8 * @since 8
*/ */
declare enum ItemState { declare enum ItemState {
/** /**
* Default State * Default State
* @devices phone, tablet, car
* @since 8 * @since 8
*/ */
Normal, Normal,
/** /**
* Disabled State * Disabled State
* @devices phone, tablet, car
* @since 8 * @since 8
*/ */
Disabled, Disabled,
/** /**
* Waiting State * Waiting State
* @devices phone, tablet, car
* @since 8 * @since 8
*/ */
Waiting, Waiting,
/** /**
* Skip State * Skip State
* @devices phone, tablet, car
* @since 8 * @since 8
*/ */
Skip, Skip,
@ -50,53 +45,39 @@ declare enum ItemState {
/** /**
* Provides an interface for switching the stepperItem view on stepper container. * Provides an interface for switching the stepperItem view on stepper container.
* @devices phone, tablet, car
* @since 8 * @since 8
*/ */
interface StepperItemInterface { interface StepperItemInterface {
/** /**
* Called when the stepperItem component is used. * Called when the stepperItem component is used.
* @devices phone, tablet, car
* @since 8 * @since 8
*/ */
(): StepperItemAttribute; (): StepperItemAttribute;
} }
/** /**
* @devices phone, tablet, car * Defines the stepper item attrbute functions.
* @since 8 * @since 8
*/ */
declare class StepperItemAttribute extends CommonMethod<StepperItemAttribute> { declare class StepperItemAttribute extends CommonMethod<StepperItemAttribute> {
/** /**
* Called when the value of stepperItem prevLabel is set * Called when the value of stepperItem prevLabel is set
* @devices phone, tablet, car
* @since 8 * @since 8
*/ */
prevLabel(value: string): StepperItemAttribute; prevLabel(value: string): StepperItemAttribute;
/** /**
* Called when the value of stepperItem nextLabel is set * Called when the value of stepperItem nextLabel is set
* @devices phone, tablet, car
* @since 8 * @since 8
*/ */
nextLabel(value: string): StepperItemAttribute; nextLabel(value: string): StepperItemAttribute;
/** /**
* Called when the value of stepperItem status is set * Called when the value of stepperItem status is set
* @devices phone, tablet, car
* @since 8 * @since 8
*/ */
status(value?: ItemState): StepperItemAttribute; status(value?: ItemState): StepperItemAttribute;
} }
/**
* @devices phone, tablet, car
* @since 8
*/
declare const StepperItemInstance: StepperItemAttribute; declare const StepperItemInstance: StepperItemAttribute;
/**
* @devices phone, tablet, car
* @since 8
*/
declare const StepperItem: StepperItemInterface; declare const StepperItem: StepperItemInterface;

@ -128,6 +128,7 @@ declare interface IndicatorStyle {
} }
/** /**
* Defines the swiper attibute functions.
* @since 7 * @since 7
*/ */
declare class SwiperAttribute extends CommonMethod<SwiperAttribute> { declare class SwiperAttribute extends CommonMethod<SwiperAttribute> {

@ -79,6 +79,7 @@ interface TabsInterface {
} }
/** /**
* Defines the tabs attribute functions.
* @since 7 * @since 7
*/ */
declare class TabsAttribute extends CommonMethod<TabsAttribute> { declare class TabsAttribute extends CommonMethod<TabsAttribute> {

@ -13,7 +13,6 @@
* limitations under the License. * limitations under the License.
*/ */
/** /**
* Provides an interface for writing texts. * Provides an interface for writing texts.
* @since 7 * @since 7
@ -121,11 +120,5 @@ declare class TextAttribute extends CommonMethod<TextAttribute> {
baselineOffset(value: number | string): TextAttribute; baselineOffset(value: number | string): TextAttribute;
} }
/**
* @since 7
*/
declare const TextInstance: TextAttribute; declare const TextInstance: TextAttribute;
/** declare const Text: TextInterface;
* @since 7
*/
declare const Text: TextInterface;

@ -13,7 +13,6 @@
* limitations under the License. * limitations under the License.
*/ */
/** /**
* Provides the method of switching the cursor position. * Provides the method of switching the cursor position.
* @since 8 * @since 8
@ -134,7 +133,6 @@ declare class TextAreaAttribute extends CommonMethod<TextAreaAttribute> {
/** /**
* Called when the input changes. * Called when the input changes.
* @devices phone, tablet, car.
* @since 7 * @since 7
*/ */
onChange(callback: (value: string) => void): TextAreaAttribute; onChange(callback: (value: string) => void): TextAreaAttribute;

@ -29,8 +29,8 @@ declare class TextClockController {
*/ */
start(); start();
/** /**
* Provides a stop event for textclock. * Provides a stop event for textclock.
* @since 8 * @since 8
*/ */
stop(); stop();
} }
@ -47,7 +47,7 @@ interface TextClockInterface {
* Where a negative value indicates the eastern time zone, for example, -8. * Where a negative value indicates the eastern time zone, for example, -8.
* @since 8 * @since 8
*/ */
(options?: {timeZoneOffset?: number, controller?: TextClockController}): TextClockAttribute; (options?: { timeZoneOffset?: number; controller?: TextClockController }): TextClockAttribute;
} }
declare class TextClockAttribute extends CommonMethod<TextClockAttribute> { declare class TextClockAttribute extends CommonMethod<TextClockAttribute> {
@ -98,5 +98,4 @@ declare class TextClockAttribute extends CommonMethod<TextClockAttribute> {
} }
declare const TextClock: TextClockInterface; declare const TextClock: TextClockInterface;
declare const TextClockInstance: TextClockAttribute; declare const TextClockInstance: TextClockAttribute;

@ -13,7 +13,6 @@
* limitations under the License. * limitations under the License.
*/ */
/** /**
* Declare the type of input box * Declare the type of input box
* @since 7 * @since 7
@ -134,6 +133,7 @@ interface TextInputInterface {
} }
/** /**
* Defines the TextInput attribute functions.
* @since 7 * @since 7
*/ */
declare class TextInputAttribute extends CommonMethod<TextInputAttribute> { declare class TextInputAttribute extends CommonMethod<TextInputAttribute> {

@ -91,10 +91,10 @@ declare class TextTimerAttribute extends CommonMethod<TextTimerAttribute> {
* @since 8 * @since 8
*/ */
format(value: string): TextTimerAttribute; format(value: string): TextTimerAttribute;
/** /**
* Called when the font color is set. * Called when the font color is set.
* @since 8 * @since 8
*/ */
fontColor(value: ResourceColor): TextTimerAttribute; fontColor(value: ResourceColor): TextTimerAttribute;
/** /**
* Called when the font size is set. * Called when the font size is set.
@ -106,15 +106,15 @@ declare class TextTimerAttribute extends CommonMethod<TextTimerAttribute> {
* @since 8 * @since 8
*/ */
fontStyle(value: FontStyle): TextTimerAttribute; fontStyle(value: FontStyle): TextTimerAttribute;
/** /**
* Called when the fontWeight is set * Called when the fontWeight is set
* @since 8 * @since 8
*/ */
fontWeight(value: number | FontWeight | string): TextTimerAttribute; fontWeight(value: number | FontWeight | string): TextTimerAttribute;
/** /**
* Called when the fontFamily is set * Called when the fontFamily is set
* @since 8 * @since 8
*/ */
fontFamily(value: ResourceStr): TextTimerAttribute; fontFamily(value: ResourceStr): TextTimerAttribute;
/** /**
* Called when the timer value is returned. * Called when the timer value is returned.

@ -38,6 +38,7 @@ declare enum ToggleType {
} }
/** /**
* Defines the toggle interface.
* @since 8 * @since 8
*/ */
interface ToggleInterface { interface ToggleInterface {
@ -49,6 +50,7 @@ interface ToggleInterface {
} }
/** /**
* Defines the toggle attibute functions
* @since 8 * @since 8
*/ */
declare class ToggleAttribute extends CommonMethod<ToggleAttribute> { declare class ToggleAttribute extends CommonMethod<ToggleAttribute> {

@ -161,17 +161,88 @@ declare interface Area {
/** /**
* Defines the position. * Defines the position.
* @since 8 * @since 7
*/ */
declare interface Position { declare interface Position {
/** /**
* Coordinate x of the Position. * Coordinate x of the Position.
* @since 8 * @since 7
*/ */
x: Length; x?: Length;
/** /**
* Coordinate y of the Position. * Coordinate y of the Position.
* @since 8 * @since 7
*/ */
y: Length; y?: Length;
}
/**
* Defines the constrain size option.
* @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 option.
* @since 7
*/
declare interface SizeOptions {
/**
* Defines the width.
* @since 7
*/
width?: Length;
/**
* Defines the height.
* @since 7
*/
height?: Length;
}
/**
* Defines the option of border.
* @since 7
*/
declare interface BorderOption {
/**
* 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
*/
style?: BorderStyle;
} }

@ -36,7 +36,7 @@ declare enum SeekMode {
*/ */
ClosestKeyframe, ClosestKeyframe,
/** /**
* Seek to frames closest the time point. * Seek to frames closest the time point.
* @since 8 * @since 8
*/ */
@ -48,67 +48,69 @@ declare enum SeekMode {
* @since 8 * @since 8
*/ */
declare enum PlaybackSpeed { 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 * 0.75x speed playback.
* @since 8
*/ */
interface VideoOption { Speed_Forward_0_75_X,
/**
* src of video. /**
* @since 7 * 1.00x speed playback.
*/ * @since 8
src?: string | Resource; */
Speed_Forward_1_00_X,
/**
* playback rate of video. /**
* @since 7 * 1.25x speed playback.
*/ * @since 8
currentProgressRate?: number | string | PlaybackSpeed; */
Speed_Forward_1_25_X,
/**
* preview uri of video. /**
* @since 8 * 1.75x speed playback.
*/ * @since 8
previewUri?: string | PixelMap | Resource; */
Speed_Forward_1_75_X,
/**
* controller of video. /**
* @since 7 * 2.00x speed playback.
*/ * @since 8
controller?: VideoController; */
} Speed_Forward_2_00_X,
}
/** /**
* Defines the video options.
* @since 7
*/
declare 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;
}
/**
* Defines the video controller.
* @since 7 * @since 7
*/ */
declare class VideoController { declare class VideoController {
@ -150,6 +152,7 @@ declare class VideoController {
} }
/** /**
* Defines the video interface.
* @since 7 * @since 7
*/ */
interface VideoInterface { interface VideoInterface {
@ -161,6 +164,7 @@ interface VideoInterface {
} }
/** /**
* Defines the video attribute functions.
* @since 7 * @since 7
*/ */
declare class VideoAttribute extends CommonMethod<VideoAttribute> { declare class VideoAttribute extends CommonMethod<VideoAttribute> {

@ -27,9 +27,13 @@ declare enum MessageLevel {
* Warn level. * Warn level.
* @since 8 * @since 8
*/ */
Warn Warn,
} }
/**
* Defines the mixed mode.
* @since 8
*/
declare enum MixedMode { declare enum MixedMode {
/** /**
* Allows all sources. * Allows all sources.
@ -97,26 +101,37 @@ declare enum HitTestType {
* Other unknown hit test. * Other unknown hit test.
* @since 8 * @since 8
*/ */
Unknown Unknown,
} }
/**
* Defines the cache mode interface.
* @since 8
*/
declare enum CacheMode { declare enum CacheMode {
/** /**
* load online and not cache. * load online and not cache.
* @since 8
*/ */
None, None,
/** /**
* Load cache first, then online. * Load cache first, then online.
* @since 8
*/ */
Online, Online,
/** /**
* load cache and not online. * load cache and not online.
* @since 8
*/ */
Only Only,
} }
/**
* Defines the js result.
* @since 8
*/
declare class JsResult { declare class JsResult {
/** /**
* Constructor. * Constructor.
@ -137,6 +152,10 @@ declare class JsResult {
handleConfirm(): void; handleConfirm(): void;
} }
/**
* Defines the console message.
* @since 8
*/
declare class ConsoleMessage { declare class ConsoleMessage {
/** /**
* Constructor. * Constructor.
@ -177,6 +196,10 @@ declare class ConsoleMessage {
getMessageLevel(): MessageLevel; getMessageLevel(): MessageLevel;
} }
/**
* Defines the web resource request.
* @since 8
*/
declare class WebResourceRequest { declare class WebResourceRequest {
/** /**
* Constructor. * Constructor.
@ -225,6 +248,10 @@ declare class WebResourceRequest {
isRedirect(): boolean; isRedirect(): boolean;
} }
/**
* Defines the web resource error.
* @since 8
*/
declare class WebResourceError { declare class WebResourceError {
/** /**
* Constructor. * Constructor.
@ -249,6 +276,10 @@ declare class WebResourceError {
getErrorCode(): number; getErrorCode(): number;
} }
/**
* Defines the js geolocation request.
* @since 8
*/
declare class JsGeolocation { declare class JsGeolocation {
/** /**
* Constructor. * Constructor.
@ -258,7 +289,7 @@ declare class JsGeolocation {
/** /**
* Report the geolocation permission status from users. * Report the geolocation permission status from users.
* *
* @param origin The origin that ask for the geolocation permission. * @param origin The origin that ask for the geolocation permission.
* @param allow The geolocation permission status. * @param allow The geolocation permission status.
* @param retain Whether to allow the geolocation permission status to be saved to the system. * @param retain Whether to allow the geolocation permission status to be saved to the system.
@ -267,6 +298,10 @@ declare class JsGeolocation {
invoke(origin: string, allow: boolean, retain: boolean): void; invoke(origin: string, allow: boolean, retain: boolean): void;
} }
/**
* Defines the js web cookie.
* @since 8
*/
declare class WebCookie { declare class WebCookie {
/** /**
* Constructor. * Constructor.
@ -287,6 +322,10 @@ declare class WebCookie {
saveCookie(); saveCookie();
} }
/**
* Defines the web controller.
* @since 8
*/
declare class WebController { declare class WebController {
/** /**
* Constructor. * Constructor.
@ -324,19 +363,19 @@ declare class WebController {
* Means to load a piece of code and execute JS code in the context of the currently displayed page * Means to load a piece of code and execute JS code in the context of the currently displayed page
* @since 8 * @since 8
*/ */
runJavaScript(options: { script: string, callback?: (result: string) => void }); runJavaScript(options: { script: string; callback?: (result: string) => void });
/** /**
* Indicates that a piece of code is loaded * Indicates that a piece of code is loaded
* @since 8 * @since 8
*/ */
loadData(options: { data: string, mimeType: string, encoding: string, baseUrl?: string, historyUrl?: string }); loadData(options: { data: string; mimeType: string; encoding: string; baseUrl?: string; historyUrl?: string });
/** /**
* Load the given URL * Load the given URL
* @since 8 * @since 8
*/ */
loadUrl(options: {url: string, headers?: Array<{ key: string, value: string }> }); loadUrl(options: { url: string; headers?: Array<{ key: string; value: string }> });
/** /**
* refreshes the current URL. * refreshes the current URL.
@ -354,7 +393,7 @@ declare class WebController {
* Registers the JavaScript object and method list. * Registers the JavaScript object and method list.
* @since 8 * @since 8
*/ */
registerJavaScriptProxy(options: { obj: object, name: string, methodList: Array<string> }); registerJavaScriptProxy(options: { obj: object; name: string; methodList: Array<string> });
/** /**
* Deletes a registered JavaScript object with given name. * Deletes a registered JavaScript object with given name.
@ -375,46 +414,57 @@ declare class WebController {
requestFocus(); requestFocus();
/** /**
* Check whether the web page can go back * Check whether the web page can go back
* @since 8 * @since 8
*/ */
accessBackward(): boolean; accessBackward(): boolean;
/** /**
* Check whether the web page can go forward * Check whether the web page can go forward
* @since 8 * @since 8
*/ */
accessForward(): boolean; accessForward(): boolean;
/** /**
* Check whether the web page can go back or forward the given number of steps * Check whether the web page can go back or forward the given number of steps
* @since 8 * @since 8
*/ */
accessStep(step: number): boolean; accessStep(step: number): boolean;
/** /**
* Go back in the history of the web * Go back in the history of the web
* @since 8 * @since 8
*/ */
backward(); backward();
/** /**
* Go forward in the history of the web * Go forward in the history of the web
* @since 8 * @since 8
*/ */
forward(); forward();
} }
/**
* Defines the web options.
* @since 8
*/
declare interface WebOptions { declare interface WebOptions {
/** /**
* Set the address of the web page to be displayed * Set the address of the web page to be displayed.
* @since 8 * @since 8
*/ */
src: string | Resource; src: string | Resource;
/**
* Set the controller of the web.
* @since 8
*/
controller: WebController; controller: WebController;
} }
/**
* Defines the web interface.
* @since 8
*/
interface WebInterface { interface WebInterface {
/** /**
* Set Value. * Set Value.
@ -423,6 +473,10 @@ interface WebInterface {
(value: WebOptions): WebAttribute; (value: WebOptions): WebAttribute;
} }
/**
* Defines the web attribute functions.
* @since 8
*/
declare class WebAttribute extends CommonMethod<WebAttribute> { declare class WebAttribute extends CommonMethod<WebAttribute> {
/** /**
* Set whether WebView allows JavaScript scripts to execute * Set whether WebView allows JavaScript scripts to execute
@ -476,9 +530,14 @@ declare class WebAttribute extends CommonMethod<WebAttribute> {
* Inject the arkUI JS object into H5 and invoke the function of the object in H5. * Inject the arkUI JS object into H5 and invoke the function of the object in H5.
* @since 8 * @since 8
*/ */
javaScriptProxy(javaScriptProxy: { obj: object, name: string, methodList: Array<string>, controller: WebController }): WebAttribute; javaScriptProxy(javaScriptProxy: {
obj: object;
name: string;
methodList: Array<string>;
controller: WebController;
}): WebAttribute;
/* /**
* Sets whether the Web should save the password. * Sets whether the Web should save the password.
* @param password {@code ture} means the Web can save the password; {@code false} otherwise. * @param password {@code ture} means the Web can save the password; {@code false} otherwise.
* *
@ -574,12 +633,12 @@ declare class WebAttribute extends CommonMethod<WebAttribute> {
/** /**
* Show prompt to ask for the geolocation permission. * Show prompt to ask for the geolocation permission.
* *
* @param origin the origin of the resource to get geolocation. * @param origin the origin of the resource to get geolocation.
* @param geolocation callback to report geolocation. * @param geolocation callback to report geolocation.
* @since 8 * @since 8
*/ */
onGeolocationShow(callback: (event?: { origin: string, geolocation: JsGeolocation }) => void): WebAttribute; onGeolocationShow(callback: (event?: { origin: string; geolocation: JsGeolocation }) => void): WebAttribute;
/** /**
* Get WebView focus callback event * Get WebView focus callback event
@ -593,7 +652,7 @@ declare class WebAttribute extends CommonMethod<WebAttribute> {
* @param callback The triggered function when the web page wants to display a JavaScript alert() dialog. * @param callback The triggered function when the web page wants to display a JavaScript alert() dialog.
* @since 8 * @since 8
*/ */
onAlert(callback: (event?: { url: string, message: string, result: JsResult }) => boolean): WebAttribute; onAlert(callback: (event?: { url: string; message: string; result: JsResult }) => boolean): WebAttribute;
/** /**
* Triggered when the web page wants to confirm navigation from JavaScript onbeforeunload. * Triggered when the web page wants to confirm navigation from JavaScript onbeforeunload.
@ -601,7 +660,7 @@ declare class WebAttribute extends CommonMethod<WebAttribute> {
* @param callback The triggered function when the web page wants to confirm navigation from JavaScript onbeforeunload. * @param callback The triggered function when the web page wants to confirm navigation from JavaScript onbeforeunload.
* @since 8 * @since 8
*/ */
onBeforeUnload(callback: (event?: { message: string, result: JsResult }) => boolean): WebAttribute; onBeforeUnload(callback: (event?: { message: string; result: JsResult }) => boolean): WebAttribute;
/** /**
* Triggered when the web page wants to display a JavaScript confirm() dialog. * Triggered when the web page wants to display a JavaScript confirm() dialog.
@ -609,7 +668,7 @@ declare class WebAttribute extends CommonMethod<WebAttribute> {
* @param callback The Triggered function when the web page wants to display a JavaScript confirm() dialog. * @param callback The Triggered function when the web page wants to display a JavaScript confirm() dialog.
* @since 8 * @since 8
*/ */
onConfirm(callback: (event?: {url: string, message: string, result: JsResult }) => boolean): WebAttribute; onConfirm(callback: (event?: { url: string; message: string; result: JsResult }) => boolean): WebAttribute;
/** /**
* Triggered when the web page receives a JavaScript console message. * Triggered when the web page receives a JavaScript console message.
@ -617,7 +676,7 @@ declare class WebAttribute extends CommonMethod<WebAttribute> {
* @param callback The triggered function when the web page receives a JavaScript console message. * @param callback The triggered function when the web page receives a JavaScript console message.
* @since 8 * @since 8
*/ */
onConsole(callback: (event?: {message: ConsoleMessage}) => boolean): WebAttribute; onConsole(callback: (event?: { message: ConsoleMessage }) => boolean): WebAttribute;
/** /**
* Triggered when the web page receives a web resource loading error. * Triggered when the web page receives a web resource loading error.
@ -625,7 +684,7 @@ declare class WebAttribute extends CommonMethod<WebAttribute> {
* @param callback The triggered function when the web page receives a web resource loading error. * @param callback The triggered function when the web page receives a web resource loading error.
* @since 8 * @since 8
*/ */
onErrorReceive(callback: (event?: {request: WebResourceRequest, error: WebResourceError}) => void): WebAttribute; onErrorReceive(callback: (event?: { request: WebResourceRequest; error: WebResourceError }) => void): WebAttribute;
/** /**
* Triggered when the web page receives a web resource loading HTTP error. * Triggered when the web page receives a web resource loading HTTP error.
@ -633,13 +692,23 @@ declare class WebAttribute extends CommonMethod<WebAttribute> {
* @param callback The triggered function when the web page receives a web resource loading HTTP error. * @param callback The triggered function when the web page receives a web resource loading HTTP error.
* @since 8 * @since 8
*/ */
onHttpErrorReceive(callback: (event?: {request: WebResourceRequest, error: WebResourceError}) => void): WebAttribute; onHttpErrorReceive(
callback: (event?: { request: WebResourceRequest; error: WebResourceError }) => void,
): WebAttribute;
/** /**
* Triggered when download start * Triggered when download start
* @since 8 * @since 8
*/ */
onDownloadStart(callback: (event?: {url: string, userAgent: string, contentDisposition: string, mimetype: string, contentLength: number}) => void): WebAttribute; onDownloadStart(
callback: (event?: {
url: string;
userAgent: string;
contentDisposition: string;
mimetype: string;
contentLength: number;
}) => void,
): WebAttribute;
/** /**
* Triggered when the Web page refreshes accessed history. * Triggered when the Web page refreshes accessed history.
@ -647,7 +716,7 @@ declare class WebAttribute extends CommonMethod<WebAttribute> {
* *
* @since 8 * @since 8
*/ */
onRefreshAccessedHistory(callback: (event?: { url: string, refreshed: boolean }) => void): WebAttribute; onRefreshAccessedHistory(callback: (event?: { url: string; refreshed: boolean }) => void): WebAttribute;
/** /**
* Triggered when the url is about to be loaded. * Triggered when the url is about to be loaded.
@ -664,7 +733,7 @@ declare class WebAttribute extends CommonMethod<WebAttribute> {
* *
* @since 8 * @since 8
*/ */
onSslErrorReceive(callback: (event?: { handler: Function, error: object }) => void): WebAttribute; onSslErrorReceive(callback: (event?: { handler: Function; error: object }) => void): WebAttribute;
/** /**
* Triggered when the render process is exited. * Triggered when the render process is exited.
@ -682,7 +751,7 @@ declare class WebAttribute extends CommonMethod<WebAttribute> {
* *
* @since 8 * @since 8
*/ */
onFileSelectorShow(callback: (event?: { callback: Function, fileSelector: object }) => void): WebAttribute; onFileSelectorShow(callback: (event?: { callback: Function; fileSelector: object }) => void): WebAttribute;
} }
declare const Web: WebInterface; declare const Web: WebInterface;

@ -52,12 +52,7 @@ interface XComponentInterface {
* @since 8 * @since 8
* @systemapi * @systemapi
*/ */
(value: { (value: { id: string; type: string; libraryname?: string; controller?: XComponentController }): XComponentAttribute;
id: string;
type: string;
libraryname?: string;
controller?: XComponentController;
}): XComponentAttribute;
} }
/** /**
@ -71,14 +66,14 @@ declare class XComponentAttribute extends CommonMethod<XComponentAttribute> {
* @since 8 * @since 8
* @systemapi * @systemapi
*/ */
onLoad(callback: (event?: object) => void): XComponentAttribute; onLoad(callback: (event?: object) => void): XComponentAttribute;
/** /**
* Called when judging whether the xcomponent is destroyed. * Called when judging whether the xcomponent is destroyed.
* @since 8 * @since 8
* @systemapi * @systemapi
*/ */
onDestroy(event: () => void): XComponentAttribute; onDestroy(event: () => void): XComponentAttribute;
} }
declare const XComponent: XComponentInterface; declare const XComponent: XComponentInterface;

@ -13,67 +13,89 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* Defines the console info.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
export declare class console { export declare class console {
/**
* Prints "debug" logs.
* @param message Text to print.
* @since 7
*/
static debug(message: string, ...arguments: any[]): void; static debug(message: string, ...arguments: any[]): void;
/**
* Prints "log" logs.
* @param message Text to print.
* @since 7
*/
static log(message: string, ...arguments: any[]): void; static log(message: string, ...arguments: any[]): void;
/**
* Prints "info" logs.
* @param message Text to print.
* @since 7
*/
static info(message: string, ...arguments: any[]): void; static info(message: string, ...arguments: any[]): void;
/**
* Prints "warn" logs.
* @param message Text to print.
* @since 7
*/
static warn(message: string, ...arguments: any[]): void; static warn(message: string, ...arguments: any[]): void;
/**
* Prints "error" logs.
* @param message Text to print.
* @since 7
*/
static error(message: string, ...arguments: any[]): void; static error(message: string, ...arguments: any[]): void;
} }
export interface Result {
code: number; /**
data: object; * Sets the interval for repeatedly calling a function.
} * @syscap SystemCapability.ArkUI.ArkUI.Full
export interface SubscribeMessageResponse { * @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.
deviceId: string; * @param delay Indicates the interval between each two calls, in milliseconds. The function will be called after this delay.
bundleName: string; * @param arguments Indicates additional arguments to pass to "handler" when the timer goes off.
abilityName: string; * @returns Returns the timer ID.
message: string; * @since 7
} */
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<string>;
static subscribeAbilityEvent(
param: SubscribeAbilityEventParam,
func: Function
): Promise<string>;
static unsubscribeAbilityEvent(
param: SubscribeAbilityEventParam
): Promise<string>;
static sendMsg(options: SendMessageOptions): void;
static subscribeMsg(options: SubscribeMessageOptions): void;
static unsubscribeMsg(): void;
}
export declare function setInterval(handler: Function | string, delay: number, ...arguments: any[]): number; 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; 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; 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 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; export declare function canIUse(syscap: string): boolean;

@ -14,15 +14,14 @@
*/ */
/** /**
* Defines the animator options.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices phone, tablet, wearable, tv, car
* @since 6 * @since 6
*/ */
export interface AnimatorOptions { export interface AnimatorOptions {
/** /**
* Duration of the animation, in milliseconds. * Duration of the animation, in milliseconds.
* The default value is 0. * The default value is 0.
* @devices phone, tablet, wearable, tv, car
* @since 6 * @since 6
*/ */
duration: number; 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. * 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. * 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. * The default value is ease.
* @devices phone, tablet, wearable, tv, car
* @since 6 * @since 6
*/ */
easing: string; easing: string;
@ -53,7 +51,6 @@ export interface AnimatorOptions {
/** /**
* Delay for the animation start. The default value indicates no delay. * Delay for the animation start. The default value indicates no delay.
* The default value is 0. * The default value is 0.
* @devices phone, tablet, wearable, tv, car
* @since 6 * @since 6
*/ */
delay: number; delay: number;
@ -62,7 +59,6 @@ export interface AnimatorOptions {
* Whether to resume to the initial state after the animation is executed. * Whether to resume to the initial state after the animation is executed.
* none: The initial state is restored 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. * 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 * @since 6
*/ */
fill: "none" | "forwards" | "backwards" | "both"; fill: "none" | "forwards" | "backwards" | "both";
@ -70,7 +66,6 @@ export interface AnimatorOptions {
/** /**
* The animation playback mode. * The animation playback mode.
* The default value is "normal". * The default value is "normal".
* @devices phone, tablet, wearable, tv, car
* @since 6 * @since 6
*/ */
direction: "normal" | "reverse" | "alternate" | "alternate-reverse"; 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. * 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. * The default value is 1.
* @devices phone, tablet, wearable, tv, car
* @since 6 * @since 6
*/ */
iterations: number; iterations: number;
@ -86,7 +80,6 @@ export interface AnimatorOptions {
/** /**
* Starting point of animator interpolation. * Starting point of animator interpolation.
* The default value is 0. * The default value is 0.
* @devices phone, tablet, wearable, tv, car
* @since 6 * @since 6
*/ */
begin: number; begin: number;
@ -94,77 +87,74 @@ export interface AnimatorOptions {
/** /**
* Ending point of Dynamic Interpolation * Ending point of Dynamic Interpolation
* The default value is 1. * The default value is 1.
* @devices phone, tablet, wearable, tv, car
* @since 6 * @since 6
*/ */
end: number; end: number;
} }
/**
* Defines the Animator result interface.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 6
*/
export interface AnimatorResult { export interface AnimatorResult {
/** /**
* Update the options for current animator. * Update the options for current animator.
* @param options Options. * @param options Options.
* @since 6
*/ */
update(options: AnimatorOptions): void; update(options: AnimatorOptions): void;
/** /**
* Starts the animation. * Starts the animation.
* @devices phone, tablet, wearable, tv, car
* @since 6 * @since 6
*/ */
play(): void; play(): void;
/** /**
* Ends the animation. * Ends the animation.
* @devices phone, tablet, wearable, tv, car
* @since 6 * @since 6
*/ */
finish(): void; finish(): void;
/** /**
* Pauses the animation. * Pauses the animation.
* @devices phone, tablet, wearable, tv, car
* @since 6 * @since 6
*/ */
pause(): void; pause(): void;
/** /**
* Cancels the animation. * Cancels the animation.
* @devices phone, tablet, wearable, tv, car
* @since 6 * @since 6
*/ */
cancel(): void; cancel(): void;
/** /**
* Plays the animation in reverse direction. * Plays the animation in reverse direction.
* @devices phone, tablet, wearable, tv, car
* @since 6 * @since 6
*/ */
reverse(): void; reverse(): void;
/** /**
* Trigger when vsync callback. * Trigger when vsync callback.
* @param progress The current progress of animtion * @param progress The current progress of animtion
* @devices phone, tablet, wearable, tv, car
* @since 6 * @since 6
*/ */
onframe: (progress: number) => void; onframe: (progress: number) => void;
/** /**
* The animation is finished. * The animation is finished.
* @devices phone, tablet, wearable, tv, car
* @since 6 * @since 6
*/ */
onfinish: () => void; onfinish: () => void;
/** /**
* The animation is canceled. * The animation is canceled.
* @devices phone, tablet, wearable, tv, car
* @since 6 * @since 6
*/ */
oncancel: () => void; oncancel: () => void;
/** /**
* The animation is repeated. * The animation is repeated.
* @devices phone, tablet, wearable, tv, car
* @since 6 * @since 6
*/ */
onrepeat: () => void; onrepeat: () => void;
} }
/** /**
* @devices phone, tablet, wearable, tv, car * Defines the Animator class.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 6 * @since 6
* @import prompt from '@ohos.animator'; * @import prompt from '@ohos.animator';
*/ */
@ -172,7 +162,6 @@ export default class Animator {
/** /**
* Create an animator object for custum animation. * Create an animator object for custum animation.
* @param options Options. * @param options Options.
* @devices phone, tablet, wearable, tv, car
* @since 6 * @since 6
*/ */
static createAnimator(options: AnimatorOptions): AnimatorResult; static createAnimator(options: AnimatorOptions): AnimatorResult;

@ -17,13 +17,11 @@
* Contains interpolator functions such as initialization, third-order Bezier curves, and spring curves. * Contains interpolator functions such as initialization, third-order Bezier curves, and spring curves.
* @import import Curves from '@ohos.curves' * @import import Curves from '@ohos.curves'
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices phone, tablet, tv, wearable
* @since 7 * @since 7
*/ */
declare namespace curves { declare namespace curves {
/** /**
* enum Curve. * enum Curve.
* @devices phone, tablet, tv, wearable
* @since 7 * @since 7
*/ */
enum Curve { enum Curve {
@ -44,28 +42,24 @@ declare namespace curves {
/** /**
* Initializes the interpolator curve when called. * Initializes the interpolator curve when called.
* @devices phone, tablet, tv, wearable
* @since 7 * @since 7
*/ */
function init(curve?: Curve): string; function init(curve?: Curve): string;
/** /**
* Constructs a step curve when called. * Constructs a step curve when called.
* @devices phone, tablet, tv, wearable
* @since 7 * @since 7
*/ */
function steps(count: number, end: boolean): string; function steps(count: number, end: boolean): string;
/** /**
* Constructs a third-order Bezier curve when called. * Constructs a third-order Bezier curve when called.
* @devices phone, tablet, tv, wearable
* @since 7 * @since 7
*/ */
function cubicBezier(x1: number, y1: number, x2: number, y2: number): string; function cubicBezier(x1: number, y1: number, x2: number, y2: number): string;
/** /**
* Constructs a spring curve when called. * Constructs a spring curve when called.
* @devices phone, tablet, tv, wearable
* @since 7 * @since 7
*/ */
function spring(velocity: number, mass: number, stiffness: number, damping: number): string; function spring(velocity: number, mass: number, stiffness: number, damping: number): string;

@ -17,33 +17,28 @@
* Used to do matrix operations * Used to do matrix operations
* @import import Matrix4 from '@ohos.matrix4' * @import import Matrix4 from '@ohos.matrix4'
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices phone, tablet, tv, wearable
* @since 7 * @since 7
*/ */
declare namespace matrix4 { declare namespace matrix4 {
/** /**
* Set translation parameters * Set translation parameters
* @devices phone, tablet, tv, wearable
* @since 7 * @since 7
*/ */
interface TranslateOption { interface TranslateOption {
/** /**
* Indicates the translation distance of the x-axis, in px. * Indicates the translation distance of the x-axis, in px.
* @devices phone, tablet, tv, wearable
* @since 7 * @since 7
*/ */
x?: number; x?: number;
/** /**
* Indicates the translation distance of the y-axis, in px. * Indicates the translation distance of the y-axis, in px.
* @devices phone, tablet, tv, wearable
* @since 7 * @since 7
*/ */
y?: number; y?: number;
/** /**
* Indicates the translation distance of the z-axis, in px. * Indicates the translation distance of the z-axis, in px.
* @devices phone, tablet, tv, wearable
* @since 7 * @since 7
*/ */
z?: number; z?: number;
@ -51,41 +46,35 @@ declare namespace matrix4 {
/** /**
* Set scaling parameters * Set scaling parameters
* @devices phone, tablet, tv, wearable
* @since 7 * @since 7
*/ */
interface ScaleOption { interface ScaleOption {
/** /**
* Zoom factor of the x-axis. * Zoom factor of the x-axis.
* @devices phone, tablet, tv, wearable
* @since 7 * @since 7
*/ */
x?: number; x?: number;
/** /**
* Zoom factor of the y-axis. * Zoom factor of the y-axis.
* @devices phone, tablet, tv, wearable
* @since 7 * @since 7
*/ */
y?: number; y?: number;
/** /**
* Zoom factor of the z-axis. * Zoom factor of the z-axis.
* @devices phone, tablet, tv, wearable
* @since 7 * @since 7
*/ */
z?: number; z?: number;
/** /**
* Transform the x-axis coordinate of the center point. * Transform the x-axis coordinate of the center point.
* @devices phone, tablet, tv, wearable
* @since 7 * @since 7
*/ */
centerX?: number; centerX?: number;
/** /**
* Transform the y-axis coordinate of the center point. * Transform the y-axis coordinate of the center point.
* @devices phone, tablet, tv, wearable
* @since 7 * @since 7
*/ */
centerY?: number; centerY?: number;
@ -93,48 +82,41 @@ declare namespace matrix4 {
/** /**
* Set Rotation Parameters. * Set Rotation Parameters.
* @devices phone, tablet, tv, wearable
* @since 7 * @since 7
*/ */
interface RotateOption { interface RotateOption {
/** /**
* Axis of rotation vector x coordinate. * Axis of rotation vector x coordinate.
* @devices phone, tablet, tv, wearable
* @since 7 * @since 7
*/ */
x?: number; x?: number;
/** /**
* Axis of rotation vector y coordinate. * Axis of rotation vector y coordinate.
* @devices phone, tablet, tv, wearable
* @since 7 * @since 7
*/ */
y?: number; y?: number;
/** /**
* Axis of rotation vector z coordinate. * Axis of rotation vector z coordinate.
* @devices phone, tablet, tv, wearable
* @since 7 * @since 7
*/ */
z?: number; z?: number;
/** /**
* Transform the x-axis coordinate of the center point. * Transform the x-axis coordinate of the center point.
* @devices phone, tablet, tv, wearable
* @since 7 * @since 7
*/ */
centerX?: number; centerX?: number;
/** /**
* Transform the y-axis coordinate of the center point. * Transform the y-axis coordinate of the center point.
* @devices phone, tablet, tv, wearable
* @since 7 * @since 7
*/ */
centerY?: number; centerY?: number;
/** /**
* Rotation angle. * Rotation angle.
* @devices phone, tablet, tv, wearable
* @since 7 * @since 7
*/ */
angle?: number; angle?: number;
@ -142,14 +124,12 @@ declare namespace matrix4 {
/** /**
* Matrix4Transit. * Matrix4Transit.
* @devices phone, tablet, tv, wearable
* @since 7 * @since 7
*/ */
interface Matrix4Transit { interface Matrix4Transit {
/** /**
* Copy function of Matrix, which can copy a copy of the current matrix object. * Copy function of Matrix, which can copy a copy of the current matrix object.
* @since 7 * @since 7
* @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit * @return Return to Matrix4Transit
*/ */
copy(): 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. * The inverse function of Matrix returns an inverse matrix of the current matrix object, that is, the effect is exactly the opposite.
* @since 7 * @since 7
* @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit * @return Return to Matrix4Transit
*/ */
invert(): 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. * Matrix superposition function, which can superpose the effects of two matrices to generate a new matrix object.
* @since 7 * @since 7
* @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit * @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. * Matrix translation function, which can add the x-axis, Y-axis, or Z-axis translation effect to the current matrix.
* @since 7 * @since 7
* @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit * @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. * Scaling function of the Matrix, which can add the x-axis, Y-axis, or Z-axis scaling effect to the current matrix.
* @since 7 * @since 7
* @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit * @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 * @since 7
* @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit * @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. * Matrix coordinate point conversion function, which can apply the current transformation effect to a coordinate point.
* @since 7 * @since 7
* @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit * @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. * Constructor of Matrix, which can create a fourth-order matrix based on the input parameters. The matrix is column-first.
* @since 7 * @since 7
* @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit * @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. * Matrix initialization function, which can return an identity matrix object.
* @since 7 * @since 7
* @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit * @return Return to Matrix4Transit
*/ */
function identity(): 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. * Copy function of Matrix, which can copy a copy of the current matrix object.
* @since 7 * @since 7
* @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit * @return Return to Matrix4Transit
*/ */
function copy(): 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. * The inverse function of Matrix returns an inverse matrix of the current matrix object, that is, the effect is exactly the opposite.
* @since 7 * @since 7
* @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit * @return Return to Matrix4Transit
*/ */
function invert(): 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. * Matrix superposition function, which can superpose the effects of two matrices to generate a new matrix object.
* @since 7 * @since 7
* @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit * @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. * Matrix translation function, which can add the x-axis, Y-axis, or Z-axis translation effect to the current matrix.
* @since 7 * @since 7
* @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit * @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. * Scaling function of the Matrix, which can add the x-axis, Y-axis, or Z-axis scaling effect to the current matrix.
* @since 7 * @since 7
* @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit * @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. * Rotation function of the Matrix. You can add the x-axis, Y-axis, or Z-axis rotation effect to the current matrix.
* @since 7 * @since 7
* @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit * @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. * Matrix coordinate point conversion function, which can apply the current transformation effect to a coordinate point.
* @since 7 * @since 7
* @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit * @return Return to Matrix4Transit
*/ */
function transformPoint(options:[number,number]): [number,number]; function transformPoint(options: [number, number]): [number, number];
} }
export default matrix4; export default matrix4;

@ -19,7 +19,6 @@ import {Callback} from './basic';
* Used to do mediaquery operations. * Used to do mediaquery operations.
* @import import mediaquery from '@ohos.mediaquery' * @import import mediaquery from '@ohos.mediaquery'
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices phone, tablet, tv, wearable
* @since 7 * @since 7
*/ */
declare namespace mediaquery { declare namespace mediaquery {

@ -18,7 +18,6 @@ import { Want } from './ability/want';
/** /**
* systemPasteboard * systemPasteboard
* @syscap SystemCapability.Miscservices.Pasteboard * @syscap SystemCapability.Miscservices.Pasteboard
* @devices phone, tablet, tv, wearable, car
* @import import pasteboard from '@ohos.pasteboard'; * @import import pasteboard from '@ohos.pasteboard';
*/ */
declare namespace pasteboard { declare namespace pasteboard {

@ -113,7 +113,6 @@ declare namespace prompt {
} }
/** /**
* @devices tv, phone, tablet, wearable
* @since 8 * @since 8
*/ */
interface ActionMenuOptions { interface ActionMenuOptions {

42
api/basic.d.ts vendored

@ -13,18 +13,50 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* Defines the basic callback.
* @since 6
*/
export interface Callback<T> { export interface Callback<T> {
(data: T): void; /**
* Defines the callback info.
* @since 6
*/
(data: T): void;
} }
/**
* Defines the basic error callback.
* @since 6
*/
export interface ErrorCallback<T extends Error = BusinessError> { export interface ErrorCallback<T extends Error = BusinessError> {
(err: T): void; /**
* Defines the basic error callback.
* @since 6
*/
(err: T): void;
} }
/**
* Defines the basic async callback.
* @since 6
*/
export interface AsyncCallback<T> { export interface AsyncCallback<T> {
(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 { export interface BusinessError extends Error {
code: number; /**
* Defines the basic error code.
* @since 6
*/
code: number;
} }

@ -15,42 +15,36 @@
/** /**
* @syscap SystemCapability.ArkUI.ArkUI.Lite * @syscap SystemCapability.ArkUI.ArkUI.Lite
* @devices tv, phone, tablet, wearable, liteWearable, smartVision
* @since 3 * @since 3
*/ */
export declare class console { export declare class console {
/** /**
* Prints "debug" logs. * Prints "debug" logs.
* @param message Text to print. * @param message Text to print.
* @devices tv, phone, tablet, wearable, liteWearable, smartVision
*/ */
static debug(message: string, ...arguments: any[]): void; static debug(message: string, ...arguments: any[]): void;
/** /**
* Prints "log" logs. * Prints "log" logs.
* @param message Text to print. * @param message Text to print.
* @devices tv, phone, tablet, wearable, liteWearable, smartVision
*/ */
static log(message: string, ...arguments: any[]): void; static log(message: string, ...arguments: any[]): void;
/** /**
* Prints "info" logs. * Prints "info" logs.
* @param message Text to print. * @param message Text to print.
* @devices tv, phone, tablet, wearable, liteWearable, smartVision
*/ */
static info(message: string, ...arguments: any[]): void; static info(message: string, ...arguments: any[]): void;
/** /**
* Prints "warn" logs. * Prints "warn" logs.
* @param message Text to print. * @param message Text to print.
* @devices tv, phone, tablet, wearable, liteWearable, smartVision
*/ */
static warn(message: string, ...arguments: any[]): void; static warn(message: string, ...arguments: any[]): void;
/** /**
* Prints "error" logs. * Prints "error" logs.
* @param message Text to print. * @param message Text to print.
* @devices tv, phone, tablet, wearable, liteWearable, smartVision
*/ */
static error(message: string, ...arguments: any[]): void; static error(message: string, ...arguments: any[]): void;
} }

@ -20,7 +20,6 @@
* @param delay Indicates the interval between each two calls, in milliseconds. The function will be called after this delay. * @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. * @param arguments Indicates additional arguments to pass to "handler" when the timer goes off.
* @returns Returns the timer ID. * @returns Returns the timer ID.
* @devices tv, phone, tablet, wearable
* @since 3 * @since 3
*/ */
export declare function setInterval(handler: Function | string, delay: number, ...arguments: any[]): number; export declare function setInterval(handler: Function | string, delay: number, ...arguments: any[]): number;
@ -32,7 +31,6 @@ 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 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. * @param arguments Indicates additional arguments to pass to "handler" when the timer goes off.
* @returns Returns the timer ID. * @returns Returns the timer ID.
* @devices tv, phone, tablet, wearable
* @since 3 * @since 3
*/ */
export declare function setTimeout(handler: Function | string, delay?: number, ...arguments: any[]): number; export declare function setTimeout(handler: Function | string, delay?: number, ...arguments: any[]): number;
@ -41,7 +39,6 @@ export declare function setTimeout(handler: Function | string, delay?: number, .
* Cancels the interval set by " setInterval()". * Cancels the interval set by " setInterval()".
* @syscap SystemCapability.ArkUI.ArkUI.Lite * @syscap SystemCapability.ArkUI.ArkUI.Lite
* @param intervalID Indicates the timer ID returned by "setInterval()". * @param intervalID Indicates the timer ID returned by "setInterval()".
* @devices tv, phone, tablet, wearable, liteWearable, smartVision
* @since 3 * @since 3
*/ */
export declare function clearInterval(intervalID?: number): void; export declare function clearInterval(intervalID?: number): void;
@ -50,7 +47,6 @@ export declare function clearInterval(intervalID?: number): void;
* Cancels the timer set by "setTimeout()". * Cancels the timer set by "setTimeout()".
* @syscap SystemCapability.ArkUI.ArkUI.Lite * @syscap SystemCapability.ArkUI.ArkUI.Lite
* @param timeoutID Indicates the timer ID returned by "setTimeout()". * @param timeoutID Indicates the timer ID returned by "setTimeout()".
* @devices tv, phone, tablet, wearable, liteWearable, smartVision
* @since 3 * @since 3
*/ */
export declare function clearTimeout(timeoutID?: number): void; export declare function clearTimeout(timeoutID?: number): void;
@ -64,7 +60,6 @@ export declare function canIUse(syscap: string): boolean;
/** /**
* Obtain the objects exposed in app.js * Obtain the objects exposed in app.js
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable, smartVision
* @since 6 * @since 6
*/ */
export declare function getApp(): object; export declare function getApp(): object;
@ -72,127 +67,142 @@ export declare function getApp(): object;
/** /**
* You can create an Image object by calling new Image(). * You can create an Image object by calling new Image().
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable * @since 4
*/ */
export declare class Image { export declare class Image {
/** /**
* Network address or local resource. The internal URI is supported. * Network address or local resource. The internal URI is supported.
* @devices tv, phone, tablet, wearable * @since 4
*/ */
src: string; src: string;
/** /**
* Image width. * Image width.
* @devices tv, phone, tablet, wearable * @since 4
*/ */
width?: number; width?: number;
/** /**
* Image height. * Image height.
* @devices tv, phone, tablet, wearable * @since 4
*/ */
height?: number; height?: number;
/** /**
* Called when an image is successfully loaded. This function has no parameter. * Called when an image is successfully loaded. This function has no parameter.
* @devices tv, phone, tablet, wearable * @since 4
*/ */
onload?: () => void; onload?: () => void;
/** /**
* Called when an image fails to be loaded. This function has no parameter. * Called when an image fails to be loaded. This function has no parameter.
* @devices tv, phone, tablet, wearable * @since 4
*/ */
onerror?: () => void; onerror?: () => void;
} }
/** /**
* An ImageData object is a common object that stores the actual pixel data of a Canvas object. * An ImageData object is a common object that stores the actual pixel data of a Canvas object.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable * @since 4
*/ */
export declare class ImageData { export declare class ImageData {
/** /**
* Actual width of the ImageData object, in pixels. * Actual width of the ImageData object, in pixels.
* @devices tv, phone, tablet, wearable * @since 4
*/ */
width: number; width: number;
/** /**
* Actual height of the ImageData object, in pixels. * Actual height of the ImageData object, in pixels.
* @devices tv, phone, tablet, wearable * @since 4
*/ */
height: number; 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. * 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 * @since 4
*/ */
data: Uint8ClampedArray; data: Uint8ClampedArray;
} }
/** /**
* OffscreenCanvas provides a Canvas object that can be rendered off-screen. * OffscreenCanvas provides a Canvas object that can be rendered off-screen.
* It works in both window and Web worker environments. * It works in both window and Web worker environments.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/ */
export declare class OffscreenCanvas { export declare class OffscreenCanvas {
/** /**
* The width of the offScreen Canvas object * The width of the offScreen Canvas object
* The height of the offScreen Canvas object * The height of the offScreen Canvas object
*/ * @since 7
constructor(width: number, height: number); */
constructor(width: number, height: number);
/** /**
* The width of the offScreen Canvas object * The width of the offScreen Canvas object
*/ * @since 7
width: number; */
width: number;
/** /**
* The height of the offScreen Canvas object * The height of the offScreen Canvas object
*/ * @since 7
height: number; */
height: number;
/** /**
* Gets the context object for off-screen drawing. * Gets the context object for off-screen drawing.
* @param contextId creates a CanvasRenderingContext2D object representing a two-dimensional rendering context. * @param contextId creates a CanvasRenderingContext2D object representing a two-dimensional rendering context.
* @param options object representing a three-dimensional rendering context. * @param options object representing a three-dimensional rendering context.
* @returns a render canvas for the offScreen Canvas object. * @returns a render canvas for the offScreen Canvas object.
*/ * @since 7
getContext(contextId: "2d", options?: CanvasRenderingContext2DSettings): OffscreenCanvasRenderingContext2D; */
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. * 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 type indicating the image format.
* @param quality between 0 and 1 indicating image quality if the type option is image/jpeg or image/webp. * @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. * @returns A Promise returning a Blob object representing the image contained in the canvas.
*/ * @since 7
toDataURL(type?: string, quality?: number): string; */
toDataURL(type?: string, quality?: number): string;
/** /**
* Converts the draw content in the current off-screen draw object to a Bitmap object. * Converts the draw content in the current off-screen draw object to a Bitmap object.
* @returns Returns An ImageBitmap object. * @returns Returns An ImageBitmap object.
*/ * @since 7
transferToImageBitmap(): ImageBitmap; */
transferToImageBitmap(): ImageBitmap;
} }
/** /**
* Defines the ImageBitmap.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/ */
export declare class ImageBitmap { export declare class ImageBitmap {
/** /**
* The height of the Image Bitmap object * The height of the Image Bitmap object.
*/ * @since 7
readonly height: number; */
readonly height: number;
/** /**
* The width of the Image Bitmap object * The width of the Image Bitmap object.
*/ * @since 7
readonly width: number; */
readonly width: number;
} }
/** /**
* Conditional compilation for rich equipment * Conditional compilation for rich equipment
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 4
* @systemapi
*/ */
export declare const STANDARD: string; export declare const STANDARD: string;
/** /**
* Conditional compilation for lite equipment * Conditional compilation for lite equipment
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 4
* @systemapi
*/ */
export declare const LITE: string; export declare const LITE: string;

File diff suppressed because it is too large Load Diff

@ -14,14 +14,14 @@
*/ */
/** /**
* Defines the AppResponse info.
* @syscap SystemCapability.ArkUI.ArkUI.Lite * @syscap SystemCapability.ArkUI.ArkUI.Lite
* @devices tv, phone, tablet, wearable, liteWearable, smartVision * @since 3
*/ */
export interface AppResponse { export interface AppResponse {
/** /**
* Application bundleName. * Application bundleName.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable
* @since 6 * @since 6
*/ */
appID: string; appID: string;
@ -29,7 +29,6 @@ export interface AppResponse {
/** /**
* Application name. * Application name.
* @syscap SystemCapability.ArkUI.ArkUI.Lite * @syscap SystemCapability.ArkUI.ArkUI.Lite
* @devices tv, phone, tablet, wearable, liteWearable, smartVision
* @since 3 * @since 3
*/ */
appName: string; appName: string;
@ -37,7 +36,6 @@ export interface AppResponse {
/** /**
* Application version name. * Application version name.
* @syscap SystemCapability.ArkUI.ArkUI.Lite * @syscap SystemCapability.ArkUI.ArkUI.Lite
* @devices tv, phone, tablet, wearable, liteWearable, smartVision
* @since 3 * @since 3
*/ */
versionName: string; versionName: string;
@ -45,62 +43,73 @@ export interface AppResponse {
/** /**
* Application version. * Application version.
* @syscap SystemCapability.ArkUI.ArkUI.Lite * @syscap SystemCapability.ArkUI.ArkUI.Lite
* @devices tv, phone, tablet, wearable, liteWearable, smartVision
* @since 3 * @since 3
*/ */
versionCode: number; versionCode: number;
} }
/** /**
* Defines the option of screenOnVisible interface.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices wearable, liteWearable * @since 3
*/ */
export interface ScreenOnVisibleOptions { export interface ScreenOnVisibleOptions {
/** /**
* Whether to keep the application visible. The default value is false. * Whether to keep the application visible. The default value is false.
* @devices wearable, liteWearable
* @since 3 * @since 3
*/ */
visible?: boolean; visible?: boolean;
/** /**
* Called when the application always keeps visible. * Called when the application always keeps visible.
* @devices wearable, liteWearable
* @since 3 * @since 3
*/ */
success?: () => void; success?: () => void;
/** /**
* Called when the application fails to keep visible. * Called when the application fails to keep visible.
* @devices wearable, liteWearable
* @since 3 * @since 3
*/ */
fail?: (data: string, code: number) => void; fail?: (data: string, code: number) => void;
/** /**
* Called when the execution is completed. * Called when the execution is completed.
* @devices wearable, liteWearable
* @since 3 * @since 3
*/ */
complete?: () => void; complete?: () => void;
} }
/** /**
* Defines the option of RequestFullWindow interface.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 3
*/
export interface RequestFullWindowOptions {
/**
* Defines the number of animation options.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 3
*/
duration: number;
}
/**
* Defines the app class info.
* @syscap SystemCapability.ArkUI.ArkUI.Lite * @syscap SystemCapability.ArkUI.ArkUI.Lite
* @devices tv, phone, tablet, wearable, liteWearable, smartVision * @since 3
*/ */
export default class App { export default class App {
/** /**
* Obtains the declared information in the config.json file of an application. * Obtains the declared information in the config.json file of an application.
* @syscap SystemCapability.ArkUI.ArkUI.Lite * @syscap SystemCapability.ArkUI.ArkUI.Lite
* @devices tv, phone, tablet, wearable, liteWearable, smartVision * @since 3
*/ */
static getInfo(): AppResponse; static getInfo(): AppResponse;
/** /**
* Destroys the current ability. * Destroys the current ability.
* @syscap SystemCapability.ArkUI.ArkUI.Lite * @syscap SystemCapability.ArkUI.ArkUI.Lite
* @devices tv, phone, tablet, wearable, liteWearable, smartVision * @since 3
*/ */
static terminate(): void; static terminate(): void;
@ -112,7 +121,8 @@ export default class App {
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @param options Transition time from non-full window to full window, in milliseconds. * @param options Transition time from non-full window to full window, in milliseconds.
* By default, the value is in direct proportion to the distance between the non-full window and the full window. * By default, the value is in direct proportion to the distance between the non-full window and the full window.
* @devices phone, tablet * @since 3
* @systemapi
*/ */
static requestFullWindow(options?: RequestFullWindowOptions): void; static requestFullWindow(options?: RequestFullWindowOptions): void;
} }

@ -15,13 +15,12 @@
/** /**
* @syscap SystemCapability.ArkUI.ArkUI.Lite * @syscap SystemCapability.ArkUI.ArkUI.Lite
* @devices tv, phone, tablet, wearable, liteWearable * @since 3
*/ */
export interface LocaleResponse { export interface LocaleResponse {
/** /**
* Current language of the application. Example: zh. * Current language of the application. Example: zh.
* @syscap SystemCapability.ArkUI.ArkUI.Lite * @syscap SystemCapability.ArkUI.ArkUI.Lite
* @devices tv, phone, tablet, wearable, liteWearable
* @since 3 * @since 3
*/ */
language: string; language: string;
@ -29,7 +28,6 @@ export interface LocaleResponse {
/** /**
* Country or region. Example: CN. * Country or region. Example: CN.
* @syscap SystemCapability.ArkUI.ArkUI.Lite * @syscap SystemCapability.ArkUI.ArkUI.Lite
* @devices tv, phone, tablet, wearable, liteWearable
* @since 3 * @since 3
*/ */
countryOrRegion: string; countryOrRegion: string;
@ -39,7 +37,6 @@ export interface LocaleResponse {
* ltr: The text direction is from left to right. * ltr: The text direction is from left to right.
* rtl: The text direction is from right to left. * rtl: The text direction is from right to left.
* @syscap SystemCapability.ArkUI.ArkUI.Lite * @syscap SystemCapability.ArkUI.ArkUI.Lite
* @devices tv, phone, tablet, wearable, liteWearable
* @since 3 * @since 3
*/ */
dir: "ltr" | "rtl"; dir: "ltr" | "rtl";
@ -47,13 +44,13 @@ export interface LocaleResponse {
/** /**
* @syscap SystemCapability.ArkUI.ArkUI.Lite * @syscap SystemCapability.ArkUI.ArkUI.Lite
* @devices tv, phone, tablet, wearable, liteWearable * @since 3
*/ */
export default class Configuration { export default class Configuration {
/** /**
* Obtains the current locale of the application, which is the same as the system locale. * Obtains the current locale of the application, which is the same as the system locale.
* @syscap SystemCapability.ArkUI.ArkUI.Lite * @syscap SystemCapability.ArkUI.ArkUI.Lite
* @devices tv, phone, tablet, wearable, liteWearable * @since 3
*/ */
static getLocale(): LocaleResponse; static getLocale(): LocaleResponse;
} }

@ -14,28 +14,29 @@
*/ */
/** /**
* Defines the MediaQuery event.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable * @since 3
*/ */
export interface MediaQueryEvent { export interface MediaQueryEvent {
/** /**
* The result of match result.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable
* @since 3 * @since 3
*/ */
matches: boolean; matches: boolean;
} }
/** /**
* Defines the MediaQuery list info.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable * @since 3
*/ */
export interface MediaQueryList { export interface MediaQueryList {
/** /**
* Serialized media query condition. * Serialized media query condition.
* This parameter is read-only. * This parameter is read-only.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable
* @since 3 * @since 3
*/ */
media?: string; media?: string;
@ -44,7 +45,6 @@ export interface MediaQueryList {
* Whether the query is successful. True if the query condition is matched successfully, false otherwise. * Whether the query is successful. True if the query condition is matched successfully, false otherwise.
* This parameter is read-only. * This parameter is read-only.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable
* @since 3 * @since 3
*/ */
matches?: boolean; matches?: boolean;
@ -52,7 +52,6 @@ export interface MediaQueryList {
/** /**
* Called when the matches value changes. * Called when the matches value changes.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable
* @since 3 * @since 3
*/ */
onchange?: (matches: boolean) => void; onchange?: (matches: boolean) => void;
@ -61,7 +60,6 @@ export interface MediaQueryList {
* Adds a listening function to MediaQueryList. * Adds a listening function to MediaQueryList.
* The listening function must be added before onShow is called, that is, added to the onInit or onReady function. * The listening function must be added before onShow is called, that is, added to the onInit or onReady function.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable
* @since 3 * @since 3
*/ */
addListener(callback: (event: MediaQueryEvent) => void): void; addListener(callback: (event: MediaQueryEvent) => void): void;
@ -69,21 +67,21 @@ export interface MediaQueryList {
/** /**
* Removes a listening function from MediaQueryList. * Removes a listening function from MediaQueryList.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable
* @since 3 * @since 3
*/ */
removeListener(callback: (event: MediaQueryEvent) => void): void; removeListener(callback: (event: MediaQueryEvent) => void): void;
} }
/** /**
* Defines the mediaqurey interface.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable * @since 3
*/ */
export default class MediaQuery { export default class MediaQuery {
/** /**
* Queries a media item and returns a MediaQueryList object. * Queries a media item and returns a MediaQueryList object.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable * @since 3
*/ */
static matchMedia(condition: string): MediaQueryList; static matchMedia(condition: string): MediaQueryList;
} }

@ -14,14 +14,14 @@
*/ */
/** /**
* Defines the options of ShowToast.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable * @since 3
*/ */
export interface ShowToastOptions { export interface ShowToastOptions {
/** /**
* Text to display. * Text to display.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable
* @since 3 * @since 3
*/ */
message: string; message: string;
@ -31,7 +31,6 @@ export interface ShowToastOptions {
* The recommended value ranges from 1500 ms to 10000ms. * The recommended value ranges from 1500 ms to 10000ms.
* NOTE: A value less than 1500 is automatically changed to 1500. The maximum value is 10000 ms. * NOTE: A value less than 1500 is automatically changed to 1500. The maximum value is 10000 ms.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable
* @since 3 * @since 3
*/ */
duration?: number; duration?: number;
@ -39,54 +38,55 @@ export interface ShowToastOptions {
/** /**
* The distance between toast dialog box and the bottom of screen. * The distance between toast dialog box and the bottom of screen.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable
* @since 5 * @since 5
*/ */
bottom?: string | number; bottom?: string | number;
} }
/** /**
* Defines the prompt info of button.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable * @since 3
*/ */
export interface Button { export interface Button {
/** /**
* Defines the button info.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable
* @since 3 * @since 3
*/ */
text: string; text: string;
/** /**
* Defines the color of button.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable
* @since 3 * @since 3
*/ */
color: string; color: string;
} }
/** /**
* Defines the response of ShowDialog.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable * @since 3
*/ */
export interface ShowDialogSuccessResponse { export interface ShowDialogSuccessResponse {
/** /**
* Defines the index of data.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable
* @since 3 * @since 3
*/ */
index: number; index: number;
} }
/** /**
* Defines the option of show dialog.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable * @since 3
*/ */
export interface ShowDialogOptions { export interface ShowDialogOptions {
/** /**
* Title of the text to display. * Title of the text to display.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable
* @since 3 * @since 3
*/ */
title?: string; title?: string;
@ -94,7 +94,6 @@ export interface ShowDialogOptions {
/** /**
* Text body. * Text body.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable
* @since 3 * @since 3
*/ */
message?: string; message?: string;
@ -104,7 +103,6 @@ export interface ShowDialogOptions {
* The array structure is {text:'button', color: '#666666'}. * The array structure is {text:'button', color: '#666666'}.
* One to three buttons are supported. The first button is of the positiveButton type, the second is of the negativeButton type, and the third is of the neutralButton type. * One to three buttons are supported. The first button is of the positiveButton type, the second is of the negativeButton type, and the third is of the neutralButton type.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable
* @since 3 * @since 3
*/ */
buttons?: [Button, Button?, Button?]; buttons?: [Button, Button?, Button?];
@ -112,7 +110,6 @@ export interface ShowDialogOptions {
/** /**
* Called when the dialog box is displayed. * Called when the dialog box is displayed.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable
* @since 3 * @since 3
*/ */
success?: (data: ShowDialogSuccessResponse) => void; success?: (data: ShowDialogSuccessResponse) => void;
@ -120,7 +117,6 @@ export interface ShowDialogOptions {
/** /**
* Called when the operation is cancelled. * Called when the operation is cancelled.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable
* @since 3 * @since 3
*/ */
cancel?: (data: string, code: string) => void; cancel?: (data: string, code: string) => void;
@ -128,21 +124,20 @@ export interface ShowDialogOptions {
/** /**
* Called when the dialog box is closed. * Called when the dialog box is closed.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable
* @since 3 * @since 3
*/ */
complete?: (data: string) => void; complete?: (data: string) => void;
} }
/** /**
* Defines the option of ShowActionMenu.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices phone, tablet * @since 6
*/ */
export interface ShowActionMenuOptions { export interface ShowActionMenuOptions {
/** /**
* Title of the text to display. * Title of the text to display.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices phone, tablet
* @since 6 * @since 6
*/ */
title?: string; title?: string;
@ -152,7 +147,6 @@ export interface ShowActionMenuOptions {
* The array structure is {text:'button', color: '#666666'}. * The array structure is {text:'button', color: '#666666'}.
* One to six buttons are supported. * One to six buttons are supported.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices phone, tablet
* @since 6 * @since 6
*/ */
buttons: [Button, Button?, Button?, Button?, Button?, Button?]; buttons: [Button, Button?, Button?, Button?, Button?, Button?];
@ -160,7 +154,6 @@ export interface ShowActionMenuOptions {
/** /**
* Called when the dialog box is displayed. * Called when the dialog box is displayed.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices phone, tablet
* @since 6 * @since 6
*/ */
success?: (tapIndex: number, errMsg: string) => void; success?: (tapIndex: number, errMsg: string) => void;
@ -168,7 +161,6 @@ export interface ShowActionMenuOptions {
/** /**
* Called when the operation is cancelled. * Called when the operation is cancelled.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices phone, tablet
* @since 6 * @since 6
*/ */
fail?: (errMsg: string) => void; fail?: (errMsg: string) => void;
@ -176,22 +168,22 @@ export interface ShowActionMenuOptions {
/** /**
* Called when the dialog box is closed. * Called when the dialog box is closed.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices phone, tablet
* @since 6 * @since 6
*/ */
complete?: () => void; complete?: () => void;
} }
/** /**
* Defines the prompt interface.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable * @since 3
*/ */
export default class Prompt { export default class Prompt {
/** /**
* Displays the notification text. * Displays the notification text.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @param options Options. * @param options Options.
* @devices tv, phone, tablet, wearable * @since 3
*/ */
static showToast(options: ShowToastOptions): void; static showToast(options: ShowToastOptions): void;
@ -199,7 +191,7 @@ export default class Prompt {
* Displays the dialog box. * Displays the dialog box.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @param options Options. * @param options Options.
* @devices tv, phone, tablet, wearable * @since 3
*/ */
static showDialog(options: ShowDialogOptions): void; static showDialog(options: ShowDialogOptions): void;
@ -207,7 +199,7 @@ export default class Prompt {
* Displays the menu. * Displays the menu.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @param options Options. * @param options Options.
* @devices phone, tablet * @since 6
*/ */
static showActionMenu(options: ShowActionMenuOptions): void; static showActionMenu(options: ShowActionMenuOptions): void;
} }

@ -14,8 +14,9 @@
*/ */
/** /**
* Defines the option of router.
* @syscap SystemCapability.ArkUI.ArkUI.Lite * @syscap SystemCapability.ArkUI.ArkUI.Lite
* @devices tv, phone, tablet, wearable, liteWearable, smartVision * @since 3
*/ */
export interface RouterOptions { export interface RouterOptions {
/** /**
@ -26,7 +27,6 @@ export interface RouterOptions {
* pages/detail/detail * pages/detail/detail
* 2. Particular path. If the URI is a slash (/), the home page is displayed. * 2. Particular path. If the URI is a slash (/), the home page is displayed.
* @syscap SystemCapability.ArkUI.ArkUI.Lite * @syscap SystemCapability.ArkUI.ArkUI.Lite
* @devices tv, phone, tablet, wearable, liteWearable, smartVision
* @since 3 * @since 3
*/ */
uri: string; uri: string;
@ -36,22 +36,21 @@ export interface RouterOptions {
* After the destination page is displayed, the parameter can be directly used for the page. * After the destination page is displayed, the parameter can be directly used for the page.
* For example, this.data1 (data1 is the key value of the params used for page navigation.) * For example, this.data1 (data1 is the key value of the params used for page navigation.)
* @syscap SystemCapability.ArkUI.ArkUI.Lite * @syscap SystemCapability.ArkUI.ArkUI.Lite
* @devices tv, phone, tablet, wearable, liteWearable, smartVision
* @since 3 * @since 3
*/ */
params?: Object; params?: Object;
} }
/** /**
* Defines the option of router back.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable * @since 7
*/ */
export interface BackRouterOptions { export interface BackRouterOptions {
/** /**
* Returns to the page of the specified path. * Returns to the page of the specified path.
* If the page with the specified path does not exist in the page stack, router.back() is called by default. * If the page with the specified path does not exist in the page stack, router.back() is called by default.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable
* @since 7 * @since 7
*/ */
uri?: string; uri?: string;
@ -59,22 +58,21 @@ export interface BackRouterOptions {
/** /**
* Data that needs to be passed to the destination page during navigation. * Data that needs to be passed to the destination page during navigation.
* @syscap SystemCapability.ArkUI.ArkUI.Lite * @syscap SystemCapability.ArkUI.ArkUI.Lite
* @devices tv, phone, tablet, wearable, liteWearable, smartVision
* @since 7 * @since 7
*/ */
params?: Object; params?: Object;
} }
/** /**
* Defines the state of router.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable * @since 3
*/ */
export interface RouterState { export interface RouterState {
/** /**
* Index of the current page in the stack. * Index of the current page in the stack.
* NOTE: The index starts from 1 from the bottom to the top of the stack. * NOTE: The index starts from 1 from the bottom to the top of the stack.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable
* @since 3 * @since 3
*/ */
index: number; index: number;
@ -82,7 +80,6 @@ export interface RouterState {
/** /**
* Name of the current page, that is, the file name. * Name of the current page, that is, the file name.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable
* @since 3 * @since 3
*/ */
name: string; name: string;
@ -90,21 +87,20 @@ export interface RouterState {
/** /**
* Path of the current page. * Path of the current page.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable
* @since 3 * @since 3
*/ */
path: string; path: string;
} }
/** /**
* Defines the option of EnableAlertBeforeBackPage.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices phone, tablet * @since 6
*/ */
export interface EnableAlertBeforeBackPageOptions { export interface EnableAlertBeforeBackPageOptions {
/** /**
* dialog context. * dialog context.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices phone, tablet
* @since 6 * @since 6
*/ */
message: string; message: string;
@ -112,7 +108,6 @@ export interface EnableAlertBeforeBackPageOptions {
/** /**
* Called when the dialog box is displayed. * Called when the dialog box is displayed.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices phone, tablet
* @since 6 * @since 6
*/ */
success?: (errMsg: string) => void; success?: (errMsg: string) => void;
@ -120,7 +115,6 @@ export interface EnableAlertBeforeBackPageOptions {
/** /**
* Called when the operation is cancelled. * Called when the operation is cancelled.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices phone, tablet
* @since 6 * @since 6
*/ */
cancel?: (errMsg: string) => void; cancel?: (errMsg: string) => void;
@ -128,21 +122,20 @@ export interface EnableAlertBeforeBackPageOptions {
/** /**
* Called when the dialog box is closed. * Called when the dialog box is closed.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices phone, tablet
* @since 6 * @since 6
*/ */
complete?: () => void; complete?: () => void;
} }
/** /**
* Defines the option of DisableAlertBeforeBackPage.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices phone, tablet * @since 6
*/ */
export interface DisableAlertBeforeBackPageOptions { export interface DisableAlertBeforeBackPageOptions {
/** /**
* Called when the dialog box is displayed. * Called when the dialog box is displayed.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices phone, tablet
* @since 6 * @since 6
*/ */
success?: (errMsg: string) => void; success?: (errMsg: string) => void;
@ -150,7 +143,6 @@ export interface DisableAlertBeforeBackPageOptions {
/** /**
* Called when the operation is cancelled. * Called when the operation is cancelled.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices phone, tablet
* @since 6 * @since 6
*/ */
cancel?: (errMsg: string) => void; cancel?: (errMsg: string) => void;
@ -158,22 +150,22 @@ export interface DisableAlertBeforeBackPageOptions {
/** /**
* Called when the dialog box is closed. * Called when the dialog box is closed.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices phone, tablet
* @since 6 * @since 6
*/ */
complete?: () => void; complete?: () => void;
} }
/** /**
* Defines the Router interface.
* @syscap SystemCapability.ArkUI.ArkUI.Lite * @syscap SystemCapability.ArkUI.ArkUI.Lite
* @devices tv, phone, tablet, wearable, liteWearable, smartVision * @since 3
*/ */
export default class Router { export default class Router {
/** /**
* Navigates to a specified page in the application based on the page URL and parameters. * Navigates to a specified page in the application based on the page URL and parameters.
* @param options Options. * @param options Options.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable * @since 3
*/ */
static push(options: RouterOptions): void; static push(options: RouterOptions): void;
@ -181,7 +173,7 @@ export default class Router {
* Replaces the current page with another one in the application. The current page is destroyed after replacement. * Replaces the current page with another one in the application. The current page is destroyed after replacement.
* @syscap SystemCapability.ArkUI.ArkUI.Lite * @syscap SystemCapability.ArkUI.ArkUI.Lite
* @param options Options. * @param options Options.
* @devices tv, phone, tablet, wearable, liteWearable, smartVision * @since 3
*/ */
static replace(options: RouterOptions): void; static replace(options: RouterOptions): void;
@ -189,8 +181,7 @@ export default class Router {
* Returns to the previous page or a specified page. * Returns to the previous page or a specified page.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @param options Options. * @param options Options.
* @devices tv, phone, tablet, wearable * @since 3
* @since 7
*/ */
static back(options?: BackRouterOptions): void; static back(options?: BackRouterOptions): void;
@ -198,7 +189,6 @@ export default class Router {
* Obtains information about the current page params. * Obtains information about the current page params.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @returns Page params. * @returns Page params.
* @devices tv, phone, tablet, wearable
* @since 7 * @since 7
*/ */
static getParams(): Object; static getParams(): Object;
@ -206,7 +196,7 @@ export default class Router {
/** /**
* Clears all historical pages and retains only the current page at the top of the stack. * Clears all historical pages and retains only the current page at the top of the stack.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable * @since 3
*/ */
static clear(): void; static clear(): void;
@ -214,7 +204,7 @@ export default class Router {
* Obtains the number of pages in the current stack. * Obtains the number of pages in the current stack.
* @returns Number of pages in the stack. The maximum value is 32. * @returns Number of pages in the stack. The maximum value is 32.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @devices tv, phone, tablet, wearable * @since 3
*/ */
static getLength(): string; static getLength(): string;
@ -222,7 +212,7 @@ export default class Router {
* Obtains information about the current page state. * Obtains information about the current page state.
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @returns Page state. * @returns Page state.
* @devices tv, phone, tablet, wearable * @since 3
*/ */
static getState(): RouterState; static getState(): RouterState;
@ -230,7 +220,7 @@ export default class Router {
* Pop up dialog to ask whether to back * Pop up dialog to ask whether to back
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @param options Options. * @param options Options.
* @devices phone, tablet * @since 6
*/ */
static enableAlertBeforeBackPage(options: EnableAlertBeforeBackPageOptions): void; static enableAlertBeforeBackPage(options: EnableAlertBeforeBackPageOptions): void;
@ -238,7 +228,7 @@ export default class Router {
* cancel enableAlertBeforeBackPage * cancel enableAlertBeforeBackPage
* @syscap SystemCapability.ArkUI.ArkUI.Full * @syscap SystemCapability.ArkUI.ArkUI.Full
* @param options Options. * @param options Options.
* @devices phone, tablet * @since 6
*/ */
static disableAlertBeforeBackPage(options?: DisableAlertBeforeBackPageOptions): void; static disableAlertBeforeBackPage(options?: DisableAlertBeforeBackPageOptions): void;
} }