diff --git a/BUILD.gn b/BUILD.gn
index e1313d198c90a92af6c117b1fa0c2d8633ce60b9..a29eb996c7e3333620c40dabbe1e4196353cee5c 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -14,12 +14,15 @@
import("//build/ohos.gni")
import("//build/ohos/notice/notice.gni")
import("//build/templates/metadata/module_info.gni")
+import("interface_config.gni")
ohos_copy("ets_internal_api") {
sources = [
"api/@internal/ets/index.d.ts",
"api/@internal/ets/lifecycle.d.ts",
"api/@internal/global.d.ts",
+ "api/common/full/canvaspattern.d.ts",
+ "api/common/full/featureability.d.ts",
]
outputs = [ target_out_dir + "/$target_name/{{source_file_part}}" ]
module_source_dir = target_out_dir + "/$target_name"
@@ -59,6 +62,7 @@ ohos_copy("ets_component") {
"api/@internal/component/ets/grid.d.ts",
"api/@internal/component/ets/gridItem.d.ts",
"api/@internal/component/ets/grid_container.d.ts",
+ "api/@internal/component/ets/hyperlink.d.ts",
"api/@internal/component/ets/image.d.ts",
"api/@internal/component/ets/image_animator.d.ts",
"api/@internal/component/ets/index-full.d.ts",
@@ -73,7 +77,6 @@ ohos_copy("ets_component") {
"api/@internal/component/ets/page_transition.d.ts",
"api/@internal/component/ets/panel.d.ts",
"api/@internal/component/ets/path.d.ts",
- "api/@internal/component/ets/piece.d.ts",
"api/@internal/component/ets/polygon.d.ts",
"api/@internal/component/ets/polyline.d.ts",
"api/@internal/component/ets/progress.d.ts",
@@ -90,7 +93,6 @@ ohos_copy("ets_component") {
"api/@internal/component/ets/search.d.ts",
"api/@internal/component/ets/select.d.ts",
"api/@internal/component/ets/shape.d.ts",
- "api/@internal/component/ets/sheet.d.ts",
"api/@internal/component/ets/sidebar.d.ts",
"api/@internal/component/ets/slider.d.ts",
"api/@internal/component/ets/span.d.ts",
@@ -107,6 +109,7 @@ ohos_copy("ets_component") {
"api/@internal/component/ets/text_input.d.ts",
"api/@internal/component/ets/text_picker.d.ts",
"api/@internal/component/ets/text_timer.d.ts",
+ "api/@internal/component/ets/time_picker.d.ts",
"api/@internal/component/ets/toggle.d.ts",
"api/@internal/component/ets/units.d.ts",
"api/@internal/component/ets/video.d.ts",
@@ -119,15 +122,7 @@ ohos_copy("ets_component") {
}
ohos_copy("common_api") {
- sources = [
- "api/@ohos.wifi.d.ts",
- "api/common/@system.app.d.ts",
- "api/common/@system.configuration.d.ts",
- "api/common/@system.file.d.ts",
- "api/common/@system.mediaquery.d.ts",
- "api/common/@system.prompt.d.ts",
- "api/common/@system.router.d.ts",
- ]
+ sources = common_api_src
outputs = [ target_out_dir + "/$target_name/{{source_file_part}}" ]
module_source_dir = target_out_dir + "/$target_name"
module_install_name = ""
@@ -144,7 +139,7 @@ template("ohos_declaration_template") {
forward_variables_from(invoker, "*")
action_with_pydeps(target_name) {
script = "//interface/sdk-js/remove_internal.py"
- outputs = [ root_out_dir + "/$target_name/" ]
+ outputs = [ root_out_dir + "/ohos_declaration/$target_name" ]
args = [
"--input",
rebase_path("//interface/sdk-js/api", root_build_dir),
@@ -171,10 +166,13 @@ ohos_declaration_template("ohos_declaration_common") {
ohos_copy("internal_full") {
sources = [
- "api/common/@internal/console.d.ts",
- "api/common/@internal/global.d.ts",
- "api/common/@internal/index.d.ts",
- "api/common/@internal/viewmodel.d.ts",
+ "api/common/full/canvaspattern.d.ts",
+ "api/common/full/console.d.ts",
+ "api/common/full/dom.d.ts",
+ "api/common/full/featureability.d.ts",
+ "api/common/full/global.d.ts",
+ "api/common/full/index.d.ts",
+ "api/common/full/viewmodel.d.ts",
]
outputs = [ target_out_dir + "/$target_name/{{source_file_part}}" ]
module_source_dir = target_out_dir + "/$target_name"
@@ -183,10 +181,11 @@ ohos_copy("internal_full") {
ohos_copy("internal_lite") {
sources = [
- "api/liteWearable/@internal/console.d.ts",
- "api/liteWearable/@internal/global.d.ts",
- "api/liteWearable/@internal/index.d.ts",
- "api/liteWearable/@internal/viewmodel.d.ts",
+ "api/common/lite/console.d.ts",
+ "api/common/lite/featureability.d.ts",
+ "api/common/lite/global.d.ts",
+ "api/common/lite/index.d.ts",
+ "api/common/lite/viewmodel.d.ts",
]
outputs = [ target_out_dir + "/$target_name/{{source_file_part}}" ]
module_source_dir = target_out_dir + "/$target_name"
@@ -202,13 +201,13 @@ ohos_copy("syscap_check") {
ohos_copy("system_api") {
sources = [
- "api/common/@system.app.d.ts",
- "api/common/@system.cipher.d.ts",
- "api/common/@system.configuration.d.ts",
- "api/common/@system.file.d.ts",
- "api/common/@system.mediaquery.d.ts",
- "api/common/@system.prompt.d.ts",
- "api/common/@system.router.d.ts",
+ "api/@system.app.d.ts",
+ "api/@system.cipher.d.ts",
+ "api/@system.configuration.d.ts",
+ "api/@system.file.d.ts",
+ "api/@system.mediaquery.d.ts",
+ "api/@system.prompt.d.ts",
+ "api/@system.router.d.ts",
]
outputs = [ target_out_dir + "/$target_name/{{source_file_part}}" ]
module_source_dir = target_out_dir + "/$target_name"
diff --git a/api/@internal/component/ets/alert_dialog.d.ts b/api/@internal/component/ets/alert_dialog.d.ts
index e88783f82c4ab887efb0e3a43da1694c3e8d59b6..56f25ee6597851a4b30fd03e152a70bc925bda60 100644
--- a/api/@internal/component/ets/alert_dialog.d.ts
+++ b/api/@internal/component/ets/alert_dialog.d.ts
@@ -163,6 +163,10 @@ declare interface AlertDialogParamWithConfirm extends AlertDialogParam {
};
}
+/**
+ * Defines the dialog param with buttons.
+ * @since 7
+ */
declare interface AlertDialogParamWithButtons extends AlertDialogParam {
/**
* First button.
diff --git a/api/@internal/component/ets/alphabet_indexer.d.ts b/api/@internal/component/ets/alphabet_indexer.d.ts
index a902431b34a4e76c5560ef87c6984665e4d08e17..42a4b1694a04863d01bae5fc71a2ace9462f4fe4 100644
--- a/api/@internal/component/ets/alphabet_indexer.d.ts
+++ b/api/@internal/component/ets/alphabet_indexer.d.ts
@@ -52,8 +52,9 @@ declare class AlphabetIndexerAttribute extends CommonMethod void): AlphabetIndexerAttribute;
+ onSelected(callback: (index: number) => void): AlphabetIndexerAttribute;
/**
* Definitions color.
@@ -121,29 +122,35 @@ declare class AlphabetIndexerAttribute extends CommonMethod void): AlphabetIndexerAttribute;
+
/**
* Index bar selection callback and return the strings which display on pop-up.
* @since 8
*/
- onRequestPopupData(event: (index: number) => Array): AlphabetIndexerAttribute;
+ onRequestPopupData(callback: (index: number) => Array): AlphabetIndexerAttribute;
/**
* Pop-up selection callback.
* @since 8
*/
- onPopupSelected(event: (index: number) => void): AlphabetIndexerAttribute;
+ onPopupSelect(callback: (index: number) => void): AlphabetIndexerAttribute;
/**
- * Select the index.
+ * Sets the selected index.
* @since 8
*/
- selectedIndex(index: number): AlphabetIndexerAttribute;
+ selected(index: number): AlphabetIndexerAttribute;
/**
* Position of the pop-up windows, relative to the midpoint of the top border of the indexer bar.
* @since 8
*/
- popupPosition(value: {offsetX: number, offsetY: number}): AlphabetIndexerAttribute;
+ popupPosition(value: Position): AlphabetIndexerAttribute;
}
declare const AlphabetIndexer: AlphabetIndexerInterface;
diff --git a/api/@internal/component/ets/badge.d.ts b/api/@internal/component/ets/badge.d.ts
index 5c7d354ea01658a414f44247bf54db64ed339079..6c6ef7b5936c4e46a99a4a1cd8780479c6f19028 100644
--- a/api/@internal/component/ets/badge.d.ts
+++ b/api/@internal/component/ets/badge.d.ts
@@ -145,5 +145,5 @@ interface BadgeInterface {
*/
declare class BadgeAttribute extends CommonMethod {}
-declare const Badge: BadgeInterface
+declare const Badge: BadgeInterface;
declare const BadgeInstance: BadgeAttribute;
diff --git a/api/@internal/component/ets/blank.d.ts b/api/@internal/component/ets/blank.d.ts
index 4415acc8a0c39bede5a52cdd867183ef5e7d49dc..327a53ef07df5b396233d579af5981d57c9008cd 100644
--- a/api/@internal/component/ets/blank.d.ts
+++ b/api/@internal/component/ets/blank.d.ts
@@ -1,4 +1,4 @@
- /*
+/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/api/@internal/component/ets/button.d.ts b/api/@internal/component/ets/button.d.ts
index 68f472819de0d9dea9b66e90fbf43ca6ecc76193..3ad3db720fe0169a43cd945cc9f01a02d853fcac 100644
--- a/api/@internal/component/ets/button.d.ts
+++ b/api/@internal/component/ets/button.d.ts
@@ -41,7 +41,7 @@ declare enum ButtonType {
* Defines the button options.
* @since 7
*/
-declare interface ButtonOption {
+declare interface ButtonOptions {
/**
* Describes the button style.
* @since 7
@@ -70,13 +70,13 @@ interface ButtonInterface {
* Create Button with Text child.
* @since 7
*/
- (options: ButtonOption): ButtonAttribute;
+ (options: ButtonOptions): ButtonAttribute;
/**
* Create Button with inner text label.
* @since 7
*/
- (label: ResourceStr, options?: ButtonOption): ButtonAttribute;
+ (label: ResourceStr, options?: ButtonOptions): ButtonAttribute;
}
/**
@@ -127,5 +127,5 @@ declare class ButtonAttribute extends CommonMethod {
fontFamily(value: string | Resource): ButtonAttribute;
}
-declare const Button: ButtonInterface
+declare const Button: ButtonInterface;
declare const ButtonInstance: ButtonAttribute;
diff --git a/api/@internal/component/ets/calendar.d.ts b/api/@internal/component/ets/calendar.d.ts
index 73af8ae5278a07e8f00f740823dda9548dc519f5..63569d81073600b4718ce87c33e435a764bbde85 100644
--- a/api/@internal/component/ets/calendar.d.ts
+++ b/api/@internal/component/ets/calendar.d.ts
@@ -102,7 +102,7 @@ interface CalendarDay {
}
/**
- * Date object.
+ * Date object.
* @since 7
* @systemapi
*/
diff --git a/api/@internal/component/ets/canvas.d.ts b/api/@internal/component/ets/canvas.d.ts
index 37f1a30ba622a0e6caa02b7c87e23e65554b358e..6c1072d53d60e138496276dd73f7fefc32273059 100644
--- a/api/@internal/component/ets/canvas.d.ts
+++ b/api/@internal/component/ets/canvas.d.ts
@@ -252,14 +252,7 @@ declare class Path2D extends CanvasPath {
* Describes an opaque object of a template, which is created using the createPattern() method.
* @since 8
*/
-declare interface CanvasPattern {
- /**
- * Adds the matrix transformation effect to the current template.
- * @param transform transformation matrix
- * @since 8
- */
- setTransform(transform?: Matrix2D): void;
-}
+declare type CanvasPattern = import('../api/@internal/full/canvaspattern').CanvasPattern;
/**
* Size information of the text
@@ -1061,7 +1054,7 @@ declare class OffscreenCanvasRenderingContext2D extends CanvasRenderer {
* @param settings Drawing attribute. For details, see {@link RenderingContextSettings}.
* @since 8
*/
- constructor(width: number, height: number,settings?: RenderingContextSettings);
+ constructor(width: number, height: number, settings?: RenderingContextSettings);
}
/**
@@ -1116,5 +1109,6 @@ declare class CanvasAttribute extends CommonMethod {
*/
onReady(event: () => void): CanvasAttribute;
}
+
declare const Canvas: CanvasInterface;
declare const CanvasInstance: CanvasAttribute;
diff --git a/api/@internal/component/ets/checkbox.d.ts b/api/@internal/component/ets/checkbox.d.ts
index c66216a3398fc46911be175a9dc2eae4f8f4b4f0..adc255a0850ab69a12da8a844eed1e29690c0aeb 100644
--- a/api/@internal/component/ets/checkbox.d.ts
+++ b/api/@internal/component/ets/checkbox.d.ts
@@ -14,21 +14,21 @@
*/
/**
- * Defines the option of Checkbox.
+ * Defines the options of Checkbox.
* @since 8
*/
-declare interface CheckboxOption {
+declare interface CheckboxOptions {
/**
* Current name of Checkbox.
* @since 8
*/
- name?: string;
+ name?: string;
/**
* Sets the group of Checkbox.
* @since 8
*/
- group?: string;
+ group?: string;
}
/**
@@ -41,7 +41,7 @@ interface CheckboxInterface {
* Called when the Checkbox component is used.
* @since 8
*/
- (options?: CheckboxOption): CheckboxAttribute;
+ (options?: CheckboxOptions): CheckboxAttribute;
}
/**
@@ -53,13 +53,13 @@ declare class CheckboxAttribute extends CommonMethod {
* setting whether checkbox is selected.
* @since 8
*/
- select(value: boolean): CheckboxAttribute;
+ select(value: boolean): CheckboxAttribute;
/**
* setting the display color of checkbox.
* @since 8
*/
- selectedColor(value: ResourceColor): CheckboxAttribute;
+ selectedColor(value: ResourceColor): CheckboxAttribute;
/**
* Called when the selection status changes.
diff --git a/api/@internal/component/ets/checkboxgroup.d.ts b/api/@internal/component/ets/checkboxgroup.d.ts
index 3fee2e97cd34e1d47790488a54af2448f3f52161..16695f09d2ee68c454c758613e1fe8726dfe006c 100644
--- a/api/@internal/component/ets/checkboxgroup.d.ts
+++ b/api/@internal/component/ets/checkboxgroup.d.ts
@@ -36,19 +36,19 @@ declare enum SelectStatus {
}
/**
- * Defines the option of CheckboxGroup.
+ * Defines the options of CheckboxGroup.
* @since 8
*/
-declare interface CheckboxGroupOption {
+declare interface CheckboxGroupOptions {
/**
* Setting the group of CheckboxGroup.
* @since 8
*/
- group?: string;
+ group?: string;
}
/**
- * Defines the option of CheckboxGroupResult.
+ * Defines the options of CheckboxGroupResult.
* @since 8
*/
declare interface CheckboxGroupResult {
@@ -56,12 +56,12 @@ declare interface CheckboxGroupResult {
* Checkbox name.
* @since 8
*/
- name: Array;
+ name: Array;
/**
* Set the group of status.
* @since 8
*/
- status: SelectStatus;
+ status: SelectStatus;
}
/**
@@ -73,7 +73,7 @@ interface CheckboxGroupInterface {
* Called when the CheckboxGroup component is used.
* @since 8
*/
- (options?: CheckboxGroupOption): CheckboxGroupAttribute;
+ (options?: CheckboxGroupOptions): CheckboxGroupAttribute;
}
/**
@@ -85,13 +85,13 @@ declare class CheckboxGroupAttribute extends CommonMethod PropertyDecorator;
*/
declare const Watch: (value: string) => PropertyDecorator;
-
/**
* Defining Builder MethodDecorator
* @since 7
@@ -141,34 +140,29 @@ declare interface Configuration {
/**
* Defines the data type of the interface restriction.
- * @devices phone, tablet, car
* @since 8
*/
declare interface Rectangle {
/**
* x:Horizontal coordinate
- * @devices phone, tablet, car
* @since 8
*/
x?: Length;
/**
* y:Vertical axis coordinate.
- * @devices phone, tablet, car
* @since 8
*/
y?: Length;
/**
* Sets the width of the current touchRect.
- * @devices phone, tablet, car
* @since 8
*/
width?: Length;
/**
* Sets the height of the current touchRect.
- * @devices phone, tablet, car
* @since 8
*/
height?: Length;
@@ -177,6 +171,7 @@ declare interface Rectangle {
/**
* Defining isSystemplugin Constants.
* @since 7
+ * @systemapi
*/
declare const isSystemplugin: (...args: string[]) => any;
@@ -193,42 +188,290 @@ declare function $r(value: string, ...params: any[]): Resource;
declare function $rawfile(value: string): Resource;
/**
- * global getContentStorage function
- * @since 8
- */
-declare function getContentStorage(value: any): ContentStorage;
-
-declare type Context = any;
-
-/**
- * global getContext function
- * @since 8
+ * Defines the animate function params.
+ * @since 7
*/
-declare function getContext(value: any): Context;
-
-interface AnimateToParam {
+declare interface AnimateParam {
+ /**
+ * Animation duration, in ms.
+ * @since 7
+ */
duration?: number;
+ /**
+ * Animation playback speed. A larger value indicates faster animation playback, and a smaller value indicates slower
+ * animation playback. The value 0 means that there is no animation.
+ * @since 7
+ */
tempo?: number;
+ /**
+ * Animation curve.
+ * @since 7
+ */
curve?: Curve | string;
+ /**
+ * Animation playback mode. By default, the animation is played from the beginning after the playback is complete.
+ * @since 7
+ */
delay?: number;
+ /**
+ * Animation playback mode. By default, the animation is played from the beginning after the playback is complete.
+ * @since 7
+ */
iterations?: number;
+ /**
+ * Animation playback mode. By default, the animation is played from the beginning after the playback is complete.
+ * @since 7
+ */
playMode?: PlayMode;
+ /**
+ * Callback invoked when the animation playback is complete.
+ * @since 7
+ */
onFinish?: () => void;
}
+/**
+ * Defines the motion path options.
+ * @since 7
+ */
+declare interface MotionPathOptions {
+ /**
+ * The path info.
+ * @since 7
+ */
+ path: string;
+ /**
+ * The origin point info.
+ * @since 7
+ */
+ from?: number;
+ /**
+ * The distance point info.
+ * @since 7
+ */
+ to?: number;
+ /**
+ * The rotate info.
+ * @since 7
+ */
+ rotatable?: boolean;
+}
+
+/**
+ * Defines the shard transition function params.
+ * @since 7
+ */
+declare interface sharedTransitionOptions {
+ /**
+ * Animation duration, in ms.
+ * @since 7
+ */
+ duration?: number;
+ /**
+ * Animation duration, in ms.
+ * @since 7
+ */
+ curve?: Curve | string;
+ /**
+ * Animation playback mode. By default, the animation is played from the beginning after the playback is complete.
+ * @since 7
+ */
+ delay?: number;
+ /**
+ * The motion path info.
+ * @since 7
+ */
+ motionPath?: MotionPathOptions;
+ /**
+ * Z index info.
+ * @since 7
+ */
+ zIndex?: number;
+ /**
+ * the animate type.
+ * @since 7
+ */
+ type?: SharedTransitionEffectType;
+}
+
+/**
+ * Defines the options of translate.
+ * @since 7
+ */
+declare interface TranslateOptions {
+ /**
+ * The param of x direction.
+ * @since 7
+ */
+ x?: number | string;
+ /**
+ * The param of y direction.
+ * @since 7
+ */
+ y?: number | string;
+ /**
+ * The param of z direction.
+ * @since 7
+ */
+ z?: number | string;
+}
+
+/**
+ * Defines the options of scale.
+ * @since 7
+ */
+declare interface ScaleOptions {
+ /**
+ * The param of x direction.
+ * @since 7
+ */
+ x?: number;
+ /**
+ * The param of y direction.
+ * @since 7
+ */
+ y?: number;
+ /**
+ * The param of z direction.
+ * @since 7
+ */
+ z?: number;
+ /**
+ * The param of center point of x.
+ * @since 7
+ */
+ centerX?: number | string;
+ /**
+ * The param of center point of y.
+ * @since 7
+ */
+ centerY?: number | string;
+}
+
+declare interface RotateOptions {
+ /**
+ * The param of x direction.
+ * @since 7
+ */
+ x?: number;
+ /**
+ * The param of y direction.
+ * @since 7
+ */
+ y?: number;
+ /**
+ * The param of z direction.
+ * @since 7
+ */
+ z?: number;
+ /**
+ * The param of center point of x.
+ * @since 7
+ */
+ centerX?: number | string;
+ /**
+ * The param of center point of y.
+ * @since 7
+ */
+ centerY?: number | string;
+ /**
+ * The param of angle.
+ * @since 7
+ */
+ angle: number | string;
+}
+
+/**
+ * Defines the param of transition.
+ * @since 7
+ */
+declare interface TransitionOptions {
+ /**
+ * Defines the param of type.
+ * @since 7
+ */
+ type?: TransitionType;
+ /**
+ * Defines the param of opacity.
+ * @since 7
+ */
+ opacity?: number;
+ /**
+ * Defines the param of translate.
+ * @since 7
+ */
+ translate?: TranslateOptions;
+ /**
+ * Defines the param of scale.
+ * @since 7
+ */
+ scale?: ScaleOptions;
+ /**
+ * Defines the param of rotate.
+ * @since 7
+ */
+ rotate?: RotateOptions;
+}
+
/**
* Define Preview property
* @since 8
+ * @systemapi
*/
interface PreviewParams {
+ /**
+ * Define Preview title
+ * @since 8
+ * @systemapi
+ */
title?: string;
+ /**
+ * Define Preview width
+ * @since 8
+ * @systemapi
+ */
width?: number;
+ /**
+ * Define Preview height
+ * @since 8
+ * @systemapi
+ */
height?: number;
+ /**
+ * Define Preview locale
+ * @since 8
+ * @systemapi
+ */
locale?: string;
+ /**
+ * Define Preview colorMode
+ * @since 8
+ * @systemapi
+ */
colorMode?: string;
+ /**
+ * Define Preview deviceType
+ * @since 8
+ * @systemapi
+ */
deviceType?: string;
+ /**
+ * Define Preview dpi
+ * @since 8
+ * @systemapi
+ */
dpi?: number;
+ /**
+ * Define Preview orientation
+ * @since 8
+ * @systemapi
+ */
orientation?: string;
+ /**
+ * Define Preview roundScreen
+ * @since 8
+ * @systemapi
+ */
roundScreen?: boolean;
}
@@ -236,7 +479,7 @@ interface PreviewParams {
* ItemDragInfo object description
* @since 8
*/
-interface ItemDragInfo {
+declare interface ItemDragInfo {
/**
* Obtains the X coordinate of the drag window, in vp.
* @since 8
@@ -254,7 +497,7 @@ interface ItemDragInfo {
* DragItemInfo object description
* @since 8
*/
-interface DragItemInfo {
+declare interface DragItemInfo {
/**
* Uses the pixelMap object for drawing.
* @since 8
@@ -274,17 +517,11 @@ interface DragItemInfo {
extraInfo?: string;
}
-/**
- * Defining syscap function.
- * @since 8
- */
-declare function canIUse(syscap: string): boolean;
-
/**
* Defining animation function.
* @since 7
*/
-declare function animateTo(value: AnimateToParam, event: () => void): void;
+declare function animateTo(value: AnimateParam, event: () => void): void;
/**
* Converts a value in vp units to a value in px.
@@ -326,7 +563,7 @@ declare function px2lpx(value: number): number;
* Defines the event target.
* @since 8
*/
-interface EventTarget {
+declare interface EventTarget {
/**
* Area of current target.
* @since 8
@@ -362,7 +599,7 @@ declare enum SourceType {
* Defines the base event.
* @since 8
*/
-interface BaseEvent {
+declare interface BaseEvent {
/**
* Defines the current target which fires this event.
* @since 8
@@ -386,7 +623,7 @@ interface BaseEvent {
* The tap action triggers this method invocation.
* @since 7
*/
-interface ClickEvent extends BaseEvent {
+declare interface ClickEvent extends BaseEvent {
/**
* X coordinate of the click point relative to the left edge of the device screen.
* @since 7
@@ -416,7 +653,7 @@ interface ClickEvent extends BaseEvent {
* The mouse click action triggers this method invocation.
* @since 8
*/
-interface MouseEvent extends BaseEvent {
+declare interface MouseEvent extends BaseEvent {
/**
* Mouse button of the click event.
* @since 8
@@ -464,7 +701,7 @@ interface MouseEvent extends BaseEvent {
* Type of the touch event.
* @since 7
*/
-interface TouchObject {
+declare interface TouchObject {
/**
* Type of the touch event.
* @since 7
@@ -506,7 +743,7 @@ interface TouchObject {
* Touch Action Function Parameters
* @since 7
*/
-interface TouchEvent extends BaseEvent {
+declare interface TouchEvent extends BaseEvent {
/**
* Type of the touch event.
* @since 7
@@ -532,13 +769,21 @@ interface TouchEvent extends BaseEvent {
stopPropagation?: () => void;
}
+/**
+ * Defines the PixelMap type object for ui component.
+ * @since 7
+ */
+declare type PixelMap = PixelMapMock;
+
/**
* pixelmap object with release function.
+ * @systemapi
* @since 7
*/
-declare class PixelMap {
+declare interface PixelMapMock {
/**
* release function.
+ * @systemapi
* @since 7
*/
release(): void;
@@ -548,7 +793,7 @@ declare class PixelMap {
* DragEvent object description
* @since 7
*/
-interface DragEvent {
+declare interface DragEvent {
/**
* Obtains the X coordinate of the drag window, in vp.
* @since 7
@@ -566,7 +811,7 @@ interface DragEvent {
* KeyEvent object description:
* @since 7
*/
-interface KeyEvent {
+declare interface KeyEvent {
/**
* Type of a key.
* @since 7
@@ -621,7 +866,7 @@ interface KeyEvent {
* Component State Styels.
* @since 8
*/
-interface StateStyels {
+declare interface StateStyles {
/**
* Defines normal state styles.
* @since 8
@@ -653,7 +898,11 @@ interface StateStyels {
clicked?: any;
}
-interface PopupOption {
+/**
+ * Defines the popup options.
+ * @since 7
+ */
+declare interface PopupOptions {
/**
* Information in the pop-up window.
* @since 7
@@ -709,7 +958,11 @@ interface PopupOption {
onStateChange?: (event: { isVisible: boolean }) => void;
}
-interface CustomPopupOption {
+/**
+ * Defines the custom popup options.
+ * @since 8
+ */
+declare interface CustomPopupOptions {
/**
* builder of popup
* @since 8
@@ -754,13 +1007,15 @@ interface CustomPopupOption {
}
/**
- * CommonMethod
+ * CommonMethod.
* @since 7
*/
declare class CommonMethod {
/**
* constructor.
+ * @systemapi
* @since 7
+ * @ignore
*/
constructor();
@@ -778,7 +1033,6 @@ declare class CommonMethod {
/**
* Sets the response region of the current component.
- * @devices phone, tablet, car
* @since 8
*/
responseRegion(value: Array | Rectangle): T;
@@ -787,42 +1041,35 @@ declare class CommonMethod {
* The size of the current component.
* @since 7
*/
- size(value: { width?: Length; height?: Length }): T;
+ size(value: SizeOptions): T;
/**
* constraint Size:
* minWidth:minimum Width,maxWidth:maximum Width,minHeight:minimum Height ,maxHeight:maximum Height,
* @since 7
*/
- constraintSize(value: {
- minWidth?: number | string | Resource;
- maxWidth?: number | string | Resource;
- minHeight?: number | string | Resource;
- maxHeight?: number | string | Resource;
- }): T;
+ constraintSize(value: ConstraintSizeOptions): T;
/**
* Sets the touchable of the current component
- * @devices phone, tablet, car
- * @since 8
+ * @since 7
*/
touchable(value: boolean): T;
/**
* layout Weight
- * @devices phone, tablet, car.
* @since 7
*/
layoutWeight(value: number | string): T;
/**
- * Inner margin
+ * Inner margin.
* @since 7
*/
padding(value: Padding | Length): T;
/**
- * Outer Margin
+ * Outer Margin.
* @since 7
*/
margin(value: Margin | Length): T;
@@ -831,32 +1078,27 @@ declare class CommonMethod {
* Background color
* @since 7
*/
- backgroundColor(value: Color | number | string | Resource): T;
+ backgroundColor(value: ResourceColor): T;
/**
* Background image
* src: Image address url
* @since 7
*/
- backgroundImage(src: string | Resource, repeat?: ImageRepeat): T;
+ backgroundImage(src: ResourceStr, repeat?: ImageRepeat): T;
/**
* Background image size
* @since 7
*/
- backgroundImageSize(
- value: {
- width?: number | string | Resource;
- height?: number | string | Resource
- } | ImageSize
- ): T;
+ backgroundImageSize(value: SizeOptions | ImageSize): T;
/**
* Background image position
* x:Horizontal coordinate;y:Vertical axis coordinate.
* @since 7
*/
- backgroundImagePosition(value: { x?: number | string | Resource; y?: number | string | Resource } | Alignment): T;
+ backgroundImagePosition(value: Position | Alignment): T;
/**
* Opacity
@@ -869,12 +1111,7 @@ declare class CommonMethod {
* width:Border width;color:Border color;radius:Border radius;
* @since 7
*/
- border(value: {
- width?: number | string | Resource;
- color?: Color | number | string | Resource;
- radius?: number | string | Resource;
- style?: BorderStyle;
- }): T;
+ border(value: BorderOptions): T;
/**
* Border style
@@ -886,19 +1123,19 @@ declare class CommonMethod {
* Border width
* @since 7
*/
- borderWidth(value: number | string | Resource): T;
+ borderWidth(value: Length): T;
/**
* Border color
* @since 7
*/
- borderColor(value: Color | number | string | Resource): T;
+ borderColor(value: ResourceColor): T;
/**
* Border radius
* @since 7
*/
- borderRadius(value: number | string | Resource): T;
+ borderRadius(value: Length): T;
/**
* Trigger a click event when a click is clicked.
@@ -940,68 +1177,31 @@ declare class CommonMethod {
* Set focusable.
* @since 8
*/
- focusable(value: boolean): T;
+ focusable(value: boolean): T;
/**
* Trigger a event when got focus.
* @since 8
*/
- onFocus(event: () => void): T;
+ onFocus(event: () => void): T;
/**
* Trigger a event when lose focus.
* @since 8
*/
- onBlur(event: () => void): T;
-
- /**
- * Trigger a event when focus move.
- * @since 8
- */
- onFocusMove(event: (direction?: FocusDirection) => void): T;
+ onBlur(event: () => void): T;
/**
* animation
* @since 7
*/
- animation(value: {
- duration?: number;
- tempo?: number;
- curve?: Curve | string;
- delay?: number;
- iterations?: number;
- playMode?: PlayMode;
- onFinish?: () => void;
- }): T;
+ animation(value: AnimateParam): T;
/**
* Transition parameter
* @since 7
*/
- transition(value: {
- type?: TransitionType;
- opacity?: number;
- translate?: {
- x?: number | string;
- y?: number | string;
- z?: number | string;
- };
- scale?: {
- x?: number;
- y?: number;
- z?: number;
- centerX?: number | string;
- centerY?: number | string;
- };
- rotate?: {
- x?: number;
- y?: number;
- z?: number;
- centerX?: number | string;
- centerY?: number | string;
- angle: number | string;
- };
- }): T;
+ transition(value: TransitionOptions): T;
/**
* Bind gesture recognition.
@@ -1105,13 +1305,13 @@ declare class CommonMethod {
* When this parameter is set together with slide, slide takes effect by default.
* @since 7
*/
- translate(value: { x?: number | string; y?: number | string; z?: number | string }): T;
+ translate(value: TranslateOptions): T;
/**
* Sets the zoom effect during page transition. The value is the start point of entry and end point of exit.
* @since 7
*/
- scale(value: { x?: number; y?: number; z?: number; centerX?: number | string; centerY?: number | string }): T;
+ scale(value: ScaleOptions): T;
/**
* Default number of occupied columns, indicating the number of occupied grid columns when the number of columns (span) of the corresponding size is not set in the useSizeType attribute.
@@ -1131,14 +1331,7 @@ declare class CommonMethod {
* The values are the start point during insertion and the end point during deletion.
* @since 7
*/
- rotate(value: {
- x?: number;
- y?: number;
- z?: number;
- centerX?: number | string;
- centerY?: number | string;
- angle: number | string;
- }): T;
+ rotate(value: RotateOptions): T;
/**
* Sets the transformation matrix for the current component.
@@ -1159,7 +1352,7 @@ declare class CommonMethod {
onDisAppear(event: () => void): T;
/**
- * This callback is triggered when the size or position of this component has changed.
+ * This callback is triggered when the size or position of this component change finished.
* @param event event callback.
* @since 8
*/
@@ -1211,22 +1404,7 @@ declare class CommonMethod {
* If the components of the two pages are configured with the same ID, the shared element transition is performed during transition. If the parameter is set to an empty string, the shared element transition does not occur. For details about the options parameter, see the options parameter description.
* @since 7
*/
- sharedTransition(
- id: string,
- options?: {
- duration?: number;
- curve?: Curve | string;
- delay?: number;
- motionPath?: {
- path: string;
- from?: number;
- to?: number;
- rotatable?: boolean;
- };
- zIndex?: number;
- type?: SharedTransitionEffectType;
- },
- ): T;
+ sharedTransition(id: string, options?: sharedTransitionOptions): T;
/**
* Sets the sliding direction. The enumerated value supports logical AND (&) and logical OR (|).
@@ -1244,20 +1422,20 @@ declare class CommonMethod {
* position
* @since 7
*/
- position(value: { x?: number | string | Resource; y?: number | string | Resource }): T;
+ position(value: Position): T;
/**
* Sets the anchor point of the element when it is positioned. The base point is offset from the top start point of the element.
* @since 7
*/
- markAnchor(value: { x?: number | string | Resource; y?: number | string | Resource }): T;
+ markAnchor(value: Position): T;
/**
* Coordinate offset relative to the layout completion position.
* Setting this attribute does not affect the layout of the parent container. The position is adjusted only during drawing.
* @since 7
*/
- offset(value: { x?: number | string | Resource; y?: number | string | Resource }): T;
+ offset(value: Position): T;
/**
* If the value is true, the component is available and can respond to operations such as clicking.
@@ -1371,7 +1549,7 @@ declare class CommonMethod {
* rotatble:Whether to follow the path for rotation.
* @since 7
*/
- motionPath(value: { path: string; from?: number; to?: number; rotatable?: boolean }): T;
+ motionPath(value: MotionPathOptions): T;
/**
* Add a shadow effect to the current component
@@ -1400,6 +1578,8 @@ declare class CommonMethod {
/**
* Key. User can set an key to the component to identify it.
* @since 8
+ * @systemapi
+ * @test
*/
key(value: string): T;
@@ -1419,7 +1599,7 @@ declare class CommonMethod {
* Popup control
* @since 7
*/
- bindPopup(show: boolean, popup: PopupOption | CustomPopupOption): T;
+ bindPopup(show: boolean, popup: PopupOptions | CustomPopupOptions): T;
/**
* Menu control
@@ -1431,13 +1611,13 @@ declare class CommonMethod {
* ContextMenu control
* @since 8
*/
- bindContextMenu(content: CustomBuilder, responseType : ResponseType): T;
+ bindContextMenu(content: CustomBuilder, responseType: ResponseType): T;
/**
* Sets styles for component state.
* @since 8
*/
- stateStyles(value: StateStyels): T;
+ stateStyles(value: StateStyles): T;
/**
* id for distrubte identification.
@@ -1447,13 +1627,13 @@ declare class CommonMethod {
}
/**
- * CommonAttribute
+ * CommonAttribute for ide.
* @since 7
*/
declare class CommonAttribute extends CommonMethod {}
/**
- * CommonInterface
+ * CommonInterface for ide.
* @since 7
*/
interface CommonInterface {
@@ -1461,13 +1641,13 @@ interface CommonInterface {
}
/**
- * CommonInstance
+ * CommonInstance for ide.
* @since 7
*/
declare const CommonInstance: CommonAttribute;
/**
- * Common
+ * Common for ide.
* @since 7
*/
declare const Common: CommonInterface;
@@ -1486,6 +1666,7 @@ declare class CommonShapeMethod extends CommonMethod {
/**
* constructor.
* @since 7
+ * @syetemapi
*/
constructor();
@@ -1493,13 +1674,13 @@ declare class CommonShapeMethod extends CommonMethod {
* border Color
* @since 7
*/
- stroke(value: Color | number | string | Resource): T;
+ stroke(value: ResourceColor): T;
/**
* Fill color.
* @since 7
*/
- fill(value: Color | number | string | Resource): T;
+ fill(value: ResourceColor): T;
/**
* Offset from the start point of the border drawing.
@@ -1541,7 +1722,7 @@ declare class CommonShapeMethod extends CommonMethod {
* Sets the width of the dividing line.
* @since 7
*/
- strokeWidth(value: number | string | Resource): T;
+ strokeWidth(value: Length): T;
/**
* Indicates whether to enable anti-aliasing
@@ -1578,16 +1759,45 @@ declare class CustomComponent {
* @since 7
*/
aboutToDisappear?(): void;
+
+ /**
+ * onPageShow Method
+ * @since 7
+ */
+ onPageShow?(): void;
+
+ /**
+ * onPageHide Method
+ * @since 7
+ */
+ onPageHide?(): void;
+
+ /**
+ * onBackPress Method
+ * @since 7
+ */
+ onBackPress?(): void;
}
/**
* View
* @ignore ide should ignore this class
+ * @systemapi
+ * @since 7
*/
declare class View {
/**
* Just use for generate tsbundle
* @ignore ide should ignore this arrtibute
+ * @systemapi
+ * @since 7
*/
create(value: any): any;
}
+
+declare module "SpecialEvent" {
+ module "SpecialEvent" {
+ // @ts-ignore
+ export { TouchObject, KeyEvent, MouseEvent };
+ }
+}
diff --git a/api/@internal/component/ets/custom_dialog_controller.d.ts b/api/@internal/component/ets/custom_dialog_controller.d.ts
index f208a905785be27f76a992eedab3d378025097ff..c0686ea814e4b35b9b29656c644f81941aa2951e 100644
--- a/api/@internal/component/ets/custom_dialog_controller.d.ts
+++ b/api/@internal/component/ets/custom_dialog_controller.d.ts
@@ -15,10 +15,10 @@
/**
- * Defines the option of CustomDialogController.
+ * Defines the options of CustomDialogController.
* @since 7
*/
-declare interface CustomDialogControllerOption {
+declare interface CustomDialogControllerOptions {
/**
* Custom builder function.
* @since 7
@@ -71,7 +71,7 @@ declare class CustomDialogController {
* The constructor transfers parameter settings.
* @since 7
*/
- constructor(value: CustomDialogControllerOption);
+ constructor(value: CustomDialogControllerOptions);
/**
* Display the content of the customized pop-up window. If the content has been displayed, it does not take effect.
diff --git a/api/@internal/component/ets/data_panel.d.ts b/api/@internal/component/ets/data_panel.d.ts
index 82d6f4c68b00d7197d82962285509577acdf8e30..9a702b2b2ef3e159ad7ae81d09314f1afc86098e 100644
--- a/api/@internal/component/ets/data_panel.d.ts
+++ b/api/@internal/component/ets/data_panel.d.ts
@@ -33,10 +33,10 @@ declare enum DataPanelType {
}
/**
- * Defines the option of DataPanel.
+ * Defines the options of DataPanel.
* @since 7
*/
-declare interface DataPanelOption {
+declare interface DataPanelOptions {
/**
* Current data value. the max length is 9.
* @since 7
@@ -65,7 +65,7 @@ interface DataPanelInterface {
* Return a DataPanel.
* @since 7
*/
- (options: DataPanelOption): DataPanelAttribute;
+ (options: DataPanelOptions): DataPanelAttribute;
}
/**
diff --git a/api/@internal/component/ets/date_picker.d.ts b/api/@internal/component/ets/date_picker.d.ts
index d5c55b20326d52915413b59f6e530182066a9787..02c116589efa4388800628ddaedbebd30913fed4 100644
--- a/api/@internal/component/ets/date_picker.d.ts
+++ b/api/@internal/component/ets/date_picker.d.ts
@@ -13,24 +13,6 @@
* limitations under the License.
*/
-/**
- * Defines the type of DatePicker.
- * @since 8
- */
-declare enum DatePickerType {
- /**
- * Application hour and second
- * @since 8
- */
- Time,
-
- /**
- * Application data
- * @since 8
- */
- Date,
-}
-
/**
* Defines the struct of DatePickerResult.
* @since 8
@@ -53,49 +35,29 @@ declare interface DatePickerResult {
* @since 8
*/
day?: number;
-
- /**
- * Application hour
- * @since 8
- */
- hour?: number;
-
- /**
- * Application minute
- * @since 8
- */
- minute?: number;
-
- /**
- * Application second
- * @since 8
- */
- second?: number;
}
/**
- * Defines the option of DatePicker.
+ * Defines the options of DatePicker.
* @since 8
*/
-declare interface DatePickerOption {
+declare interface DatePickerOptions {
/**
* Specifies the start date of the date selector.
+ * @since 8
*/
start?: Date;
/**
* Specifies the end date for the date selector.
+ * @since 8
*/
end?: Date;
/**
* Specifies the date selector check date or time selector check time.
+ * @since 8
*/
selected?: Date;
-
- /**
- * Selector type, including date selector and time selector. By default, the date selector is used.
- */
- type?: DatePickerType;
}
/**
@@ -107,7 +69,7 @@ interface DatePickerInterface {
* Defines the DatePicker constructor.
* @since 8
*/
- (options?: DatePickerOption): DatePickerAttribute;
+ (options?: DatePickerOptions): DatePickerAttribute;
}
/**
@@ -121,12 +83,6 @@ declare class DatePickerAttribute extends CommonMethod {
*/
lunar(value: boolean): DatePickerAttribute;
- /**
- * Time Selector: indicates whether to display the 24-hour clock.
- * @since 8
- */
- useMilitaryTime(value: boolean): DatePickerAttribute;
-
/**
* This event is triggered when a DatePicker date or time is selected.
* @since 8
@@ -135,20 +91,16 @@ declare class DatePickerAttribute extends CommonMethod {
}
/**
- * Defines the DatePickerDialogOption for Data Picker Dialog.
+ * Defines the DatePickerDialogOptions for Data Picker Dialog.
* @since 8
*/
-declare interface DatePickerDialogOption extends DatePickerOption {
+declare interface DatePickerDialogOptions extends DatePickerOptions {
/**
* Date selector: true: displays the lunar calendar. false: The lunar calendar is not displayed.
* @since 8
*/
lunar?: boolean;
- /**
- * Time Selector: indicates whether to display the 24-hour clock.
- * @since 8
- */
- useMilitaryTime?: boolean;
+
/**
* Called when the OK button in the dialog is clicked.
* @since 8
@@ -175,7 +127,7 @@ declare class DatePickerDialog {
* Invoking method display.
* @since 8
*/
- static show(options?: DatePickerDialogOption);
+ static show(options?: DatePickerDialogOptions);
}
declare const DatePicker: DatePickerInterface;
diff --git a/api/@internal/component/ets/divider.d.ts b/api/@internal/component/ets/divider.d.ts
index 4ee88aa42e24c44c25e9f4d0d61aa9e2edad3633..67ce98ac5debfff200f3423a798fb40e20f2e37f 100644
--- a/api/@internal/component/ets/divider.d.ts
+++ b/api/@internal/component/ets/divider.d.ts
@@ -13,7 +13,6 @@
* limitations under the License.
*/
-
/**
* Provides a divider component to separate different content blocks/content elements.
* @since 7
@@ -57,5 +56,5 @@ declare class DividerAttribute extends CommonMethod {
lineCap(value: LineCapStyle): DividerAttribute;
}
-declare const Divider: DividerInterface
+declare const Divider: DividerInterface;
declare const DividerInstance: DividerAttribute;
diff --git a/api/@internal/component/ets/ellipse.d.ts b/api/@internal/component/ets/ellipse.d.ts
index 2ba7cdbbba6274970b5ec0f5cdd74d899db71117..2b207f95085f3a4537fb8b0170f068ea2349999d 100644
--- a/api/@internal/component/ets/ellipse.d.ts
+++ b/api/@internal/component/ets/ellipse.d.ts
@@ -13,7 +13,6 @@
* limitations under the License.
*/
-
/**
* Ellipse drawing.
* @since 7
diff --git a/api/@internal/component/ets/enums.d.ts b/api/@internal/component/ets/enums.d.ts
index bf60ad002433926b4f6e0c48cd52646d85a7f623..518e2efabf457a584b22d6b2321ea1a507f7b164 100644
--- a/api/@internal/component/ets/enums.d.ts
+++ b/api/@internal/component/ets/enums.d.ts
@@ -274,13 +274,7 @@ declare enum MouseAction {
* Triggered when the mouse is Hovered.
* @since 8
*/
- Hover,
-
- /**
- * Triggered when the mouse status is None.
- * @since 8
- */
- None,
+ Hover
}
/**
@@ -457,60 +451,6 @@ declare enum PlayMode {
AlternateReverse,
}
-/**
- * This style allows you to set the window blurring degree and blurring style of the current component layout range,
- * @since 7
- */
-declare enum BlurStyle {
- /**
- * Small range glow effect.
- * @since 7
- */
- SmallLight,
-
- /**
- * Medium range glow effect.
- * @since 7
- */
- MediumLight,
-
- /**
- * Wide range of luminous effects.
- * @since 7
- */
- LargeLight,
-
- /**
- * Super-range luminous effect.
- * @since 7
- */
- XlargeLight,
-
- /**
- * Small range of dark effects.
- * @since 7
- */
- SmallDark,
-
- /**
- * Medium range dark effect.
- * @since 7
- */
- MediumDark,
-
- /**
- * Wide range of dark effects.
- * @since 7
- */
- LargeDark,
-
- /**
- * Extra large range of dark effects.
- * @since 7
- */
- XlargeDark,
-}
-
/**
* Type of a key.
* @since 7
@@ -667,42 +607,6 @@ declare enum Direction {
Auto,
}
-/**
- * Sets the horizontal layout of elements.
- * @since 8
- */
-declare enum FocusDirection {
- /**
- * From the key up.
- * @since 8
- */
- Up,
-
- /**
- * From the key down.
- * @since 8
- */
- Down,
-
- /**
- * From the key left.
- * @since 8
- */
- Left,
-
- /**
- * From the key right.
- * @since 8
- */
- Right,
-
- /**
- * From the key tab.
- * @since 8
- */
- Tab,
-}
-
/**
* Used to set the status of the scroll bar.
* @since 7
@@ -1449,7 +1353,7 @@ declare enum HoverEffect {
* Highlight effect
* @since 8
*/
- Board,
+ Highlight,
/**
* None effect
diff --git a/api/@internal/component/ets/flex.d.ts b/api/@internal/component/ets/flex.d.ts
index 0e6bb92157dfb4a59f4214380a00e2bcea6ae5b2..a22e7c704c5c2801c0c660a4c5038bea99bdddb7 100644
--- a/api/@internal/component/ets/flex.d.ts
+++ b/api/@internal/component/ets/flex.d.ts
@@ -14,10 +14,10 @@
*/
/**
- * Defines the option of Flex.
+ * Defines the options of Flex.
* @since 7
*/
-declare interface FlexOption {
+declare interface FlexOptions {
/**
* Sets the horizontal layout of elements.
* @since 7
@@ -58,7 +58,7 @@ interface FlexInterface {
* Defines the constructor of Flex.
* @since 7
*/
- (value?: FlexOption): FlexAttribute;
+ (value?: FlexOptions): FlexAttribute;
}
/**
diff --git a/api/@internal/component/ets/for_each.d.ts b/api/@internal/component/ets/for_each.d.ts
index d1e8c71767b13b0655f5eabebe878514378aa4b4..f6bf97cf24a4e5719cf5c22849edf0b8fdabfe8f 100644
--- a/api/@internal/component/ets/for_each.d.ts
+++ b/api/@internal/component/ets/for_each.d.ts
@@ -14,7 +14,7 @@
*/
/**
- * looping
+ * looping function.
* @since 7
*/
interface ForEachInterface {
@@ -29,8 +29,4 @@ interface ForEachInterface {
): ForEachInterface;
}
-/**
- * @devices phone, tablet, car
- * @since 7
- */
declare const ForEach: ForEachInterface;
diff --git a/api/@internal/component/ets/form_component.d.ts b/api/@internal/component/ets/form_component.d.ts
index 1d3fa7dfdd56e0ff2605ab27801d6f5ecee3ff10..e94054f90fc62702d70c57a1d4e7993ddf680d4c 100644
--- a/api/@internal/component/ets/form_component.d.ts
+++ b/api/@internal/component/ets/form_component.d.ts
@@ -13,7 +13,6 @@
* limitations under the License.
*/
-
/**
* Defines the FormDimension enum.
* @since 7
@@ -132,6 +131,13 @@ declare class FormComponentAttribute extends CommonMethod void): FormComponentAttribute;
+
+ /**
+ * Uninstall Card.
+ * @since 7
+ * @systemapi
+ */
+ onUninstall(callback: (info: { id: number }) => void): FormComponentAttribute;
}
declare const FormComponent: FormComponentInterface;
diff --git a/api/@internal/component/ets/gauge.d.ts b/api/@internal/component/ets/gauge.d.ts
index 6002fadf1e2c2b76349bb05cdfe4bb2a0adb9e89..cee7e983f4156cfe868dd554d96a19802c195cd0 100644
--- a/api/@internal/component/ets/gauge.d.ts
+++ b/api/@internal/component/ets/gauge.d.ts
@@ -59,8 +59,8 @@ declare class GaugeAttribute extends CommonMethod {
* Sets the thickness of the ring chart.
* @since 8
*/
- strokeWidth(length: number): GaugeAttribute;
+ strokeWidth(length: Length): GaugeAttribute;
}
-declare const Gauge: GaugeInterface
+declare const Gauge: GaugeInterface;
declare const GaugeInstance: GaugeAttribute;
diff --git a/api/@internal/component/ets/gesture.d.ts b/api/@internal/component/ets/gesture.d.ts
index a91f87a8593303880f2d89e5434ca595ff355c55..7f98ed77b28c3bcbd35b82fa14e0bcabb4d122f2 100644
--- a/api/@internal/component/ets/gesture.d.ts
+++ b/api/@internal/component/ets/gesture.d.ts
@@ -13,30 +13,6 @@
* limitations under the License.
*/
-/**
- * Creating an Object
- * @since 7
- */
-declare enum GestureDirection {
- /**
- * Sliding in all directions.
- * @since 7
- */
- All,
-
- /**
- * Sliding horizontally.
- * @since 7
- */
- Horizontal,
-
- /**
- * Sliding Vertical
- * @since 7
- */
- Vertical,
-}
-
/**
* Creating an Object
* @since 7
@@ -204,7 +180,7 @@ interface FingerInfo {
* @since 7
*/
declare type GestureType =
- | TapGestureInterface
+ TapGestureInterface
| LongPressGestureInterface
| PanGestureInterface
| PinchGestureInterface
@@ -341,10 +317,10 @@ interface LongPressGestureInterface {
}
/**
- * Defines the PanGesture option.
+ * Defines the PanGesture options.
* @since 7
*/
-declare class PanGestureOption {
+declare class PanGestureOptions {
/**
* Constructor parameters.
* @since 7
@@ -379,7 +355,7 @@ interface PanGestureInterface {
* Set the value.
* @since 7
*/
- (value?: { fingers?: number; direction?: PanDirection; distance?: number } | PanGestureOption): PanGestureInterface;
+ (value?: { fingers?: number; direction?: PanDirection; distance?: number } | PanGestureOptions): PanGestureInterface;
/**
* Pan gesture recognition success callback.
diff --git a/api/@internal/component/ets/grid.d.ts b/api/@internal/component/ets/grid.d.ts
index fb54634f35b985a9b9bedea76e1134248687a435..e58a4765bcee9799274ca04d52c879227b7de0d0 100644
--- a/api/@internal/component/ets/grid.d.ts
+++ b/api/@internal/component/ets/grid.d.ts
@@ -13,8 +13,8 @@
* limitations under the License.
*/
-
/**
+ * Defines the grid interface.
* @since 7
*/
interface GridInterface {
@@ -30,13 +30,30 @@ interface GridInterface {
* @since 8
*/
declare enum GridDirection {
+ /**
+ * The row direction.
+ * @since 8
+ */
Row,
+ /**
+ * The column direction.
+ * @since 8
+ */
Column,
+ /**
+ * The row reverse direction.
+ * @since 8
+ */
RowReverse,
- ColumnReverse
+ /**
+ * The column reverse direction.
+ * @since 8
+ */
+ ColumnReverse,
}
/**
+ * Defines the grid attibute functions.
* @since 7
*/
declare class GridAttribute extends CommonMethod {
@@ -112,10 +129,10 @@ declare class GridAttribute extends CommonMethod {
*/
maxCount(value: number): GridAttribute;
- /**
- * minCount
- * @since 8
- */
+ /**
+ * minCount
+ * @since 8
+ */
minCount(value: number): GridAttribute;
/**
@@ -166,8 +183,9 @@ declare class GridAttribute extends CommonMethod {
* This callback is triggered when the drag behavior is stopped within the scope of the component.
* @since 8
*/
- onItemDrop(event:
- (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void): GridAttribute;
+ onItemDrop(
+ event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void,
+ ): GridAttribute;
}
declare const Grid: GridInterface;
diff --git a/api/@internal/component/ets/grid_container.d.ts b/api/@internal/component/ets/grid_container.d.ts
index 86cacbe4285c3633a39b2a676310922122340997..28203fa47f53365ea30a523ac957abe7864e6577 100644
--- a/api/@internal/component/ets/grid_container.d.ts
+++ b/api/@internal/component/ets/grid_container.d.ts
@@ -50,10 +50,10 @@ declare enum SizeType {
}
/**
- * Defines the option of GridContainer.
+ * Defines the options of GridContainer.
* @since 7
*/
-declare interface GridContainerOption {
+declare interface GridContainerOptions {
/**
* Sets the total number of columns in the current layout.
* @since 7
@@ -88,7 +88,7 @@ interface GridContainerInterface {
* Defines the constructor of GridContainer.
* @since 7
*/
- (value?: GridContainerOption): GridContainerAttribute;
+ (value?: GridContainerOptions): GridContainerAttribute;
}
/**
diff --git a/api/ability/continueAbilityOptions.d.ts b/api/@internal/component/ets/hyperlink.d.ts
old mode 100755
new mode 100644
similarity index 51%
rename from api/ability/continueAbilityOptions.d.ts
rename to api/@internal/component/ets/hyperlink.d.ts
index 32c09d141425de7df7c76477511658ea6505d8c6..40751b2d28b0228f41b5266b250b72122e8cc0e6
--- a/api/ability/continueAbilityOptions.d.ts
+++ b/api/@internal/component/ets/hyperlink.d.ts
@@ -13,30 +13,31 @@
* limitations under the License.
*/
- /**
+/**
+ * Defines the hyperlink interface.
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
- * @permission N/A
*/
-export interface ContinueAbilityOptions {
+interface HyperlinkInterface {
/**
- * Indicates the ID of the target device where this ability will be migrated to.
- *
- * @default -
+ * Return to get Hyperlink.
+ * adress: Web page redirected by the hyperlink component.
+ * content: Hyperlinks in the hyperlink component display text.
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
- * @FAModelOnly
*/
- deviceId: string;
+ (address: string | Resource, content?: string | Resource): HyperlinkAttribute;
+}
+/**
+ * Defines the hyperlink attibute functions
+ * @since 7
+ */
+declare class HyperlinkAttribute extends CommonMethod {
/**
- * Indicates whether the ability to be migrated back to the local device through
- * This is a reserved field.
- *
- * @default -
+ * Set Color
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
- * @FAModelOnly
*/
- reversible?: boolean;
-}
\ No newline at end of file
+ color(value: Color | number | string | Resource): HyperlinkAttribute;
+}
+
+declare const Hyperlink: HyperlinkInterface;
+declare const HyperlinkInterface: HyperlinkAttribute;
diff --git a/api/@internal/component/ets/image.d.ts b/api/@internal/component/ets/image.d.ts
index 9474d5f7c62c2a75fe1ad39ad96b25cd967a8456..49465ff58cc663a6fa2f7d492f834889229dd104 100644
--- a/api/@internal/component/ets/image.d.ts
+++ b/api/@internal/component/ets/image.d.ts
@@ -171,12 +171,5 @@ declare class ImageAttribute extends CommonMethod {
onFinish(event: () => void): ImageAttribute;
}
-/**
- * @devices phone, tablet, car
- * @since 7
- */
declare const Image: ImageInterface;
-/**
- * @since 7
- */
declare const ImageInstance: ImageAttribute;
diff --git a/api/@internal/component/ets/image_animator.d.ts b/api/@internal/component/ets/image_animator.d.ts
index c30d4db7291408156145ee3ef344ba6d1000dab7..aa269104fdb4ab6f8372db7265413d7b459cf3b4 100644
--- a/api/@internal/component/ets/image_animator.d.ts
+++ b/api/@internal/component/ets/image_animator.d.ts
@@ -14,6 +14,7 @@
*/
/**
+ * Defines the ImageAnimator Interface.
* @since 7
*/
interface ImageAnimatorInterface {
diff --git a/api/@internal/component/ets/index-full.d.ts b/api/@internal/component/ets/index-full.d.ts
index f4427afcf654483824da3b49ebf35ca180bd7101..25e737704ec1431e8d9a54197941dfc40709c9f0 100644
--- a/api/@internal/component/ets/index-full.d.ts
+++ b/api/@internal/component/ets/index-full.d.ts
@@ -44,6 +44,7 @@
///
///
///
+///
///
///
///
@@ -58,7 +59,6 @@
///
///
///
-///
///
///
///
@@ -76,7 +76,6 @@
///
///
///
-///
///
///
///
@@ -92,6 +91,7 @@
///
///
///
+///
///
///
///
diff --git a/api/@internal/component/ets/inspector.d.ts b/api/@internal/component/ets/inspector.d.ts
index 7dc106a2babd474a9523768f66be526a935ef3bb..c62f3802cf6cfc69b9c8ea99829073ebc6e02145 100644
--- a/api/@internal/component/ets/inspector.d.ts
+++ b/api/@internal/component/ets/inspector.d.ts
@@ -29,54 +29,6 @@ declare function getInspectorNodes(): object;
*/
declare function getInspectorNodeById(id: number): object;
-/**
- * Get inspector info by key.
- * @since 8
- * @systemapi
- * @test
- */
-declare function getInspectorByKey(id: string): string;
-
-/**
- * Get inspector tree.
- * @since 8
- * @systemapi
- * @test
- */
-declare function getInspectorTree(): string;
-
-/**
- * Send event to inspector by key. Return false if no inspector with key is found.
- * @since 8
- * @systemapi
- * @test
- */
-declare function sendEventByKey(id: string, action: number, params: string): boolean;
-
-/**
- * Send touch event.
- * @since 8
- * @systemapi
- * @test
- */
-declare function sendTouchEvent(event: TouchObject): boolean;
-
-/**
- * Send key event.
- * @since 8
- * @systemapi
- * @test
- */
-declare function sendKeyEvent(event: KeyEvent): boolean;
-
-/**
- * Send mouse event.
- * @since 8
- * @systemapi
- * @test
- */
-declare function sendMouseEvent(event: MouseEvent): boolean;
-
/**
* Profiler tools for inspectors.
* @since 8
diff --git a/api/@internal/component/ets/lazy_for_each.d.ts b/api/@internal/component/ets/lazy_for_each.d.ts
index 8498b93cb12817ebde6a80faffd21d5c1d44aea3..a027eab8aff3963214cdccde22447144c5a0ea07 100644
--- a/api/@internal/component/ets/lazy_for_each.d.ts
+++ b/api/@internal/component/ets/lazy_for_each.d.ts
@@ -27,53 +27,81 @@ declare interface DataChangeListener {
/**
* Data added.
* @since 7
+ * @deprecated since 8
*/
onDataAdded(index: number): void;
+ /**
+ * Data added.
+ * @since 8
+ */
+ onDataAdd(index: number): void;
+
/**
* Data moved.
* @since 7
+ * @deprecated since 8
*/
onDataMoved(from: number, to: number): void;
+ /**
+ * Data moved.
+ * @since 8
+ */
+ onDataMove(from: number, to: number): void;
+
/**
* Data deleted.
* @since 7
+ * @deprecated since 8
*/
onDataDeleted(index: number): void;
/**
- * Data changed.
+ * Data deleted.
+ * @since 8
+ */
+ onDataDelete(index: number): void;
+
+ /**
+ * Call when has data change.
* @since 7
+ * @deprecated since 8
*/
onDataChanged(index: number): void;
+
+ /**
+ * Call when has data change.
+ * @since 8
+ */
+ onDataChange(index: number): void;
}
/**
- * Data changed.
+ * Developers need to implement this interface to provide data to LazyForEach component.
* @since 7
*/
declare interface IDataSource {
/**
- * Total count.
+ * Total data count.
* @since 7
*/
totalCount(): number;
/**
- * get data.
+ * Return the data of index.
* @since 7
*/
getData(index: number): any;
/**
- * register Data Change Listener
+ * Register data change listener.
* @since 7
*/
registerDataChangeListener(listener: DataChangeListener): void;
/**
- * unregister Data Change Listener
+ * Unregister data change listener.
* @since 7
*/
unregisterDataChangeListener(listener: DataChangeListener): void;
@@ -95,7 +123,4 @@ interface LazyForEachInterface {
): LazyForEachInterface;
}
-/**
- * @since 7
- */
declare const LazyForEach: LazyForEachInterface;
diff --git a/api/@internal/component/ets/list.d.ts b/api/@internal/component/ets/list.d.ts
index 8470f64a9b3a7f0d177c389ee4c49af0cba0d9e2..24845b0924b93892776455ee849c167a66825335 100644
--- a/api/@internal/component/ets/list.d.ts
+++ b/api/@internal/component/ets/list.d.ts
@@ -106,7 +106,7 @@ declare class ListAttribute extends CommonMethod {
/**
* Called when setting whether to enable chain linkage dynamic effect.
- * @since 8
+ * @since 7
*/
chainAnimation(value: boolean): ListAttribute;
@@ -185,8 +185,5 @@ declare class ListAttribute extends CommonMethod {
onItemDrop(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void): ListAttribute;
}
-/**
- * @since 7
- */
declare const List: ListInterface;
declare const ListInstance: ListAttribute;
diff --git a/api/@internal/component/ets/list_item.d.ts b/api/@internal/component/ets/list_item.d.ts
index 96b1afa40ca04b93d1eaad56538f3b031a10ec81..70e2a9195dc7c0811ce743e467bc73d28795f37f 100644
--- a/api/@internal/component/ets/list_item.d.ts
+++ b/api/@internal/component/ets/list_item.d.ts
@@ -40,7 +40,6 @@ declare enum Sticky {
/**
* Declare whether the ListItem element is editable.
- * @devices phone, tablet
* @since 7
*/
declare enum EditMode {
@@ -113,4 +112,3 @@ declare class ListItemAttribute extends CommonMethod {
*/
declare const ListItemInstance: ListItemAttribute;
declare const ListItem: ListItemInterface;
-
diff --git a/api/@internal/component/ets/loading_progress.d.ts b/api/@internal/component/ets/loading_progress.d.ts
index 5bc3c49fd9143fc0c25ddbf99ba3344164968342..2d1ad14dfd53951a27783b7839fd3317c5ac59ba 100644
--- a/api/@internal/component/ets/loading_progress.d.ts
+++ b/api/@internal/component/ets/loading_progress.d.ts
@@ -37,8 +37,6 @@ declare enum LoadingProgressStyle {
Orbital,
}
-
-
/**
* Provides an interface for extending the loading progress.
* @since 8
@@ -71,4 +69,4 @@ declare const LoadingProgress: LoadingProgressInterface;
* Loading Progress Extensions on Declarative Classes
* @since 8
*/
- declare const LoadingProgressInstance: LoadingProgressAttribute
\ No newline at end of file
+declare const LoadingProgressInstance: LoadingProgressAttribute;
diff --git a/api/@internal/component/ets/matrix2d.d.ts b/api/@internal/component/ets/matrix2d.d.ts
index 982eb954c091e3ee5a77c3efa8e48000d43108f3..67ffd751c8a678a1e2e5ba522841305c6d1944d3 100644
--- a/api/@internal/component/ets/matrix2d.d.ts
+++ b/api/@internal/component/ets/matrix2d.d.ts
@@ -17,92 +17,4 @@
* 2D transformation matrix, supporting rotation, translation, and scaling of the X-axis and Y-axis
* @since 8
*/
-declare class Matrix2D {
- /**
- * Horizontal Zoom
- * @since 8
- */
- scaleX?: number;
-
- /**
- * Vertical Tilt
- * @since 8
- */
- rotateY?: number;
-
- /**
- * Horizontal Tilt
- * @since 8
- */
- rotateX?: number;
-
- /**
- * Vertical Zoom
- * @since 8
- */
- scaleY?: number;
-
- /**
- * Horizontal movement
- * @since 8
- */
- translateX?: number;
-
- /**
- * Vertical movement
- * @since 8
- */
- translateY?: number;
-
- /**
- * Transforms the current 2D matrix back to the identity matrix (i.e., without any rotational
- * translation scaling effect)
- * @since 8
- */
- identity(): Matrix2D;
-
- /**
- * Transform the current 2D matrix into an inverse matrix (that is, the transformation effect
- * is the opposite effect of the original)
- * @since 8
- */
- invert(): Matrix2D;
-
- /**
- * The matrix is superimposed in right multiplication mode. When the input parameter is empty,
- * the matrix is superimposed.
- * @param other Matrix to be superimposed
- * @since 8
- */
- multiply(other?: Matrix2D): Matrix2D;
-
- /**
- * Adds the rotation effect of the X and Y axes to the current matrix.
- * @param rx Rotation effect of the X axis
- * @param ry Rotation effect of the Y-axis
- * @since 8
- */
- rotate(rx?: number, ry?: number): Matrix2D;
-
- /**
- * Adds the translation effect of the X and Y axes to the current matrix.
- * @param tx X-axis translation effect
- * @param ty Y-axis translation effect
- * @since 8
- */
- translate(tx?: number, ty?: number): Matrix2D;
-
- /**
- * Adds the scaling effect of the X and Y axes to the current matrix.
- * @param sx X-axis scaling effect
- * @param sy Y-axis scaling effect
- * @since 8
- */
- scale(sx?: number, sy?: number): Matrix2D;
-
- /**
- * Constructs a 2D change matrix object. The default value is the unit matrix.
- * @since 8
- */
- constructor();
-}
+declare type Matrix2D = import('../api/@internal/full/canvaspattern').Matrix2D
diff --git a/api/@internal/component/ets/middle_class.d.ts b/api/@internal/component/ets/middle_class.d.ts
index 05aaf273f822dd40c45e45467b007806db124d2d..adad7410a1fd41cc46380f309ee2a7f55e65b15a 100644
--- a/api/@internal/component/ets/middle_class.d.ts
+++ b/api/@internal/component/ets/middle_class.d.ts
@@ -1,623 +1,2351 @@
/*
- * Copyright (c) 2021 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
+ * Copyright (c) 2021 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSAlphabetIndexerAttribute extends CommonMethod {
- pop(): AlphabetIndexerAttribute;
- debugLine(value: string): AlphabetIndexerAttribute;
- create(value: {
- arrayValue: Array;
- selected: number;
- }): AlphabetIndexerAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): AlphabetIndexerAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): AlphabetIndexerAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: { arrayValue: Array; selected: number }): AlphabetIndexerAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSAnimatorAttribute extends CommonMethod {
- create(value: string): AnimatorAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: string): AnimatorAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSBadgeAttribute extends CommonMethod {
- pop(): BadgeAttribute;
- debugLine(value: string): BadgeAttribute;
- create(value: BadgeParamWithNumber | BadgeParamWithString): BadgeAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): BadgeAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): BadgeAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: BadgeParamWithNumber | BadgeParamWithString): BadgeAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSBlankAttribute extends CommonMethod {
- create(min?: number | string): BlankAttribute;
- pop(): BlankAttribute;
- debugLine(value: string): BlankAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(min?: number | string): BlankAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): BlankAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): BlankAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSButtonAttribute extends CommonMethod {
- createWithChild(label?: ResourceStr, options?: ButtonOption): ButtonAttribute;
- createWithLabel(label?: ResourceStr, options?: ButtonOption): ButtonAttribute;
- pop(): ButtonAttribute;
- debugLine(value: string): ButtonAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ createWithChild(label?: ResourceStr, options?: ButtonOptions): ButtonAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ createWithLabel(label?: ResourceStr, options?: ButtonOptions): ButtonAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): ButtonAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): ButtonAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSCalendarAttribute {
- create(value: {
- date: {
- year: number;
- month: number;
- day: number;
- };
- currentData: MonthData;
- preData: MonthData;
- nextData: MonthData;
- controller?: CalendarController;
- }): CalendarAttribute;
- pop(): CalendarAttribute;
- debugLine(value: string): CalendarAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: {
+ date: {
+ year: number;
+ month: number;
+ day: number;
+ };
+ currentData: MonthData;
+ preData: MonthData;
+ nextData: MonthData;
+ controller?: CalendarController;
+ }): CalendarAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): CalendarAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): CalendarAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSCanvasAttribute extends CommonMethod {
- create(context?: CanvasRenderingContext2D): CanvasAttribute;
- pop(): CanvasAttribute;
- debugLine(value: string): CanvasAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(context?: CanvasRenderingContext2D): CanvasAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): CanvasAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): CanvasAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSCheckboxAttribute extends CommonMethod {
- create(options?: CheckboxOption): CheckboxAttribute;
- pop(): CheckboxAttribute;
- debugLine(value: string): CheckboxAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options?: CheckboxOptions): CheckboxAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): CheckboxAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): CheckboxAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSCheckboxGroupAttribute extends CommonMethod {
- create(options?: CheckboxGroupOption): CheckboxGroupAttribute;
- pop(): CheckboxGroupAttribute;
- debugLine(value: string): CheckboxGroupAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options?: CheckboxGroupOptions): CheckboxGroupAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): CheckboxGroupAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): CheckboxGroupAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSCircleAttribute extends CommonShapeMethod {
- create(value?: CircleOption): CircleAttribute;
- debugLine(value: string): CircleAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: CircleOptions): CircleAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): CircleAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSColumnAttribute extends CommonMethod {
- create(value?: {
- space?: string | number;
- }): ColumnAttribute;
- pop(): ColumnAttribute;
- debugLine(value: string): ColumnAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { space?: string | number }): ColumnAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): ColumnAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): ColumnAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSColumnSplitAttribute extends CommonMethod {
- create(): ColumnSplitAttribute;
- pop(): ColumnSplitAttribute;
- debugLine(value: string): ColumnSplitAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(): ColumnSplitAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): ColumnSplitAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): ColumnSplitAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSCounterAttribute extends CommonMethod {
- create(): CounterAttribute;
- pop(): CounterAttribute;
- debugLine(value: string): CounterAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(): CounterAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): CounterAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): CounterAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSDataPanelAttribute extends CommonMethod {
- create(options: DataPanelOption): DataPanelAttribute;
- pop(): DataPanelAttribute;
- debugLine(value: string): DataPanelAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options: DataPanelOptions): DataPanelAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): DataPanelAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): DataPanelAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSDatePickerAttribute extends CommonMethod {
- create(options?: DatePickerOption): DatePickerAttribute;
- pop(): DatePickerAttribute;
- debugLine(value: string): DatePickerAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options?: DatePickerOptions): DatePickerAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): DatePickerAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): DatePickerAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSDividerAttribute extends CommonMethod {
- create(): DividerAttribute;
- debugLine(value: string): DividerAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(): DividerAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): DividerAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSEllipseAttribute extends CommonShapeMethod {
- create(value?: {
- width?: string | number;
- height?: string | number;
- }): EllipseAttribute;
- debugLine(value: string): EllipseAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { width?: string | number; height?: string | number }): EllipseAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): EllipseAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSFlexAttribute extends CommonMethod {
- create(value?: FlexOption): FlexAttribute;
- pop(): FlexAttribute;
- debugLine(value: string): FlexAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: FlexOptions): FlexAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): FlexAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): FlexAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSForEachInterface {
- create(arr: Array, itemGenerator: (item: any, index?: number) => void, keyGenerator?: (item: any, index?: number) => string): ForEachInterface;
- pop(): ForEachInterface;
- debugLine(value: string): ForEachInterface;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(
+ arr: Array,
+ itemGenerator: (item: any, index?: number) => void,
+ keyGenerator?: (item: any, index?: number) => string,
+ ): ForEachInterface;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): ForEachInterface;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): ForEachInterface;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSFormComponentAttribute extends CommonMethod {
- create(value: {
- id: number;
- name: string;
- bundle: string;
- ability: string;
- module: string;
- dimension?: FormDimension;
- temporary?: boolean;
- }): FormComponentAttribute;
- debugLine(value: string): FormComponentAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: {
+ id: number;
+ name: string;
+ bundle: string;
+ ability: string;
+ module: string;
+ dimension?: FormDimension;
+ temporary?: boolean;
+ }): FormComponentAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): FormComponentAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSGaugeAttribute extends CommonMethod {
- create(options: {
- value: number;
- min?: number;
- max?: number;
- }): GaugeAttribute;
- debugLine(value: string): GaugeAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options: { value: number; min?: number; max?: number }): GaugeAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): GaugeAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSGridAttribute extends CommonMethod {
- create(scroller?: Scroller): GridAttribute;
- pop(): GridAttribute;
- debugLine(value: string): GridAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(scroller?: Scroller): GridAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): GridAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): GridAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSGridItemAttribute extends CommonMethod {
- create(): GridItemAttribute;
- pop(): GridItemAttribute;
- debugLine(value: string): GridItemAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(): GridItemAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): GridItemAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): GridItemAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSGridContainerAttribute extends ColumnAttribute {
- create(value?: GridContainerOption): GridContainerAttribute;
- pop(): GridContainerAttribute;
- debugLine(value: string): GridContainerAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: GridContainerOptions): GridContainerAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): GridContainerAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): GridContainerAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSImageAttribute extends CommonMethod {
- create(src: string | PixelMap | Resource): ImageAttribute;
- debugLine(value: string): ImageAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(src: string | PixelMap | Resource): ImageAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): ImageAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSImageAnimatorAttribute extends CommonMethod {
- create(): ImageAnimatorAttribute;
- debugLine(value: string): ImageAnimatorAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(): ImageAnimatorAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): ImageAnimatorAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSLazyForEachInterface {
- create(dataSource: IDataSource, itemGenerator: (item: any, index?: number) => void, keyGenerator?: (item: any, index?: number) => string): LazyForEachInterface;
- pop(): LazyForEachInterface;
- debugLine(value: string): LazyForEachInterface;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(
+ dataSource: IDataSource,
+ itemGenerator: (item: any, index?: number) => void,
+ keyGenerator?: (item: any, index?: number) => string,
+ ): LazyForEachInterface;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): LazyForEachInterface;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): LazyForEachInterface;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSLineAttribute extends CommonShapeMethod {
- create(value?: {
- width?: string | number;
- height?: string | number;
- }): LineAttribute;
- debugLine(value: string): LineAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { width?: string | number; height?: string | number }): LineAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): LineAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSListAttribute extends CommonMethod {
- create(value?: {
- initialIndex?: number;
- space?: number | string;
- scroller?: Scroller;
- }): ListAttribute;
- pop(): ListAttribute;
- debugLine(value: string): ListAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { initialIndex?: number; space?: number | string; scroller?: Scroller }): ListAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): ListAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): ListAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSListItemAttribute extends CommonMethod {
- create(value?: string): ListItemAttribute;
- pop(): ListItemAttribute;
- debugLine(value: string): ListItemAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: string): ListItemAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): ListItemAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): ListItemAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSLoadingProgressAttribute extends CommonMethod {
- create(): LoadingProgressAttribute;
- debugLine(value: string): LoadingProgressAttribute;
- color(value: ResourceColor): LoadingProgressAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(): LoadingProgressAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): LoadingProgressAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ color(value: ResourceColor): LoadingProgressAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSMarqueeAttribute extends CommonMethod {
- create(value: {
- start: boolean;
- step?: number;
- loop?: number;
- fromStart?: boolean;
- src: string;
- }): MarqueeAttribute;
- pop(): MarqueeAttribute;
- debugLine(value: string): MarqueeAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: { start: boolean; step?: number; loop?: number; fromStart?: boolean; src: string }): MarqueeAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): MarqueeAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): MarqueeAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSNavigationAttribute extends CommonMethod {
- create(): NavigationAttribute;
- pop(): NavigationAttribute;
- debugLine(value: string): NavigationAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(): NavigationAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): NavigationAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): NavigationAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSNavigatorAttribute extends CommonMethod {
- create(value?: {
- target: string;
- type?: NavigationType;
- }): NavigatorAttribute;
- pop(): NavigatorAttribute;
- debugLine(value: string): NavigatorAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { target: string; type?: NavigationType }): NavigatorAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): NavigatorAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): NavigatorAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSPageTransitionEnterInterface extends CommonTransition {
- create(value: {
- type?: RouteType;
- duration?: number;
- curve?: Curve | string;
- delay?: number;
- }): PageTransitionEnterInterface;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: {
+ type?: RouteType;
+ duration?: number;
+ curve?: Curve | string;
+ delay?: number;
+ }): PageTransitionEnterInterface;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSPageTransitionExitInterface extends CommonTransition {
- create(value: {
- type?: RouteType;
- duration?: number;
- curve?: Curve | string;
- delay?: number;
- }): PageTransitionExitInterface;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: {
+ type?: RouteType;
+ duration?: number;
+ curve?: Curve | string;
+ delay?: number;
+ }): PageTransitionExitInterface;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSPanelAttribute extends CommonMethod {
- create(show: boolean): PanelAttribute;
- pop(): PanelAttribute;
- debugLine(value: string): PanelAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(show: boolean): PanelAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): PanelAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): PanelAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSPathAttribute extends CommonShapeMethod {
- create(value?: {
- width?: number | string;
- height?: number | string;
- commands?: string;
- }): PathAttribute;
- pop(): PathAttribute;
- debugLine(value: string): PathAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { width?: number | string; height?: number | string; commands?: string }): PathAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): PathAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): PathAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSPatternLockAttribute extends CommonMethod {
- create(controller?: PatternLockController): TSPatternLockAttribute;
- pop(): TSPatternLockAttribute;
- debugLine(value: string): TSPatternLockAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(controller?: PatternLockController): TSPatternLockAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): TSPatternLockAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): TSPatternLockAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSPieceAttribute extends CommonMethod {
- create(options?: {
- content: string;
- icon?: string;
- }): PieceAttribute;
- pop(): PieceAttribute;
- debugLine(value: string): PieceAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options?: { content: string; icon?: string }): PieceAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): PieceAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): PieceAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSPluginComponentAttribute extends CommonMethod {
- create(value: {
- template: PluginComponentTemplate;
- data: any;
- }): PluginComponentAttribute;
- pop(): PluginComponentAttribute;
- debugLine(value: string): PluginComponentAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: { template: PluginComponentTemplate; data: any }): PluginComponentAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): PluginComponentAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): PluginComponentAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSPolygonAttribute extends CommonShapeMethod {
- create(value?: {
- width?: string | number;
- height?: string | number;
- }): PolygonAttribute;
- debugLine(value: string): PolygonAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { width?: string | number; height?: string | number }): PolygonAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): PolygonAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSPolylineAttribute extends CommonShapeMethod {
- create(value?: {
- width?: string | number;
- height?: string | number;
- }): PolylineAttribute;
- debugLine(value: string): PolylineAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { width?: string | number; height?: string | number }): PolylineAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): PolylineAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSProgressAttribute extends CommonMethod {
- create(object: {
- value: number;
- total?: number;
- style?: ProgressStyle;
- }): ProgressAttribute;
- debugLine(value: string): ProgressAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options: ProgressOptions): ProgressAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): ProgressAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSQRCodeAttribute extends CommonMethod {
- create(value: string): QRCodeAttribute;
- pop(): QRCodeAttribute;
- debugLine(value: string): QRCodeAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: string): QRCodeAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): QRCodeAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): QRCodeAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSRadioAttribute extends CommonMethod {
- create(options: RadioOption): RadioAttribute;
- debugLine(value: string): RadioAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options: RadioOptions): RadioAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): RadioAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSRatingAttribute extends CommonMethod {
- create(options?: {
- rating: number;
- indicator?: boolean;
- }): RatingAttribute;
- pop(): RatingAttribute;
- debugLine(value: string): RatingAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options?: { rating: number; indicator?: boolean }): RatingAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): RatingAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): RatingAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSRectAttribute extends CommonShapeMethod {
- create(value?: {
- width?: number | string;
- height?: number | string;
- radius?: number | string | Array;
- } | {
- width?: number | string;
- height?: number | string;
- radiusWidth?: number | string;
- radiusHeight?: number | string;
- }): RectAttribute;
- debugLine(value: string): RectAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(
+ value?:
+ | {
+ width?: number | string;
+ height?: number | string;
+ radius?: number | string | Array;
+ }
+ | {
+ width?: number | string;
+ height?: number | string;
+ radiusWidth?: number | string;
+ radiusHeight?: number | string;
+ },
+ ): RectAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): RectAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSRefreshAttribute extends CommonMethod {
- create(value: {
- refreshing: boolean;
- offset?: number | string;
- friction?: number | string;
- }): RefreshAttribute;
- pop(): RefreshAttribute;
- debugLine(value: string): RefreshAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: { refreshing: boolean; offset?: number | string; friction?: number | string }): RefreshAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): RefreshAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): RefreshAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSRowAttribute extends CommonMethod {
- create(value?: {
- space?: string | number;
- }): RowAttribute;
- pop(): RowAttribute;
- debugLine(value: string): RowAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { space?: string | number }): RowAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): RowAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): RowAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSRowSplitAttribute extends CommonMethod {
- create(): RowSplitAttribute;
- pop(): RowSplitAttribute;
- debugLine(value: string): RowSplitAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(): RowSplitAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): RowSplitAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): RowSplitAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSScrollAttribute extends CommonMethod {
- create(scroller?: Scroller): ScrollAttribute;
- pop(): ScrollAttribute;
- debugLine(value: string): ScrollAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(scroller?: Scroller): ScrollAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): ScrollAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): ScrollAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSScrollBarAttribute extends CommonMethod {
- create(value: ScrollBarOption): ScrollBarAttribute;
- pop(): ScrollBarAttribute;
- debugLine(value: string): ScrollBarAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: ScrollBarOptions): ScrollBarAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): ScrollBarAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): ScrollBarAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSSearchAttribute extends CommonMethod {
- create(options?: {
- value?: string;
- placeholder?: string;
- icon?: string;
- controller?: SearchController;
- }): SearchAttribute;
- pop(): SearchAttribute;
- debugLine(value: string): SearchAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options?: {
+ value?: string;
+ placeholder?: string;
+ icon?: string;
+ controller?: SearchController;
+ }): SearchAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): SearchAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): SearchAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSSelectAttribute extends CommonMethod {
- create(options: Array): SelectAttribute;
- pop(): SelectAttribute;
- debugLine(value: string): SelectAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options: Array): SelectAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): SelectAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): SelectAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSShapeAttribute extends CommonMethod {
- create(value?: PixelMap): ShapeAttribute;
- pop(): ShapeAttribute;
- debugLine(value: string): ShapeAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: PixelMap): ShapeAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): ShapeAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): ShapeAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSSheetAttribute extends CommonMethod {
- create(): SheetAttribute;
- pop(): SheetAttribute;
- debugLine(value: string): SheetAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(): SheetAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): SheetAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): SheetAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSSliderAttribute extends CommonMethod {
- create(options?: SliderOption): SliderAttribute;
- debugLine(value: string): SliderAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options?: SliderOptions): SliderAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): SliderAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSSpanAttribute extends CommonMethod {
- create(value: string | Resource): SpanAttribute;
- debugLine(value: string): SpanAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: string | Resource): SpanAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): SpanAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSStackAttribute extends CommonMethod {
- create(value?: {
- alignContent?: Alignment;
- }): StackAttribute;
- pop(): StackAttribute;
- debugLine(value: string): StackAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { alignContent?: Alignment }): StackAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): StackAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): StackAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSStepperAttribute extends CommonMethod {
- create(value?: {
- index?: number;
- }): StepperAttribute;
- pop(): StepperAttribute;
- debugLine(value: string): StepperAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { index?: number }): StepperAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): StepperAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): StepperAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSStepperItemAttribute extends CommonMethod {
- create(): StepperItemAttribute;
- pop(): StepperItemAttribute;
- debugLine(value: string): StepperItemAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(): StepperItemAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): StepperItemAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): StepperItemAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSSwiperAttribute extends CommonMethod {
- create(controller?: SwiperController): SwiperAttribute;
- pop(): SwiperAttribute;
- debugLine(value: string): SwiperAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(controller?: SwiperController): SwiperAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): SwiperAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): SwiperAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSTabContentAttribute extends CommonMethod {
- create(): TabContentAttribute;
- pop(): TabContentAttribute;
- debugLine(value: string): TabContentAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(): TabContentAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): TabContentAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): TabContentAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSTabsAttribute extends CommonMethod {
- create(value?: {
- barPosition?: BarPosition;
- index?: number;
- controller?: TabsController;
- }): TabsAttribute;
- pop(): TabsAttribute;
- debugLine(value: string): TabsAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { barPosition?: BarPosition; index?: number; controller?: TabsController }): TabsAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): TabsAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): TabsAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSTextAttribute extends CommonMethod {
- create(content?: string | Resource): TextAttribute;
- pop(): TextAttribute;
- debugLine(value: string): TextAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(content?: string | Resource): TextAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): TextAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): TextAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSTextAreaAttribute extends CommonMethod {
- create(value?: TextAreaOption): TextAreaAttribute;
- debugLine(value: string): TextAreaAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: TextAreaOptions): TextAreaAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): TextAreaAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSTextClockAttribute extends CommonMethod {
- create(options?: {
- timeZoneOffset?: number;
- controller?: TextClockController;
- }): TextClockAttribute;
- pop(): TextClockAttribute;
- debugLine(value: string): TextClockAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options?: { timeZoneOffset?: number; controller?: TextClockController }): TextClockAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): TextClockAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): TextClockAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSTextInputAttribute extends CommonMethod {
- create(value?: TextInputOption): TextInputAttribute;
- debugLine(value: string): TextInputAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: TextInputOptions): TextInputAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): TextInputAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSTextPickerAttribute extends CommonMethod {
- create(options?: TextPickerOption): TextPickerAttribute;
- pop(): TextPickerAttribute;
- debugLine(value: string): TextPickerAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options?: TextPickerOptions): TextPickerAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): TextPickerAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): TextPickerAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSTextTimerAttribute extends CommonMethod {
- create(options?: TextTimerOption): TextTimerAttribute;
- pop(): TextTimerAttribute;
- debugLine(value: string): TextTimerAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options?: TextTimerOptions): TextTimerAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): TextTimerAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): TextTimerAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSToggleAttribute extends CommonMethod {
- create(options: {
- type: ToggleType;
- isOn?: boolean;
- }): ToggleAttribute;
- pop(): ToggleAttribute;
- debugLine(value: string): ToggleAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options: { type: ToggleType; isOn?: boolean }): ToggleAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): ToggleAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): ToggleAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSVideoAttribute extends CommonMethod {
- create(value: {
- src?: string | Resource;
- previewUri?: string | PixelMap | Resource;
- controller?: VideoController;
- }): VideoAttribute;
- debugLine(value: string): VideoAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: {
+ src?: string | Resource;
+ previewUri?: string | PixelMap | Resource;
+ controller?: VideoController;
+ }): VideoAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): VideoAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSWebAttribute extends CommonMethod {
- create(value: WebOptions): WebAttribute;
- debugLine(value: string): WebAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: WebOptions): WebAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): WebAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSXComponentAttribute extends CommonMethod {
- create(value: {
- id: string;
- type: string;
- libraryname?: string;
- controller?: XComponentController;
- }): XComponentAttribute;
- debugLine(value: string): XComponentAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: {
+ id: string;
+ type: string;
+ libraryname?: string;
+ controller?: XComponentController;
+ }): XComponentAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): XComponentAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSRichTextAttribute {
- create(content: string): RichTextAttribute;
- pop(): RichTextAttribute;
- debugLine(value: string): RichTextAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(content: string): RichTextAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): RichTextAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): RichTextAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSTapGestureInterface {
- create(value?: {
- count?: number;
- fingers?: number;
- }): TapGestureInterface;
- pop(): TapGestureInterface;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { count?: number; fingers?: number }): TapGestureInterface;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): TapGestureInterface;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSLongPressGestureInterface {
- create(value?: {
- fingers?: number;
- repeat?: boolean;
- duration?: number;
- }): LongPressGestureInterface;
- pop(): LongPressGestureInterface;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { fingers?: number; repeat?: boolean; duration?: number }): LongPressGestureInterface;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): LongPressGestureInterface;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSPanGestureInterface {
- create(value?: {
- fingers?: number;
- direction?: PanDirection;
- distance?: number;
- } | PanGestureOption): PanGestureInterface;
- pop(): PanGestureInterface;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(
+ value?:
+ | {
+ fingers?: number;
+ direction?: PanDirection;
+ distance?: number;
+ }
+ | PanGestureOptions,
+ ): PanGestureInterface;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): PanGestureInterface;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSSwipeGestureInterface {
- create(value?: {
- fingers?: number;
- direction?: SwipeDirection;
- speed?: number;
- }): SwipeGestureInterface;
- pop(): SwipeGestureInterface;
-}
-
-declare class PinchGestureInterface {
- create(value?: {
- fingers?: number;
- distance?: number;
- }): PinchGestureInterface;
- pop(): PinchGestureInterface;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { fingers?: number; direction?: SwipeDirection; speed?: number }): SwipeGestureInterface;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): SwipeGestureInterface;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+declare class TSPinchGestureInterface {
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { fingers?: number; distance?: number }): PinchGestureInterface;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): PinchGestureInterface;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSRotationGestureInterface {
- create(value?: {
- fingers?: number;
- angle?: number;
- }): RotationGestureInterface;
- pop(): RotationGestureInterface;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { fingers?: number; angle?: number }): RotationGestureInterface;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): RotationGestureInterface;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSGestureGroupInterface {
- create(mode: GestureMode, ...gesture: GestureType[]): GestureGroupInterface;
- pop(): GestureGroupInterface;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(mode: GestureMode, ...gesture: GestureType[]): GestureGroupInterface;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): GestureGroupInterface;
}
diff --git a/api/@internal/component/ets/navigation.d.ts b/api/@internal/component/ets/navigation.d.ts
index 5130791878169fc2b6cfd20c07717d0fbbebf6ed..420438d98b3d5d30151a4370cf261094f0572fd4 100644
--- a/api/@internal/component/ets/navigation.d.ts
+++ b/api/@internal/component/ets/navigation.d.ts
@@ -108,12 +108,6 @@ declare class NavigationAttribute extends CommonMethod {
*/
menus(value: Array | CustomBuilder): NavigationAttribute;
- /**
- * The amount of the menu in Navigation.
- * @since 8
- */
- menuCount(value: number): NavigationAttribute;
-
/**
* Tool bar
* @since 8
@@ -127,10 +121,10 @@ declare class NavigationAttribute extends CommonMethod {
hideToolBar(value: boolean): NavigationAttribute;
/**
- * Trigger a titleModeChanged event when title mode changed at free mode.
+ * Trigger callback when title mode change finished at free mode.
* @since 8
*/
- onTitleModeChanged(callback: (titleMode: NavigationTitleMode) => void): NavigationAttribute;
+ onTitleModeChange(callback: (titleMode: NavigationTitleMode) => void): NavigationAttribute;
}
declare const Navigation: NavigationInterface;
diff --git a/api/@internal/component/ets/plugin_component.d.ts b/api/@internal/component/ets/plugin_component.d.ts
index 99339284866b4290bd6f4bbee92236d7e1e83c89..47300deaa7180ff98c64873b247e881d45a013a2 100644
--- a/api/@internal/component/ets/plugin_component.d.ts
+++ b/api/@internal/component/ets/plugin_component.d.ts
@@ -18,7 +18,15 @@
* @since 8
*/
interface PluginComponentTemplate {
+ /**
+ * Defines the plugin source name.
+ * @since 8
+ */
source: string;
+ /**
+ * Defines the ability name.
+ * @since 8
+ */
ability: string;
}
@@ -35,6 +43,7 @@ interface PluginComponentInterface {
}
/**
+ * Defines the plugin component attibute functions.
* @since 8
*/
declare class PluginComponentAttribute extends CommonMethod {
diff --git a/api/@internal/component/ets/progress.d.ts b/api/@internal/component/ets/progress.d.ts
index 80a73a7da0072c02941a2d75bac9c207d707d251..76faf8e8a693123a150fb6c18bea118ee30144ba 100644
--- a/api/@internal/component/ets/progress.d.ts
+++ b/api/@internal/component/ets/progress.d.ts
@@ -13,6 +13,97 @@
* limitations under the License.
*/
+/**
+ * Defines the option of Progress.
+ * @since 7
+ */
+ declare interface ProgressOptions {
+ /**
+ * Sets the value of Progress.
+ * @since 7
+ */
+ value: number;
+
+ /**
+ * Sets the total of Progress.
+ * @since 7
+ */
+ total?: number;
+
+ /**
+ * Sets the style of Progress.
+ * @since 7
+ * @deprecated since 8
+ */
+ style?: ProgressStyle
+
+ /**
+ * Sets the type of Progress.
+ * @since 8
+ */
+ type?: ProgressType
+}
+
+/**
+ * Type of progress bar
+ * @since 8
+ */
+declare enum ProgressType {
+ /**
+ * Linear progress bar style.
+ * @since 8
+ */
+ Linear,
+
+ /**
+ * Ring progress bar.
+ * @since 8
+ */
+ Ring,
+
+ /**
+ * Eclipse progress bar.
+ * @since 8
+ */
+ Eclipse,
+
+ /**
+ * ScaleRing progress bar.
+ * @since 8
+ */
+ ScaleRing,
+
+ /**
+ * Capsule progress bar.
+ * @since 8
+ */
+ Capsule,
+}
+
+/**
+ * Defines style options for progress component.
+ * @since 8
+ */
+declare interface ProgressStyleOptions {
+ /**
+ * Defines the strokeWidth property.
+ * @since 8
+ */
+ strokeWidth?: Length;
+
+ /**
+ * Defines the scaleCoun property.
+ * @since 8
+ */
+ scaleCount?: number;
+
+ /**
+ * Defines the scaleWidth property.
+ * @since 8
+ */
+ scaleWidth?: Length;
+}
+
/**
* Type of progress bar
* @since 7
@@ -20,35 +111,30 @@
declare enum ProgressStyle {
/**
* Linear progress bar style.
- * @devices phone, tablet, car.
* @since 7
*/
Linear,
/**
* Ring progress bar.
- * @devices phone, tablet, car.
* @since 8
*/
Ring,
/**
* Eclipse progress bar.
- * @devices phone, tablet, car.
* @since 7
*/
Eclipse,
/**
* ScaleRing progress bar.
- * @devices phone, tablet, car.
* @since 8
*/
ScaleRing,
/**
* Capsule progress bar.
- * @devices phone, tablet, car.
* @since 8
*/
Capsule,
@@ -63,10 +149,11 @@ interface ProgressInterface {
* Called when the progress bar is set.
* @since 7
*/
- (object: { value: number; total?: number; style?: ProgressStyle }): ProgressAttribute;
+ (options: ProgressOptions): ProgressAttribute;
}
/**
+ * Defines the progress attibute functions.
* @since 7
*/
declare class ProgressAttribute extends CommonMethod {
@@ -83,17 +170,10 @@ declare class ProgressAttribute extends CommonMethod {
color(value: ResourceColor): ProgressAttribute;
/**
- * Called when the style of the circular progress bar is set.
- * @since 7
- */
- circularStyle(value: { strokeWidth?: Length; scaleCount?: number; scaleWidth?: Length }): ProgressAttribute;
-
- /**
- * Called when the style of the cricular progress bar is set.
- * @since 7
- * @deprecated since 7
+ * Called when the style of progress bar is set.
+ * @since 8
*/
- cricularStyle(value: { strokeWidth?: Length; scaleCount?: number; scaleWidth?: Length }): ProgressAttribute;
+ style(value: ProgressStyleOptions): ProgressAttribute;
}
declare const Progress: ProgressInterface;
diff --git a/api/@internal/component/ets/qrcode.d.ts b/api/@internal/component/ets/qrcode.d.ts
index 61eefc5700dbf0eb1e319b6cb2a7da8f53782371..ecae91dc558eae0032bdb9fcbeb1284cf5dcfbb8 100644
--- a/api/@internal/component/ets/qrcode.d.ts
+++ b/api/@internal/component/ets/qrcode.d.ts
@@ -26,6 +26,7 @@ interface QRCodeInterface {
}
/**
+ * Defines the qrcode attibute functions.
* @since 7
*/
declare class QRCodeAttribute extends CommonMethod {
diff --git a/api/@internal/component/ets/radio.d.ts b/api/@internal/component/ets/radio.d.ts
index d3d749404ce749014ed1822b78bc4bb0544b6469..f67db1784428e4013f334d4f51461db8464a8b1d 100644
--- a/api/@internal/component/ets/radio.d.ts
+++ b/api/@internal/component/ets/radio.d.ts
@@ -15,20 +15,17 @@
/**
* Input parameter for creating a radio box.
- * @devices phone, tablet, car
* @since 8
*/
-declare interface RadioOption {
+declare interface RadioOptions {
/**
* Radio group name.
- * @devices phone, tablet, car
* @since 8
*/
group: string;
/**
* Radio name.
- * @devices phone, tablet, car
* @since 8
*/
value: string;
@@ -36,33 +33,28 @@ declare interface RadioOption {
/**
* Provides an interface for creating a radio box.
- * @devices phone, tablet, car
* @since 8
*/
interface RadioInterface {
/**
* Called when a radio box is created.
- * @devices phone, tablet, car
* @since 8
*/
- (options: RadioOption): RadioAttribute;
+ (options: RadioOptions): RadioAttribute;
}
/**
- * @devices phone, tablet, car
* @since 8
*/
declare class RadioAttribute extends CommonMethod {
/**
* Called when the radio box is selected.
- * @devices phone, tablet, car
* @since 8
*/
checked(value: boolean): RadioAttribute;
/**
* Called when the radio box selection status changes.
- * @devices phone, tablet, car
* @since 8
*/
onChange(callback: (isChecked: boolean) => void): RadioAttribute;
diff --git a/api/@internal/component/ets/rating.d.ts b/api/@internal/component/ets/rating.d.ts
index 09f6740ec75c2a715de42f4595028888695ebe74..7dc8bac49645fcf78bcf7f39fad4be33bcf5fff7 100644
--- a/api/@internal/component/ets/rating.d.ts
+++ b/api/@internal/component/ets/rating.d.ts
@@ -26,6 +26,7 @@ interface RatingInterface {
}
/**
+ * Defines the rating attibute functions.
* @since 7
*/
declare class RatingAttribute extends CommonMethod {
diff --git a/api/@internal/component/ets/rect.d.ts b/api/@internal/component/ets/rect.d.ts
index 7ca9aa72fac29aa43129c2a22a796b93113732ea..3bc5bdab97d8d3629a058ed6d2aa7fcde94cb5aa 100644
--- a/api/@internal/component/ets/rect.d.ts
+++ b/api/@internal/component/ets/rect.d.ts
@@ -13,7 +13,6 @@
* limitations under the License.
*/
-
/**
* Provides an interface for drawing rectangles.
* @since 7
@@ -25,11 +24,11 @@ interface RectInterface {
*/
new (
value?:
- | {
- width?: number | string;
- height?: number | string;
- radius?: number | string | Array;
- }
+ {
+ width?: number | string;
+ height?: number | string;
+ radius?: number | string | Array;
+ }
| {
width?: number | string;
height?: number | string;
@@ -44,11 +43,11 @@ interface RectInterface {
*/
(
value?:
- | {
- width?: number | string;
- height?: number | string;
- radius?: number | string | Array;
- }
+ {
+ width?: number | string;
+ height?: number | string;
+ radius?: number | string | Array;
+ }
| {
width?: number | string;
height?: number | string;
diff --git a/api/@internal/component/ets/refresh.d.ts b/api/@internal/component/ets/refresh.d.ts
index 648528bb7d179112856255d00e3e20e8aa3610f6..2475dc5518269b153f000bc91d96f73b576f7316 100644
--- a/api/@internal/component/ets/refresh.d.ts
+++ b/api/@internal/component/ets/refresh.d.ts
@@ -62,6 +62,7 @@ interface RefreshInterface {
}
/**
+ * Defines the refresh attibute functions.
* @since 8
*/
declare class RefreshAttribute extends CommonMethod {
diff --git a/api/@internal/component/ets/row.d.ts b/api/@internal/component/ets/row.d.ts
index 6d723e4b8baf61b87857b95aced6fc55cc2b89ae..f33801c37657346f16fd1c841a354bcf1e3d2136 100644
--- a/api/@internal/component/ets/row.d.ts
+++ b/api/@internal/component/ets/row.d.ts
@@ -26,6 +26,7 @@ interface RowInterface {
}
/**
+ * Defines the row attribute functions.
* @since 7
*/
declare class RowAttribute extends CommonMethod {
@@ -39,7 +40,7 @@ declare class RowAttribute extends CommonMethod {
* Called when the horizontal alignment is set.
* @since 8
*/
- justifyContent(value: FlexAlign): RowAttribute;
+ justifyContent(value: FlexAlign): RowAttribute;
}
declare const Row: RowInterface;
diff --git a/api/@internal/component/ets/scroll.d.ts b/api/@internal/component/ets/scroll.d.ts
index 7ea65ec436f8a53a0badd006ea19a777c2aff4c0..4779b3593c9b5022bc09238a5b8ebe6f9244be4b 100644
--- a/api/@internal/component/ets/scroll.d.ts
+++ b/api/@internal/component/ets/scroll.d.ts
@@ -101,6 +101,7 @@ interface ScrollInterface {
}
/**
+ * Defines the scroll attibute functions.
* @since 7
*/
declare class ScrollAttribute extends CommonMethod {
diff --git a/api/@internal/component/ets/scroll_bar.d.ts b/api/@internal/component/ets/scroll_bar.d.ts
index 0a722fca3961cb71eb90b318ef2530f62c8964a3..d8089e23b40238ad29c651a0e52c65f13cfd184e 100644
--- a/api/@internal/component/ets/scroll_bar.d.ts
+++ b/api/@internal/component/ets/scroll_bar.d.ts
@@ -32,10 +32,10 @@ declare enum ScrollBarDirection {
}
/**
- * Defines the option of ScrollBar.
+ * Defines the options of ScrollBar.
* @since 8
*/
-declare interface ScrollBarOption {
+declare interface ScrollBarOptions {
/**
* Sets the scroller of scroll bar.
* @since 8
@@ -64,12 +64,14 @@ interface ScrollBarInterface {
* Called when a ScrollBar container is set.
* @since 8
*/
- (value: ScrollBarOption): ScrollBarAttribute;
+ (value: ScrollBarOptions): ScrollBarAttribute;
}
/**
+ * Defines the scrollbar attibute functions.
* @since 8
*/
declare class ScrollBarAttribute extends CommonMethod {}
+
declare const ScrollBar: ScrollBarInterface;
declare const ScrollBarInstance: ScrollBarAttribute;
diff --git a/api/@internal/component/ets/select.d.ts b/api/@internal/component/ets/select.d.ts
index 6b186318b05634f816572e5c863fd64a5a0c6bd4..0c03c35b06461598cfb0e71970cdb808bfd1108e 100644
--- a/api/@internal/component/ets/select.d.ts
+++ b/api/@internal/component/ets/select.d.ts
@@ -112,7 +112,7 @@ declare class SelectAttribute extends CommonMethod {
* Callback for selecting an item from the select.
* @since 8
*/
- onSelected(event: (index: number, value?: string) => void): SelectAttribute;
+ onSelect(callback: (index: number, value?: string) => void): SelectAttribute;
}
declare const Select: SelectInterface;
diff --git a/api/@internal/component/ets/sidebar.d.ts b/api/@internal/component/ets/sidebar.d.ts
index 083b948e47a5591ec05453c67190cad015912084..e38f1ad790401262cc06ccf9b87e908c06708fcc 100644
--- a/api/@internal/component/ets/sidebar.d.ts
+++ b/api/@internal/component/ets/sidebar.d.ts
@@ -1,33 +1,33 @@
/*
- * Copyright (c) 2021 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ * Copyright (c) 2021 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
/**
* Sets the sidebar style of showing
* @since 8
*/
-declare enum SideBarContainerStyle {
- /**
- * The sidebar invisible
- * @since 8
- */
- Embed,
- /**
- * The sidebar visible
- * @since 8
- */
- Overlay
+declare enum SideBarContainerType {
+ /**
+ * The sidebar invisible
+ * @since 8
+ */
+ Embed,
+ /**
+ * The sidebar visible
+ * @since 8
+ */
+ Overlay,
}
/**
@@ -35,33 +35,37 @@ declare enum SideBarContainerStyle {
* @since 8
*/
declare interface ButtonStyle {
- /**
- * Set the left of control button
- * @since 8
- */
- left?: number;
- /**
- * Set the top of control button
- * @since 8
- */
- top?: number;
- /**
- * Set the width of control button
- * @since 8
- */
- width?: number;
+ /**
+ * Set the left of control button
+ * @since 8
+ */
+ left?: number;
+ /**
+ * Set the top of control button
+ * @since 8
+ */
+ top?: number;
+ /**
+ * Set the width of control button
+ * @since 8
+ */
+ width?: number;
- /**
- * Set the heigth of control button
- * @since 8
- */
- height?: number;
+ /**
+ * Set the heigth of control button
+ * @since 8
+ */
+ height?: number;
- /**
- * Set the button icon when sidebar status has changed
- * @since 8
- */
- icons?: {shown:string | PixelMap | Resource, hidden: string | PixelMap | Resource, switching?: string | PixelMap | Resource}
+ /**
+ * Set the button icon when sidebar status has changed
+ * @since 8
+ */
+ icons?: {
+ shown: string | PixelMap | Resource;
+ hidden: string | PixelMap | Resource;
+ switching?: string | PixelMap | Resource;
+ };
}
/**
@@ -69,28 +73,35 @@ declare interface ButtonStyle {
* @since 8
*/
interface SideBarContainerInterface {
- /**
- * Called when showing the sidebar of a block entry.
- * @since 8
- */
- (options?: { showSideBarContainer?: boolean,
- style?: SideBarContainerStyle,
- buttonAttr?: ButtonStyle}): SideBarContainerAttribute;
+ /**
+ * Called when showing the sidebar of a block entry.
+ * @since 8
+ */
+ (type?: SideBarContainerType): SideBarContainerAttribute;
}
/**
* The attribute function of sidebar
* @since 8
*/
-
declare class SideBarContainerAttribute extends CommonMethod {
+ /**
+ * Callback showControlButton function when setting the status of sidebar
+ * @since 8
+ */
+ showSideBar(value: boolean): SideBarContainerAttribute;
+ /**
+ * Callback controlButton function when setting the style of button
+ * @since 8
+ */
+ controlButton(value: ButtonStyle): SideBarContainerAttribute;
/**
* Callback showControlButton function when setting the status of button
* @since 8
*/
showControlButton(value: boolean): SideBarContainerAttribute;
/**
- * Callback onChange function when sidebar style of showing has changed
+ * Trigger callback when sidebar style of showing change finished.
* @since 8
*/
onChange(callback: (value: boolean) => void): SideBarContainerAttribute;
@@ -114,4 +125,4 @@ declare class SideBarContainerAttribute extends CommonMethod {
/**
* Called when setting whether to display step size.
- * @devices phone, tablet, car
* @since 7
*/
showSteps(value: boolean): SliderAttribute;
/**
* Called when the percentage of bubble prompt is set when sliding.
- * @devices phone, tablet, car
* @since 7
*/
showTips(value: boolean): SliderAttribute;
/**
* Called when the thickness of track is set.
- * @devices phone, tablet, car
* @since 8
*/
trackThickness(value: Length): SliderAttribute;
/**
* Called when the selection value changes.
- * @devices phone, tablet, car
* @since 7
*/
onChange(callback: (value: number, mode: SliderChangeMode) => void): SliderAttribute;
diff --git a/api/@internal/component/ets/state_management.d.ts b/api/@internal/component/ets/state_management.d.ts
index 0e11d0e5e965ced4eda340ab6ae8f661ab100238..310e1ad62b0872b0dfbe070d478c686ef60e4ac0 100644
--- a/api/@internal/component/ets/state_management.d.ts
+++ b/api/@internal/component/ets/state_management.d.ts
@@ -16,220 +16,268 @@
/**
* Provides an interface for attribute subscribers.
* @since 7
+ * @systemapi
*/
interface IPropertySubscriber {
/**
* Called when the ID of the property subscriber is queried.
* @since 7
+ * @systemapi
*/
id(): number;
/**
* Provides a single attribute change user interface.
* @since 7
+ * @systemapi
*/
aboutToBeDeleted(owningView?: IPropertySubscriber): void;
}
/**
+ * Defines the subscriber.
* @since 7
+ * @systemapi
*/
interface ISinglePropertyChangeSubscriber extends IPropertySubscriber {
/**
* Provides a single attribute change user interface.
* @since 7
+ * @systemapi
*/
hasChanged(newValue: T): void;
}
/**
+ * Defines the subscribed abstract property.
* @since 7
+ * @systemapi
*/
declare abstract class SubscribedAbstractProperty {
/**
* Setting Subscribers.
* @since 7
+ * @systemapi
*/
protected subscribers_: Set;
/**
* Private user ID.
* @since 7
+ * @systemapi
*/
private id_;
/**
* Private user information.
* @since 7
+ * @systemapi
*/
private info_?;
/**
* @since 7
+ * @systemapi
*/
constructor(
/**
- * Subscriber Information.
+ * Subscriber IPropertySubscriber.
* @since 7
+ * @systemapi
*/
subscribeMe?: IPropertySubscriber,
+ /**
+ * Subscriber info.
+ * @since 7
+ * @systemapi
+ */
info?: string,
);
/**
* Called when the subscriber ID is entered.
* @since 7
+ * @systemapi
*/
id(): number;
/**
* Called when a subscriber information description is entered.
* @since 7
+ * @systemapi
*/
info(): string;
/**
* Called when data is obtained.
* @since 7
+ * @systemapi
*/
abstract get(): T;
/**
* Called when data is created.
* @since 7
+ * @systemapi
*/
abstract set(newValue: T): void;
/**
* Called when a two-way synchronization is created.
* @since 7
+ * @systemapi
*/
createTwoWaySync(subscribeMe?: IPropertySubscriber, info?: string): SyncedPropertyTwoWay;
/**
* Called when a one-way synchronization is created.
* @since 7
+ * @systemapi
*/
createOneWaySync(subscribeMe?: IPropertySubscriber, info?: string): SyncedPropertyOneWay;
/**
* Called when the subscriber is unlinked.
* @since 7
+ * @systemapi
*/
unlinkSuscriber(subscriberId: number): void;
/**
* Called when the notification has changed.
* @since 7
+ * @systemapi
*/
protected notifyHasChanged(newValue: T): void;
/**
* Called when the notification property is read.
* @since 7
+ * @systemapi
*/
protected notifyPropertyRead(): void;
/**
* Called when the number of users is queried.
* @since 7
+ * @systemapi
*/
numberOfSubscrbers(): number;
}
/**
+ * Defines the state value.
* @since 7
+ * @systemapi
*/
declare class SyncedPropertyTwoWay
extends SubscribedAbstractProperty
- implements ISinglePropertyChangeSubscriber {
+ implements ISinglePropertyChangeSubscriber
+{
/**
* Sources of synchronization attributes bidirectionally.
* @since 7
+ * @systemapi
*/
private source_;
/**
* constructor parameters.
* @since 7
+ * @systemapi
*/
constructor(source: SubscribedAbstractProperty, subscribeMe?: IPropertySubscriber, info?: string);
/**
* Called when processing information about to be deleted.
* @since 7
+ * @systemapi
*/
aboutToBeDeleted(unsubscribeMe?: IPropertySubscriber): void;
/**
* Information Changed.
* @since 7
+ * @systemapi
*/
hasChanged(newValue: T): void;
/**
* Called when data is obtained.
* @since 7
+ * @systemapi
*/
get(): T;
/**
* Called when data is created.
* @since 7
+ * @systemapi
*/
set(newValue: T): void;
}
/**
+ * Defines the prop state value.
* @since 7
+ * @systemapi
*/
declare class SyncedPropertyOneWay
extends SubscribedAbstractProperty
- implements ISinglePropertyChangeSubscriber {
+ implements ISinglePropertyChangeSubscriber
+{
/**
* Pack value for single-item binding.
* @since 7
+ * @systemapi
*/
private wrappedValue_;
/**
* Sources of synchronization attributes bidirectionally.
* @since 7
+ * @systemapi
*/
private source_;
/**
* Constructor parameters.
* @since 7
+ * @systemapi
*/
constructor(source: SubscribedAbstractProperty, subscribeMe?: IPropertySubscriber, info?: string);
/**
* Called when processing information about to be deleted.
* @since 7
+ * @systemapi
*/
aboutToBeDeleted(unsubscribeMe?: IPropertySubscriber): void;
/**
* Information Changed.
* @since 7
+ * @systemapi
*/
hasChanged(newValue: T): void;
/**
* Called when data is obtained.
* @since 7
+ * @systemapi
*/
get(): T;
/**
* Called when data is created.
* @since 7
+ * @systemapi
*/
set(newValue: T): void;
}
/**
+ * Defines the AppStorage interface.
* @since 7
*/
declare class AppStorage {
@@ -313,12 +361,15 @@ declare class AppStorage {
}
/**
+ * Defines the Environment interface.
* @since 7
*/
declare class Environment {
/**
* Constructor.
* @since 7
+ * @systemapi
+ * @hide
*/
constructor();
@@ -347,23 +398,25 @@ declare class Environment {
}
/**
+ * Defines the ColorMode of device.
* @since 7
*/
declare enum ColorMode {
/**
- * Bright color.
+ * Light mode.
* @since 7
*/
LIGHT = 0,
/**
- * Dark.
+ * Dark mode.
* @since 7
*/
DARK,
}
/**
+ * Defines the LayoutDirection of device.
* @since 7
*/
declare enum LayoutDirection {
@@ -371,7 +424,7 @@ declare enum LayoutDirection {
* Elements are laid out from left to right.
* @since 7
*/
- LTR = 0,
+ LTR,
/**
* Elements are laid out from right to left.
@@ -383,16 +436,19 @@ declare enum LayoutDirection {
* Elements are laid out from auto.
* @since 8
*/
- Auto
+ Auto,
}
/**
+ * Defines the PersistentStorage interface.
* @since 7
*/
declare class PersistentStorage {
/**
* Constructor parameters.
* @since 7
+ * @systemapi
+ * @hide
*/
constructor(appStorage: AppStorage, storage: Storage);
@@ -427,179 +483,112 @@ declare class PersistentStorage {
}
/**
+ * Defines the base class of storage.
* @since 7
+ * @systemapi
*/
declare class Storage {
/**
* Constructor parameters.
* @since 7
+ * @systemapi
+ * @hide
*/
constructor(needCrossThread?: boolean, file?: string);
/**
* Called when data is obtained.
* @since 7
+ * @systemapi
+ * @hide
*/
get(key: string): string | undefined;
/**
* Called when setting.
* @since 7
+ * @systemapi
+ * @hide
*/
set(key: string, val: any): void;
/**
* Called when data is cleared.
* @since 7
+ * @systemapi
+ * @hide
*/
clear(): void;
/**
* Called when data is deleted.
* @since 7
+ * @systemapi
+ * @hide
*/
delete(key: string): void;
}
/**
+ * Defines the Subscribale base class.
* @since 7
+ * @systemapi
+ * @hide
*/
declare abstract class SubscribaleAbstract {
/**
* Returns the ownership attribute set by the.
* @since 7
+ * @systemapi
+ * @hide
*/
private owningProperties_: Set;
/**
* Constructor.
* @since 7
+ * @systemapi
+ * @hide
*/
constructor();
/**
* Called when the notification property has changed.
* @since 7
+ * @systemapi
+ * @hide
*/
protected notifyPropertyHasChanged(propName: string, newValue: any): void;
/**
* Called when adding an already owned property.
* @since 7
+ * @systemapi
+ * @hide
*/
public addOwningProperty(subscriber: IPropertySubscriber): void;
/**
* Called when an already owned property is deleted.
* @since 7
+ * @systemapi
+ * @hide
*/
public removeOwningProperty(property: IPropertySubscriber): void;
/**
* Called when an already owned property is deleted by ID
* @since 7
+ * @systemapi
+ * @hide
*/
public removeOwningPropertyById(subscriberId: number): void;
}
/**
- * @since 9
- * @StageModelOnly
- */
- declare class ContentStorage {
- /**
- * Called when a link is set.
- * @since 9
- * @StageModelOnly
- */
- link(propName: string): any;
-
- /**
- * Called when a hyperlink is set.
- * @since 9
- * @StageModelOnly
- */
- setAndLink(propName: string, defaultValue: T): SubscribedAbstractProperty;
-
- /**
- * Called when a property is set.
- * @since 9
- * @StageModelOnly
- */
- prop(propName: string): any;
-
- /**
- * Called when dynamic properties are set.
- * @since 9
- * @StageModelOnly
- */
- setAndProp(propName: string, defaultValue: S): SubscribedAbstractProperty;
-
- /**
- * Called when owning or not.
- * @since 9
- * @StageModelOnly
- */
- has(propName: string): boolean;
-
- /**
- * Called when data is obtained.
- * @since 9
- * @StageModelOnly
- */
- get(propName: string): T | undefined;
-
- /**
- * Called when setting.
- * @since 9
- * @StageModelOnly
- */
- set(propName: string, newValue: T): boolean;
-
- /**
- * Called when setting or creating.
- * @since 9
- * @StageModelOnly
- */
- setOrCreate(propName: string, newValue: T): void;
-
- /**
- * Called when a deletion is made.
- * @since 9
- * @StageModelOnly
- */
- delete(propName: string): boolean;
-
- /**
- * Called when a dictionary is sorted.
- * @since 9
- * @StageModelOnly
- */
- keys(): IterableIterator;
-
- /**
- * Called when a cleanup occurs.
- * @since 9
- * @StageModelOnly
- */
- clear(): boolean;
-
- /**
- * Called when the data can be changed.
- * @since 9
- * @StageModelOnly
- */
- isMutable(propName: string): boolean;
-
- /**
- * Called when you check how much data is stored.
- * @since 9
- * @StageModelOnly
- */
- size(): number;
-}
-
-/**
+ * Used for ide.
* @since 7
+ * @systemapi
+ * @hide
*/
declare const appStorage: AppStorage;
diff --git a/api/@internal/component/ets/stepper.d.ts b/api/@internal/component/ets/stepper.d.ts
index 71338678597a559cd06a3b6ed8c7d736bd953b25..168d6d284137dc5f9de36532b19c3c44584b93b2 100644
--- a/api/@internal/component/ets/stepper.d.ts
+++ b/api/@internal/component/ets/stepper.d.ts
@@ -15,13 +15,11 @@
/**
* Declare the stepper.
-
* @since 8
*/
interface StepperInterface {
/**
* Called when the stepper component is used.
-
* @since 8
*/
(value?: { index?: number }): StepperAttribute;
@@ -34,35 +32,30 @@ interface StepperInterface {
declare class StepperAttribute extends CommonMethod {
/**
* Callback when the finish label is clicked.
-
* @since 8
*/
onFinish(callback: () => void): StepperAttribute;
/**
* Callback when the skip label is clicked.
-
* @since 8
*/
onSkip(callback: () => void): StepperAttribute;
/**
* Callback when the change label is clicked.
-
* @since 8
*/
onChange(callback: (prevIndex?: number, index?: number) => void): StepperAttribute;
/**
* Callback when the next label is clicked.
-
* @since 8
*/
onNext(callback: (index?: number, pendingIndex?: number) => void): StepperAttribute;
/**
* Callback when the previous label is clicked.
-
* @since 8
*/
onPrevious(callback: (index?: number, pendingIndex?: number) => void): StepperAttribute;
diff --git a/api/@internal/component/ets/stepper_item.d.ts b/api/@internal/component/ets/stepper_item.d.ts
index 042417cf4c0c916adb3fb8713aec2995e6d24a15..c7e0976f37ad4b64da3ca52491c2b25d1f359978 100644
--- a/api/@internal/component/ets/stepper_item.d.ts
+++ b/api/@internal/component/ets/stepper_item.d.ts
@@ -15,34 +15,29 @@
/**
* ItemState
- * @devices phone, tablet, car
* @since 8
*/
declare enum ItemState {
/**
* Default State
- * @devices phone, tablet, car
* @since 8
*/
Normal,
/**
* Disabled State
- * @devices phone, tablet, car
* @since 8
*/
Disabled,
/**
* Waiting State
- * @devices phone, tablet, car
* @since 8
*/
Waiting,
/**
* Skip State
- * @devices phone, tablet, car
* @since 8
*/
Skip,
@@ -50,53 +45,39 @@ declare enum ItemState {
/**
* Provides an interface for switching the stepperItem view on stepper container.
- * @devices phone, tablet, car
* @since 8
*/
interface StepperItemInterface {
/**
* Called when the stepperItem component is used.
- * @devices phone, tablet, car
* @since 8
*/
(): StepperItemAttribute;
}
/**
- * @devices phone, tablet, car
+ * Defines the stepper item attrbute functions.
* @since 8
*/
declare class StepperItemAttribute extends CommonMethod {
/**
* Called when the value of stepperItem prevLabel is set
- * @devices phone, tablet, car
* @since 8
*/
prevLabel(value: string): StepperItemAttribute;
/**
* Called when the value of stepperItem nextLabel is set
- * @devices phone, tablet, car
* @since 8
*/
nextLabel(value: string): StepperItemAttribute;
/**
* Called when the value of stepperItem status is set
- * @devices phone, tablet, car
* @since 8
*/
status(value?: ItemState): StepperItemAttribute;
}
-/**
- * @devices phone, tablet, car
- * @since 8
- */
declare const StepperItemInstance: StepperItemAttribute;
-
-/**
- * @devices phone, tablet, car
- * @since 8
- */
declare const StepperItem: StepperItemInterface;
diff --git a/api/@internal/component/ets/swiper.d.ts b/api/@internal/component/ets/swiper.d.ts
index 217295dd78a4a6df9dadf92fa98ba442b8ca901e..1a3f7ad21e13266ac548d3837f5493a408c2b669 100644
--- a/api/@internal/component/ets/swiper.d.ts
+++ b/api/@internal/component/ets/swiper.d.ts
@@ -38,7 +38,7 @@ declare class SwiperController {
/**
* Called when need to stop the swiper animation.
- * @since 8
+ * @since 7
*/
finishAnimation(callback?: () => void);
}
@@ -128,6 +128,7 @@ declare interface IndicatorStyle {
}
/**
+ * Defines the swiper attibute functions.
* @since 7
*/
declare class SwiperAttribute extends CommonMethod {
diff --git a/api/@internal/component/ets/tabs.d.ts b/api/@internal/component/ets/tabs.d.ts
index 93b8933721bf9616710a4bb80e117f7a56152652..509d578ff2c4dfef3bf4bc344923f42932ad0be0 100644
--- a/api/@internal/component/ets/tabs.d.ts
+++ b/api/@internal/component/ets/tabs.d.ts
@@ -79,6 +79,7 @@ interface TabsInterface {
}
/**
+ * Defines the tabs attribute functions.
* @since 7
*/
declare class TabsAttribute extends CommonMethod {
@@ -102,24 +103,14 @@ declare class TabsAttribute extends CommonMethod {
/**
* Called when the width of the bar graph is set.
- * @since 7
- */
- barWidth(value: number): TabsAttribute;
-
- /**
- * Called when the height of the bar graph is set.
- * @since 7
- */
- barHeight(value: number): TabsAttribute;
-
- /**
- * Called when the width of the bar graph is set.
+ * Notice: barWidth only supports Number type on 7, supports Length type since 8.
* @since 8
*/
barWidth(value: Length): TabsAttribute;
/**
* Called when the height of the bar graph is set.
+ * Notice: barHeight only supports Number type on 7, supports Length type since 8.
* @since 8
*/
barHeight(value: Length): TabsAttribute;
diff --git a/api/@internal/component/ets/text.d.ts b/api/@internal/component/ets/text.d.ts
index cdd575d2eba1f0b6bfc7f62042e04ea25c61cdc9..aa258e5c47a9c5179bc2d31f33ed1a4bbad793a2 100644
--- a/api/@internal/component/ets/text.d.ts
+++ b/api/@internal/component/ets/text.d.ts
@@ -13,7 +13,6 @@
* limitations under the License.
*/
-
/**
* Provides an interface for writing texts.
* @since 7
@@ -121,11 +120,5 @@ declare class TextAttribute extends CommonMethod {
baselineOffset(value: number | string): TextAttribute;
}
-/**
- * @since 7
- */
declare const TextInstance: TextAttribute;
-/**
- * @since 7
- */
-declare const Text: TextInterface;
\ No newline at end of file
+declare const Text: TextInterface;
diff --git a/api/@internal/component/ets/text_area.d.ts b/api/@internal/component/ets/text_area.d.ts
index 0bd8669c821a44c3924129fea575ea9758e2ecf0..d5898a5ad82cd590cc3f7512fb67c2c3b1868c34 100644
--- a/api/@internal/component/ets/text_area.d.ts
+++ b/api/@internal/component/ets/text_area.d.ts
@@ -13,7 +13,6 @@
* limitations under the License.
*/
-
/**
* Provides the method of switching the cursor position.
* @since 8
@@ -32,10 +31,10 @@ declare class TextAreaController {
}
/**
- * Defines the option of TextArea.
+ * Defines the options of TextArea.
* @since 7
*/
-declare interface TextAreaOption {
+declare interface TextAreaOptions {
/**
* The place holder text string.
* @since 7
@@ -64,7 +63,7 @@ interface TextAreaInterface {
* Called when writing multiple lines of text.
* @since 7
*/
- (value?: TextAreaOption): TextAreaAttribute;
+ (value?: TextAreaOptions): TextAreaAttribute;
}
/**
@@ -134,7 +133,6 @@ declare class TextAreaAttribute extends CommonMethod {
/**
* Called when the input changes.
- * @devices phone, tablet, car.
* @since 7
*/
onChange(callback: (value: string) => void): TextAreaAttribute;
diff --git a/api/@internal/component/ets/text_clock.d.ts b/api/@internal/component/ets/text_clock.d.ts
index 4d2fb2af1938c15ad8e4de17989be4b422ac12f6..a522bb3cc73cdec68cb760fc66414b84576a06d3 100644
--- a/api/@internal/component/ets/text_clock.d.ts
+++ b/api/@internal/component/ets/text_clock.d.ts
@@ -29,8 +29,8 @@ declare class TextClockController {
*/
start();
/**
- * Provides a stop event for textclock.
- * @since 8
+ * Provides a stop event for textclock.
+ * @since 8
*/
stop();
}
@@ -47,7 +47,7 @@ interface TextClockInterface {
* Where a negative value indicates the eastern time zone, for example, -8.
* @since 8
*/
- (options?: {timeZoneOffset?: number, controller?: TextClockController}): TextClockAttribute;
+ (options?: { timeZoneOffset?: number; controller?: TextClockController }): TextClockAttribute;
}
declare class TextClockAttribute extends CommonMethod {
@@ -98,5 +98,4 @@ declare class TextClockAttribute extends CommonMethod {
}
declare const TextClock: TextClockInterface;
-
declare const TextClockInstance: TextClockAttribute;
diff --git a/api/@internal/component/ets/text_input.d.ts b/api/@internal/component/ets/text_input.d.ts
index 8ad8b036d2a55cb38120462ae1c69c43cd0b9d11..3d613331f2f1b28fd9dc58fff8211382b6851b00 100644
--- a/api/@internal/component/ets/text_input.d.ts
+++ b/api/@internal/component/ets/text_input.d.ts
@@ -13,7 +13,6 @@
* limitations under the License.
*/
-
/**
* Declare the type of input box
* @since 7
@@ -98,10 +97,10 @@ declare class TextInputController {
}
/**
- * Defines the option of TextInput.
+ * Defines the options of TextInput.
* @since 7
*/
-declare interface TextInputOption {
+declare interface TextInputOptions {
/**
* The place holder text string.
* @since 7
@@ -130,10 +129,11 @@ interface TextInputInterface {
* Called when writing a single line of text.
* @since 7
*/
- (value?: TextInputOption): TextInputAttribute;
+ (value?: TextInputOptions): TextInputAttribute;
}
/**
+ * Defines the TextInput attribute functions.
* @since 7
*/
declare class TextInputAttribute extends CommonMethod {
@@ -168,11 +168,18 @@ declare class TextInputAttribute extends CommonMethod {
caretColor(value: ResourceColor): TextInputAttribute;
/**
- * Called when judging whether the text editing has changed.
+ * Called when judging whether the text editing change finished.
* @since 7
+ * @deprecated since 8
*/
onEditChanged(callback: (isEditing: boolean) => void): TextInputAttribute;
+ /**
+ * Called when judging whether the text editing change finished.
+ * @since 8
+ */
+ onEditChange(callback: (isEditing: boolean) => void): TextInputAttribute;
+
/**
* Called when submitted.
* @since 7
diff --git a/api/@internal/component/ets/text_picker.d.ts b/api/@internal/component/ets/text_picker.d.ts
index 8db6d4687d45dba790fed2ec386002c311ea08b8..9d91d8cf3e05453744de6d4d21efe3dc3df42d1e 100644
--- a/api/@internal/component/ets/text_picker.d.ts
+++ b/api/@internal/component/ets/text_picker.d.ts
@@ -14,10 +14,10 @@
*/
/**
- * Defines the option of TextPicker.
+ * Defines the options of TextPicker.
* @since 8
*/
-declare interface TextPickerOption {
+declare interface TextPickerOptions {
/**
* Specifies the range of the text selector.
*/
@@ -40,7 +40,7 @@ interface TextPickerInterface {
* Defines the TextPicker constructor.
* @since 8
*/
- (options?: TextPickerOption): TextPickerAttribute;
+ (options?: TextPickerOptions): TextPickerAttribute;
}
/**
@@ -88,10 +88,10 @@ declare interface TextPickerResult {
}
/**
- * Defines the TextPickerDialogOption for Text Picker Dialog.
+ * Defines the TextPickerDialogOptions for Text Picker Dialog.
* @since 8
*/
-declare interface TextPickerDialogOption extends TextPickerOption {
+declare interface TextPickerDialogOptions extends TextPickerOptions {
/**
* Called when the default height of the selected element is set.
* @since 8
@@ -123,7 +123,7 @@ declare class TextPickerDialog {
* Invoking method display.
* @since 8
*/
- static show(options?: TextPickerDialogOption);
+ static show(options?: TextPickerDialogOptions);
}
declare const TextPicker: TextPickerInterface;
diff --git a/api/@internal/component/ets/text_timer.d.ts b/api/@internal/component/ets/text_timer.d.ts
index 3001ddf1eede63b200a8507c59d17d9c7352385a..bf49c7c7e087bd74c73a9881bf31fc8df78be87a 100644
--- a/api/@internal/component/ets/text_timer.d.ts
+++ b/api/@internal/component/ets/text_timer.d.ts
@@ -44,10 +44,10 @@ declare class TextTimerController {
}
/**
- * Defines the option of TextTimer.
+ * Defines the options of TextTimer.
* @since 8
*/
-interface TextTimerOption {
+interface TextTimerOptions {
/**
* Sets whether to countdown.The default value is false.
* @since 8
@@ -77,7 +77,7 @@ interface TextTimerInterface {
* Defines the TextTimer constructor.
* @since 8
*/
- (options?: TextTimerOption): TextTimerAttribute;
+ (options?: TextTimerOptions): TextTimerAttribute;
}
/**
@@ -91,10 +91,10 @@ declare class TextTimerAttribute extends CommonMethod {
* @since 8
*/
format(value: string): TextTimerAttribute;
- /**
- * Called when the font color is set.
- * @since 8
- */
+ /**
+ * Called when the font color is set.
+ * @since 8
+ */
fontColor(value: ResourceColor): TextTimerAttribute;
/**
* Called when the font size is set.
@@ -106,15 +106,15 @@ declare class TextTimerAttribute extends CommonMethod {
* @since 8
*/
fontStyle(value: FontStyle): TextTimerAttribute;
- /**
- * Called when the fontWeight is set
- * @since 8
- */
+ /**
+ * Called when the fontWeight is set
+ * @since 8
+ */
fontWeight(value: number | FontWeight | string): TextTimerAttribute;
- /**
- * Called when the fontFamily is set
- * @since 8
- */
+ /**
+ * Called when the fontFamily is set
+ * @since 8
+ */
fontFamily(value: ResourceStr): TextTimerAttribute;
/**
* Called when the timer value is returned.
diff --git a/api/@internal/component/ets/piece.d.ts b/api/@internal/component/ets/time_picker.d.ts
similarity index 34%
rename from api/@internal/component/ets/piece.d.ts
rename to api/@internal/component/ets/time_picker.d.ts
index 5e67176d8caf32f99dde768ddbc23051dcef3f3b..46846092967dc22bed93895c964682f08610a96c 100644
--- a/api/@internal/component/ets/piece.d.ts
+++ b/api/@internal/component/ets/time_picker.d.ts
@@ -13,83 +13,103 @@
* limitations under the License.
*/
-
/**
- * Sets the relative position of icons and text.
+ * Defines the struct of TimePickerResult.
* @since 8
*/
-declare enum IconPosition {
+declare interface TimePickerResult {
/**
- * The icon is at the beginning of the text.
+ * Application hour
* @since 8
*/
- Start,
+ hour?: number;
/**
- * The icon is at the end of the text.
+ * Application minute
* @since 8
*/
- End,
+ minute?: number;
}
/**
- * Provides text and icons for setting block entries.
+ * Defines the options of TimePicker.
* @since 8
*/
-interface PieceInterface {
+declare interface TimePickerOptions {
/**
- * Called when setting the position of a block entry.
- * @since 8
+ * Specifies the time selector check time.
*/
- (options?: { content: string; icon?: string }): PieceAttribute;
+ selected?: Date;
}
/**
+ * Defines the TimePicker Component.
* @since 8
*/
-declare class PieceAttribute extends CommonMethod {
+interface TimePickerInterface {
/**
- * Called when the relative position of the icon and the text is set.
+ * Defines the TimePicker constructor.
* @since 8
*/
- iconPosition(value: IconPosition): PieceAttribute;
+ (options?: TimePickerOptions): TimePickerAttribute;
+}
+
+/**
+ * Defines the TimePicker attribute functions.
+ * @since 8
+ */
+declare class TimePickerAttribute extends CommonMethod {
/**
- * Called when the value of Piece fontColor is set
+ * Time Selector: indicates whether to display the 24-hour clock.
* @since 8
*/
- fontColor(value: ResourceColor): PieceAttribute;
+ useMilitaryTime(value: boolean): TimePickerAttribute;
+
/**
- * Called when the value of Piece fontSize is set
+ * This event is triggered when a TimePicker time is selected.
* @since 8
*/
- fontSize(value: Length): PieceAttribute;
+ onChange(callback: (value: TimePickerResult) => void): TimePickerAttribute;
+}
+
+/**
+ * Defines the TimePickerDialogOptions for Data Picker Dialog.
+ * @since 8
+ */
+declare interface TimePickerDialogOptions extends TimePickerOptions {
/**
- * Called when the value of Piece fontStyle is set
+ * Time Selector: indicates whether to display the 24-hour clock.
* @since 8
*/
- fontStyle(value: FontStyle): PieceAttribute;
+ useMilitaryTime?: boolean;
/**
- * Called when the value of Piece fontWeight is set
+ * Called when the OK button in the dialog is clicked.
* @since 8
*/
- fontWeight(value: number | FontWeight | string): PieceAttribute;
+ onAccept?: (value: TimePickerResult) => void;
/**
- * Called when the value of Piece fontFamily is set
+ * Called when the Cancel button in the dialog is clicked.
* @since 8
*/
- fontFamily(value: ResourceStr): PieceAttribute;
+ onCancel?: () => void;
/**
- * Called when the value of Piece showDelete is set
+ * This event is triggered when a TimePicker Time or time is selected in dialog.
* @since 8
*/
- showDelete(value: boolean): PieceAttribute;
+ onChange?: (value: TimePickerResult) => void;
+}
+
+/**
+ * Defines TimePickerDialog which uses show method to show TimePicker dialog.
+ * @since 8
+ */
+declare class TimePickerDialog {
/**
- * Default icon is invisible,
- * Callback onClose function when icon is clicked
+ * Invoking method display.
* @since 8
*/
- onClose(callback: () => void): PieceAttribute;
+ static show(options?: TimePickerDialogOptions);
}
-declare const Piece: PieceInterface;
-declare const PieceInstance: PieceAttribute;
+declare const TimePicker: TimePickerInterface;
+declare const TimePickerInstance: TimePickerAttribute;
diff --git a/api/@internal/component/ets/toggle.d.ts b/api/@internal/component/ets/toggle.d.ts
index bb8562b1a7898c4afdc86130e52e39b90270b609..b51b5b490ee4ce8f25d7959d29425192be4fb33c 100644
--- a/api/@internal/component/ets/toggle.d.ts
+++ b/api/@internal/component/ets/toggle.d.ts
@@ -38,6 +38,7 @@ declare enum ToggleType {
}
/**
+ * Defines the toggle interface.
* @since 8
*/
interface ToggleInterface {
@@ -49,6 +50,7 @@ interface ToggleInterface {
}
/**
+ * Defines the toggle attibute functions
* @since 8
*/
declare class ToggleAttribute extends CommonMethod {
diff --git a/api/@internal/component/ets/units.d.ts b/api/@internal/component/ets/units.d.ts
index 0d9d5ba26b6f4f8c3ba12c1f6f61e86e47d8d245..1eeb8aeadfd7701427cffe2babd034041c6f3e2d 100644
--- a/api/@internal/component/ets/units.d.ts
+++ b/api/@internal/component/ets/units.d.ts
@@ -150,28 +150,99 @@ declare interface Area {
* Defines the local position.
* @since 8
*/
- pos: Position;
+ position: Position;
/**
* Defines the global position.
* @since 8
*/
- globalPos: Position;
+ globalPosition: Position;
}
/**
* Defines the position.
- * @since 8
+ * @since 7
*/
declare interface Position {
/**
* Coordinate x of the Position.
- * @since 8
+ * @since 7
*/
- x: Length;
+ x?: Length;
/**
* Coordinate y of the Position.
- * @since 8
+ * @since 7
+ */
+ y?: Length;
+}
+
+/**
+ * Defines the constrain size options.
+ * @since 7
+ */
+declare interface ConstraintSizeOptions {
+ /**
+ * Defines the min width.
+ * @since 7
+ */
+ minWidth?: Length;
+ /**
+ * Defines the max width.
+ * @since 7
+ */
+ maxWidth?: Length;
+ /**
+ * Defines the min height.
+ * @since 7
+ */
+ minHeight?: Length;
+ /**
+ * Defines the max height.
+ * @since 7
+ */
+ maxHeight?: Length;
+}
+
+/**
+ * Defines the size options.
+ * @since 7
+ */
+declare interface SizeOptions {
+ /**
+ * Defines the width.
+ * @since 7
+ */
+ width?: Length;
+ /**
+ * Defines the height.
+ * @since 7
+ */
+ height?: Length;
+}
+
+/**
+ * Defines the options of border.
+ * @since 7
+ */
+declare interface BorderOptions {
+ /**
+ * Defines the border width.
+ * @since 7
+ */
+ width?: Length;
+ /**
+ * Defines the border color.
+ * @since 7
+ */
+ color?: ResourceColor;
+ /**
+ * Defines the border radius.
+ * @since 7
+ */
+ radius?: Length;
+ /**
+ * Defines the border style.
+ * @since 7
*/
- y: Length;
+ style?: BorderStyle;
}
diff --git a/api/@internal/component/ets/video.d.ts b/api/@internal/component/ets/video.d.ts
index d80052caf7abe2400a29a624f146b22819f4e770..1672760d4bdd348513d46b9c2fcacd842593e3e0 100644
--- a/api/@internal/component/ets/video.d.ts
+++ b/api/@internal/component/ets/video.d.ts
@@ -36,7 +36,7 @@ declare enum SeekMode {
*/
ClosestKeyframe,
- /**
+ /**
* Seek to frames closest the time point.
* @since 8
*/
@@ -48,67 +48,69 @@ declare enum SeekMode {
* @since 8
*/
declare enum PlaybackSpeed {
- /**
- * 0.75x speed playback.
- * @since 8
- */
- Speed_Forward_0_75_X,
-
- /**
- * 1.00x speed playback.
- * @since 8
- */
- Speed_Forward_1_00_X,
-
- /**
- * 1.25x speed playback.
- * @since 8
- */
- Speed_Forward_1_25_X,
-
- /**
- * 1.75x speed playback.
- * @since 8
- */
- Speed_Forward_1_75_X,
-
- /**
- * 2.00x speed playback.
- * @since 8
- */
- Speed_Forward_2_00_X,
- }
-
- /**
- * @since 7
- */
- interface VideoOption {
- /**
- * src of video.
- * @since 7
- */
- src?: string | Resource;
-
- /**
- * playback rate of video.
- * @since 7
- */
- currentProgressRate?: number | string | PlaybackSpeed;
-
- /**
- * preview uri of video.
- * @since 8
- */
- previewUri?: string | PixelMap | Resource;
-
- /**
- * controller of video.
- * @since 7
- */
- controller?: VideoController;
- }
+ /**
+ * 0.75x speed playback.
+ * @since 8
+ */
+ Speed_Forward_0_75_X,
+
+ /**
+ * 1.00x speed playback.
+ * @since 8
+ */
+ Speed_Forward_1_00_X,
+
+ /**
+ * 1.25x speed playback.
+ * @since 8
+ */
+ Speed_Forward_1_25_X,
+
+ /**
+ * 1.75x speed playback.
+ * @since 8
+ */
+ Speed_Forward_1_75_X,
+
+ /**
+ * 2.00x speed playback.
+ * @since 8
+ */
+ Speed_Forward_2_00_X,
+}
+
+/**
+ * Defines the video options.
+ * @since 7
+ */
+declare interface VideoOptions {
+ /**
+ * src of video.
+ * @since 7
+ */
+ src?: string | Resource;
+
+ /**
+ * playback rate of video.
+ * @since 7
+ */
+ currentProgressRate?: number | string | PlaybackSpeed;
+
+ /**
+ * preview uri of video.
+ * @since 7
+ */
+ previewUri?: string | PixelMap | Resource;
+
+ /**
+ * controller of video.
+ * @since 7
+ */
+ controller?: VideoController;
+}
/**
+ * Defines the video controller.
* @since 7
*/
declare class VideoController {
@@ -132,7 +134,7 @@ declare class VideoController {
/**
* Provides an event to stop playback.
- * @since 6
+ * @since 7
*/
stop();
@@ -142,6 +144,18 @@ declare class VideoController {
*/
setCurrentTime(value: number);
+ /**
+ * Provides a full screen playback method.
+ * @since 7
+ */
+ requestFullscreen(value: boolean);
+
+ /**
+ * Provides a method to exit full screen playback.
+ * @since 7
+ */
+ exitFullscreen();
+
/**
* Provide the progress method of video playback.
* @since 8
@@ -150,6 +164,7 @@ declare class VideoController {
}
/**
+ * Defines the video interface.
* @since 7
*/
interface VideoInterface {
@@ -157,10 +172,11 @@ interface VideoInterface {
* Set the value.
* @since 7
*/
- (value: VideoOption): VideoAttribute;
+ (value: VideoOptions): VideoAttribute;
}
/**
+ * Defines the video attribute functions.
* @since 7
*/
declare class VideoAttribute extends CommonMethod {
@@ -212,6 +228,11 @@ declare class VideoAttribute extends CommonMethod {
*/
onFinish(event: () => void): VideoAttribute;
+ /**
+ * Called when the video enters and exits the full screen.
+ * @since 7
+ */
+ onFullscreenChange(callback: (event?: { fullscreen: boolean }) => void): VideoAttribute;
/**
* Called when the video preparation is complete.
* @since 7
diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts
index 6c34f1228cdd79bbb2cafafe49153075d5de5968..b98ca50d6beae32a333b759c35c1c6ee6c4e5177 100755
--- a/api/@internal/component/ets/web.d.ts
+++ b/api/@internal/component/ets/web.d.ts
@@ -1,3 +1,22 @@
+/*
+ * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Enum type supplied to {@link getMessageLevel} for receiving the console log level of JavaScript.
+ * @since 8
+ */
declare enum MessageLevel {
/**
* Debug level.
@@ -27,35 +46,43 @@ declare enum MessageLevel {
* Warn level.
* @since 8
*/
- Warn
+ Warn,
}
-declare enum MixedModeContent {
+/**
+ * The Web's behavior to load from HTTP or HTTPS. Defaults to MixedMode.None.
+ * @since 8
+ */
+declare enum MixedMode {
/**
- * MIXED_CONTENT_ALWAYS_ALLOW level.
+ * Allows all sources.
* @since 8
*/
- MIXED_CONTENT_ALWAYS_ALLOW,
+ All,
/**
- * MIXED_CONTENT_NEVER_ALLOW level.
+ * Allows sources Compatibly.
* @since 8
*/
- MIXED_CONTENT_NEVER_ALLOW,
+ Compatible,
/**
- * MIXED_CONTENT_COMPATIBILITY_MODE level.
+ * Don't allow unsecure sources from a secure origin.
* @since 8
*/
- MIXED_CONTENT_COMPATIBILITY_MODE,
+ None,
}
+/**
+ * Enum type supplied to {@link getHitTest} for indicating the cursor node HitTest.
+ * @since 8
+ */
declare enum HitTestType {
/**
* The edit text.
* @since 8
*/
- Edit,
+ EditText,
/**
* The email address.
@@ -67,13 +94,13 @@ declare enum HitTestType {
* The HTML::a tag with src=http.
* @since 8
*/
- Http,
+ HttpAnchor,
/**
* The HTML::a tag with src=http + HTML::img.
* @since 8
*/
- HttpImg,
+ HttpAnchorImg,
/**
* The HTML::img tag.
@@ -94,29 +121,40 @@ declare enum HitTestType {
Phone,
/**
- * Other unknown hit test.
+ * Other unknown HitTest.
* @since 8
*/
- Unknown
+ Unknown,
}
+/**
+ * Enum type supplied to {@link cacheMode} for setting the Web cache mode.
+ * @since 8
+ */
declare enum CacheMode {
/**
* load online and not cache.
+ * @since 8
*/
None,
/**
* Load cache first, then online.
+ * @since 8
*/
Online,
/**
* load cache and not online.
+ * @since 8
*/
- Only
+ Only,
}
+/**
+ * Defines the js result.
+ * @since 8
+ */
declare class JsResult {
/**
* Constructor.
@@ -137,46 +175,59 @@ declare class JsResult {
handleConfirm(): void;
}
+/**
+ * Encompassed message information as parameters to {@link onConsole} method.
+ * @since 8
+ */
declare class ConsoleMessage {
/**
* Constructor.
+ * @param message The console message.
+ * @param sourceId The Web source file's path and name.
+ * @param lineNumber The line number of the console message.
+ * @param messageLevel The console log level.
+ *
* @since 8
*/
constructor(message: string, sourceId: string, lineNumber: number, messageLevel: MessageLevel);
/**
- * Get the message of a console message.
- *
+ * Gets the message of a console message.
* @return Return the message of a console message.
+ *
* @since 8
*/
getMessage(): string;
/**
- * Get the source id of a console message.
+ * Gets the Web source file's path and name of a console message.
+ * @return Return the Web source file's path and name of a console message.
*
- * @return Return the source id of a console message.
* @since 8
*/
getSourceId(): string;
/**
- * Get the line number of a console message.
- *
+ * Gets the line number of a console message.
* @return Return the line number of a console message.
+ *
* @since 8
*/
getLineNumber(): number;
/**
- * Get the message level of a console message.
- *
+ * Gets the message level of a console message.
* @return Return the message level of a console message, which can be {@link MessageLevel}.
+ *
* @since 8
*/
getMessageLevel(): MessageLevel;
}
+/**
+ * Defines the Web resource request.
+ * @since 8
+ */
declare class WebResourceRequest {
/**
* Constructor.
@@ -185,46 +236,128 @@ declare class WebResourceRequest {
constructor();
/**
- * Get request headers.
+ * Gets request headers.
+ * @return Return the request headers
*
- * @return Return a map of the request headers
* @since 8
*/
- getRequestHeader(): Map;
+ getRequestHeader(): Array;
/**
- * Get the request url.
+ * Gets the request URL.
+ * @return Return the request URL.
*
- * @return Return the request url.
* @since 8
*/
getRequestUrl(): string;
/**
* Check whether the request is associated with gesture.
- *
* @return Return {@code true} if the request is associated with gesture;return {@code false} otherwise.
+ *
* @since 8
*/
isRequestGesture(): boolean;
/**
* Check whether the request is for getting the main frame.
+ * @return Return {@code true} if the request is associated with gesture for getting the main frame; return {@code false} otherwise.
*
- * @return Return {@code true} if the request is associated with gesturefor getting the main frame; return {@code false} otherwise.
* @since 8
*/
isMainFrame(): boolean;
/**
* Check whether the request redirects.
- *
* @return Return {@code true} if the request redirects; return {@code false} otherwise.
+ *
* @since 8
*/
isRedirect(): boolean;
}
+/**
+ * Defines the Web resource response.
+ * @since 8
+ */
+ declare class WebResourceResponse {
+ /**
+ * Constructor.
+ * @since 8
+ */
+ constructor();
+
+ /**
+ * Gets the response data.
+ * @return Return the response data.
+ *
+ * @since 8
+ */
+ getResponseData(): string;
+
+ /**
+ * Gets the response encoding.
+ * @return Return the response encoding.
+ *
+ * @since 8
+ */
+ getResponseEncoding(): string;
+
+ /**
+ * Gets the response MIME type.
+ * @return Return the response MIME type.
+ *
+ * @since 8
+ */
+ getResponseMimeType(): string;
+
+ /**
+ * Gets the reason message.
+ * @return Return the reason message.
+ *
+ * @since 8
+ */
+ getReasonMessage(): string;
+
+ /**
+ * Gets the response headers.
+ * @return Return the response headers.
+ *
+ * @since 8
+ */
+ getResponseHeader() : Array;
+
+ /**
+ * Gets the response code.
+ * @return Return the response code.
+ *
+ * @since 8
+ */
+ getResponseCode(): number;
+}
+
+/**
+ * Defines the Web's request/response header.
+ * @since 8
+ */
+declare interface Header {
+ /**
+ * Gets the key of the request/response header.
+ * @since 8
+ */
+ headerKey: string;
+
+ /**
+ * Gets the value of the request/response header.
+ * @since 8
+ */
+ headerValue: string;
+}
+
+/**
+ * Defines the Web resource error.
+ * @since 8
+ */
declare class WebResourceError {
/**
* Constructor.
@@ -233,22 +366,26 @@ declare class WebResourceError {
constructor();
/**
- * Get the info of the web resource error.
+ * Gets the info of the Web resource error.
+ * @return Return the info of the Web resource error.
*
- * @return Return the info of the web resource error.
* @since 8
*/
getErrorInfo(): string;
/**
- * Get the code of the web resource error.
+ * Gets the code of the Web resource error.
+ * @return Return the code of the Web resource error.
*
- * @return Return the code of the web resource error.
* @since 8
*/
getErrorCode(): number;
}
+/**
+ * Defines the js geolocation request.
+ * @since 8
+ */
declare class JsGeolocation {
/**
* Constructor.
@@ -258,15 +395,19 @@ declare class JsGeolocation {
/**
* Report the geolocation permission status from users.
- *
* @param origin The origin that ask for the geolocation permission.
* @param allow The geolocation permission status.
* @param retain Whether to allow the geolocation permission status to be saved to the system.
+ *
* @since 8
*/
invoke(origin: string, allow: boolean, retain: boolean): void;
}
+/**
+ * Defines the Web cookie.
+ * @since 8
+ */
declare class WebCookie {
/**
* Constructor.
@@ -287,7 +428,11 @@ declare class WebCookie {
saveCookie();
}
-declare class WebController {
+/**
+ * Defines the Web controller.
+ * @since 8
+ */
+ declare class WebController {
/**
* Constructor.
* @since 8
@@ -307,28 +452,42 @@ declare class WebController {
onActive(): void;
/**
- * Clear the history in the Web.
+ * Let the Web zoom by.
+ * @param factor The zoom factor.
+ *
+ * @since 8
+ */
+ zoom(factor: number): void;
+
+ /**
+ * Clears the history in the Web.
* @since 8
*/
clearHistory(): void;
/**
- * Means to load a piece of code and execute JS code in the context of the currently displayed page
+ * Loads a piece of code and execute JS code in the context of the currently displayed page.
+ * @param options The options with a piece of code and a callback.
+ *
* @since 8
*/
- runJavaScript(jscode: string, callback?: (result: string) => void);
+ runJavaScript(options: { script: string, callback?: (result: string) => void });
/**
- * Indicates that a piece of code is loaded
+ * Loads the data or URL.
+ * @param options The options with the data or URL and other information.
+ *
* @since 8
*/
- loadData(value: { 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
+ * Loads the given URL.
+ * @param options The options with the URL and other information.
+ *
* @since 8
*/
- loadUrl(url: string, additionalHttpHeaders?: Array<{ key: string, value: string }>);
+ loadUrl(options: { url: string | Resource, headers?: Array });
/**
* refreshes the current URL.
@@ -344,142 +503,183 @@ declare class WebController {
/**
* Registers the JavaScript object and method list.
+ * @param options The option with the JavaScript object and method list.
+ *
* @since 8
*/
- registerJavaScriptProxy(value: { obj: object, name: string, methodList: Array });
+ registerJavaScriptProxy(options: { object: object, name: string, methodList: Array });
/**
* Deletes a registered JavaScript object with given name.
+ * @param name The name of a registered JavaScript object to be deleted.
+ *
* @since 8
*/
- deleteJavaScriptProxy(value: { name: string });
+ deleteJavaScriptRegister(name: string);
/**
- * Get the type of hit test.
+ * Gets the type of HitTest.
* @since 8
*/
getHitTest(): HitTestType;
/**
- * Get the request focus.
+ * Gets the request focus.
* @since 8
*/
requestFocus();
/**
- * Check whether the web page can go back
- * @since 8
- */
+ * Checks whether the web page can go back.
+ * @since 8
+ */
accessBackward(): boolean;
/**
- * Check whether the web page can go forward
- * @since 8
- */
+ * Checks whether the web page can go forward.
+ * @since 8
+ */
accessForward(): boolean;
/**
- * Check whether the web page can go back or forward the given number of steps
- * @since 8
- */
+ * Checks whether the web page can go back or forward the given number of steps.
+ * @param step The number of steps.
+ *
+ * @since 8
+ */
accessStep(step: number): boolean;
/**
- * Go back in the history of the web
- * @since 8
- */
+ * Goes back in the history of the web page.
+ * @since 8
+ */
backward();
/**
- * Go forward in the history of the web
- * @since 8
- */
+ * Goes forward in the history of the web page.
+ * @since 8
+ */
forward();
-
}
+/**
+ * Defines the Web options.
+ * @since 8
+ */
declare interface WebOptions {
/**
- * Set the address of the web page to be displayed
+ * Sets the address of the web page to be displayed.
* @since 8
*/
src: string | Resource;
+ /**
+ * Sets the controller of the Web.
+ * @since 8
+ */
controller: WebController;
}
+/**
+ * Defines the Web interface.
+ * @since 8
+ */
interface WebInterface {
/**
- * Set Value.
+ * Sets Value.
* @since 8
*/
(value: WebOptions): WebAttribute;
}
+/**
+ * Defines the Web attribute functions.
+ * @since 8
+ */
declare class WebAttribute extends CommonMethod {
/**
- * Set whether WebView allows JavaScript scripts to execute
+ * Sets whether the Web allows JavaScript scripts to execute.
+ * @param javaScriptAccess {@code true} means the Web can allows JavaScript scripts to execute; {@code false} otherwise.
+ *
* @since 8
*/
javaScriptAccess(javaScriptAccess: boolean): WebAttribute;
/**
- * Enable or disable local file system access in WebView
+ * Sets whether enable local file system access in Web.
+ * @param fileAccess {@code true} means enable local file system access in Web; {@code false} otherwise.
+ *
* @since 8
*/
fileAccess(fileAccess: boolean): WebAttribute;
/**
- * Whether to allow image resources to be loaded from the network
+ * Sets whether to allow image resources to be loaded from the network.
+ * @param onlineImageAccess {@code true} means the Web can allow image resources to be loaded from the network;
+ * {@code false} otherwise.
+ *
* @since 8
*/
onlineImageAccess(onlineImageAccess: boolean): WebAttribute;
/**
- * Setting Whether to Enable the DOM Storage API Permission
+ * Sets whether to enable the DOM Storage API permission.
+ * @param domStorageAccess {@code true} means enable the DOM Storage API permission in Web; {@code false} otherwise.
+ *
* @since 8
*/
domStorageAccess(domStorageAccess: boolean): WebAttribute;
/**
- * Set whether WebView should automatically load image resources
+ * Sets whether the Web can automatically load image resources.
+ * @param imageAccess {@code true} means the Web can automatically load image resources; {@code false} otherwise.
+ *
* @since 8
*/
imageAccess(imageAccess: boolean): WebAttribute;
/**
- * Whether to load HTTP and HTTPS content
+ * Sets how to load HTTP and HTTPS content.
+ * @param mixedMode The mixed mode, which can be {@link MixedMode}.
+ *
* @since 8
*/
- mixedMode(mixedMode: MixedModeContent): WebAttribute;
+ mixedMode(mixedMode: MixedMode): WebAttribute;
/**
- * Sets whether the WebView supports zooming using on-screen controls or gestures
+ * Sets whether the Web supports zooming using gestures.
+ * @param zoomAccess {@code true} means the Web supports zooming using gestures; {@code false} otherwise.
+ *
* @since 8
*/
zoomAccess(zoomAccess: boolean): WebAttribute;
/**
- * Indicates whether to allow access to geographical locations
+ * Sets whether to allow access to geographical locations.
+ * @param geolocationAccess {@code true} means the Web allows access to geographical locations; {@code false} otherwise.
+ *
* @since 8
*/
geolocationAccess(geolocationAccess: boolean): WebAttribute;
/**
- * Inject the arkUI JS object into H5 and invoke the function of the object in H5.
+ * Injects the JavaScript object into window and invoke the function in window.
+ * @param javaScriptProxy The JavaScript object to be injected.
+ *
* @since 8
*/
- javaScriptProxy(javaScriptProxy: { obj: object, name: string, methodList: Array }): WebAttribute;
+ javaScriptProxy(javaScriptProxy: { object: object, name: string, methodList: Array,
+ controller: WebController }): WebAttribute;
- /*
+ /**
* 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 true} means the Web can save the password; {@code false} otherwise.
*
* @since 8
*/
password(password: boolean): WebAttribute;
/**
- * Sets the mode of cache in the Web.
+ * Sets the mode of cache in Web.
* @param cacheMode The cache mode, which can be {@link CacheMode}.
*
* @since 8
@@ -488,7 +688,7 @@ declare class WebAttribute extends CommonMethod {
/**
* Sets whether the Web should save the table data.
- * @param tableData {@code ture} means the Web can save the table data; {@code false} otherwise.
+ * @param tableData {@code true} means the Web can save the table data; {@code false} otherwise.
*
* @since 8
*/
@@ -496,7 +696,7 @@ declare class WebAttribute extends CommonMethod {
/**
* Sets whether the Web access meta 'viewport' in HTML.
- * @param wideViewModeAccess {@code ture} means the Web access meta 'viewport' in HTML; {@code false} otherwise.
+ * @param wideViewModeAccess {@code true} means the Web access meta 'viewport' in HTML; {@code false} otherwise.
*
* @since 8
*/
@@ -504,7 +704,7 @@ declare class WebAttribute extends CommonMethod {
/**
* Sets whether the Web access overview mode.
- * @param overviewModeAccess {@code ture} means the Web access overview mode; {@code false} otherwise.
+ * @param overviewModeAccess {@code true} means the Web access overview mode; {@code false} otherwise.
*
* @since 8
*/
@@ -520,110 +720,133 @@ declare class WebAttribute extends CommonMethod {
/**
* Sets whether the Web access the database.
- * @param databaseAccess {@code ture} means the Web access the database; {@code false} otherwise.
+ * @param databaseAccess {@code true} means the Web access the database; {@code false} otherwise.
*
* @since 8
*/
databaseAccess(databaseAccess: boolean): WebAttribute;
/**
- * Triggered at the end of web page loading
+ * Sets the Web's user agent.
+ * @param userAgent The Web's user agent.
+ *
+ * @since 8
+ */
+ userAgent(userAgent: string): WebAttribute;
+
+ /**
+ * Triggered at the end of web page loading.
+ * @param callback The triggered function at the end of web page loading.
+ *
* @since 8
*/
onPageEnd(callback: (event?: { url: string }) => void): WebAttribute;
/**
- * Triggered at the begin of web page loading
+ * Triggered at the begin of web page loading.
+ * @param callback The triggered function at the begin of web page loading.
+ *
* @since 8
*/
onPageBegin(callback: (event?: { url: string }) => void): WebAttribute;
/**
- * Triggered when the page loading progress changes
+ * Triggered when the page loading progress changes.
+ * @param callback The triggered function when the page loading progress changes.
+ *
* @since 8
*/
onProgressChange(callback: (event?: { newProgress: number }) => void): WebAttribute;
/**
- * Triggered when the title of the main application document changes
+ * Triggered when the title of the main application document changes.
+ * @param callback The triggered function when the title of the main application document changes.
+ *
* @since 8
*/
onTitleReceive(callback: (event?: { title: string }) => void): WebAttribute;
/**
- * Hide prompt to ask for the geolocation permission.
+ * Triggered when requesting to hide the geolocation.
+ * @param callback The triggered function when requesting to hide the geolocation permission.
+ *
* @since 8
*/
onGeolocationHide(callback: () => void): WebAttribute;
/**
- * Show prompt to ask for the geolocation permission.
- *
- * @param origin the origin of the resource to get geolocation.
- * @param geolocation callback to report geolocation.
+ * Triggered when requesting to show the geolocation permission.
+ * @param callback The triggered function when requesting to show the geolocation permission.
+ *
* @since 8
*/
onGeolocationShow(callback: (event?: { origin: string, geolocation: JsGeolocation }) => void): WebAttribute;
/**
- * Get WebView focus callback event
+ * Triggered when the Web gets the focus.
+ * @param callback The triggered function when the Web gets the focus.
+ *
* @since 8
*/
- onRequestSelected(event: () => void): WebAttribute;
+ onRequestSelected(callback: () => void): WebAttribute;
/**
- * Triggered when the web page wants to display a JavaScript alert() dialog.
- *
+ * Triggered when the Web 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
*/
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 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
*/
- onBeforeUnload(callback: (event?: { message: string, result: JsResult }) => boolean): WebAttribute;
+ onBeforeUnload(callback: (event?: { url: string, message: string, result: JsResult }) => boolean): WebAttribute;
/**
* Triggered 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
*/
- 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.
- *
* @param callback The triggered function when the web page receives a JavaScript console message.
+ *
* @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.
- *
* @param callback The triggered function when the web page receives a web resource loading error.
+ *
* @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.
- *
* @param callback The triggered function when the web page receives a web resource loading HTTP error.
+ *
* @since 8
*/
- onHttpErrorReceive(callback: (event?: {request: WebResourceRequest, error: WebResourceError}) => void): WebAttribute;
+ onHttpErrorReceive(callback: (event?: { request: WebResourceRequest,
+ response: WebResourceResponse }) => void): WebAttribute;
/**
- * Triggered when download start
+ * Triggered when starting to download.
+ * @param callback The triggered function when starting to download.
+ *
* @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.
@@ -634,26 +857,24 @@ declare class WebAttribute extends CommonMethod {
onRefreshAccessedHistory(callback: (event?: { url: string, refreshed: boolean }) => void): WebAttribute;
/**
- * Triggered when the url is about to be loaded.
- * @param callback The triggered callback when the url is about to be loaded.
- * @return Returns {@code ture} to let the load stop; return {@code false} to let the load continue.
+ * Triggered when the URL loading is intercepted.
+ * @param callback The triggered callback when the URL loading is intercepted.
*
* @since 8
*/
onUrlLoadIntercept(callback: (event?: { data: string | WebResourceRequest }) => boolean): WebAttribute;
/**
- * Triggered when the Web page receives the ssl Error.
- * @param callback The triggered callback when the Web page receives the ssl Error.
+ * Triggered when the Web page receives an ssl Error.
+ * @param callback The triggered callback when the Web page receives an ssl Error.
*
* @since 8
*/
onSslErrorReceive(callback: (event?: { handler: Function, error: object }) => void): WebAttribute;
/**
- * Triggered when the render process is exited.
- * @param callback The triggered when the render process is exited.
- * @return Returns {@code ture} to handle the situation; return {@code false} to kill the render process.
+ * Triggered when the render process exits.
+ * @param callback The triggered when the render process exits.
*
* @since 8
*/
@@ -662,7 +883,6 @@ declare class WebAttribute extends CommonMethod {
/**
* Triggered when the file selector shows.
* @param callback The triggered when the file selector shows.
- * @return Returns {@code ture} to handle the situation; return {@code false} to use default handling.
*
* @since 8
*/
@@ -670,4 +890,4 @@ declare class WebAttribute extends CommonMethod {
}
declare const Web: WebInterface;
-declare const WebInstance: WebAttribute;
+declare const WebInstance: WebAttribute;
\ No newline at end of file
diff --git a/api/@internal/component/ets/xcomponent.d.ts b/api/@internal/component/ets/xcomponent.d.ts
index 9cbc7cb1cd9c0f6264ff0072422e178da1e6d947..119d2f59edf883c81f9596c2150e92593eeaea10 100644
--- a/api/@internal/component/ets/xcomponent.d.ts
+++ b/api/@internal/component/ets/xcomponent.d.ts
@@ -16,13 +16,11 @@
/**
* Defines XComponentController
* @since 8
- * @systemapi
*/
declare class XComponentController {
/**
* constructor.
* @since 8
- * @systemapi
*/
constructor();
@@ -32,46 +30,52 @@ declare class XComponentController {
* @systemapi
*/
getXComponentSurfaceId();
+
+ /**
+ * get the context of native XComponent.
+ * @since 8
+ */
+ getXComponentContext();
+
+ /**
+ * set the surface size created by XComponent.
+ * @since 8
+ * @systemapi
+ */
+ setXComponentSurfaceSize(value: {
+ surfaceWidth: number;
+ surfaceHeight: number;
+ });
}
/**
* Defines XComponent.
* @since 8
- * @systemapi
*/
interface XComponentInterface {
/**
* Constructor parameters
* @since 8
- * @systemapi
*/
- (value: {
- id: string;
- type: string;
- libraryname?: string;
- controller?: XComponentController;
- }): XComponentAttribute;
+ (value: { id: string; type: string; libraryname?: string; controller?: XComponentController }): XComponentAttribute;
}
/**
* Defines XComponentAttribute.
* @since 8
- * @systemapi
*/
declare class XComponentAttribute extends CommonMethod {
/**
* Called when judging whether the xcomponent surface is created.
* @since 8
- * @systemapi
*/
- onLoad(callback: (event?: object) => void): XComponentAttribute;
+ onLoad(callback: (event?: object) => void): XComponentAttribute;
/**
* Called when judging whether the xcomponent is destroyed.
* @since 8
- * @systemapi
*/
- onDestroy(event: () => void): XComponentAttribute;
+ onDestroy(event: () => void): XComponentAttribute;
}
declare const XComponent: XComponentInterface;
diff --git a/api/@internal/ets/index.d.ts b/api/@internal/ets/index.d.ts
index 4a9e2b6b33809e76eb91f12c8ba4779d2bb51a1b..6199f456664bd425babb063bc9eabf0c99663b13 100644
--- a/api/@internal/ets/index.d.ts
+++ b/api/@internal/ets/index.d.ts
@@ -13,5 +13,6 @@
* limitations under the License.
*/
+export * from './featureability';
export * from './global';
export * from './lifecycle';
diff --git a/api/@internal/ets/lifecycle.d.ts b/api/@internal/ets/lifecycle.d.ts
index e93c7b285fe44b2b8e654613baf2e5b8786cfe96..2c2520a6c47221f04f9dcfebc97e390c523b0668 100644
--- a/api/@internal/ets/lifecycle.d.ts
+++ b/api/@internal/ets/lifecycle.d.ts
@@ -13,37 +13,38 @@
* limitations under the License.
*/
-import { Want } from "../ability/want";
-import { ResultSet } from "../data/rdb/resultSet";
-import { AbilityInfo } from "../bundle/abilityInfo";
-import { DataAbilityResult } from "../ability/dataAbilityResult";
-import { DataAbilityOperation } from "../ability/dataAbilityOperation";
-import dataAbility from "../@ohos.data.dataAbility";
-import formBindingData from "../@ohos.ability.formBindingData";
-import formManager from "../@ohos.ability.formManager";
-import rdb from "../@ohos.data.rdb";
-import rpc from "../@ohos.rpc";
-import resourceManager from "../@ohos.resourceManager";
-import { PacMap } from "../ability/dataAbilityHelper";
+import { Want } from "../../ability/want";
+import { ResultSet } from "../../data/rdb/resultSet";
+import { AbilityInfo } from "../../bundle/abilityInfo";
+import { DataAbilityResult } from "../../ability/dataAbilityResult";
+import { DataAbilityOperation } from "../../ability/dataAbilityOperation";
+import dataAbility from "../../@ohos.data.dataAbility";
+import formBindingData from "../../@ohos.application.formBindingData";
+import formInfo from "../../@ohos.application.formInfo";
+import rdb from "../../@ohos.data.rdb";
+import rpc from "../../@ohos.rpc";
+import resourceManager from "../../@ohos.resourceManager";
+import { PacMap } from "../../ability/dataAbilityHelper";
+import { AsyncCallback } from "../../basic";
/**
* interface of form lifecycle.
*
* @name LifecycleForm
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
*/
export declare interface LifecycleForm {
/**
* Called to return a {@link formBindingData.FormBindingData} object.
*
- * @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @since 8
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param want Indicates the detailed information for creating a {@link formBindingData#FormBindingData}.
* The {@code Want} object must include the form ID, form name, and grid style of the form,
- * which can be obtained from {@link formManager#FormParam#IDENTITY_KEY},
- * {@link formManager#FormParam#NAME_KEY}, and {@link formManager#FormParam#DIMENSION_KEY},
+ * which can be obtained from {@link formInfo#FormParam#IDENTITY_KEY},
+ * {@link formInfo#FormParam#NAME_KEY}, and {@link formInfo#FormParam#DIMENSION_KEY},
* respectively. Such form information must be managed as persistent data for further form
* acquisition, update, and deletion.
* @return Returns the created {@link formBindingData#FormBindingData} object.
@@ -54,19 +55,19 @@ export declare interface LifecycleForm {
/**
* Called when the form provider is notified that a temporary form is successfully converted to a normal form.
*
- * @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @since 8
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param formId Indicates the ID of the form.
* @return -
* @FAModelOnly
*/
- onCastTempToNormal?(formId: string): void;
+ onCastToNormal?(formId: string): void;
/**
* Called to notify the form provider to update a specified form.
*
- * @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @since 8
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param formId Indicates the ID of the form to update.
* @return -
* @FAModelOnly
@@ -76,24 +77,24 @@ export declare interface LifecycleForm {
/**
* Called when the form provider receives form events from the system.
*
- * @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @since 8
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param newStatus Indicates the form events occurred. The key in the {@code Map} object indicates the form ID,
- * and the value indicates the event type, which can be either {@link formManager#VisibilityType#FORM_VISIBLE}
- * or {@link formManager#VisibilityType#FORM_INVISIBLE}. {@link formManager#VisibilityType#FORM_VISIBLE}
- * means that the form becomes visible, and {@link formManager#VisibilityType#FORM_INVISIBLE}
+ * and the value indicates the event type, which can be either {@link formInfo#VisibilityType#FORM_VISIBLE}
+ * or {@link formInfo#VisibilityType#FORM_INVISIBLE}. {@link formInfo#VisibilityType#FORM_VISIBLE}
+ * means that the form becomes visible, and {@link formInfo#VisibilityType#FORM_INVISIBLE}
* means that the form becomes invisible.
* @return -
* @FAModelOnly
*/
- onVisibilityChanged?(newStatus: { [key: string]: number }): void;
+ onVisibilityChange?(newStatus: { [key: string]: number }): void;
/**
* Called when a specified message event defined by the form provider is triggered. This method is valid only for
* JS forms.
*
- * @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @since 8
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param formId Indicates the ID of the form on which the message event is triggered, which is provided by
* the client to the form provider.
* @param message Indicates the value of the {@code params} field of the message event. This parameter is
@@ -101,19 +102,19 @@ export declare interface LifecycleForm {
* @return -
* @FAModelOnly
*/
- onTriggerEvent?(formId: string, message: string): void;
+ onEvent?(formId: string, message: string): void;
/**
* Called to notify the form provider that a specified form has been deleted. Override this method if
* you want your application, as the form provider, to be notified of form deletion.
*
- * @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @since 8
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param formId Indicates the ID of the deleted form.
* @return -
* @FAModelOnly
*/
- onDelete?(formId: string): void;
+ onDestroy?(formId: string): void;
/**
* Called to return a {@link FormState} object.
@@ -121,14 +122,14 @@ export declare interface LifecycleForm {
* You must override this callback if you want this ability to return the actual form state. Otherwise,
* this method returns {@link FormState#DEFAULT} by default.
*
- * @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
- * @param want Indicates the description of the form for which the {@link formManager#FormState} is obtained.
+ * @since 8
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @param want Indicates the description of the form for which the {@link formInfo#FormState} is obtained.
* The description covers the bundle name, ability name, module name, form name, and form dimensions.
- * @return Returns the {@link formManager#FormState} object.
+ * @return Returns the {@link formInfo#FormState} object.
* @FAModelOnly
*/
- onAcquireFormState?(want: Want): formManager.FormState;
+ onAcquireFormState?(want: Want): formInfo.FormState;
}
/**
@@ -136,7 +137,7 @@ export declare interface LifecycleForm {
*
* @name LifecycleApp
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAMode
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
*/
export declare interface LifecycleApp {
@@ -144,7 +145,7 @@ export declare interface LifecycleApp {
* Called back when the state of an ability changes from BACKGROUND to INACTIVE.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @return -
* @FAModelOnly
*/
@@ -154,7 +155,7 @@ export declare interface LifecycleApp {
* Called back when an ability enters the BACKGROUND state.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @return -
* @FAModelOnly
*/
@@ -164,7 +165,7 @@ export declare interface LifecycleApp {
* Called back before an ability is destroyed.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @return -
* @FAModelOnly
*/
@@ -174,7 +175,7 @@ export declare interface LifecycleApp {
* Called back when an ability is started for initialization.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @return -
* @FAModelOnly
*/
@@ -185,7 +186,7 @@ export declare interface LifecycleApp {
* to multi-window mode or from multi-window mode to fullscreen mode.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param isShownInMultiWindow Specifies whether this ability is currently in multi-window mode.
* The value {@code true} indicates the multi-window mode, and {@code false} indicates another mode.
* @param newConfig Indicates the new configuration information about this Page ability.
@@ -199,7 +200,7 @@ export declare interface LifecycleApp {
* Asks a user whether to start the migration.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @return Returns {@code true} if the user allows the migration; returns {@code false} otherwise.
* @FAModelOnly
*/
@@ -211,7 +212,7 @@ export declare interface LifecycleApp {
* Scheduler Service requests data from the local ability.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param data Indicates the user data to save.
* @return Returns {@code true} if the data is successfully saved; returns {@code false} otherwise.
* @FAModelOnly
@@ -225,7 +226,7 @@ export declare interface LifecycleApp {
* notify the user of the successful migration and then exit the local ability.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param result Indicates the migration result code. The value {@code 0} indicates that the migration is
* successful, and {@code -1} indicates that the migration fails.
* @return -
@@ -239,7 +240,7 @@ export declare interface LifecycleApp {
* is restored.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param data Indicates the user data to restore.
* @return -
* @FAModelOnly
@@ -251,7 +252,7 @@ export declare interface LifecycleApp {
* migration is performed for the ability from the local device to the remote device.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @return -
* @FAModelOnly
*/
@@ -263,7 +264,7 @@ export declare interface LifecycleApp {
* this method is used only to save temporary states.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param outState Indicates the {@code PacMap} object used for storing user data and states. This
* parameter cannot be null.
* @return -
@@ -277,7 +278,7 @@ export declare interface LifecycleApp {
* states. Generally, this method is called after the {@link #onStart(Want)} method.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param inState Indicates the {@code PacMap} object used for storing data and states. This
* parameter can not be null.
* @return -
@@ -290,7 +291,7 @@ export declare interface LifecycleApp {
* change to the BACKGROUND or ACTIVE state).
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @return -
* @FAModelOnly
*/
@@ -300,7 +301,7 @@ export declare interface LifecycleApp {
* Called back when an ability enters the ACTIVE state.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @return -
* @FAModelOnly
*/
@@ -310,7 +311,7 @@ export declare interface LifecycleApp {
* Called when the launch mode of an ability is set to singleton.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param want Indicates the new {@code want} containing information about the ability.
* @return -
* @FAModelOnly
@@ -322,7 +323,7 @@ export declare interface LifecycleApp {
* background and there is no enough memory for running as many background processes as possible.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param level Indicates the memory trim level, which shows the current memory usage status.
* @return -
* @FAModelOnly
@@ -335,7 +336,7 @@ export declare interface LifecycleApp {
*
* @name LifecycleService
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAMode
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
*/
export declare interface LifecycleService {
@@ -344,7 +345,7 @@ export declare interface LifecycleService {
* an ability).
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @return -
* @FAModelOnly
*/
@@ -354,7 +355,7 @@ export declare interface LifecycleService {
* Called back when Service is started.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param want Indicates the want of Service to start.
* @param startId Indicates the number of times the Service ability has been started. The {@code startId} is
* incremented by 1 every time the ability is started. For example, if the ability has been started
@@ -368,7 +369,7 @@ export declare interface LifecycleService {
* Called back before an ability is destroyed.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @return -
* @FAModelOnly
*/
@@ -378,7 +379,7 @@ export declare interface LifecycleService {
* Called back when a Service ability is first connected to an ability.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param want Indicates connection information about the Service ability.
* @return Returns the proxy of the Service ability.
* @FAModelOnly
@@ -389,7 +390,7 @@ export declare interface LifecycleService {
* Called back when all abilities connected to a Service ability are disconnected.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param want Indicates disconnection information about the Service ability.
* @return -
* @FAModelOnly
@@ -404,7 +405,7 @@ export declare interface LifecycleService {
* called but {@link #terminateSelf} has not.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param want Indicates the want of the Service ability being connected.
* @return -
* @FAModelOnly
@@ -417,7 +418,7 @@ export declare interface LifecycleService {
*
* @name LifecycleData
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAMode
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
*/
export declare interface LifecycleData {
@@ -425,7 +426,7 @@ export declare interface LifecycleData {
* Updates one or more data records in the database. This method should be implemented by a Data ability.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param uri Indicates the database table storing the data to update.
* @param valueBucket Indicates the data to update. This parameter can be null.
* @param predicates Indicates filter criteria. If this parameter is null, all data records will be updated by
@@ -441,7 +442,7 @@ export declare interface LifecycleData {
* Queries one or more data records in the database. This method should be implemented by a Data ability.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param uri Indicates the database table storing the data to query.
* @param columns Indicates the columns to be queried, in array, for example, {"name","age"}. You should define
* the processing logic when this parameter is null.
@@ -458,7 +459,7 @@ export declare interface LifecycleData {
* Deletes one or more data records. This method should be implemented by a Data ability.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param uri Indicates the database table storing the data to delete.
* @param predicates Indicates filter criteria. If this parameter is null, all data records will be deleted by
* default.
@@ -475,7 +476,7 @@ export declare interface LifecycleData {
* even if the context has changed.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param uri Indicates the uri to normalize.
* @param callback function specified by framework to receive the result, developer should call this function to
* return the result to framework.
@@ -488,7 +489,7 @@ export declare interface LifecycleData {
* Inserts multiple data records into the database. This method should be implemented by a Data ability.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param uri Indicates the position where the data is to insert.
* @param valueBuckets Indicates the data to insert.
* @param callback function specified by framework to receive the result, developer should call this function to
@@ -503,7 +504,7 @@ export declare interface LifecycleData {
* The default implementation of this method returns the original uri passed to it.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param uri Indicates the uri to denormalize.
* @param callback function specified by framework to receive the result, developer should call this function to
* return the result to framework.
@@ -516,7 +517,7 @@ export declare interface LifecycleData {
* Inserts a data record into the database. This method should be implemented by a Data ability.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param uri Indicates the position where the data is to insert.
* @param valueBucket Indicates the data to insert.
* @param callback function specified by framework to receive the result, developer should call this function to
@@ -530,7 +531,7 @@ export declare interface LifecycleData {
* Opens a file. This method should be implemented by a Data ability.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param uri Indicates the path of the file to open.
* @param mode Indicates the open mode, which can be "r" for read-only access, "w" for write-only access (erasing
* whatever data is currently in the file), "wt" for write access that truncates any existing file,
@@ -547,7 +548,7 @@ export declare interface LifecycleData {
* Obtains the MIME type of files. This method should be implemented by a Data ability.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param uri Indicates the path of the files to obtain.
* @param mimeTypeFilter Indicates the MIME type of the files to obtain. This parameter cannot be set to {@code
* null}.
@@ -565,7 +566,7 @@ export declare interface LifecycleData {
* Called to carry {@code AbilityInfo} to this ability after the ability is initialized.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param info Indicates the {@code AbilityInfo} object containing information about this ability.
* @return -
* @FAModelOnly
@@ -579,12 +580,40 @@ export declare interface LifecycleData {
* Data abilities supports general data types, including text, HTML, and JPEG.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param uri Indicates the uri of the data.
* @param callback function specified by framework to receive the result, developer should call this function to
* return the result to framework.
* @return -
* @FAModelOnly
*/
- getType?(uri: string, callback: AsyncCallback): void;
+ getType?(uri: string, callback: AsyncCallback): void;
+
+ /**
+ * Performs batch operations on the database. This method should be implemented by a Data ability.
+ *
+ * @since 7
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @param ops Indicates the data operation list, which can contain multiple operations on the database.
+ * @param callback function specified by framework to receive the result, developer should call this function to
+ * return the result to framework.
+ * @return -
+ * @FAModelOnly
+ */
+ executeBatch?(ops: Array, callback: AsyncCallback>): void;
+
+ /**
+ * Defines a method in this Data ability (implementation depending on child classes).
+ *
+ * @since 7
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @param method Indicates the method name.
+ * @param arg Indicates the parameter transferred by the method.
+ * @param extras Indicates the parameter transferred by the method.
+ * @param callback function specified by framework to receive the result, developer should call this function to
+ * return the result to framework.
+ * @return -
+ * @FAModelOnly
+ */
+ call?(method: string, arg: string, extras: PacMap, callback: AsyncCallback): void;
}
diff --git a/api/@internal/global.d.ts b/api/@internal/global.d.ts
index 03bc8cc2bc561c9b8c8cc51c0f1fff31acdb9a0e..7a0ea78e3f47a74af869afde8a1a7e1db2cadba4 100644
--- a/api/@internal/global.d.ts
+++ b/api/@internal/global.d.ts
@@ -13,66 +13,148 @@
* limitations under the License.
*/
+///
+
+import { TouchObject, KeyEvent, MouseEvent } from 'SpecialEvent';
+
+/**
+ * Defines the console info.
+ * @syscap SystemCapability.ArkUI.ArkUI.Full
+ * @since 7
+ */
export declare class console {
+ /**
+ * Prints "debug" logs.
+ * @param message Text to print.
+ * @since 7
+ */
static debug(message: string, ...arguments: any[]): void;
+
+ /**
+ * Prints "log" logs.
+ * @param message Text to print.
+ * @since 7
+ */
static log(message: string, ...arguments: any[]): void;
+
+ /**
+ * Prints "info" logs.
+ * @param message Text to print.
+ * @since 7
+ */
static info(message: string, ...arguments: any[]): void;
+
+ /**
+ * Prints "warn" logs.
+ * @param message Text to print.
+ * @since 7
+ */
static warn(message: string, ...arguments: any[]): void;
+
+ /**
+ * Prints "error" logs.
+ * @param message Text to print.
+ * @since 7
+ */
static error(message: string, ...arguments: any[]): void;
}
-export interface Result {
- code: number;
- data: object;
-}
-export interface SubscribeMessageResponse {
- deviceId: string;
- bundleName: string;
- abilityName: string;
- message: string;
-}
-export interface CallAbilityParam {
- bundleName: string;
- abilityName: string;
- messageCode: number;
- abilityType: number;
- data?: object;
- syncOption?: number;
-}
-export interface SubscribeAbilityEventParam {
- bundleName: string;
- abilityName: string;
- messageCode: number;
- abilityType: number;
- syncOption?: number;
-}
-export interface SendMessageOptions {
- deviceId: string;
- bundleName: string;
- abilityName: string;
- message?: string;
- success?: () => void;
- fail?: (data: string, code: number) => void;
- complete?: () => void;
-}
-export interface SubscribeMessageOptions {
- success?: (data: SubscribeMessageResponse) => void;
- fail?: (data: string, code: number) => void;
-}
-export declare class FeatureAbility {
- static callAbility(param: CallAbilityParam): Promise;
- static subscribeAbilityEvent(
- param: SubscribeAbilityEventParam,
- func: Function
- ): Promise;
- static unsubscribeAbilityEvent(
- param: SubscribeAbilityEventParam
- ): Promise;
- static sendMsg(options: SendMessageOptions): void;
- static subscribeMsg(options: SubscribeMessageOptions): void;
- static unsubscribeMsg(): void;
-}
+
+/**
+ * Sets the interval for repeatedly calling a function.
+ * @syscap SystemCapability.ArkUI.ArkUI.Full
+ * @param handler Indicates the function to be called after the timer goes off. For devices of "tv", "phone, tablet", and "wearable" types, this parameter can be a function or string. For devices of "lite wearable" and "smartVision" types, this parameter must be a function.
+ * @param delay Indicates the interval between each two calls, in milliseconds. The function will be called after this delay.
+ * @param arguments Indicates additional arguments to pass to "handler" when the timer goes off.
+ * @returns Returns the timer ID.
+ * @since 7
+ */
export declare function setInterval(handler: Function | string, delay: number, ...arguments: any[]): number;
+
+/**
+ * Sets a timer after which a function will be executed.
+ * @syscap SystemCapability.ArkUI.ArkUI.Full
+ * @param handler Indicates the function to be called after the timer goes off. For devices of "tv", "phone, tablet", and "wearable" types, this parameter can be a function or string. For devices of "lite wearable" and "smartVision" types, this parameter must be a function.
+ * @param delay Indicates the delay (in milliseconds) after which the function will be called. If this parameter is left empty, default value "0" will be used, which means that the function will be called immediately or as soon as possible.
+ * @param arguments Indicates additional arguments to pass to "handler" when the timer goes off.
+ * @returns Returns the timer ID.
+ * @since 7
+ */
export declare function setTimeout(handler: Function | string, delay?: number, ...arguments: any[]): number;
+
+/**
+ * Cancels the interval set by " setInterval()".
+ * @syscap SystemCapability.ArkUI.ArkUI.Full
+ * @param intervalID Indicates the timer ID returned by "setInterval()".
+ * @since 7
+ */
export declare function clearInterval(intervalID?: number): void;
+
+/**
+ * Cancels the timer set by "setTimeout()".
+ * @syscap SystemCapability.ArkUI.ArkUI.Full
+ * @param timeoutID Indicates the timer ID returned by "setTimeout()".
+ * @since 7
+ */
export declare function clearTimeout(timeoutID?: number): void;
-export declare function createLocalParticleAbility(timeoutID?: number): any;
+
+/**
+ * Defining syscap function.
+ * @syscap SystemCapability.ArkUI.ArkUI.Full
+ * @since 8
+ */
+export declare function canIUse(syscap: string): boolean;
+
+/**
+ * Obtains all attributes of the component with the specified ID.
+ * @param id ID of the component whose attributes are to be obtained.
+ * @since 8
+ * @systemapi
+ * @test
+ */
+export declare function getInspectorByKey(id: string): string;
+
+ /**
+ * Get components tree.
+ * @since 8
+ * @systemapi
+ * @test
+ */
+export declare function getInspectorTree(): string;
+
+ /**
+ * Sends an event to the component with the specified ID.
+ * @param id ID of the component for which the event is to be sent.
+ * @param action Type of the event to be sent. The options are as follows: Click event: 10 LongClick: 11.
+ * @param params Event parameters. If there is no parameter, pass an empty string "".
+ * @since 8
+ * @systemapi
+ * @test
+ */
+export declare function sendEventByKey(id: string, action: number, params: string): boolean;
+
+ /**
+ * Send touch event.
+ * @param event TouchObject to be sent.
+ * @since 8
+ * @systemapi
+ * @test
+ */
+export declare function sendTouchEvent(event: TouchObject): boolean;
+
+ /**
+ * Send key event.
+ * @param event KeyEvent to be sent.
+ * @since 8
+ * @systemapi
+ * @test
+ */
+export declare function sendKeyEvent(event: KeyEvent): boolean;
+
+ /**
+ * Send mouse event.
+ * @param event MouseEvent to be sent.
+ * @since 8
+ * @systemapi
+ * @test
+ */
+export declare function sendMouseEvent(event: MouseEvent): boolean;
diff --git a/api/@ohos.ability.dataUriUtils.d.ts b/api/@ohos.ability.dataUriUtils.d.ts
index 3b978c07dd07085802a6f2f46ad3ebc2f4ba35c6..af7b6805001a1b4a9e70bf5b40afc7b81447ba2e 100644
--- a/api/@ohos.ability.dataUriUtils.d.ts
+++ b/api/@ohos.ability.dataUriUtils.d.ts
@@ -25,7 +25,7 @@ declare namespace dataUriUtils {
* Obtains the ID attached to the end of the path component of the given uri.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @param uri Indicates the uri object from which the ID is to be obtained.
* @return Returns the ID attached to the end of the path component;
*/
@@ -35,7 +35,7 @@ declare namespace dataUriUtils {
* Attaches the given ID to the end of the path component of the given uri.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @param uri Indicates the uri string from which the ID is to be obtained.
* @param id Indicates the ID to attach.
* @return Returns the uri object with the given ID attached.
@@ -46,7 +46,7 @@ declare namespace dataUriUtils {
* Deletes the ID from the end of the path component of the given uri.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @param uri Indicates the uri object from which the ID is to be deleted.
* @return Returns the uri object with the ID deleted.
*/
@@ -56,7 +56,7 @@ declare namespace dataUriUtils {
* Updates the ID in the specified uri
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @param uri Indicates the uri object to be updated.
* @param id Indicates the new ID.
* @return Returns the updated uri object.
diff --git a/api/liteWearable/@system.configuration.d.ts b/api/@ohos.ability.errorCode.d.ts
similarity index 46%
rename from api/liteWearable/@system.configuration.d.ts
rename to api/@ohos.ability.errorCode.d.ts
index 1d774e43b2d3560328038a2fc7183458ac8cdace..155f039766c9f43e869df44ef695970b524b57f8 100644
--- a/api/liteWearable/@system.configuration.d.ts
+++ b/api/@ohos.ability.errorCode.d.ts
@@ -1,46 +1,49 @@
-/*
- * Copyright (c) 2020 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-export interface LocaleResponse {
- /**
- * Current language of the application. Example: zh.
- * @since 3
- */
- language: string;
-
- /**
- * Country or region. Example: CN
- * @since 3
- */
- countryOrRegion: string;
-
- /**
- * Text layout direction. Available values are as follows:
- * 1. ltr: The text direction is from left to right.
- * 2. rtl: The text direction is from right to left.
- * @since 3
- */
- dir: "ltr" | "rtl";
-}
-
-/**
- * @Syscap SysCap.ACE.UIEngineLite
- */
-export default class Configuration {
- /**
- * Obtains the current locale of the application, which is the same as the system locale.
- */
- static getLocale(): LocaleResponse;
-}
+/*
+ * Copyright (c) 2022 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+ /**
+ * Defines error codes used when starting an ability, for example, featureAbility.ErrorCode.NO_ERROR.
+ * @since 6
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ */
+export enum ErrorCode {
+ /**
+ * Permission denied.
+ * @since 6
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ */
+ PERMISSION_DENY = -3,
+
+ /**
+ * Ability not found.
+ * @since 6
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ */
+ ABILITY_NOT_FOUND = -2,
+
+ /**
+ * Invalid parameter.
+ * @since 6
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ */
+ INVALID_PARAMETER = -1,
+
+ /**
+ * No error.
+ * @since 6
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ */
+ NO_ERROR = 0
+}
diff --git a/api/@ohos.ability.featureAbility.d.ts b/api/@ohos.ability.featureAbility.d.ts
index 20b110239b55fe400e17329733f831436d8af0b6..cff1e71e38cf847f3e8f11c7cbcbadebd8675666 100644
--- a/api/@ohos.ability.featureAbility.d.ts
+++ b/api/@ohos.ability.featureAbility.d.ts
@@ -13,19 +13,20 @@
* limitations under the License.
*/
import { AsyncCallback } from './basic';
+import { Callback } from './basic';
import { Want } from './ability/want';
import { StartAbilityParameter } from './ability/startAbilityParameter';
import { AbilityResult } from './ability/abilityResult';
import { Context } from './app/context';
import { DataAbilityHelper } from './ability/dataAbilityHelper';
import { ConnectOptions } from './ability/connectOptions';
-import { ContinueAbilityOptions } from './ability/continueAbilityOptions';
+import window from './@ohos.window';
/**
* A Feature Ability represents an ability with a UI and is designed to interact with users.
* @name featureAbility
* @since 6
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @permission N/A
* @FAModelOnly
*/
@@ -34,7 +35,7 @@ declare namespace featureAbility {
* Obtain the want sended from the source ability.
*
* @since 6
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param parameter Indicates the ability to start.
* @return -
* @FAModelOnly
@@ -46,7 +47,7 @@ declare namespace featureAbility {
* Starts a new ability.
*
* @since 6
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param parameter Indicates the ability to start.
* @return -
* @FAModelOnly
@@ -57,7 +58,7 @@ declare namespace featureAbility {
/**
* Obtains the application context.
*
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @return Returns the application context.
* @since 6
* @FAModelOnly
@@ -68,7 +69,7 @@ declare namespace featureAbility {
* Starts an ability and returns the execution result when the ability is destroyed.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param parameter Indicates the ability to start.
* @return Returns the {@link AbilityResult}.
* @FAModelOnly
@@ -81,7 +82,7 @@ declare namespace featureAbility {
* and destroys this Page ability.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param parameter Indicates the result to return.
* @return -
* @FAModelOnly
@@ -93,7 +94,7 @@ declare namespace featureAbility {
* Destroys this Page ability.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @return -
* @FAModelOnly
*/
@@ -104,7 +105,7 @@ declare namespace featureAbility {
* Obtains the dataAbilityHelper.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param uri Indicates the path of the file to open.
* @return Returns the dataAbilityHelper.
* @FAModelOnly
@@ -115,7 +116,7 @@ declare namespace featureAbility {
* Checks whether the main window of this ability has window focus.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @return Returns {@code true} if this ability currently has window focus; returns {@code false} otherwise.
* @FAModelOnly
*/
@@ -126,7 +127,7 @@ declare namespace featureAbility {
* Connects the current ability to an ability using the AbilityInfo.AbilityType.SERVICE template.
* @default -
* @since 7
- * @SysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param request The element name of the service ability
* @param options The remote object instance
* @return Returns the number code of the ability connected
@@ -138,7 +139,7 @@ declare namespace featureAbility {
* The callback interface was connect successfully.
* @default -
* @since 7
- * @SysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param connection The number code of the ability connected
* @FAModelOnly
*/
@@ -146,16 +147,23 @@ declare namespace featureAbility {
function disconnectAbility(connection: number): Promise;
/**
- * Migrates this ability to the given device on the same distributed network.
- * @default -
+ * Obtains the window corresponding to the current ability.
+ *
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
- * @return -
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @return Returns the window corresponding to the current ability.
* @FAModelOnly
*/
- function continueAbility(options: ContinueAbilityOptions, callback: AsyncCallback): void;
- function continueAbility(options: ContinueAbilityOptions): Promise;
+ function getWindow(callback: AsyncCallback): void;
+ function getWindow(): Promise;
+ /**
+ * Obtain the window configuration.
+ *
+ * @since 7
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @FAModelOnly
+ */
export enum AbilityWindowConfiguration {
WINDOW_MODE_UNDEFINED = 0,
WINDOW_MODE_FULLSCREEN = 1,
@@ -164,12 +172,26 @@ declare namespace featureAbility {
WINDOW_MODE_FLOATING = 102
}
+ /**
+ * Obtain the window properties.
+ *
+ * @since 7
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @FAModelOnly
+ */
export enum AbilityStartSetting {
BOUNDS_KEY = "abilityBounds",
WINDOW_MODE_KEY = "windowMode",
DISPLAY_ID_KEY = "displayId"
}
+ /**
+ * Obtain the errorCode.
+ *
+ * @since 7
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @FAModelOnly
+ */
export enum ErrorCode {
NO_ERROR = 0,
INVALID_PARAMETER = -1,
@@ -177,6 +199,13 @@ declare namespace featureAbility {
PERMISSION_DENY = -3
}
+ /**
+ * Indicates the operation type of data.
+ *
+ * @since 7
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @FAModelOnly
+ */
export enum DataAbilityOperationType {
TYPE_INSERT = 1,
TYPE_UPDATE = 2,
diff --git a/api/@ohos.ability.particleAbility.d.ts b/api/@ohos.ability.particleAbility.d.ts
index fc367272ac775fa8a3e00bb24b67072e7b85b86e..1b9a85b641c88372412a9b9334e160a2b21b568d 100644
--- a/api/@ohos.ability.particleAbility.d.ts
+++ b/api/@ohos.ability.particleAbility.d.ts
@@ -17,12 +17,14 @@ import { AsyncCallback } from './basic';
import { StartAbilityParameter } from './ability/startAbilityParameter';
import { DataAbilityHelper } from './ability/dataAbilityHelper';
import { NotificationRequest } from './notification/notificationRequest';
+import { ConnectOptions } from './ability/connectOptions';
+import { Want } from './ability/want';
/**
* A Particle Ability represents an ability with service.
* @name particleAbility
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @permission N/A
* @FAModelOnly
*/
@@ -31,7 +33,7 @@ declare namespace particleAbility {
* Service ability uses this method to start a specific ability.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param parameter Indicates the ability to start.
* @return -
* @FAModelOnly
@@ -43,7 +45,7 @@ declare namespace particleAbility {
* Destroys this service ability.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @return -
* @FAModelOnly
*/
@@ -54,7 +56,7 @@ declare namespace particleAbility {
* Obtains the dataAbilityHelper.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param uri Indicates the path of the file to open.
* @return Returns the dataAbilityHelper.
* @FAModelOnly
@@ -85,5 +87,38 @@ declare namespace particleAbility {
*/
function cancelBackgroundRunning(callback: AsyncCallback): void;
function cancelBackgroundRunning(): Promise;
+
+ /**
+ * Connects an ability to a Service ability.
+ *
+ * @since 7
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @param request Indicates the Service ability to connect.
+ * @param options Callback object for the client. If this parameter is null, an exception is thrown.
+ * @return unique identifier of the connection between the client and the service side.
+ * @FAModelOnly
+ */
+ function connectAbility(request: Want, options:ConnectOptions): number;
+
+ /**
+ * Disconnects ability to a Service ability.
+ * @since 7
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @param connection the connection id returned from connectAbility api.
+ * @FAModelOnly
+ */
+ function disconnectAbility(connection: number, callback:AsyncCallback): void;
+ function disconnectAbility(connection: number): Promise;
+
+ /**
+ * Obtain the errorCode.
+ *
+ * @since 7
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @FAModelOnly
+ */
+ export enum ErrorCode {
+ INVALID_PARAMETER = -1
+ }
}
export default particleAbility;
diff --git a/api/@ohos.ability.wantConstant.d.ts b/api/@ohos.ability.wantConstant.d.ts
index a0483c0095fcfbf5e8e4f9234deda55e593836a7..c571dbe255c2b868adb3d6762b81be8748782882 100644
--- a/api/@ohos.ability.wantConstant.d.ts
+++ b/api/@ohos.ability.wantConstant.d.ts
@@ -17,7 +17,7 @@
* the constant for action and entity in the want
* @name wantConstant
* @since 6
- * @sysCap SystemCapability.Ability.AbilityBase
+ * @syscap SystemCapability.Ability.AbilityBase
* @permission N/A
*/
declare namespace wantConstant {
@@ -25,14 +25,14 @@ declare namespace wantConstant {
* the constant for action of the want
* @name Action
* @since 6
- * @sysCap SystemCapability.Ability.AbilityBase
+ * @syscap SystemCapability.Ability.AbilityBase
* @permission N/A
*/
export enum Action {
/**
* Indicates the action of backing home.
*
- * @since 1
+ * @since 6
*/
ACTION_HOME = "ohos.want.action.home",
@@ -221,7 +221,7 @@ declare namespace wantConstant {
* the constant for Entity of the want
* @name Action
* @since 6
- * @sysCap SystemCapability.Ability.AbilityBase
+ * @syscap SystemCapability.Ability.AbilityBase
* @permission N/A
*/
export enum Entity {
@@ -293,14 +293,14 @@ declare namespace wantConstant {
/**
* Indicates the grant for possible persisting on the URI.
*
- * @hide
+ * @systemapi Hide this for inner system use.
*/
FLAG_AUTH_PERSISTABLE_URI_PERMISSION = 0x00000040,
/**
* Returns the result to the source ability slice.
*
- * @hide
+ * @systemapi Hide this for inner system use.
*/
FLAG_AUTH_PREFIX_URI_PERMISSION = 0x00000080,
@@ -318,7 +318,7 @@ declare namespace wantConstant {
/**
* Indicates the continuation is reversible.
*
- * @hide
+ * @systemapi Hide this for inner system use.
*/
FLAG_ABILITY_CONTINUATION_REVERSIBLE = 0x00000400,
diff --git a/api/@ohos.abilityAccessCtrl.d.ts b/api/@ohos.abilityAccessCtrl.d.ts
index 687c3262004ee7f363ca1507301db69c1541b76d..a7e2c44790375f5978fe8ae1ac1621d3f6c7463a 100644
--- a/api/@ohos.abilityAccessCtrl.d.ts
+++ b/api/@ohos.abilityAccessCtrl.d.ts
@@ -45,7 +45,7 @@ import { AsyncCallback } from "./basic";
* @param tokenID The tokenId of specified application.
* @param permissionName The permission name to be granted.
* @param permissionFlag Flag of permission state.
- * @oermission ohos.permission.GRANT_SENSITIVE_PERMISSIONS.
+ * @permission ohos.permission.GRANT_SENSITIVE_PERMISSIONS.
* @systemapi hid this for inner system use
* @since 8
*/
@@ -57,7 +57,7 @@ import { AsyncCallback } from "./basic";
* @param tokenID The tokenId of specified application.
* @param permissionName The permission name to be revoked.
* @param permissionFlag Flag of permission state.
- * @oermission ohos.permission.REVOKE_SENSITIVE_PERMISSIONS.
+ * @permission ohos.permission.REVOKE_SENSITIVE_PERMISSIONS.
* @systemapi hid this for inner system use
* @since 8
*/
@@ -69,7 +69,7 @@ import { AsyncCallback } from "./basic";
* @param tokenID The tokenId of specified application.
* @param permissionName The permission name to be granted.
* @return Return permission flag.
- * @oermission ohos.permission.GET_SENSITIVE_PERMISSIONS/ohos.permission.GRANT_SENSITIVE_PERMISSIONS/ohos.permission.REVOKE_SENSITIVE_PERMISSIONS.
+ * @permission ohos.permission.GET_SENSITIVE_PERMISSIONS or ohos.permission.GRANT_SENSITIVE_PERMISSIONS or ohos.permission.REVOKE_SENSITIVE_PERMISSIONS.
* @systemapi hid this for inner system use
* @since 8
*/
diff --git a/api/@ohos.accessibility.d.ts b/api/@ohos.accessibility.d.ts
index b834ba05db6f92839c5d7bd559302b63988f8284..40faa01613bfa210110ca4338d4fa38168c9a222 100644
--- a/api/@ohos.accessibility.d.ts
+++ b/api/@ohos.accessibility.d.ts
@@ -15,27 +15,26 @@
import { AsyncCallback } from './basic';
import { Callback } from './basic';
-import { AbilityInfo } from './bundle/abilityInfo';
/**
* Accessibility
* @name Accessibility
* @since 7
- * @syscap SystemCapability.Barrierfree.Accessibility.Core
+ * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @import basic,abilityInfo
*/
declare namespace accessibility {
/**
* The type of the Ability app.
- * @syscap SystemCapability.Barrierfree.Accessibility.Core
+ * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 7
*/
type AbilityType = 'audible' | 'generic' | 'haptic' | 'spoken' | 'visual';
/**
* The action that the ability can execute.
- * @syscap SystemCapability.Barrierfree.Accessibility.Core
+ * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 7
*/
type Action = 'accessibilityFocus' | 'clearAccessibilityFocus' | 'focus' | 'clearFocus' | 'clearSelection' |
@@ -50,7 +49,7 @@ declare namespace accessibility {
* @note announcement
* @note notificationChange
* @note textTraversedAtMove
- * @syscap SystemCapability.Barrierfree.Accessibility.Core
+ * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 7
*/
type EventType = 'accessibilityFocus' | 'accessibilityFocusClear' |
@@ -60,14 +59,14 @@ declare namespace accessibility {
/**
* The change type of the windowsChange event.
* @note It's used when received the {@code windowsChange} event.
- * @syscap SystemCapability.Barrierfree.Accessibility.Core
+ * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 7
*/
type WindowUpdateType = 'add' | 'remove' | 'bounds' | 'active' | 'focus';
/**
* The type of the ability state.
- * @syscap SystemCapability.Barrierfree.Accessibility.Core
+ * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 7
*/
type AbilityState = 'enable' | 'disable' | 'install';
@@ -80,7 +79,7 @@ declare namespace accessibility {
* windowContent: Describes the capability to search for the content of the active window.
* filterKeyEvents: Describes the capability to request to filter key events.
* fingerprintGesture: Describes the capability to request to fingerprint gesture.
- * @syscap SystemCapability.Barrierfree.Accessibility.Core
+ * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 7
*/
type Capability = 'retrieve' | 'touchGuide' | 'keyEventObserver' | 'zoom' | 'gesture';
@@ -88,7 +87,7 @@ declare namespace accessibility {
/**
* The granularity of text move.
* @note The granularity of text move.
- * @syscap SystemCapability.Barrierfree.Accessibility.Core
+ * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 7
*/
type TextMoveUnit = 'char' | 'word' | 'line' | 'page' | 'paragraph';
@@ -97,7 +96,7 @@ declare namespace accessibility {
* Checks whether accessibility ability is enabled.
* @since 7
* @param callback Asynchronous callback interface.
- * @syscap SystemCapability.Barrierfree.Accessibility.Core
+ * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @return Returns {@code true} if the accessibility is enabled; returns {@code false} otherwise.
*/
function isOpenAccessibility(callback: AsyncCallback): void;
@@ -107,7 +106,7 @@ declare namespace accessibility {
* Checks touch browser ability (which is used by talkback) is enabled.
* @since 7
* @param callback Asynchronous callback interface.
- * @syscap SystemCapability.Barrierfree.Accessibility.Vision
+ * @syscap SystemCapability.BarrierFree.Accessibility.Vision
* @return Returns {@code true} if the touch browser is enabled; returns {@code false} otherwise.
*/
function isOpenTouchGuide(callback: AsyncCallback): void;
@@ -118,7 +117,7 @@ declare namespace accessibility {
* @since 7
* @param abilityType The type of the accessibility ability. {@code AbilityType} eg.spoken
* @param stateType The state of the accessibility ability. {@code AbilityState} eg.installed
- * @syscap SystemCapability.Barrierfree.Accessibility.Core
+ * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @return Returns the list of abilityInfos.
*/
function getAbilityLists(abilityType: AbilityType, stateType: AbilityState,
@@ -131,7 +130,7 @@ declare namespace accessibility {
* @since 7
* @param event The object of the accessibility {@code EventInfo} .
* @param callback Asynchronous callback interface.
- * @syscap SystemCapability.Barrierfree.Accessibility.Core
+ * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @return Returns {@code true} if success ; returns {@code false} otherwise.
*/
function sendEvent(event: EventInfo, callback: AsyncCallback): void;
@@ -142,7 +141,7 @@ declare namespace accessibility {
* @since 7
* @param type state event type.
* @param callback Asynchronous callback interface.
- * @syscap SystemCapability.Barrierfree.Accessibility.Core
+ * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @return Returns {@code true} if the register is success ; returns {@code false} otherwise.
*/
function on(type: 'accessibilityStateChange', callback: Callback): void;
@@ -152,7 +151,7 @@ declare namespace accessibility {
* @since 7
* @param type state event type.
* @param callback Asynchronous callback interface.
- * @syscap SystemCapability.Barrierfree.Accessibility.Vision
+ * @syscap SystemCapability.BarrierFree.Accessibility.Vision
* @return Returns {@code true} if the register is success ; returns {@code false} otherwise.
*/
function on(type: 'touchGuideStateChange', callback: Callback): void;
@@ -162,7 +161,7 @@ declare namespace accessibility {
* @since 7
* @param type state event type
* @param callback Asynchronous callback interface.
- * @syscap SystemCapability.Barrierfree.Accessibility.Core
+ * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @return Returns {@code true} if the deregister is success ; returns {@code false} otherwise.
*/
function off(type: 'accessibilityStateChange', callback?: Callback): void;
@@ -178,7 +177,7 @@ declare namespace accessibility {
/**
* Get the captions manager.
- * @syscap SystemCapability.Barrierfree.Accessibility.Hearing
+ * @syscap SystemCapability.BarrierFree.Accessibility.Hearing
* @since 8
* @return Returns the captions manager.
*/
@@ -186,7 +185,7 @@ declare namespace accessibility {
/**
* Indicates the captions manager.
- * @syscap SystemCapability.Barrierfree.Accessibility.Hearing
+ * @syscap SystemCapability.BarrierFree.Accessibility.Hearing
* @since 8
*/
interface CaptionsManager {
@@ -219,20 +218,20 @@ declare namespace accessibility {
/**
* Indicates the edge type of the captions font.
- * @syscap SystemCapability.Barrierfree.Accessibility.Hearing
+ * @syscap SystemCapability.BarrierFree.Accessibility.Hearing
* @since 8
*/
type CaptionsFontEdgeType = 'none' | 'raised' | 'depressed' | 'uniform' | 'dropShadow';
/**
* Indicates the font family of captions.
- * @syscap SystemCapability.Barrierfree.Accessibility.Hearing
+ * @syscap SystemCapability.BarrierFree.Accessibility.Hearing
* @since 8
*/
type CaptionsFontFamily = 'default' | 'monospacedSerif' | 'serif' |
'monospacedSansSerif' | 'sansSerif' | 'casual' | 'cursive' | 'smallCapitals';
/**
* Indicates the style of captions.
- * @syscap SystemCapability.Barrierfree.Accessibility.Hearing
+ * @syscap SystemCapability.BarrierFree.Accessibility.Hearing
* @since 8
*/
interface CaptionsStyle {
@@ -264,7 +263,7 @@ declare namespace accessibility {
/**
* Indicates the info of accessibility.
- * @syscap SystemCapability.Barrierfree.Accessibility.Core
+ * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 7
*/
interface AccessibilityAbilityInfo {
@@ -312,7 +311,7 @@ declare namespace accessibility {
/**
* Indicates the info of events.
- * @syscap SystemCapability.Barrierfree.Accessibility.Core
+ * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 7
*/
class EventInfo {
diff --git a/api/@ohos.account.appAccount.d.ts b/api/@ohos.account.appAccount.d.ts
index a08f33eac576ebfa78272b0e913b12dacecb679f..e06cb620e2b4dacc6da6c95eef31dba1c8b7206c 100644
--- a/api/@ohos.account.appAccount.d.ts
+++ b/api/@ohos.account.appAccount.d.ts
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Huawei Device Co., Ltd.
+ * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-import {AsyncCallback} from "./basic";
+import {AsyncCallback, Callback} from "./basic";
import {Want} from "./ability/want";
/**
@@ -194,7 +194,7 @@ declare namespace appAccount {
*
* @since 7
* @return Returns a list of application accounts.
- * @permission ohos.permission.GET_ACCOUNTS_PRIVILEGED.
+ * @permission ohos.permission.GET_ALL_APP_ACCOUNTS.
*/
getAllAccessibleAccounts(callback: AsyncCallback>): void;
getAllAccessibleAccounts(): Promise>;
@@ -212,7 +212,7 @@ declare namespace appAccount {
* @since 7
* @param owner Indicates the account owner of your application or third-party applications.
* @return Returns a list of application accounts.
- * @permission ohos.permission.GET_ACCOUNTS_PRIVILEGED.
+ * @permission ohos.permission.GET_ALL_APP_ACCOUNTS.
*/
getAllAccounts(owner: string, callback: AsyncCallback>): void;
getAllAccounts(owner: string): Promise>;
@@ -269,7 +269,7 @@ declare namespace appAccount {
* @since 7
* @return void
*/
- off(type: 'change', callback?: Callback): void;
+ off(type: 'change', callback?: Callback>): void;
/**
* Authenticates an application account to get an oauth token.
@@ -326,7 +326,7 @@ declare namespace appAccount {
deleteOAuthToken(name: string, owner: string, authType: string, token: string): Promise;
/**
- * Sets the oauth token visibility of the specifed authentication type to a third-party application.
+ * Sets the oauth token visibility of the specified authentication type to a third-party application.
*
* Only the owner of the application account has the permission to call this method.
*
@@ -341,7 +341,7 @@ declare namespace appAccount {
setOAuthTokenVisibility(name: string, authType: string, bundleName: string, isVisible: boolean): Promise;
/**
- * Checks the oauth token visibility of the specifed authentication type for a third-party application.
+ * Checks the oauth token visibility of the specified authentication type for a third-party application.
*
* Only the owner of the application account has the permission to call this method.
*
diff --git a/api/@ohos.account.distributedAccount.d.ts b/api/@ohos.account.distributedAccount.d.ts
index 33ba7f02e20789e9f61c298cf7834330eba5caef..ae809f7f65391286b6b70347c0f596fe43235370 100644
--- a/api/@ohos.account.distributedAccount.d.ts
+++ b/api/@ohos.account.distributedAccount.d.ts
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Huawei Device Co., Ltd.
+ * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -45,7 +45,7 @@ declare namespace distributedAccount {
*
* @since 7
* @return The distributed information of the current OS account.
- * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS.
+ * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.DISTRIBUTED_DATASYNC
*/
queryOsAccountDistributedInfo(callback: AsyncCallback): void;
queryOsAccountDistributedInfo(): Promise;
diff --git a/api/@ohos.account.osAccount.d.ts b/api/@ohos.account.osAccount.d.ts
index 9229e35f59653bda9ede893ff9f339062254852a..a69c788d46cb80c7cf8d3ac7d4fa054ceb658125 100644
--- a/api/@ohos.account.osAccount.d.ts
+++ b/api/@ohos.account.osAccount.d.ts
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Huawei Device Co., Ltd.
+ * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -14,7 +14,7 @@
*/
import distributedAccount from './@ohos.account.distributedAccount'
-import {AsyncCallback} from "./basic";
+import {AsyncCallback, Callback} from "./basic";
/**
* This module provides the capability to manage os accounts.
@@ -64,12 +64,12 @@ declare namespace osAccount {
isMultiOsAccountEnable(): Promise;
/**
- * Checks whether an OS account is actived based on its local ID.
+ * Checks whether an OS account is activated based on its local ID.
*
* @since 7
* @param localId Indicates the local ID of the OS account.
- * @return Returns {@code true} if the OS account is actived; returns {@code false} otherwise.
- * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS/ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
+ * @return Returns {@code true} if the OS account is activated; returns {@code false} otherwise.
+ * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
*/
isOsAccountActived(localId: number, callback: AsyncCallback): void;
isOsAccountActived(localId: number): Promise;
@@ -121,7 +121,7 @@ declare namespace osAccount {
* @param localId Indicates the local ID of the OS account.
* @return Returns {@code true} if the OS account has been verified successfully;
* returns {@code false} otherwise.
- * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS/ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS.
+ * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS.
*/
isOsAccountVerified(localId: number, callback: AsyncCallback): void;
isOsAccountVerified(localId?: number): Promise;
@@ -169,6 +169,7 @@ declare namespace osAccount {
* @param localId Indicates the local ID of the OS account.
* @param localName Indicates the local name to set for the OS account.
* @return void.
+ * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS.
* @systemapi Hide this for inner system use.
*/
setOsAccountName(localId: number, localName: string, callback: AsyncCallback): void;
@@ -241,6 +242,7 @@ declare namespace osAccount {
* @since 7
* @return Returns a list of OS accounts.
* @systemapi Hide this for inner system use.
+ * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS.
*/
queryAllCreatedOsAccounts(callback: AsyncCallback>): void;
queryAllCreatedOsAccounts(): Promise>;
@@ -298,7 +300,7 @@ declare namespace osAccount {
* @since 7
* @param localId Indicates the local ID of the OS account.
* @return Returns the OS account information; returns {@code null} if the query fails.
- * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS/ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION.
+ * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION.
* @systemapi Hide this for inner system use.
*/
queryOsAccountById(localId: number, callback: AsyncCallback): void;
@@ -325,7 +327,7 @@ declare namespace osAccount {
*
* @since 7
* @return Returns the DVID if obtained; returns an empty string if no OHOS account has logged in.
- * @permission ohos.permission.DISTRIBUTED_DATASYNC.
+ * @permission ohos.permission.DISTRIBUTED_DATASYNC or ohos.permission.MANAGE_LOCAL_ACCOUNTS
*/
getDistributedVirtualDeviceId(callback: AsyncCallback): void;
getDistributedVirtualDeviceId(): Promise;
@@ -466,7 +468,7 @@ declare namespace osAccount {
serialNumber: number;
/**
- * Os account is actived or not.
+ * Os account is activated or not.
* @since 8
*/
isActived: boolean;
diff --git a/api/@ohos.animator.d.ts b/api/@ohos.animator.d.ts
index 2f306abcc6f27540380af20e75ef2238c5f37250..3f4360181c446781c2a3284436bcfc7dc5f5265a 100644
--- a/api/@ohos.animator.d.ts
+++ b/api/@ohos.animator.d.ts
@@ -14,14 +14,14 @@
*/
/**
- * @devices phone, tablet, wearable, tv, car
+ * Defines the animator options.
+ * @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 6
*/
export interface AnimatorOptions {
/**
* Duration of the animation, in milliseconds.
* The default value is 0.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
duration: number;
@@ -44,7 +44,6 @@ export interface AnimatorOptions {
* cubic-bezier(x1, y1, x2, y2) You can customize an animation speed curve in the cubic-bezier() function. The x and y values of each input parameter must be between 0 and 1.
* Step curve. The number must be set and only an integer is supported, step-position is optional. It can be set to start or end. The default value is end.
* The default value is ease.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
easing: string;
@@ -52,7 +51,6 @@ export interface AnimatorOptions {
/**
* Delay for the animation start. The default value indicates no delay.
* The default value is 0.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
delay: number;
@@ -61,7 +59,6 @@ export interface AnimatorOptions {
* Whether to resume to the initial state after the animation is executed.
* none: The initial state is restored after the animation is executed.
* forwards: The state at the end of the animation (defined in the last key frame) is retained after the animation is executed.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
fill: "none" | "forwards" | "backwards" | "both";
@@ -69,7 +66,6 @@ export interface AnimatorOptions {
/**
* The animation playback mode.
* The default value is "normal".
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
direction: "normal" | "reverse" | "alternate" | "alternate-reverse";
@@ -77,7 +73,6 @@ export interface AnimatorOptions {
/**
* Number of times the animation will be played. number indicates a fixed number of playback operations, and -1 an unlimited number of playback operations.
* The default value is 1.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
iterations: number;
@@ -85,7 +80,6 @@ export interface AnimatorOptions {
/**
* Starting point of animator interpolation.
* The default value is 0.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
begin: number;
@@ -93,77 +87,74 @@ export interface AnimatorOptions {
/**
* Ending point of Dynamic Interpolation
* The default value is 1.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
end: number;
}
+/**
+ * Defines the Animator result interface.
+ * @syscap SystemCapability.ArkUI.ArkUI.Full
+ * @since 6
+ */
export interface AnimatorResult {
/**
* Update the options for current animator.
* @param options Options.
+ * @since 6
*/
update(options: AnimatorOptions): void;
/**
* Starts the animation.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
play(): void;
/**
* Ends the animation.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
finish(): void;
/**
* Pauses the animation.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
pause(): void;
/**
* Cancels the animation.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
cancel(): void;
/**
* Plays the animation in reverse direction.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
reverse(): void;
/**
* Trigger when vsync callback.
* @param progress The current progress of animtion
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
onframe: (progress: number) => void;
/**
* The animation is finished.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
onfinish: () => void;
/**
* The animation is canceled.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
oncancel: () => void;
/**
* The animation is repeated.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
onrepeat: () => void;
}
/**
- * @devices phone, tablet, wearable, tv, car
+ * Defines the Animator class.
+ * @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 6
* @import prompt from '@ohos.animator';
*/
@@ -171,7 +162,6 @@ export default class Animator {
/**
* Create an animator object for custum animation.
* @param options Options.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
static createAnimator(options: AnimatorOptions): AnimatorResult;
diff --git a/api/@ohos.app.abilityManager.d.ts b/api/@ohos.app.abilityManager.d.ts
deleted file mode 100644
index 9b430de3ca7765df86929782bae19ee36ffc4cc4..0000000000000000000000000000000000000000
--- a/api/@ohos.app.abilityManager.d.ts
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 2021 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import { AsyncCallback } from './basic';
-import { AbilityMissionInfo } from './app/abilityMissionInfo';
-import { ActiveProcessInfo } from './app/activeProcessInfo';
-import { MissionSnapshot } from './app/missionSnapshot';
-
-/**
- * This module provides the capability to manage abilities and obtaining system task information.
- *
- * @since 7
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
- * @import import abilityManager from '@ohos.app.abilityManager'
- * @permission N/A
- */
-declare namespace abilityManager {
-
- enum ProcessErrCode {
- NO_ERROR = 0,
- CRASHED,
- NO_RESPONSE,
- }
-
-
- /**
- * Get information about running processes
- * @since 7
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
- * @return a list of ActiveProcessInfo records describing each process.
- * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION
- * @systemapi hide this for inner system use
- */
- function getActiveProcessInfos(): Promise>;
- function getActiveProcessInfos(callback: AsyncCallback>): void;
-
- /**
- * Get information about the running ability missions
- * @since 7
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
- * @param upperLimit The maximum number of mission infos to return in the array.
- * @return an array of AbilityMissionInfo records describing each active mission.
- * @permission ohos.permission.ACCESS_MISSIONS
- * @systemapi hide this for inner system use
- */
- function getActiveAbilityMissionInfos(upperLimit: number): Promise>;
- function getActiveAbilityMissionInfos(upperLimit: number, callback: AsyncCallback>): void;
-
- /**
- * Get information about recently run missions
- * @since 7
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
- * @param upperLimit The maximum number of previous mission infos to return in the array.
- * @return an array of AbilityMissionInfo records describing each of the previous mission.
- * @permission ohos.permission.ACCESS_MISSIONS_EXTRA
- * @systemapi hide this for inner system use
- */
- function getPreviousAbilityMissionInfos(upperLimit: number): Promise>;
- function getPreviousAbilityMissionInfos(upperLimit: number, callback: AsyncCallback>): void;
-
- /**
- * Delete the specified missions
- * @since 7
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
- * @param missionIds An array of missions, representing the missions that need to be deleted.
- * @permission ohos.permission.DELETE_MISSIONS
- * @systemapi hide this for inner system use
- */
- function deleteMissions(missionIds: Array): Promise;
- function deleteMissions(missionIds: Array, callback: AsyncCallback): void;
-}
-
-export default abilityManager;
diff --git a/api/@ohos.application.Ability.d.ts b/api/@ohos.application.Ability.d.ts
deleted file mode 100755
index 65963be527b5e0901076ed6d413728e4407f4a79..0000000000000000000000000000000000000000
--- a/api/@ohos.application.Ability.d.ts
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License"),
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import AbilityConstant from "./@ohos.application.AbilityConstant";
-import AbilityContext from "./application/AbilityContext";
-import Want from './@ohos.application.Want';
-import window from './@ohos.window';
-import { Configuration } from './@ohos.application.Configuration';
-import rpc from '/@ohos.rpc';
-
-/**
- * The interface of a Caller.
- *
- * @since 9
- * @sysCap AAFwk
- * @devices phone, tablet, tv, wearable, car
- * @permission N/A
- * @StageModelOnly
- */
- interface Caller {
- /**
- * Notify the server of Sequenceable type data.
- *
- * @since 9
- * @sysCap AAFwk
- * @StageModelOnly
- */
- call(method: string, data: rpc.Sequenceable): Promise;
-
- /**
- * Notify the server of Sequenceable type data and return the notification result.
- *
- * @since 9
- * @sysCap AAFwk
- * return Sequenceable data
- * @StageModelOnly
- */
- callWithResult(method: string, data: rpc.Sequenceable): Promise;
-
- /**
- * Clear service records.
- *
- * @since 9
- * @sysCap AAFwk
- * return Sequenceable data
- * @StageModelOnly
- */
- release(): void;
-
- /**
- * Register death listener notification callback.
- *
- * @since 9
- * @sysCap AAFwk
- * return Sequenceable data
- * @StageModelOnly
- */
- onRelease(callback: function): void;
- }
-
- /**
- * The interface of a Callee.
- *
- * @since 9
- * @sysCap AAFwk
- * @devices phone, tablet, tv, wearable, car
- * @permission N/A
- * @StageModelOnly
- */
- interface Callee {
-
- /**
- * Register data listener callback.
- *
- * @since 9
- * @sysCap AAFwk
- * @StageModelOnly
- */
- on(method: string, callback: function): void;
-
- /**
- * Unregister data listener callback.
- *
- * @since 9
- * @sysCap AAFwk
- * @StageModelOnly
- */
- off(method: string): void;
- }
-
-/**
- * The class of an ability.
- *
- * @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore
- * @permission N/A
- * @StageModelOnly
- */
-export default class Ability {
- /**
- * Indicates configuration information about an ability context.
- *
- * @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore
- * @StageModelOnly
- */
- context: AbilityContext;
-
- /**
- * Indicates ability launch want.
- *
- * @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore
- * @StageModelOnly
- */
- launchWant: Want;
-
- /**
- * Indicates ability last request want.
- *
- * @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore
- * @StageModelOnly
- */
- lastRequestWant: Want;
-
- /**
- * Call Service Stub Object.
- *
- * @since 9
- * @sysCap AAFwk
- * @StageModelOnly
- */
- callee: Callee;
-
- /**
- * Called back when an ability is started for initialization.
- *
- * @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore
- * @return -
- * @StageModelOnly
- */
- onCreate(want: Want, param: AbilityConstant.LaunchParam): void;
-
- /**
- * Called back when an ability window stage is created.
- *
- * @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore
- * @return -
- * @StageModelOnly
- */
- onWindowStageCreate(windowStage: window.WindowStage): void;
-
- /**
- * Called back when an ability window stage is destroyed.
- *
- * @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore
- * @return -
- * @StageModelOnly
- */
- onWindowStageDestroy(): void;
-
- /**
- * Called back before an ability is destroyed.
- *
- * @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore
- * @return -
- * @StageModelOnly
- */
- onDestroy(): void;
-
- /**
- * Called back when the state of an ability changes to foreground.
- *
- * @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore
- * @return -
- * @StageModelOnly
- */
- onForeground(): void;
-
- /**
- * Called back when the state of an ability changes to background.
- *
- * @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore
- * @return -
- * @StageModelOnly
- */
- onBackground(): void;
-
- /**
- * Called back when an ability prepares to migrate.
- *
- * @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore
- * @return true if ability agrees to migrate and saves data successfully, otherwise false.
- * @StageModelOnly
- */
- onContinue(wantParam : {[key: string]: any}): boolean;
-
- /**
- * Called when the launch mode of an ability is set to singleton.
- * This happens when you re-launch an ability that has been at the top of the ability stack.
- *
- * @devices phone, tablet, tv, wearable, car
- * @since 9
- * @sysCap AAFwk
- * @return -
- * @StageModelOnly
- */
- onNewWant(want: Want): void;
-
- /**
- * Called when the system configuration is updated.
- *
- * @devices phone, tablet, tv, wearable, car
- * @since 9
- * @sysCap AAFwk
- * @return -
- * @StageModelOnly
- */
- onConfigurationUpdated(config: Configuration): void;
-}
diff --git a/api/@ohos.application.Configuration.d.ts b/api/@ohos.application.Configuration.d.ts
index 9acbda4fa5ba669522f1ead499705f9fb036064e..9dc13b7bc51b97d59101237d591185e332ac126f 100644
--- a/api/@ohos.application.Configuration.d.ts
+++ b/api/@ohos.application.Configuration.d.ts
@@ -30,7 +30,7 @@ export interface Configuration {
* @since 8
* @syscap SystemCapability.Ability.AbilityBase
*/
- language: string;
+ language?: string;
/**
* Indicates the current colorMode of the application.
@@ -38,29 +38,5 @@ export interface Configuration {
* @since 8
* @syscap SystemCapability.Ability.AbilityBase
*/
- colorMode: ConfigurationConstant.ColorMode;
-
- /**
- * Indicates the screen direction of the current device.
- *
- * @since 8
- * @syscap SystemCapability.Ability.AbilityBase
- */
- direction: ConfigurationConstant.Direction;
-
- /**
- * Indicates the screen density of the current device.
- *
- * @since 8
- * @syscap SystemCapability.Ability.AbilityBase
- */
- screenDensity: ConfigurationConstant.ScreenDensity;
-
- /**
- * Indicates the displayId of the current device.
- *
- * @since 8
- * @syscap SystemCapability.Ability.AbilityBase
- */
- displayId: number;
+ colorMode?: ConfigurationConstant.ColorMode;
}
diff --git a/api/@ohos.application.ConfigurationConstant.d.ts b/api/@ohos.application.ConfigurationConstant.d.ts
index b9ed5f3e19e620af0b740b26577a639825afa721..617e00c3b004f89146cee819350f5f42e0168a26 100644
--- a/api/@ohos.application.ConfigurationConstant.d.ts
+++ b/api/@ohos.application.ConfigurationConstant.d.ts
@@ -32,34 +32,6 @@
COLOR_MODE_DARK = 0,
COLOR_MODE_LIGHT = 1,
}
-
- /**
- * @name Direction
- * @since 8
- * @syscap SystemCapability.Ability.AbilityBase
- * @permission N/A
- */
- export enum Direction {
- DIRECTION_NOT_SET = -1,
- DIRECTION_VERTICAL = 0,
- DIRECTION_HORIZONTAL = 1,
- }
-
- /**
- * @name ScreenDensity
- * @since 8
- * @syscap SystemCapability.Ability.AbilityBase
- * @permission N/A
- */
- export enum ScreenDensity {
- SCREEN_DENSITY_NOT_SET = 0,
- SCREEN_DENSITY_SDPI = 120,
- SCREEN_DENSITY_MDPI = 160,
- SCREEN_DENSITY_LDPI = 240,
- SCREEN_DENSITY_XLDPI = 320,
- SCREEN_DENSITY_XXLDPI = 480,
- SCREEN_DENSITY_XXXLDPI = 640,
- }
}
export default ConfigurationConstant
diff --git a/api/@ohos.application.DataShareExtensionAbility.d.ts b/api/@ohos.application.DataShareExtensionAbility.d.ts
deleted file mode 100644
index dce6c206a8ff9926c35894233dfb8fa8da70de1d..0000000000000000000000000000000000000000
--- a/api/@ohos.application.DataShareExtensionAbility.d.ts
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Copyright (c) 2022 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License"),
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import { AsyncCallback } from "./basic";
-import { ResultSet } from './data/rdb/resultSet';
-import ExtensionContext from "./application/ExtensionContext";
-import Want from './@ohos.application.Want';
-import dataAbility from './@ohos.data.dataAbility';
-import rdb from './@ohos.data.rdb';
-
-/**
- * class of datashare extension ability.
- *
- * @since 9
- * @syscap SystemCapability.DistributedDataManager.DataShare.Provider
- * @systemapi Hide this for inner system use.
- */
-export default class DataShareExtensionAbility {
- /**
- * Indicates datashare extension ability context.
- *
- * @since 9
- * @syscap SystemCapability.DistributedDataManager.DataShare.Provider
- * @systemapi Hide this for inner system use.
- */
- context?: ExtensionContext;
-
- /**
- * Called back when a datashare extension ability is started for initialization.
- *
- * @since 9
- * @syscap SystemCapability.DistributedDataManager.DataShare.Provider
- * @param want Indicates connection information about the datashare extension ability.
- * @systemapi Hide this for inner system use.
- * @return -
- */
- onCreate?(want: Want): void;
-
- /**
- * Obtains the MIME type of files. This method should be implemented by a data share.
- *
- * @since 9
- * @syscap SystemCapability.DistributedDataManager.DataShare.Provider
- * @param uri Indicates the path of the files to obtain.
- * @param mimeTypeFilter Indicates the MIME type of the files to obtain. This parameter cannot be set to {@code
- * null}.
- * 1. "*/*": Obtains all types supported by a data share.
- *
2. "image/*": Obtains files whose main type is image of any subtype.
- *
3. "*/jpg": Obtains files whose subtype is JPG of any main type.
- * @systemapi Hide this for inner system use.
- * @return Returns the MIME type of the matched files; returns null if there is no type that matches the Data
- */
- getFileTypes?(uri: string, mimeTypeFilter: string): Array;
-
- /**
- * Inserts a data record into the database. This method should be implemented by a data share.
- *
- * @since 9
- * @syscap SystemCapability.DistributedDataManager.DataShare.Provider
- * @param uri Indicates the position where the data is to insert.
- * @param valueBucket Indicates the data to insert.
- * @systemapi Hide this for inner system use.
- * @return Returns the index of the newly inserted data record.
- */
- insert?(uri: string, valueBucket: rdb.ValuesBucket): number;
-
- /**
- * Updates one or more data records in the database. This method should be implemented by a data share.
- *
- * @since 9
- * @syscap SystemCapability.DistributedDataManager.DataShare.Provider
- * @param uri Indicates the database table storing the data to update.
- * @param valueBucket Indicates the data to update. This parameter can be null.
- * @param predicates Indicates filter criteria. If this parameter is null, all data records will be updated by
- * default.
- * @systemapi Hide this for inner system use.
- * @return Returns the number of data records updated.
- */
- update?(uri: string, valueBucket: rdb.ValuesBucket, predicates: dataAbility.DataAbilityPredicates): number;
-
- /**
- * Deletes one or more data records. This method should be implemented by a data share.
- *
- * @since 9
- * @syscap SystemCapability.DistributedDataManager.DataShare.Provider
- * @param uri Indicates the database table storing the data to delete.
- * @param predicates Indicates filter criteria. If this parameter is null, all data records will be deleted by
- * default.
- * @systemapi Hide this for inner system use.
- * @return Returns the number of data records deleted.
- */
- delete?(uri: string, predicates: dataAbility.DataAbilityPredicates): number;
-
- /**
- * Queries one or more data records in the database. This method should be implemented by a data share.
- *
- * @since 9
- * @syscap SystemCapability.DistributedDataManager.DataShare.Provider
- * @param uri Indicates the database table storing the data to query.
- * @param columns Indicates the columns to be queried, in array, for example, {"name","age"}. You should define
- * the processing logic when this parameter is null.
- * @param predicates Indicates filter criteria. If this parameter is null, all data records will be queried by
- * default.
- * @systemapi Hide this for inner system use.
- * @return Returns the queried data.
- */
- query?(uri: string, columns: Array, predicates: dataAbility.DataAbilityPredicates): ResultSet;
-
- /**
- * Obtains the MIME type matching the data specified by the URI of the data share. This method should be
- * implemented by a data share.
- *
- * Data abilities supports general data types, including text, HTML, and JPEG.
- *
- * @since 9
- * @syscap SystemCapability.DistributedDataManager.DataShare.Provider
- * @param uri Indicates the uri of the data.
- * @systemapi Hide this for inner system use.
- * @return Returns the MIME type that matches the data specified by {@code uri}.
- */
- getType?(uri: string): string;
-
- /**
- * Inserts multiple data records into the database. This method should be implemented by a data share.
- *
- * @since 9
- * @syscap SystemCapability.DistributedDataManager.DataShare.Provider
- * @param uri Indicates the position where the data is to insert.
- * @param valueBuckets Indicates the data to insert.
- * @systemapi Hide this for inner system use.
- * @return Returns the number of data records inserted.
- */
- batchInsert?(uri: string, valueBuckets: Array): number;
-
- /**
- * Converts the given {@code uri} that refer to the data share into a normalized URI. A normalized URI can be
- * used across devices, persisted, backed up, and restored. It can refer to the same item in the data share
- * even if the context has changed.
- *
- * @since 9
- * @syscap SystemCapability.DistributedDataManager.DataShare.Provider
- * @param uri Indicates the uri to normalize.
- * @systemapi Hide this for inner system use.
- * @return Returns the normalized uri if the data share supports URI normalization;
- */
- normalizeUri?(uri: string): string;
-
- /**
- * Converts the given normalized {@code uri} generated by {@link #normalizeUri(uri)} into a denormalized one.
- * The default implementation of this method returns the original uri passed to it.
- *
- * @since 9
- * @syscap SystemCapability.DistributedDataManager.DataShare.Provider
- * @param uri Indicates the uri to denormalize.
- * @systemapi Hide this for inner system use.
- * @return Returns the denormalized {@code uri} object if the denormalization is successful; returns the original
- * {@code uri} passed to this method if there is nothing to do; returns {@code null} if the data identified by
- * the original {@code uri} cannot be found in the current environment.
- */
- denormalizeUri?(uri: string): string;
-}
\ No newline at end of file
diff --git a/api/@ohos.application.FormExtension.d.ts b/api/@ohos.application.FormExtension.d.ts
deleted file mode 100644
index 63862c0c221b5e3524fc49735c6fe848bad82b3f..0000000000000000000000000000000000000000
--- a/api/@ohos.application.FormExtension.d.ts
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License"),
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import formBindingData from './@ohos.application.formBindingData';
-import FormExtensionContext from "./application/FormExtensionContext";
-import Want from './@ohos.application.Want';
-import { Configuration } from './@ohos.application.Configuration';
-
-/**
- * class of form extension.
- *
- * @since 9
- * @syscap SystemCapability.Ability.Form
- * @StageModelOnly
- */
-export default class FormExtension {
- /**
- * Indicates form extension context.
- *
- * @since 9
- * @syscap SystemCapability.Ability.Form
- * @StageModelOnly
- */
- context: FormExtensionContext;
-
- /**
- * Called to return a {@link formBindingData#FormBindingData} object.
- *
- * @since 9
- * @syscap SystemCapability.Ability.Form
- * @param want Indicates the detailed information for creating a {@link formBindingData#FormBindingData}.
- * The {@code Want} object must include the form ID, form name, and grid style of the form.
- * Such form information must be managed as persistent data for further form
- * acquisition, update, and deletion.
- * @return Returns the created {@link formBindingData#FormBindingData} object.
- * @StageModelOnly
- */
- onCreate(want: Want): formBindingData.FormBindingData;
-
- /**
- * Called when the form provider is notified that a temporary form is successfully converted to a normal form.
- *
- * @since 9
- * @syscap SystemCapability.Ability.Form
- * @param formId Indicates the ID of the form.
- * @return -
- * @StageModelOnly
- */
- onCastToNormal(formId: string): void;
-
- /**
- * Called to notify the form provider to update a specified form.
- *
- * @since 9
- * @syscap SystemCapability.Ability.Form
- * @param formId Indicates the ID of the form to update.
- * @return -
- * @StageModelOnly
- */
- onUpdate(formId: string): void;
-
- /**
- * Called when the form provider receives form events from the system.
- *
- * @since 9
- * @syscap SystemCapability.Ability.Form
- * @param newStatus Indicates the form events occurred. The key in the {@code Map} object indicates the form ID,
- * and the value indicates the event type, which can be either {@link formManager#VisibilityType#FORM_VISIBLE}
- * or {@link formManager#VisibilityType#FORM_INVISIBLE}. {@link formManager#VisibilityType#FORM_VISIBLE}
- * means that the form becomes visible, and {@link formManager#VisibilityType#FORM_INVISIBLE}
- * means that the form becomes invisible.
- * @return -
- * @StageModelOnly
- */
- onVisibilityChange(newStatus: { [key: string]: number }): void;
-
- /**
- * Called when a specified message event defined by the form provider is triggered. This method is valid only for
- * JS forms.
- *
- * @since 9
- * @syscap SystemCapability.Ability.Form
- * @param formId Indicates the ID of the form on which the message event is triggered, which is provided by
- * the client to the form provider.
- * @param message Indicates the value of the {@code params} field of the message event. This parameter is
- * used to identify the specific component on which the event is triggered.
- * @return -
- * @StageModelOnly
- */
- onEvent(formId: string, message: string): void;
-
- /**
- * Called to notify the form provider that a specified form has been destroyed. Override this method if
- * you want your application, as the form provider, to be notified of form deletion.
- *
- * @since 9
- * @syscap SystemCapability.Ability.Form
- * @param formId Indicates the ID of the destroyed form.
- * @return -
- * @StageModelOnly
- */
- onDestroy(formId: string): void;
-
- /**
- * Called when the system configuration is updated.
- *
- * @since 9
- * @syscap SystemCapability.Ability.Form
- * @return -
- * @StageModelOnly
- */
- onConfigurationUpdated(config: Configuration): void;
-}
\ No newline at end of file
diff --git a/api/@ohos.application.ServiceExtAbility.d.ts b/api/@ohos.application.ServiceExtAbility.d.ts
deleted file mode 100644
index 57a549082fc195e6c9f0ce9c98d039428b4dfdab..0000000000000000000000000000000000000000
--- a/api/@ohos.application.ServiceExtAbility.d.ts
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright (c) 2021 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License"),
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import rpc from "./@ohos.rpc";
-import ServiceExtAbilityContext from "./application/ServiceExtAbilityContext";
-import Want from './@ohos.application.Want';
-
-/**
- * class of service extension ability.
- *
- * @since 9
- * @sysCap AAFwk
- * @devices phone, tablet, tv, wearable, car
- * @systemapi hide for inner use.
- * @StageModelOnly
- */
-export default class ServiceExtAbility {
- /**
- * Indicates service extension ability context.
- *
- * @since 9
- * @sysCap AAFwk
- * @systemapi hide for inner use.
- * @StageModelOnly
- */
- context: ServiceExtAbilityContext;
-
- /**
- * Called back when a service extension is started for initialization.
- *
- * @devices phone, tablet, tv, wearable, car
- * @since 9
- * @sysCap AAFwk
- * @systemapi hide for inner use.
- * @return -
- * @StageModelOnly
- */
- onCreate(want: Want): void;
-
- /**
- * Called back before a service extension is destroyed.
- *
- * @devices phone, tablet, tv, wearable, car
- * @since 9
- * @sysCap AAFwk
- * @systemapi hide for inner use.
- * @return -
- * @StageModelOnly
- */
- onDestroy(): void;
-
- /**
- * Called back when a service extension is started.
- *
- * @devices phone, tablet, tv, wearable, car
- * @since 9
- * @sysCap AAFwk
- * @param want Indicates the want of service extension to start.
- * @param startId Indicates the number of times the service extension has been started. The {@code startId} is
- * incremented by 1 every time the service extension is started. For example, if the service extension
- * has been started for six times.
- * @systemapi hide for inner use.
- * @return -
- * @StageModelOnly
- */
- onRequest(want: Want, startId: number): void;
-
- /**
- * Called back when a service extension is first connected to an ability.
- *
- * @devices phone, tablet, tv, wearable, car
- * @since 9
- * @sysCap AAFwk
- * @param want Indicates connection information about the Service ability.
- * @systemapi hide for inner use.
- * @return Returns the proxy of the Service ability.
- * @StageModelOnly
- */
- onConnect(want: Want): rpc.RemoteObject;
-
- /**
- * Called back when all abilities connected to a service extension are disconnected.
- *
- * @devices phone, tablet, tv, wearable, car
- * @since 9
- * @sysCap AAFwk
- * @param want Indicates disconnection information about the service extension.
- * @systemapi hide for inner use.
- * @return -
- * @StageModelOnly
- */
- onDisconnect(want: Want): void;
-
- /**
- * Called when a new client attempts to connect to a service extension after all previous client connections to it
- * are disconnected.
- *
- * @devices phone, tablet, tv, wearable, car
- * @since 9
- * @sysCap AAFwk
- * @param want Indicates the want of the service extension being connected.
- * @systemapi hide for inner use.
- * @return -
- * @StageModelOnly
- */
- onReconnect(want: Want): void;
-}
-
diff --git a/api/@ohos.application.ServiceExtension.d.ts b/api/@ohos.application.ServiceExtension.d.ts
deleted file mode 100644
index 002684069a63fda834df098140a46b339d008254..0000000000000000000000000000000000000000
--- a/api/@ohos.application.ServiceExtension.d.ts
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License"),
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import rpc from "./@ohos.rpc";
-import ServiceExtensionContext from "./application/ServiceExtensionContext";
-import Want from './@ohos.application.Want';
-import { Configuration } from './@ohos.application.Configuration';
-
-/**
- * class of service extension.
- *
- * @since 9
- * @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @systemapi hide for inner use.
- * @StageModelOnly
- */
-export default class ServiceExtension {
- /**
- * Indicates service extension context.
- *
- * @since 9
- * @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @systemapi hide for inner use.
- * @StageModelOnly
- */
- context: ServiceExtensionContext;
-
- /**
- * Called back when a service extension is started for initialization.
- *
- * @since 9
- * @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @systemapi hide for inner use.
- * @return -
- * @StageModelOnly
- */
- onCreate(want: Want): void;
-
- /**
- * Called back before a service extension is destroyed.
- *
- * @since 9
- * @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @systemapi hide for inner use.
- * @return -
- * @StageModelOnly
- */
- onDestroy(): void;
-
- /**
- * Called back when a service extension is started.
- *
- * @since 9
- * @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @param want Indicates the want of service extension to start.
- * @param startId Indicates the number of times the service extension has been started. The {@code startId} is
- * incremented by 1 every time the service extension is started. For example, if the service extension
- * has been started for six times.
- * @systemapi hide for inner use.
- * @return -
- * @StageModelOnly
- */
- onRequest(want: Want, startId: number): void;
-
- /**
- * Called back when a service extension is first connected to an ability.
- *
- * @since 9
- * @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @param want Indicates connection information about the Service ability.
- * @systemapi hide for inner use.
- * @return Returns the proxy of the Service ability.
- * @StageModelOnly
- */
- onConnect(want: Want): rpc.RemoteObject;
-
- /**
- * Called back when all abilities connected to a service extension are disconnected.
- *
- * @since 9
- * @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @param want Indicates disconnection information about the service extension.
- * @systemapi hide for inner use.
- * @return -
- * @StageModelOnly
- */
- onDisconnect(want: Want): void;
-
- /**
- * Called when a new client attempts to connect to a service extension after all previous client connections to it
- * are disconnected.
- *
- * @since 9
- * @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @param want Indicates the want of the service extension being connected.
- * @systemapi hide for inner use.
- * @return -
- * @StageModelOnly
- */
- onReconnect(want: Want): void;
-
- /**
- * Called when the system configuration is updated.
- *
- * @since 9
- * @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @return -
- * @StageModelOnly
- */
- onConfigurationUpdated(config: Configuration): void;
-}
-
diff --git a/api/@ohos.application.StartOptions.d.ts b/api/@ohos.application.StartOptions.d.ts
deleted file mode 100644
index 5c0b9e7d041e9e27f562824297483e010cc21b6e..0000000000000000000000000000000000000000
--- a/api/@ohos.application.StartOptions.d.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2021 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * StartOptions is the basic communication component of the system.
- *
- * @name StartOptions
- * @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
- * @permission N/A
- * @StageModelOnly
- */
-export default class StartOptions {
- /**
- * windowMode
- * @default -
- * @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
- * @StageModelOnly
- */
- windowMode?: number;
-
- /**
- * displayId
- * @default -
- * @devices phone, tablet
- * @since 9
- * @sysCap AAFwk
- * @StageModelOnly
- */
- displayId?: number;
-}
\ No newline at end of file
diff --git a/api/@ohos.application.Want.d.ts b/api/@ohos.application.Want.d.ts
index 337e376ae1577c1a1cedb04d5fed5b48fc7d4f4e..6b2c2b0ae671dc0d0f36a7f79506d7801fa7e39d 100644
--- a/api/@ohos.application.Want.d.ts
+++ b/api/@ohos.application.Want.d.ts
@@ -18,7 +18,7 @@
*
* @name Want
* @since 8
- * @sysCap SystemCapability.Ability.AbilityBase
+ * @syscap SystemCapability.Ability.AbilityBase
* @permission N/A
*/
export default class Want {
@@ -26,7 +26,7 @@ export default class Want {
* device id
* @default -
* @since 8
- * @sysCap SystemCapability.Ability.AbilityBase
+ * @syscap SystemCapability.Ability.AbilityBase
*/
deviceId?: string;
@@ -34,7 +34,7 @@ export default class Want {
* bundle name
* @default -
* @since 8
- * @sysCap SystemCapability.Ability.AbilityBase
+ * @syscap SystemCapability.Ability.AbilityBase
*/
bundleName?: string;
@@ -42,14 +42,14 @@ export default class Want {
* ability name
* @default -
* @since 8
- * @sysCap SystemCapability.Ability.AbilityBase
+ * @syscap SystemCapability.Ability.AbilityBase
*/
abilityName?: string;
/**
* The description of a URI in a Want.
* @since 8
- * @sysCap SystemCapability.Ability.AbilityBase
+ * @syscap SystemCapability.Ability.AbilityBase
* @default -
*/
uri?: string;
@@ -57,7 +57,7 @@ export default class Want {
/**
* The description of the type in this Want.
* @since 8
- * @sysCap SystemCapability.Ability.AbilityBase
+ * @syscap SystemCapability.Ability.AbilityBase
* @default -
*/
type?: string;
@@ -65,7 +65,7 @@ export default class Want {
/**
* The options of the flags in this Want.
* @since 8
- * @sysCap SystemCapability.Ability.AbilityBase
+ * @syscap SystemCapability.Ability.AbilityBase
* @default -
*/
flags?: number;
@@ -73,7 +73,7 @@ export default class Want {
/**
* The description of an action in an want.
* @since 8
- * @sysCap SystemCapability.Ability.AbilityBase
+ * @syscap SystemCapability.Ability.AbilityBase
* @default -
*/
action?: string;
@@ -81,7 +81,7 @@ export default class Want {
/**
* The description of the WantParams object in an Want
* @since 8
- * @sysCap SystemCapability.Ability.AbilityBase
+ * @syscap SystemCapability.Ability.AbilityBase
* @default -
*/
parameters?: {[key: string]: any};
@@ -89,7 +89,7 @@ export default class Want {
/**
* The description of a entities in a Want.
* @since 8
- * @sysCap SystemCapability.Ability.AbilityBase
+ * @syscap SystemCapability.Ability.AbilityBase
* @default -
*/
entities?: Array;
diff --git a/api/@ohos.application.abilityDelegatorRegistry.d.ts b/api/@ohos.application.abilityDelegatorRegistry.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..c2fa8b68e6bd28f59065e8c2208ac58e34295bf9
--- /dev/null
+++ b/api/@ohos.application.abilityDelegatorRegistry.d.ts
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2021 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { AbilityDelegator } from './application/abilityDelegator'
+import { AbilityDelegatorArgs } from './application/abilityDelegatorArgs'
+
+/**
+ * A global register used to store the AbilityDelegator and AbilityDelegatorArgs objects registered
+ * during application startup.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @import import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'
+ * @permission N/A
+ */
+declare namespace abilityDelegatorRegistry {
+ /**
+ * Get the AbilityDelegator object of the application.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @return the AbilityDelegator object initialized when the application is started.
+ */
+ function getAbilityDelegator(): AbilityDelegator;
+
+ /**
+ * Get unit test parameters stored in the AbilityDelegatorArgs object.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @return the previously registered AbilityDelegatorArgs object.
+ */
+ function getArguments(): AbilityDelegatorArgs;
+
+ /**
+ * Describes all lifecycle states of an ability.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ */
+ export enum AbilityLifecycleState {
+ UNINITIALIZED,
+ CREATE,
+ FOREGROUND,
+ BACKGROUND,
+ DESTROY,
+ }
+}
+
+export default abilityDelegatorRegistry;
\ No newline at end of file
diff --git a/api/@ohos.application.abilityManager.d.ts b/api/@ohos.application.abilityManager.d.ts
index ff2426a5e7bc9e4598d977d2e6bd62e604fb6fba..b71565531c83b74ad8f3abed829d5e3ac9baf090 100644
--- a/api/@ohos.application.abilityManager.d.ts
+++ b/api/@ohos.application.abilityManager.d.ts
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Huawei Device Co., Ltd.
+ * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -22,7 +22,7 @@ import { ExtensionRunningInfo } from './application/ExtensionRunningInfo';
* The class of an ability manager.
*
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @permission N/A
*/
declare namespace abilityManager {
@@ -30,7 +30,8 @@ declare namespace abilityManager {
/**
* @name AbilityState
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @systemapi Hide this for inner system use.
* @permission N/A
*/
export enum AbilityState {
@@ -45,10 +46,11 @@ declare namespace abilityManager {
* Updates the configuration by modifying the configuration.
*
* @since 8
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @param config Indicates the new configuration.
* @systemapi Hide this for inner system use.
* @return -
+ * @permission ohos.permission.UPDATE_CONFIGURATION
*/
function updateConfiguration(config: Configuration, callback: AsyncCallback): void;
function updateConfiguration(config: Configuration): Promise;
@@ -57,24 +59,13 @@ declare namespace abilityManager {
* Get information about running abilitys
*
* @since 8
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi Hide this for inner system use.
- * @return -
+ * @return Returns the array of {@link AbilityRunningInfo}.
+ * @permission ohos.permission.GET_RUNNING_INFO
*/
function getAbilityRunningInfos(): Promise>;
function getAbilityRunningInfos(callback: AsyncCallback>): void;
-
- /**
- * Get information about running extensions
- *
- * @since 9
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
- * @param upperLimit Get the maximum limit of the number of messages
- * @systemapi Hide this for inner system use.
- * @return -
- */
- function getExtensionRunningInfos(upperLimit: number): Promise>;
- function getExtensionRunningInfos(upperLimit: number, callback: AsyncCallback>): void;
}
export default abilityManager;
\ No newline at end of file
diff --git a/api/@ohos.application.appManager.d.ts b/api/@ohos.application.appManager.d.ts
index dcb6dca86ab862ac726dd65add9cc4c67820639f..a116e01990c216652bfb601333d4d062b628654b 100644
--- a/api/@ohos.application.appManager.d.ts
+++ b/api/@ohos.application.appManager.d.ts
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Huawei Device Co., Ltd.
+ * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -22,7 +22,7 @@ import { ProcessRunningInfo } from './application/ProcessRunningInfo';
* This module provides the function of app manager service.
*
* @since 8
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @import import appManager from '@ohos.application.appManager'
* @permission N/A
*/
@@ -32,10 +32,11 @@ declare namespace appManager {
*
* @default -
* @since 8
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @param observer The application state observer.
* @systemapi hide this for inner system use
* @return Returns the number code of the observer.
+ * @permission ohos.permission.RUNNING_STATE_OBSERVER
*/
function registerApplicationStateObserver(observer: ApplicationStateObserver): number;
@@ -43,10 +44,11 @@ declare namespace appManager {
* Unregister application state observer.
*
* @since 8
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @param observerId Indicates the number code of the observer.
* @systemapi hide this for inner system use
* @return -
+ * @permission ohos.permission.RUNNING_STATE_OBSERVER
*/
function unregisterApplicationStateObserver(observerId: number, callback: AsyncCallback): void;
function unregisterApplicationStateObserver(observerId: number): Promise;
@@ -55,9 +57,10 @@ declare namespace appManager {
* getForegroundApplications.
*
* @since 8
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi hide this for inner system use
* @return Returns the list of AppStateData.
+ * @permission ohos.permission.GET_RUNNING_INFO
*/
function getForegroundApplications(callback: AsyncCallback>): void;
function getForegroundApplications(): Promise>;
@@ -66,11 +69,12 @@ declare namespace appManager {
* Kill process with account.
*
* @since 8
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @param bundleName The process bundle name.
* @param accountId The account id.
* @systemapi hide this for inner system use
* @return -
+ * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and ohos.permission.CLEAN_BACKGROUND_PROCESSES
*/
function killProcessWithAccount(bundleName: string, accountId: number): Promise;
function killProcessWithAccount(bundleName: string, accountId: number, callback: AsyncCallback): void;
@@ -79,7 +83,7 @@ declare namespace appManager {
* Is user running in stability test.
*
* @since 8
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @return Returns true if user is running stability test.
*/
function isRunningInStabilityTest(callback: AsyncCallback): void;
@@ -89,9 +93,9 @@ declare namespace appManager {
* Get information about running processes
*
* @since 8
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
- * @systemapi Hide this for inner system use.
- * @return -
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @return Returns the array of {@link ProcessRunningInfo}.
+ * @permission ohos.permission.GET_RUNNING_INFO
*/
function getProcessRunningInfos(): Promise>;
function getProcessRunningInfos(callback: AsyncCallback>): void;
@@ -99,11 +103,10 @@ declare namespace appManager {
/**
* Kill processes by bundle name
* @since 8
- * @SysCap SystemCapability.Appexecfwk
- * @devices phone, tablet, tv, wearable, car
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @param bundleName bundle name.
- * @permission ohos.permission.DELETE_MISSIONS
* @systemapi hide this for inner system use
+ * @permission ohos.permission.CLEAN_BACKGROUND_PROCESSES
*/
function killProcessesByBundleName(bundleName: string): Promise;
function killProcessesByBundleName(bundleName: string, callback: AsyncCallback);
@@ -111,14 +114,31 @@ declare namespace appManager {
/**
* Clear up application data by bundle name
* @since 8
- * @SysCap SystemCapability.Appexecfwk
- * @devices phone, tablet, tv, wearable, car
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @param bundleName bundle name.
- * @permission ohos.permission.DELETE_MISSIONS
* @systemapi hide this for inner system use
+ * @permission ohos.permission.CLEAN_APPLICATION_DATA
*/
function clearUpApplicationData(bundleName: string): Promise;
function clearUpApplicationData(bundleName: string, callback: AsyncCallback);
+
+ /**
+ * Is it a ram-constrained device
+ * @since 7
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @return whether a ram-constrained device.
+ */
+ function isRamConstrainedDevice(): Promise;
+ function isRamConstrainedDevice(callback: AsyncCallback): void;
+
+ /**
+ * Get the memory size of the application
+ * @since 7
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @return application memory size.
+ */
+ function getAppMemorySize(): Promise;
+ function getAppMemorySize(callback: AsyncCallback): void;
}
export default appManager;
diff --git a/api/@ohos.application.formBindingData.d.ts b/api/@ohos.application.formBindingData.d.ts
index ad398765917917ecc7774d2e0ff1cda7225c41e0..f961244748da0e4ed4a16aaff2012a08081f3737 100644
--- a/api/@ohos.application.formBindingData.d.ts
+++ b/api/@ohos.application.formBindingData.d.ts
@@ -18,19 +18,24 @@
*
* @name formBindingData
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.Form
*/
declare namespace formBindingData {
/**
* Create an FormBindingData instance.
*
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.Form
* @param obj Indicates the FormBindingData instance data.
* @return Returns the {@link FormBindingData} instance.
*/
function createFormBindingData(obj?: Object | string): FormBindingData;
+ /**
+ * Defines the createFormBindingData result interface.
+ * @syscap SystemCapability.Ability.Form
+ * @since 8
+ */
interface FormBindingData {
data: Object
}
diff --git a/api/@ohos.application.formError.d.ts b/api/@ohos.application.formError.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..97ecc6768b5b2bed444e0cc5e3683d60d0ed43b0
--- /dev/null
+++ b/api/@ohos.application.formError.d.ts
@@ -0,0 +1,225 @@
+/*
+ * Copyright (c) 2022 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * interface of formError.
+ *
+ * @name formError
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+declare namespace formError {
+ /**
+ * Error of form.
+ *
+ * @name FormError
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ enum FormError {
+ /**
+ * A common internal error occurs during form processing.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ ERR_COMMON = 1,
+
+ /**
+ * The application does not have permission to use forms.
+ * Ensure that the application is granted with the ohos.permission.REQUIRE_FORM
+ * and ohos.permission.GET_BUNDLE_INFO_PRIVILEGED permissions.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ ERR_PERMISSION_DENY = 2,
+
+ /**
+ * Failed to obtain the configuration information about the form specified by the
+ * request parameters. Ensure that the parameters of the form to be added are
+ * consistent with those provided by the form provider.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ ERR_GET_INFO_FAILED = 4,
+
+ /**
+ * Failed to obtain the bundle to which the form belongs based on the request parameters.
+ * Ensure that the bundle to which the form to be added belongs is available.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ ERR_GET_BUNDLE_FAILED = 5,
+
+ /**
+ * Failed to initialize the form layout based on the request parameters.
+ * Ensure that the grid style of the form is supported by the form provider.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ ERR_GET_LAYOUT_FAILED = 6,
+
+ /**
+ * Invalid input parameter during form operation. Ensure that all input
+ * parameters are valid.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ ERR_ADD_INVALID_PARAM = 7,
+
+ /**
+ * The form configuration to be obtained using an existing form ID is
+ * different from that obtained for the first time.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ ERR_CFG_NOT_MATCH_ID = 8,
+
+ /**
+ * The ID of the form to be operated does not exist in the Form Manager Service.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ ERR_NOT_EXIST_ID = 9,
+
+ /**
+ * Failed to bind the Form Manager Service to the provider service.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ ERR_BIND_PROVIDER_FAILED = 10,
+
+ /**
+ * The total number of added forms exceeds the maximum allowed by the system.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ ERR_MAX_SYSTEM_FORMS = 11,
+
+ /**
+ * The number of form instances generated using the same form configuration
+ * exceeds the maximum allowed by the system.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ ERR_MAX_INSTANCES_PER_FORM = 12,
+
+ /**
+ * The form being requested was added by other applications and cannot be
+ * operated by the current application.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ ERR_OPERATION_FORM_NOT_SELF = 13,
+
+ /**
+ * The Form Manager Service failed to instruct the form provider to delete the form.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ ERR_PROVIDER_DEL_FAIL = 14,
+
+ /**
+ * The total number of added forms exceeds the maximum per client.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ ERR_MAX_FORMS_PER_CLIENT = 15,
+
+ /**
+ * The total number of added temp forms exceeds the maximum in system.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ ERR_MAX_SYSTEM_TEMP_FORMS = 16,
+
+ /**
+ * The module can not be find in system.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ ERR_FORM_NO_SUCH_MODULE = 17,
+
+ /**
+ * The ability can not be find in system.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ ERR_FORM_NO_SUCH_ABILITY = 18,
+
+ /**
+ * The dimension is not exist in the form.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ ERR_FORM_NO_SUCH_DIMENSION = 19,
+
+ /**
+ * The ability is not installed.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ ERR_FORM_FA_NOT_INSTALLED = 20,
+
+ /**
+ * Failed to obtain the RPC object of the Form Manager Service because
+ * the service is not started.Please try again after the service is started.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ ERR_SYSTEM_RESPONSES_FAILED = 30,
+
+ /**
+ * Failed to obtain the form requested by the client because another form
+ * with the same form ID is in use. Forms in use cannot have the same ID.
+ * To obtain and display a form that has the same configuration as an in-use
+ * form in the same application, you are advised to set the form ID to 0 in
+ * the request parameters.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ ERR_FORM_DUPLICATE_ADDED = 31,
+
+ /**
+ * The form is being restored. Perform operations on the form only after
+ * the restoration is complete.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ ERR_IN_RECOVERY = 36
+ }
+}
+export default formError;
\ No newline at end of file
diff --git a/api/@ohos.application.formHost.d.ts b/api/@ohos.application.formHost.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..382bbde363befbc8d40540f4f7edcbd43824722a
--- /dev/null
+++ b/api/@ohos.application.formHost.d.ts
@@ -0,0 +1,271 @@
+/*
+ * Copyright (c) 2022 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { AsyncCallback } from "./basic";
+import { Callback } from "./basic";
+import Want from './@ohos.application.Want';
+import formInfo from './@ohos.application.formInfo'
+
+/**
+ * interface of formHost.
+ *
+ * @name formHost
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ * @systemapi hide for inner use.
+ */
+declare namespace formHost {
+ /**
+ * Deletes an obtained form by its ID.
+ *
+ * After this method is called, the form won't be available for use by the application and the Form Manager
+ * Service no longer keeps the cache information about the form.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ * @param formId Indicates the form ID
+ * @return -
+ * @permission ohos.permission.REQUIRE_FORM
+ */
+ function deleteForm(formId: string, callback: AsyncCallback): void;
+ function deleteForm(formId: string): Promise;
+
+ /**
+ * Releases an obtained form by its ID.
+ *
+ * After this method is called, the form won't be available for use by the application, but the Form Manager
+ * Service still keeps the cache information about the form, so that the application can quickly obtain it based on
+ * the {@code formId}.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ * @param formId Indicates the form ID
+ * @param isReleaseCache Indicates whether or not release cache
+ * @return -
+ * @permission ohos.permission.REQUIRE_FORM
+ */
+ function releaseForm(formId: string, callback: AsyncCallback): void;
+ function releaseForm(formId: string, isReleaseCache: boolean, callback: AsyncCallback): void;
+ function releaseForm(formId: string, isReleaseCache?: boolean): Promise;
+
+ /**
+ * Requests for form update.
+ *
+ * This method must be called when the application has detected that a system setting item (such as the language,
+ * resolution, or screen orientation) being listened for has changed. Upon receiving the update request, the form
+ * provider automatically updates the form data (if there is any update) through the form framework, with the update
+ * process being unperceivable by the application.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ * @param formId Indicates the ID of the form to update.
+ * @return -
+ * @permission ohos.permission.REQUIRE_FORM
+ */
+ function requestForm(formId: string, callback: AsyncCallback): void;
+ function requestForm(formId: string): Promise;
+
+ /**
+ * Converts a specified temporary form that has been obtained by the application into a normal form.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ * @param formId Indicates the ID of the temporary form to convert.
+ * @return -
+ * @permission ohos.permission.REQUIRE_FORM
+ */
+ function castTempForm(formId: string, callback: AsyncCallback): void;
+ function castTempForm(formId: string): Promise;
+
+ /**
+ * Sends a notification to the form framework to make the specified forms visible.
+ *
+ * After this method is successfully called, onVisibilityChange will be called to notify the form provider of
+ * the form visibility change event.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ * @param formIds Indicates the IDs of the forms to be made visible.
+ * @return -
+ * @permission ohos.permission.REQUIRE_FORM
+ */
+ function notifyVisibleForms(formIds: Array, callback: AsyncCallback): void;
+ function notifyVisibleForms(formIds: Array): Promise;
+
+ /**
+ * Sends a notification to the form framework to make the specified forms invisible.
+ *
+ * After this method is successfully called, onVisibilityChange will be called to notify the form provider of
+ * the form visibility change event.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ * @param formIds Indicates the IDs of the forms to be made invisible.
+ * @return -
+ * @permission ohos.permission.REQUIRE_FORM
+ */
+ function notifyInvisibleForms(formIds: Array, callback: AsyncCallback): void;
+ function notifyInvisibleForms(formIds: Array): Promise;
+
+ /**
+ * Notify the form framework to make the specified forms updatable.
+ *
+ * You can use this method to set form refresh state to true, the form can receive new
+ * update from service.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ * @param formIds Indicates the IDs of the forms to be made invisible.
+ * @return -
+ * @permission ohos.permission.REQUIRE_FORM
+ */
+ function enableFormsUpdate(formIds: Array, callback: AsyncCallback): void;
+ function enableFormsUpdate(formIds: Array): Promise;
+
+ /**
+ * Notifys the form framework to make the specified forms non updatable.
+ *
+ * You can use this method to set form refresh state to false, the form do not receive
+ * new update from service.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ * @param formIds Indicates the IDs of the forms to be made invisible.
+ * @return -
+ * @permission ohos.permission.REQUIRE_FORM
+ */
+ function disableFormsUpdate(formIds: Array, callback: AsyncCallback): void;
+ function disableFormsUpdate(formIds: Array): Promise;
+
+ /**
+ * Checks whether the system is ready.
+ *
+ * You can use this method to obtain the system is ready.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ * @return -
+ */
+ function isSystemReady(callback: AsyncCallback): void;
+ function isSystemReady(): Promise;
+
+ /**
+ * Obtains the FormInfo objects provided by all applications on the device.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ * @return Returns the {@link FormInfo}
+ * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
+ */
+ function getAllFormsInfo(callback: AsyncCallback>): void;
+ function getAllFormsInfo(): Promise>;
+
+ /**
+ * Obtains the FormInfo objects provided by a specified application on the device.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ * @param bundleName Indicates the bundle name of the application.
+ * @param moduleName Indicates the module name of the application.
+ * @return Returns the {@link FormInfo}
+ * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
+ */
+ function getFormsInfo(bundleName: string, callback: AsyncCallback>): void;
+ function getFormsInfo(bundleName: string, moduleName: string, callback: AsyncCallback>): void;
+ function getFormsInfo(bundleName: string, moduleName?: string): Promise>;
+
+ /**
+ * Deletes invalid forms of the application in the Form Manager Service based on the list of.
+ *
+ * You can use this method to delete invalid forms of the application.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ * @param formIds Indicates the specify form id.
+ * @return Returns the number of invalid forms deleted by the Form Manager Service
+ * @permission ohos.permission.REQUIRE_FORM.
+ */
+ function deleteInvalidForms(formIds: Array, callback: AsyncCallback): void;
+ function deleteInvalidForms(formIds: Array): Promise;
+
+ /**
+ * Obtains the Form state.
+ *
+ * You can use this method to obtains the form state.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ * @param want Indicates want of the form.
+ * @return Returns form state {@link FormStateInfo}
+ * @permission ohos.permission.GET_BUNDLE_INFO and ohos.permission.GET_BUNDLE_INFO_PRIVILEGED.
+ */
+ function acquireFormState(want: Want, callback: AsyncCallback): void;
+ function acquireFormState(want: Want): Promise;
+
+ /**
+ * Listens to the event of uninstall form.
+ *
+ * You can use this method to listen to the event of uninstall form.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ * @param type Indicates event type.
+ * @return -
+ */
+ function on(type: "formUninstall", callback: Callback): void;
+
+ /**
+ * Cancels listening to the event of uninstall form.
+ *
+ * You can use this method to cancel listening to the event of uninstall form.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ * @param type Indicates event type.
+ * @return -
+ */
+ function off(type: "formUninstall", callback?: Callback): void;
+
+ /**
+ * notify form is Visible
+ *
+ * You can use this method to notify form visible state.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ * @param formIds Indicates the specify form id.
+ * @param isVisible Indicates whether visible.
+ * @return -
+ * @permission ohos.permission.REQUIRE_FORM.
+ */
+ function notifyFormsVisible(formIds: Array, isVisible: boolean, callback: AsyncCallback): void;
+ function notifyFormsVisible(formIds: Array, isVisible: boolean): Promise;
+
+ /**
+ * notify form enable update state.
+ *
+ * You can use this method to notify form enable update state.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ * @param formIds Indicates the specify form id.
+ * @param isEnableUpdate Indicates whether enable update.
+ * @return -
+ * @permission ohos.permission.REQUIRE_FORM.
+ */
+ function notifyFormsEnableUpdate(formIds: Array, isEnableUpdate: boolean, callback: AsyncCallback): void;
+ function notifyFormsEnableUpdate(formIds: Array, isEnableUpdate: boolean): Promise;
+}
+export default formHost;
\ No newline at end of file
diff --git a/api/@ohos.application.formInfo.d.ts b/api/@ohos.application.formInfo.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..cbb57460639b6a9364c1b1af8590e07dd087408c
--- /dev/null
+++ b/api/@ohos.application.formInfo.d.ts
@@ -0,0 +1,390 @@
+/*
+ * Copyright (c) 2022 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import Want from './@ohos.application.Want';
+
+/**
+ * interface of formInfo.
+ *
+ * @name formInfo
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+declare namespace formInfo {
+ /**
+ * Provides information about a form.
+ *
+ * @name FormInfo
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ interface FormInfo {
+ /**
+ * Obtains the bundle name of the application to which this form belongs.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ bundleName: string;
+
+ /**
+ * Obtains the name of the application module to which this form belongs.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ moduleName: string;
+
+ /**
+ * Obtains the class name of the ability to which this form belongs.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ abilityName: string;
+
+ /**
+ * Obtains the name of this form.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ name: string;
+
+ /**
+ * Obtains the name of this form.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ description: string;
+
+ /**
+ * Obtains the type of this form. Currently, JS forms are supported.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ type: FormType;
+
+ /**
+ * Obtains the JS component name of this JS form.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ jsComponentName: string;
+
+ /**
+ * Obtains the color mode of this form.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ colorMode: ColorMode;
+
+ /**
+ * Checks whether this form is a default form.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ isDefault: boolean;
+
+ /**
+ * Obtains the updateEnabled.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ updateEnabled: boolean;
+
+ /**
+ * Obtains whether notify visible of this form.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ formVisibleNotify: boolean;
+
+ /**
+ * Obtains the bundle relatedBundleName of the application to which this form belongs.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ relatedBundleName: string;
+
+ /**
+ * Obtains the scheduledUpdateTime.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ scheduledUpdateTime: string;
+
+ /**
+ * Obtains the form config ability about this form.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ formConfigAbility: string;
+
+ /**
+ * Obtains the updateDuration.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ updateDuration: number;
+
+ /**
+ * Obtains the default grid style of this form.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ defaultDimension: number;
+
+ /**
+ * Obtains the grid styles supported by this form.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ supportDimensions: Array;
+
+ /**
+ * Obtains the custom data defined in this form.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ customizeData: {[key: string]: [value: string]};
+ }
+
+ /**
+ * Type of form.
+ *
+ * @name FormType
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ enum FormType {
+ /**
+ * JS form.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ JS = 1
+ }
+
+ /**
+ * Color mode.
+ *
+ * @name ColorMode
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ enum ColorMode {
+ /**
+ * Automatic mode.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ MODE_AUTO = -1,
+
+ /**
+ * Dark mode.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ MODE_DARK = 0,
+
+ /**
+ * Light mode.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ MODE_LIGHT = 1
+ }
+
+ /**
+ * Provides state information about a form.
+ *
+ * @name FormStateInfo
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ interface FormStateInfo {
+ /**
+ * Obtains the form state.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ formState: FormState;
+
+ /**
+ * Obtains the want form .
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ want: Want;
+ }
+
+ /**
+ * Provides state about a form.
+ *
+ * @name FormState
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ enum FormState {
+ /**
+ * Indicates that the form status is unknown due to an internal error.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ UNKNOWN = -1,
+
+ /**
+ * Indicates that the form is in the default state.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ DEFAULT = 0,
+
+ /**
+ * Indicates that the form is ready.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ READY = 1,
+ }
+
+ /**
+ * Parameter of form.
+ *
+ * @name FormParam
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ enum FormParam {
+ /**
+ * Indicates the key specifying the ID of the form to be obtained, which is represented as
+ * want: {
+ * "parameters": {
+ * IDENTITY_KEY: 1L
+ * }
+ * }.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ * @systemapi hide for inner use.
+ */
+ IDENTITY_KEY = "ohos.extra.param.key.form_identity",
+
+ /**
+ * Indicates the key specifying the grid style of the form to be obtained, which is represented as
+ * want: {
+ * "parameters": {
+ * DIMENSION_KEY: 1
+ * }
+ * }.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ DIMENSION_KEY = "ohos.extra.param.key.form_dimension",
+
+ /**
+ * Indicates the key specifying the name of the form to be obtained, which is represented as
+ * want: {
+ * "parameters": {
+ * NAME_KEY: "formName"
+ * }
+ * }.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ NAME_KEY = "ohos.extra.param.key.form_name",
+
+ /**
+ * Indicates the key specifying the name of the module to which the form to be obtained belongs, which is
+ * represented as
+ * want: {
+ * "parameters": {
+ * MODULE_NAME_KEY: "formEntry"
+ * }
+ * }
+ * This constant is mandatory.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ MODULE_NAME_KEY = "ohos.extra.param.key.module_name",
+
+ /**
+ * Indicates the key specifying the width of the form to be obtained, which is represented as
+ * want: {
+ * "parameters": {
+ * WIDTH_KEY: 800
+ * }
+ * }
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ WIDTH_KEY = "ohos.extra.param.key.form_width",
+
+ /**
+ * Indicates the key specifying the height of the form to be obtained, which is represented as
+ * want: {
+ * "parameters": {
+ * HEIGHT_KEY: 400
+ * }
+ * }
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ HEIGHT_KEY = "ohos.extra.param.key.form_height",
+
+ /**
+ * Indicates the key specifying whether a form is temporary, which is represented as
+ * want: {
+ * "parameters": {
+ * TEMPORARY_KEY: true
+ * }
+ * }
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+ TEMPORARY_KEY = "ohos.extra.param.key.form_temporary"
+ }
+}
+export default formInfo;
\ No newline at end of file
diff --git a/api/application/PermissionRequestResult.d.ts b/api/@ohos.application.formProvider.d.ts
old mode 100755
new mode 100644
similarity index 35%
rename from api/application/PermissionRequestResult.d.ts
rename to api/@ohos.application.formProvider.d.ts
index 6c44ea461f8be4c4a7c03b20ed9c48c9540ec04f..7075d9ad1df2ee5e6356b2fc2315c17f62bbd962
--- a/api/application/PermissionRequestResult.d.ts
+++ b/api/@ohos.application.formProvider.d.ts
@@ -1,43 +1,54 @@
-/*
- * Copyright (c) 2022 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License"),
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * The result of requestPermissionsFromUser with asynchronous callback.
- *
- * @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.Mission
- * @permission N/A
- * @StageModelOnly
- */
-export default class PermissionRequestResult {
- /**
- * The permissions passed in by the user.
- *
- * @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.Mission
- * @StageModelOnly
- */
- permissions: Array;
-
- /**
- * The results for the corresponding request permissions. The value 0 indicates that a
- * permission is granted, and the value -1 indicates not.
- *
- * @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.Mission
- * @StageModelOnly
- */
- authResults: Array;
-}
\ No newline at end of file
+/*
+ * Copyright (c) 2022 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { AsyncCallback } from "./basic";
+import formBindingData from "./@ohos.application.formBindingData";
+
+/**
+ * interface of formProvider.
+ *
+ * @name formProvider
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ */
+declare namespace formProvider {
+ /**
+ * Set next update time for a specified form.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ * @param formId Indicates the form ID.
+ * @param minute Indicates duration minute before next update.
+ * @return -
+ */
+ function setFormNextRefreshTime(formId: string, minute: number, callback: AsyncCallback): void;
+ function setFormNextRefreshTime(formId: string, minute: number): Promise;
+
+ /**
+ * Update a specified form.
+ *
+ * Client to communication with FormManagerService.
+ *
+ * @since 8
+ * @syscap SystemCapability.Ability.Form
+ * @param formId Indicates the form ID
+ * @param FormBindingData Indicates the form data
+ * @return -
+ */
+ function updateForm(formId: string, formBindingData: formBindingData.FormBindingData,
+ callback: AsyncCallback): void;
+ function updateForm(formId: string, formBindingData: formBindingData.FormBindingData): Promise;
+}
+export default formProvider;
\ No newline at end of file
diff --git a/api/@ohos.application.missionManager.d.ts b/api/@ohos.application.missionManager.d.ts
index 94f172f8e5fc096eaf834b759b95bc4de2195a7c..dc6a871c31938cc604ca2c107fa0cf98cf7731fd 100644
--- a/api/@ohos.application.missionManager.d.ts
+++ b/api/@ohos.application.missionManager.d.ts
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Huawei Device Co., Ltd.
+ * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -24,8 +24,8 @@ import StartOptions from "./@ohos.application.StartOptions";
*
* @name missionManager
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Mission
- * @permission N/A
+ * @syscap SystemCapability.Ability.AbilityRuntime.Mission
+ * @permission ohos.permission.MANAGE_MISSIONS
* @systemapi hide for inner use.
*/
declare namespace missionManager {
@@ -33,7 +33,8 @@ declare namespace missionManager {
* Register the missionListener to ams.
*
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Mission
+ * @syscap SystemCapability.Ability.AbilityRuntime.Mission
+ * @param listener Indicates the MissionListener to be registered.
* @return The index number of the MissionListener.
*/
function registerMissionListener(listener: MissionListener): number;
@@ -42,7 +43,8 @@ declare namespace missionManager {
* Unrgister the missionListener to ams.
*
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Mission
+ * @syscap SystemCapability.Ability.AbilityRuntime.Mission
+ * @param listenerId Indicates the listener id to be unregistered.
* @return -
*/
function unregisterMissionListener(listenerId: number, callback: AsyncCallback): void;
@@ -52,7 +54,9 @@ declare namespace missionManager {
* Get the missionInfo with the given missionId.
*
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Mission
+ * @syscap SystemCapability.Ability.AbilityRuntime.Mission
+ * @param deviceId Indicates the device to be queried.
+ * @param missionId Indicates mission id to be queried.
* @return the {@link MissionInfo} of the given id.
*/
function getMissionInfo(deviceId: string, missionId: number, callback: AsyncCallback): void;
@@ -62,7 +66,9 @@ declare namespace missionManager {
* Get the missionInfo with the given missionId.
*
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Mission
+ * @syscap SystemCapability.Ability.AbilityRuntime.Mission
+ * @param deviceId Indicates the device to be queried.
+ * @param numMax Indicates the maximum number of returned missions.
* @return The array of the {@link MissionInfo}.
*/
function getMissionInfos(deviceId: string, numMax: number, callback: AsyncCallback>): void;
@@ -72,7 +78,9 @@ declare namespace missionManager {
* Get the mission snapshot with the given missionId.
*
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Mission
+ * @syscap SystemCapability.Ability.AbilityRuntime.Mission
+ * @param deviceId Indicates the device to be queried.
+ * @param missionId Indicates mission id to be queried.
* @return The {@link MissionSnapshot} of the given id.
*/
function getMissionSnapShot(deviceId: string, missionId: number, callback: AsyncCallback): void;
@@ -82,7 +90,8 @@ declare namespace missionManager {
* Lock the mission.
*
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Mission
+ * @syscap SystemCapability.Ability.AbilityRuntime.Mission
+ * @param missionId Indicates mission id to be locked.
* @return -
*/
function lockMission(missionId: number, callback: AsyncCallback): void;
@@ -92,7 +101,8 @@ declare namespace missionManager {
* Unlock the mission.
*
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Mission
+ * @syscap SystemCapability.Ability.AbilityRuntime.Mission
+ * @param missionId Indicates mission id to be unlocked.
* @return -
*/
function unlockMission(missionId: number, callback: AsyncCallback): void;
@@ -102,7 +112,8 @@ declare namespace missionManager {
* Clear the given mission in the ability manager service.
*
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Mission
+ * @syscap SystemCapability.Ability.AbilityRuntime.Mission
+ * @param missionId Indicates mission id to be cleared.
* @return -
*/
function clearMission(missionId: number, callback: AsyncCallback): void;
@@ -112,7 +123,7 @@ declare namespace missionManager {
* Clear all missions in the ability manager service.
*
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Mission
+ * @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @return -
*/
function clearAllMissions(callback: AsyncCallback): void;
@@ -122,7 +133,9 @@ declare namespace missionManager {
* Schedule the given mission to foreground.
*
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Mission
+ * @syscap SystemCapability.Ability.AbilityRuntime.Mission
+ * @param missionId Indicates mission id to be moved to foreground.
+ * @param options Indicates the start options.
* @return -
*/
function moveMissionToFront(missionId: number, callback: AsyncCallback): void;
diff --git a/api/application/ExtensionContext.d.ts b/api/@ohos.application.testRunner.d.ts
similarity index 56%
rename from api/application/ExtensionContext.d.ts
rename to api/@ohos.application.testRunner.d.ts
index b08fcc76a38603b5a28acc7e064682ac5c2d4345..dc8e559d3f4cde6916a2d229946f69e6a9d74a49 100644
--- a/api/application/ExtensionContext.d.ts
+++ b/api/@ohos.application.testRunner.d.ts
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License"),
+ * Copyright (c) 2021 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
@@ -13,35 +13,31 @@
* limitations under the License.
*/
-import { HapModuleInfo } from "../bundle/hapModuleInfo";
-import { Configuration } from '../@ohos.application.Configuration';
-import Context from "./Context";
-
/**
- * The context of an extension. It allows access to extension-specific resources.
+ * Base class for the test framework.
+ * If you want to implement your own unit test framework, you must inherit this class and overrides all its methods.
*
- * @since 9
+ * @since 8
* @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @import import TestRunner from '@ohos.application.testRunner'
* @permission N/A
- * @StageModelOnly
*/
-export default class ExtensionContext extends Context {
-
+export interface TestRunner {
/**
- * Indicates configuration information about an module.
+ * Prepare the unit testing environment for running test cases.
*
- * @since 9
+ * @since 8
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @StageModelOnly
*/
- currentHapModuleInfo: HapModuleInfo;
+ onPrepare(): void;
/**
- * Indicates configuration information.
+ * Run all test cases.
*
- * @since 9
+ * @since 8
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @StageModelOnly
*/
- config: Configuration;
-}
\ No newline at end of file
+ onRun(): void;
+}
+
+export default TestRunner;
\ No newline at end of file
diff --git a/api/@ohos.batteryinfo.d.ts b/api/@ohos.batteryInfo.d.ts
similarity index 93%
rename from api/@ohos.batteryinfo.d.ts
rename to api/@ohos.batteryInfo.d.ts
index a139929f6d85cb3fb8640a99e1fc7d45eabf1762..05b49542cab99d5f5d03e94aee99683880b67428 100644
--- a/api/@ohos.batteryinfo.d.ts
+++ b/api/@ohos.batteryInfo.d.ts
@@ -19,7 +19,7 @@
* Battery information includes the remaining battery power,
* voltage, temperature, model, and charger type.
*
- * @sysCap SystemCapability.PowerManager.BatteryManage.Core
+ * @syscap SystemCapability.PowerManager.BatteryManager.Core
* @since 6
*/
declare namespace batteryInfo {
@@ -74,7 +74,7 @@ declare namespace batteryInfo {
/**
* Indicates the charger type of a device.
*
- * @sysCap SystemCapability.PowerManager.BatteryManage.Core
+ * @syscap SystemCapability.PowerManager.BatteryManager.Core
* @since 6
*/
export enum BatteryPluggedType {
@@ -103,7 +103,7 @@ declare namespace batteryInfo {
/**
* Indicates the battery charging status of a device.
*
- * @sysCap SystemCapability.PowerManager.BatteryManage.Core
+ * @syscap SystemCapability.PowerManager.BatteryManager.Core
* @since 6
*/
export enum BatteryChargeState {
@@ -132,7 +132,7 @@ declare namespace batteryInfo {
/**
* Indicates the battery health status of a device.
*
- * @sysCap SystemCapability.PowerManager.BatteryManage.Core
+ * @syscap SystemCapability.PowerManager.BatteryManager.Core
* @since 6
*/
export enum BatteryHealthState {
diff --git a/api/@ohos.bluetooth.d.ts b/api/@ohos.bluetooth.d.ts
index 155520f1577dba21ce71d391fa7fe83da1f8805c..38e7044b419687b8c9cff20d0c70fc809787a041 100644
--- a/api/@ohos.bluetooth.d.ts
+++ b/api/@ohos.bluetooth.d.ts
@@ -18,19 +18,20 @@ import { AsyncCallback, Callback } from "./basic";
/**
* Provides methods to operate or manage Bluetooth.
* @since 7
+ * @import import bluetooth frome '@ohos.bluetooth';
* @syscap SystemCapability.Communication.Bluetooth.Core
*/
declare namespace bluetooth {
- /**
- * Obtains the Bluetooth status of a device.
- *
- * @return Returns the Bluetooth status, which can be {@link BluetoothState#STATE_OFF},
- * {@link BluetoothState#STATE_TURNING_ON}, {@link BluetoothState#STATE_ON}, {@link BluetoothState#STATE_TURNING_OFF},
- * {@link BluetoothState#STATE_BLE_TURNING_ON}, {@link BluetoothState#STATE_BLE_ON},
- * or {@link BluetoothState#STATE_BLE_TURNING_OFF}.
- * @since 7
- * @permission ohos.permission.USE_BLUETOOTH
- */
+ /**
+ * Obtains the Bluetooth status of a device.
+ *
+ * @return Returns the Bluetooth status, which can be {@link BluetoothState#STATE_OFF},
+ * {@link BluetoothState#STATE_TURNING_ON}, {@link BluetoothState#STATE_ON}, {@link BluetoothState#STATE_TURNING_OFF},
+ * {@link BluetoothState#STATE_BLE_TURNING_ON}, {@link BluetoothState#STATE_BLE_ON},
+ * or {@link BluetoothState#STATE_BLE_TURNING_OFF}.
+ * @since 7
+ * @permission ohos.permission.USE_BLUETOOTH
+ */
function getState(): BluetoothState;
/**
@@ -121,6 +122,16 @@ declare namespace bluetooth {
*/
function getPairedDevices(): Array;
+ /**
+ * Obtains the connection state of profile.
+ *
+ * @param profileId The profile id.
+ * @return Returns the connection state.
+ * @since 8
+ * @permission ohos.permission.USE_BLUETOOTH
+ */
+ function getProfileConnState(profileId: ProfileId): ProfileConnectionState;
+
/**
* Sets the confirmation of pairing with a certain device.
*
@@ -336,6 +347,134 @@ declare namespace bluetooth {
*/
function off(type: "sppRead", clientSocket: number, callback?: Callback): void;
+ /**
+ * Obtains the instance of profile.
+ *
+ * @param profileId The profile id..
+ * @return Returns instance of profile.
+ * @since 8
+ */
+ function getProfile(profileId: ProfileId): A2dpSourceProfile | HandsFreeAudioGatewayProfile;
+
+ /**
+ * Base interface of profile.
+ */
+ interface BaseProfile {
+ /**
+ * Obtains the connected devices list of profile.
+ *
+ * @return Returns the address of connected devices list.
+ * @since 8
+ * @permission ohos.permission.USE_BLUETOOTH
+ */
+ getConnectionDevices(): Array;
+
+ /**
+ * Obtains the profile state of device.
+ *
+ * @param device The address of bluetooth device.
+ * @return Returns {@link ProfileConnectionState} of device.
+ * @since 8
+ * @permission ohos.permission.USE_BLUETOOTH
+ */
+ getDeviceState(device: string): ProfileConnectionState;
+ }
+
+ /**
+ * Manager a2dp source profile.
+ */
+ interface A2dpSourceProfile extends BaseProfile {
+ /**
+ * Connect to device with a2dp.
+ *
+ * @param device The address of the remote device to connect.
+ * @return Returns {@code true} if the connect is in process; returns {@code false} otherwise.
+ * @since 8
+ * @permission permission ohos.permission.DISCOVER_BLUETOOTH
+ */
+ connect(device: string): boolean;
+
+ /**
+ * Disconnect to device with a2dp.
+ *
+ * @param device The address of the remote device to disconnect.
+ * @return Returns {@code true} if the disconnect is in process; returns {@code false} otherwise.
+ * @since 8
+ * @permission permission ohos.permission.DISCOVER_BLUETOOTH
+ */
+ disconnect(device: string): boolean;
+
+ /**
+ * Subscribe the event reported when the profile connection state changes .
+ *
+ * @param type Type of the profile connection state changes event to listen for .
+ * @param callback Callback used to listen for event.
+ * @since 8
+ */
+ on(type: "connectionStateChange", callback: Callback): void;
+
+ /**
+ * Unsubscribe the event reported when the profile connection state changes .
+ *
+ * @param type Type of the profile connection state changes event to listen for .
+ * @param callback Callback used to listen for event.
+ * @since 8
+ */
+ off(type: "connectionStateChange", callback?: Callback): void;
+
+ /**
+ * Obtains the playing state of device.
+ *
+ * @param device The address of the remote device.
+ * @return Returns {@link PlayingState} of the remote device.
+ *
+ */
+ getPlayingState(device: string): PlayingState;
+ }
+
+ /**
+ * Manager handsfree AG profile.
+ */
+ interface HandsFreeAudioGatewayProfile extends BaseProfile {
+ /**
+ * Connect to device with hfp.
+ *
+ * @param device The address of the remote device to connect.
+ * @return Returns {@code true} if the connect is in process; returns {@code false} otherwise.
+ * @since 8
+ * @permission permission ohos.permission.DISCOVER_BLUETOOTH
+ */
+ connect(device: string): boolean;
+
+ /**
+ * Disconnect to device with hfp.
+ *
+ * @param device The address of the remote device to disconnect.
+ * @return Returns {@code true} if the disconnect is in process; returns {@code false} otherwise.
+ * @since 8
+ * @permission permission ohos.permission.DISCOVER_BLUETOOTH
+ */
+ disconnect(device: string): boolean;
+
+ /**
+ * Subscribe the event reported when the profile connection state changes .
+ *
+ * @param type Type of the profile connection state changes event to listen for .
+ * @param callback Callback used to listen for event.
+ * @since 8
+ */
+ on(type: "connectionStateChange", callback: Callback): void;
+
+ /**
+ * Unsubscribe the event reported when the profile connection state changes .
+ *
+ * @param type Type of the profile connection state changes event to listen for .
+ * @param callback Callback used to listen for event.
+ * @since 8
+ */
+ off(type: "connectionStateChange", callback?: Callback): void;
+ }
+
namespace BLE {
/**
* create a JavaScript Gatt server instance.
@@ -411,7 +550,6 @@ declare namespace bluetooth {
* Manages GATT server. Before calling an Gatt server method, you must use {@link createGattServer} to create an GattServer instance.
*/
interface GattServer {
-
/**
* Starts BLE advertising.
*
@@ -781,9 +919,9 @@ declare namespace bluetooth {
/** The UUID of the {@link GattService} instance to which the characteristic belongs */
serviceUuid: string;
/** The UUID of a BLECharacteristic instance */
- characteristicUuid: string;
+ characteristicUuid: string;
/** The value of a BLECharacteristic instance */
- characteristicValue: ArrayBuffer;
+ characteristicValue: ArrayBuffer;
/** The list of {@link BLEDescriptor} contained in the characteristic */
descriptors: Array;
}
@@ -1306,6 +1444,39 @@ declare namespace bluetooth {
HEALTH_GENERIC_HEALTH_MANAGER = 0x0938,
HEALTH_PERSONAL_MOBILITY_DEVICE = 0x093C,
}
+
+ /**
+ * Profile state change parameters.
+ *
+ * @since 8
+ */
+ interface StateChangeParam {
+ /** The address of device */
+ deviceId: string;
+
+ /** Profile state value */
+ state: ProfileConnectionState;
+ }
+
+ /**
+ * The enum of a2dp playing state.
+ *
+ * @since 8
+ */
+ enum PlayingState {
+ STATE_NOT_PLAYING,
+ STATE_PLAYING,
+ }
+
+ /**
+ * The enum of profile id.
+ *
+ * @since 8
+ */
+ enum ProfileId {
+ PROFILE_A2DP_SOURCE = 1,
+ PROFILE_HANDS_FREE_AUDIO_GATEWAY = 4,
+ }
}
export default bluetooth;
diff --git a/api/@ohos.brightness.d.ts b/api/@ohos.brightness.d.ts
index f12bc7a706745b47aa73eda3fb6a1c0ad3745153..bb8b0988049e37d66b524897ad8c45d672ee5326 100644
--- a/api/@ohos.brightness.d.ts
+++ b/api/@ohos.brightness.d.ts
@@ -18,7 +18,7 @@ import { AsyncCallback } from './basic';
/**
* Provides interfaces to control the power of display.
*
- * @sysCap SystemCapability.PowerManager.DisplayPowerManager
+ * @syscap SystemCapability.PowerManager.DisplayPowerManager
* @since 7
*/
declare namespace brightness {
@@ -26,7 +26,6 @@ declare namespace brightness {
* Sets the screen brightness.
*
* @param value Brightness value, ranging from 0 to 255.
- * @sysCap SystemCapability.PowerManager.DisplayPowerManager
* @systemapi
* @since 7
*/
diff --git a/api/@ohos.bundle.d.ts b/api/@ohos.bundle.d.ts
index 8d2be229f4907e7bfdafb13592a25f9d9f47a9b2..2f5505fb2b98127a064950d940b7b25912832322 100644
--- a/api/@ohos.bundle.d.ts
+++ b/api/@ohos.bundle.d.ts
@@ -17,12 +17,10 @@ import { AsyncCallback, Callback } from './basic';
import { ApplicationInfo } from './bundle/applicationInfo';
import { BundleInfo } from './bundle/bundleInfo';
import { AbilityInfo } from './bundle/abilityInfo';
-import { ExtensionAbilityInfo } from './bundle/extensionAbilityInfo';
import { Want } from './ability/want';
import { BundleInstaller } from './bundle/bundleInstaller';
-import { ShortcutInfo } from './bundle/shortcutInfo';
-import { ModuleUsageRecord } from './bundle/moduleUsageRecord';
import { PermissionDef } from './bundle/PermissionDef';
+import image from './@ohos.multimedia.image';
/**
* bundle.
@@ -52,10 +50,6 @@ declare namespace bundle {
* @since 8
*/
GET_ABILITY_INFO_WITH_METADATA = 0x00000020,
- /**
- * @since 9
- */
- GET_BUNDLE_WITH_EXTENSION_ABILITY = 0x00000020,
/**
* @since 8
*/
@@ -74,20 +68,6 @@ declare namespace bundle {
GET_APPLICATION_INFO_WITH_DISABLE = 0x00000200,
}
-/**
- * @name ExtensionFlag
- * @since 9
- * @syscap SystemCapability.BundleManager.BundleFramework
- * @import NA
- * @permission NA
- */
- enum ExtensionFlag {
- GET_EXTENSION_INFO_DEFAULT = 0x00000000,
- GET_EXTENSION_INFO_WITH_PERMISSION = 0x00000002,
- GET_EXTENSION_INFO_WITH_APPLICATION = 0x00000004,
- GET_EXTENSION_INFO_WITH_METADATA = 0x00000020,
- }
-
/**
* @name ColorMode
* @since 7
@@ -222,76 +202,6 @@ declare namespace bundle {
STANDARD = 1,
}
- /**
- * @name ExtensionAbilityType
- * @since 9
- * @syscap SystemCapability.BundleManager.BundleFramework
- * @import NA
- * @permission NA
- */
- export enum ExtensionAbilityType {
- /**
- * @default Indicates extension info with type of form
- * @since 9
- * @syscap SystemCapability.BundleManager.BundleFramework
- */
- FORM = 0,
- /**
- * @default Indicates extension info with type of work schedule
- * @since 9
- * @syscap SystemCapability.BundleManager.BundleFramework
- */
- WORK_SCHEDULER = 1,
- /**
- * @default Indicates extension info with type of input method
- * @since 9
- * @syscap SystemCapability.BundleManager.BundleFramework
- */
- INPUT_METHOD = 2,
- /**
- * @default Indicates extension info with type of service
- * @since 9
- * @syscap SystemCapability.BundleManager.BundleFramework
- */
- SERVICE = 3,
- /**
- * @default Indicates extension info with type of accessibility
- * @since 9
- * @syscap SystemCapability.BundleManager.BundleFramework
- */
- ACCESSIBILITY = 4,
- /**
- * @default Indicates extension info with type of datashare
- * @since 9
- * @syscap SystemCapability.BundleManager.BundleFramework
- */
- DATA_SHARE = 5,
- /**
- * @default Indicates extension info with type of fileshare
- * @since 9
- * @syscap SystemCapability.BundleManager.BundleFramework
- */
- FILE_SHARE = 6,
- /**
- * @default Indicates extension info with type of staticsubscriber
- * @since 9
- * @syscap SystemCapability.BundleManager.BundleFramework
- */
- STATIC_SUBSCRIBER = 7,
- /**
- * @default Indicates extension info with type of wallpaper
- * @since 9
- * @syscap SystemCapability.BundleManager.BundleFramework
- */
- WALLPAPER = 8,
- /**
- * @default Indicates extension info with type of unspecified
- * @since 9
- * @syscap SystemCapability.BundleManager.BundleFramework
- */
- UNSPECIFIED = 9,
- }
-
/**
* @name BundleOptions
* @since 7
@@ -368,7 +278,7 @@ declare namespace bundle {
* @param bundleFlags Indicates the application bundle flags to be queried.
* @param options Indicates the bundle options object.
* @return Returns the BundleInfo object.
- * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED,ohos.permission.GET_BUNDLE_INFO
+ * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
*/
function getBundleInfo(bundleName: string, bundleFlags: number, options: BundleOptions, callback: AsyncCallback): void;
function getBundleInfo(bundleName: string, bundleFlags: number, callback: AsyncCallback): void;
@@ -381,9 +291,23 @@ declare namespace bundle {
* @syscap SystemCapability.BundleManager.BundleFramework
* @return Returns the IBundleInstaller interface.
* @permission ohos.permission.INSTALL_BUNDLE
+ * @systemapi Hide this for inner system use
*/
function getBundleInstaller(callback: AsyncCallback): void;
function getBundleInstaller(): Promise;
+
+ /**
+ * Obtains information about the current ability.
+ *
+ * @since 7
+ * @syscap SystemCapability.BundleManager.BundleFramework
+ * @param bundleName Indicates the application bundle name to be queried.
+ * @param abilityName Indicates the ability name.
+ * @return Returns the AbilityInfo object for the current ability.
+ * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
+ */
+ function getAbilityInfo(bundleName: string, abilityName: string, callback: AsyncCallback): void;
+ function getAbilityInfo(bundleName: string, abilityName: string): Promise;
/**
* Obtains based on a given bundle name.
@@ -393,12 +317,13 @@ declare namespace bundle {
* @param bundleName Indicates the application bundle name to be queried.
* @param bundleFlags Indicates the flag used to specify information contained in the ApplicationInfo object
* that will be returned.
- * @param userId Indicates the user ID.
+ * @param userId Indicates the user ID or do not pass user ID.
* @return Returns the ApplicationInfo object.
- * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED, ohos.permission.GET_BUNDLE_INFO
+ * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
*/
function getApplicationInfo(bundleName: string, bundleFlags: number, userId: number, callback: AsyncCallback) : void;
- function getApplicationInfo(bundleName: string, bundleFlags: number, userId: number) : Promise;
+ function getApplicationInfo(bundleName: string, bundleFlags: number, callback: AsyncCallback) : void;
+ function getApplicationInfo(bundleName: string, bundleFlags: number, userId?: number) : Promise;
/**
* Query the AbilityInfo by the given Want.
@@ -411,7 +336,7 @@ declare namespace bundle {
* will be returned.
* @param userId Indicates the user ID.
* @return Returns a list of AbilityInfo objects.
- * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED, ohos.permission.GET_BUNDLE_INFO
+ * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
*/
function queryAbilityByWant(want: Want, bundleFlags: number, userId: number, callback: AsyncCallback>): void;
function queryAbilityByWant(want: Want, bundleFlags: number, callback: AsyncCallback>): void;
@@ -422,15 +347,15 @@ declare namespace bundle {
*
* @since 7
* @syscap SystemCapability.BundleManager.BundleFramework
- * @param bundlelFlag Indicates the flag used to specify information contained in the BundleInfo that will be
+ * @param bundleFlag Indicates the flag used to specify information contained in the BundleInfo that will be
* returned.
* @param userId Indicates the user id.
* @return Returns a list of BundleInfo objects.
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
*/
- function getAllBundleInfo(bundlelFlag: BundleFlag, userId: number, callback: AsyncCallback>) : void;
- function getAllBundleInfo(bundlelFlag: BundleFlag, callback: AsyncCallback>) : void;
- function getAllBundleInfo(bundlelFlag: BundleFlag, userId?: number) : Promise>;
+ function getAllBundleInfo(bundleFlag: BundleFlag, userId: number, callback: AsyncCallback>) : void;
+ function getAllBundleInfo(bundleFlag: BundleFlag, callback: AsyncCallback>) : void;
+ function getAllBundleInfo(bundleFlag: BundleFlag, userId?: number) : Promise>;
/**
* Obtains information about all installed applications of a specified user.
@@ -439,12 +364,13 @@ declare namespace bundle {
* @syscap SystemCapability.BundleManager.BundleFramework
* @param bundleFlags Indicates the flag used to specify information contained in the ApplicationInfo objects
* that will be returned.
- * @param userId Indicates the user ID.
+ * @param userId Indicates the user ID or do not pass user ID.
* @return Returns a list of ApplicationInfo objects.
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
*/
function getAllApplicationInfo(bundleFlags: number, userId: number, callback: AsyncCallback>) : void;
- function getAllApplicationInfo(bundleFlags: number, userId: number) : Promise>;
+ function getAllApplicationInfo(bundleFlags: number, callback: AsyncCallback>) : void;
+ function getAllApplicationInfo(bundleFlags: number, userId?: number) : Promise>;
/**
* Obtains bundle name by the given uid.
@@ -471,8 +397,6 @@ declare namespace bundle {
function getBundleArchiveInfo(hapFilePath: string, bundleFlags: number, callback: AsyncCallback) : void
function getBundleArchiveInfo(hapFilePath: string, bundleFlags: number) : Promise;
- /**
-
/**
* Obtains the Want for starting the main ability of an application based on the
* given bundle name. The main ability of an application is the ability that has the
@@ -489,30 +413,6 @@ declare namespace bundle {
function getLaunchWantForBundle(bundleName: string, callback: AsyncCallback): void;
function getLaunchWantForBundle(bundleName: string): Promise;
- /**
- * Obtains information about the shortcuts of the application.
- *
- * @since 7
- * @syscap SystemCapability.BundleManager.BundleFramework
- * @param bundleName Indicates the bundle name of the application.
- * @return Returns a list of ShortcutInfo objects containing shortcut information about the application.
- * @permission ohos.permission.MANAGE_SHORTCUTS
- */
- function getAllShortcutInfo(bundleName: string, callback: AsyncCallback>): void;
- function getAllShortcutInfo(bundleName: string): Promise>;
-
- /**
- * get module usage record list in descending order of lastLaunchTime.
- *
- * @since 7
- * @syscap SystemCapability.BundleManager.BundleFramework
- * @param maxNum the return size of the records, must be in range of 1 to 1000.
- * @return Returns ability usage record list.
- * @systemapi hide this for inner system use
- */
- function getModuleUsageRecords(maxNum: number, callback: AsyncCallback>): void;
- function getModuleUsageRecords(maxNum: number): Promise>;
-
/**
* Clears cache data of a specified application.
*
@@ -554,22 +454,6 @@ declare namespace bundle {
function setAbilityEnabled(info: AbilityInfo, isEnable: boolean, callback: AsyncCallback): void;
function setAbilityEnabled(info: AbilityInfo, isEnable: boolean): Promise;
- /**
- * Query extension info of by utilizing a Want.
- *
- * @since 9
- * @syscap SystemCapability.BundleManager.BundleFramework
- * @param want Indicates the Want containing the application bundle name to be queried.
- * @param extensionFlags Indicates the flag used to specify information contained in the ExtensionInfo objects that
- * will be returned.
- * @param userId Indicates the user ID.
- * @return Returns a list of ExtensionInfo objects.
- * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED, ohos.permission.GET_BUNDLE_INFO
- */
- function queryExtensionAbilityInfosByWant(want: Want, extensionFlags: number, userId: number, callback: AsyncCallback>): void;
- function queryExtensionAbilityInfosByWant(want: Want, extensionFlags: number, callback: AsyncCallback>): void;
- function queryExtensionAbilityInfosByWant(want: Want, extensionFlags: number, userId?: number): Promise>;
-
/**
* Get the permission details by permissionName.
*
@@ -582,6 +466,54 @@ declare namespace bundle {
*/
function getPermissionDef(permissionName: string, callback: AsyncCallback): void;
function getPermissionDef(permissionName: string): Promise;
+
+ /**
+ * Obtains the label of a specified ability.
+ *
+ * @since 8
+ * @syscap SystemCapability.BundleManager.BundleFramework
+ * @param bundleName Indicates the bundle name of the application to which the ability belongs.
+ * @param abilityName Indicates the ability name.
+ * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
+ * @return Returns the label representing the label of the specified ability.
+ */
+ function getAbilityLabel(bundleName: string, abilityName: string, callback: AsyncCallback): void;
+ function getAbilityLabel(bundleName: string, abilityName: string): Promise;
+
+ /**
+ * Obtains the icon of a specified ability.
+ *
+ * @since 8
+ * @syscap SystemCapability.BundleManager.BundleFramework
+ * @param bundleName Indicates the bundle name of the application to which the ability belongs.
+ * @param abilityName Indicates the ability name.
+ * @return Returns the PixelMap object representing the icon of the specified ability.
+ * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
+ */
+ function getAbilityIcon(bundleName: string, abilityName: string, callback: AsyncCallback): void;
+ function getAbilityIcon(bundleName: string, abilityName: string): Promise;
+
+ /**
+ * Checks whether a specified ability is enabled.
+ *
+ * @since 8
+ * @syscap SystemCapability.BundleManager.BundleFramework
+ * @param info Indicates information about the ability to check.
+ * @returns Returns true if the ability is enabled; returns false otherwise.
+ */
+ function isAbilityEnabled(info: AbilityInfo, callback: AsyncCallback): void;
+ function isAbilityEnabled(info: AbilityInfo): Promise;
+
+ /**
+ * Checks whether a specified application is enabled.
+ *
+ * @since 8
+ * @syscap SystemCapability.BundleManager.BundleFramework
+ * @param bundleName Indicates the bundle name of the application.
+ * @returns Returns true if the application is enabled; returns false otherwise.
+ */
+ function isApplicationEnabled(bundleName: string, callback: AsyncCallback): void;
+ function isApplicationEnabled(bundleName: string): Promise;
}
export default bundle;
diff --git a/api/@ohos.bundleState.d.ts b/api/@ohos.bundleState.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..0734372b77c45a6e0346c9da414c196ed23e4d51
--- /dev/null
+++ b/api/@ohos.bundleState.d.ts
@@ -0,0 +1,249 @@
+/*
+ * Copyright (c) 2022 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { AsyncCallback } from './basic';
+
+/**
+ * Provides methods for managing bundle usage statistics,
+ * including the methods for querying bundle usage information and state data.
+ *
+ * You can use the methods defined in this class to query
+ * the usage history and states of bundles in a specified period.
+ * The system stores the query result in a {@link BundleStateInfo} or {@link BundleActiveState} instance and
+ * then returns it to you.
+ *
+ * @since 7
+ */
+declare namespace bundleState {
+
+ /**
+ * @since 7
+ * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App
+ */
+ interface BundleStateInfo {
+ /**
+ * the identifier of BundleStateInfo.
+ */
+ id: number;
+ /**
+ * the total duration, in milliseconds.
+ */
+ abilityInFgTotalTime?: number;
+ /**
+ * the last time when the application was accessed, in milliseconds.
+ */
+ abilityPrevAccessTime?: number;
+ /**
+ * the last time when the application was visible in the foreground, in milliseconds.
+ */
+ abilityPrevSeenTime?: number;
+ /**
+ * the total duration, in milliseconds.
+ */
+ abilitySeenTotalTime?: number;
+ /**
+ * the bundle name of the application.
+ */
+ bundleName?: string;
+ /**
+ * the total duration, in milliseconds.
+ */
+ fgAbilityAccessTotalTime?: number;
+ /**
+ * the last time when the foreground application was accessed, in milliseconds.
+ */
+ fgAbilityPrevAccessTime?: number;
+ /**
+ * the time of the first bundle usage record in this {@code BundleActiveInfo} object,
+ * in milliseconds.
+ */
+ infosBeginTime?: number;
+ /**
+ * the time of the last bundle usage record in this {@code BundleActiveInfo} object,
+ * in milliseconds.
+ */
+ infosEndTime?: number;
+
+ /**
+ * Merges a specified {@link BundleActiveInfo} object with this {@link BundleActiveInfo} object.
+ * The bundle name of both objects must be the same.
+ *
+ * @since 7
+ * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App
+ * @param toMerge Indicates the {@link BundleActiveInfo} object to merge.
+ * if the bundle names of the two {@link BundleActiveInfo} objects are different.
+ */
+ merge(toMerge: BundleStateInfo): void;
+ }
+
+ /**
+ * @since 7
+ * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App
+ */
+ interface BundleActiveState {
+ /**
+ * the usage priority group of the application.
+ */
+ appUsagePriorityGroup?: number;
+ /**
+ * the bundle name.
+ */
+ bundleName?: string;
+ /**
+ * the shortcut ID.
+ */
+ indexOfLink?: string;
+ /**
+ * the class name.
+ */
+ nameOfClass?: string;
+ /**
+ * the time when this state occurred, in milliseconds.
+ */
+ stateOccurredTime?: number;
+ /**
+ * the state type.
+ */
+ stateType?: number;
+ }
+
+ /**
+ * Checks whether the application with a specified bundle name is in the idle state.
+ *
+ * @since 7
+ * @syscap SystemCapability.ResourceSchedule.UsageStatistics.AppGroup
+ * @param bundleName Indicates the bundle name of the application to query.
+ * @return Returns {@code true} if the application is idle in a particular period;
+ * returns {@code false} otherwise. The time range of the particular period is defined by the system,
+ * which may be hours or days.
+ */
+ function isIdleState(bundleName: string, callback: AsyncCallback): void;
+ function isIdleState(bundleName: string): Promise;
+
+ /**
+ * Queries the usage priority group of the calling application.
+ *
+ * The priority defined in a priority group restricts the resource usage of an application,
+ * for example, restricting the running of background tasks.
+ *
+ * @since 7
+ * @syscap SystemCapability.ResourceSchedule.UsageStatistics.AppGroup
+ * @return Returns the usage priority group of the calling application.
+ */
+ function queryAppUsagePriorityGroup(callback: AsyncCallback): void;
+ function queryAppUsagePriorityGroup(): Promise;
+
+ /**
+ * @since 7
+ * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App
+ */
+ interface BundleActiveInfoResponse {
+ [key: string]: BundleStateInfo;
+ }
+
+ /**
+ * Queries usage information about each bundle within a specified period.
+ *
+ * This method queries usage information at the {@link #BY_OPTIMIZED} interval by default.
+ *
+ * @since 7
+ * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App
+ * @permission ohos.permission.BUNDLE_ACTIVE_INFO
+ * @systemapi Hide this for inner system use.
+ * @param begin Indicates the start time of the query period, in milliseconds.
+ * @param end Indicates the end time of the query period, in milliseconds.
+ * @return Returns the {@link BundleActiveInfoResponse} objects containing the usage information about each bundle.
+ */
+ function queryBundleStateInfos(begin: number, end: number, callback: AsyncCallback): void;
+ function queryBundleStateInfos(begin: number, end: number): Promise;
+
+ /**
+ * Declares interval type.
+ *
+ * @since 7
+ * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App
+ */
+ export enum IntervalType {
+ /**
+ * Indicates the interval type that will determine the optimal interval based on the start and end time.
+ */
+ BY_OPTIMIZED = 0,
+
+ /**
+ * Indicates the daily interval.
+ */
+ BY_DAILY = 1,
+
+ /**
+ * Indicates the weekly interval.
+ */
+ BY_WEEKLY = 2,
+
+ /**
+ * Indicates the monthly interval.
+ */
+ BY_MONTHLY = 3,
+
+ /**
+ * Indicates the annually interval.
+ */
+ BY_ANNUALLY = 4
+ }
+
+ /**
+ * Queries usage information about each bundle within a specified period at a specified interval.
+ *
+ * @since 7
+ * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App
+ * @permission ohos.permission.BUNDLE_ACTIVE_INFO
+ * @systemapi Hide this for inner system use.
+ * @param byInterval Indicates the interval at which the usage statistics are queried.
+ * The value can be {@link #BY_OPTIMIZED}, {@link #BY_DAILY},
+ * {@link #BY_WEEKLY}, {@link #BY_MONTHLY}, or {@link #BY_ANNUALLY}.
+ * @param begin Indicates the start time of the query period, in milliseconds.
+ * @param end Indicates the end time of the query period, in milliseconds.
+ * @return Returns the list of {@link BundleStateInfo} objects containing the usage information about each bundle.
+ */
+ function queryBundleStateInfoByInterval(byInterval: IntervalType, begin: number, end: number, callback: AsyncCallback>): void;
+ function queryBundleStateInfoByInterval(byInterval: IntervalType, begin: number, end: number): Promise>;
+
+ /**
+ * Queries state data of all bundles within a specified period identified by the start and end time.
+ *
+ * @since 7
+ * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App
+ * @permission ohos.permission.BUNDLE_ACTIVE_INFO
+ * @systemapi Hide this for inner system use.
+ * @param begin Indicates the start time of the query period, in milliseconds.
+ * @param end Indicates the end time of the query period, in milliseconds.
+ * @return Returns the list of {@link BundleActiveState} objects containing the state data of all bundles.
+ */
+ function queryBundleActiveStates(begin: number, end: number, callback: AsyncCallback>): void;
+ function queryBundleActiveStates(begin: number, end: number): Promise>;
+
+ /**
+ * Queries state data of the current bundle within a specified period.
+ *
+ * @since 7
+ * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App
+ * @param begin Indicates the start time of the query period, in milliseconds.
+ * @param end Indicates the end time of the query period, in milliseconds.
+ * @return Returns the {@link BundleActiveState} object Array containing the state data of the current bundle.
+ */
+ function queryCurrentBundleActiveStates(begin: number, end: number, callback: AsyncCallback>): void;
+ function queryCurrentBundleActiveStates(begin: number, end: number): Promise>;
+}
+
+export default bundleState;
\ No newline at end of file
diff --git a/api/@ohos.bytrace.d.ts b/api/@ohos.bytrace.d.ts
index 81b8ffbfadfe0fd6be975ecd42fcd0ead5dd7529..e1b5a1ccad9e88567a91a9438207dc6e36b2620f 100644
--- a/api/@ohos.bytrace.d.ts
+++ b/api/@ohos.bytrace.d.ts
@@ -36,7 +36,7 @@
*
* @deprecated
* @since 7
- * @syscap SystemCapability.Developtools.Bytrace
+ * @syscap SystemCapability.HiviewDFX.HiTrace
*/
declare namespace bytrace {
/**
@@ -49,7 +49,7 @@ declare namespace bytrace {
*
* @deprecated
* @since 7
- * @syscap SystemCapability.Developtools.Bytrace
+ * @syscap SystemCapability.HiviewDFX.HiTrace
* @param name Indicates the task name.
* @param taskId The unique id used to distinguish the tasks and match with the id in follow finishTrace.
* @param expectedTime Indicates the expected time required for completing the task, in milliseconds.
@@ -64,7 +64,7 @@ declare namespace bytrace {
*
* @deprecated
* @since 7
- * @syscap SystemCapability.Developtools.Bytrace
+ * @syscap SystemCapability.HiviewDFX.HiTrace
* @param name Indicates the task name. It must be the same whith the {@code name} of startTrace.
* @param taskId The unique id used to distinguish the tasks and must be the same whith the .
* {@code taskId} of startTrace.
@@ -76,7 +76,7 @@ declare namespace bytrace {
*
* @deprecated
* @since 7
- * @syscap SystemCapability.Developtools.Bytrace
+ * @syscap SystemCapability.HiviewDFX.HiTrace
* @param name Indicates the name used to identify the count.
* @param count Indicates the number of the count.
*/
diff --git a/api/@ohos.commonEvent.d.ts b/api/@ohos.commonEvent.d.ts
index e9b04424dc98e1dddef6814796df654253435606..a017a91324da3c2d37a5d5a20be24a46fa9c589b 100644
--- a/api/@ohos.commonEvent.d.ts
+++ b/api/@ohos.commonEvent.d.ts
@@ -170,6 +170,12 @@ declare namespace commonEvent {
*/
COMMON_EVENT_SCREEN_ON = "usual.event.SCREEN_ON",
+ /**
+ * this commonEvent means when the thermal state level change
+ * @since 8
+ */
+ COMMON_EVENT_THERMAL_LEVEL_CHANGED = "usual.event.THERMAL_LEVEL_CHANGED",
+
/**
* this commonEvent means when the user is present after the device waked up.
*/
@@ -887,41 +893,6 @@ declare namespace commonEvent {
*/
COMMON_EVENT_DISK_EJECT = "usual.event.data.DISK_EJECT",
- /**
- * The external storage was removed.
- * This is a protected common event that can only be sent by system.
- * @since 8
- */
- COMMON_EVENT_VOLUME_REMOVED = "usual.event.data.VOLUME_REMOVED",
-
- /**
- * The external storage was unmounted.
- * This is a protected common event that can only be sent by system.
- * @since 8
- */
- COMMON_EVENT_VOLUME_UNMOUNTED = "usual.event.data.VOLUME_UNMOUNTED",
-
- /**
- * The external storage was mounted.
- * This is a protected common event that can only be sent by system.
- * @since 8
- */
- COMMON_EVENT_VOLUME_MOUNTED = "usual.event.data.VOLUME_MOUNTED",
-
- /**
- * The external storage was bad removal.
- * This is a protected common event that can only be sent by system.
- * @since 8
- */
- COMMON_EVENT_VOLUME_BAD_REMOVAL = "usual.event.data.VOLUME_BAD_REMOVAL",
-
- /**
- * The external storage was eject.
- * This is a protected common event that can only be sent by system.
- * @since 8
- */
- COMMON_EVENT_VOLUME_EJECT = "usual.event.data.VOLUME_EJECT",
-
/**
* The visible of account was updated.
* This is a protected common event that can only be sent by system.
diff --git a/api/@ohos.configPolicy.d.ts b/api/@ohos.configPolicy.d.ts
index 32ef672ca08824e798623f0eccb68857b4f4b5f3..d12690c30faca84069c5fedcbef457ed789f20f1 100644
--- a/api/@ohos.configPolicy.d.ts
+++ b/api/@ohos.configPolicy.d.ts
@@ -19,7 +19,7 @@ import {AsyncCallback} from "./basic";
* Provides file path related APIS.
*
* @since 8
- * @sysCap SystemCapability.Customization.ConfigPolicy
+ * @syscap SystemCapability.Customization.ConfigPolicy
*/
declare namespace configPolicy {
/**
@@ -27,7 +27,7 @@ declare namespace configPolicy {
*
* @since 8
* @systemapi Hide this for inner system use.
- * @sysCap SystemCapability.Customization.ConfigPolicy
+ * @syscap SystemCapability.Customization.ConfigPolicy
* @param relPath the relative path of the config file.
* @return Returns the path of the highest priority config file.
*/
@@ -39,7 +39,7 @@ declare namespace configPolicy {
*
* @since 8
* @systemapi Hide this for inner system use.
- * @sysCap SystemCapability.Customization.ConfigPolicy
+ * @syscap SystemCapability.Customization.ConfigPolicy
* @param relPath the relative path of the config file.
* @return Returns paths of config files.
*/
@@ -51,7 +51,7 @@ declare namespace configPolicy {
*
* @since 8
* @systemapi Hide this for inner system use.
- * @sysCap SystemCapability.Customization.ConfigPolicy
+ * @syscap SystemCapability.Customization.ConfigPolicy
* @return Returns paths of config directories.
*/
function getCfgDirList(callback: AsyncCallback>);
diff --git a/api/@ohos.connectedTag.d.ts b/api/@ohos.connectedTag.d.ts
new file mode 100755
index 0000000000000000000000000000000000000000..bdaffa2a5d9c3584fb47e0e443f23fa109b19f88
--- /dev/null
+++ b/api/@ohos.connectedTag.d.ts
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2022 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { AsyncCallback, Callback } from './basic';
+
+/**
+ * Provides methods to operate or manage Connected Tag.
+ *
+ * @since 8
+ * @syscap SystemCapability.Communication.ConnectedTag
+ * @import import connectedTag from '@ohos.connectedTag';
+ */
+declare namespace connectedTag {
+ /**
+ * Initializes Connected Tag.
+ *
+ * @return Returns true or false.
+ * @permissions ohos.permission.NFC_TAG
+ *
+ * @since 8
+ */
+ function init(): boolean;
+
+ /**
+ * UnInitializes Connected Tag.
+ *
+ * @return Returns true or false.
+ * @permissions ohos.permission.NFC_TAG
+ *
+ * @since 8
+ */
+ function uninit(): boolean;
+
+ /**
+ * Reads the NDEF Data.
+ *
+ * @return Returns the NDEF Data.
+ * @permissions ohos.permission.NFC_TAG
+ *
+ * @since 8
+ */
+ function readNdefTag(): Promise;
+ function readNdefTag(callback: AsyncCallback): void;
+
+ /**
+ * Writes the NDEF Data.
+ *
+ * @param data The Data to write.
+ * @return Returns true or false.
+ * @permissions ohos.permission.NFC_TAG
+ *
+ * @since 8
+ */
+ function writeNdefTag(data: string): Promise;
+ function writeNdefTag(data: string, callback: AsyncCallback): void;
+
+ /**
+ * Subscribes NFC RF status change events.
+ *
+ * @type The callback type.
+ * @param callback The callback function to be registered.
+ * @return Returns NFC_RF_LEAVE or NFC_RF_ENTER
+ * @permissions ohos.permission.NFC_TAG
+ *
+ * @since 8
+ */
+ function on(type: "notify", callback: Callback): void;
+
+ /**
+ * Unsubscribes NFC RF status change events.
+ *
+ * All callback functions will be deregistered If there is no specific callback parameter.
+ *
+ * @type The callback type.
+ * @param callback The callback function to be unregistered.
+ * @permissions ohos.permission.NFC_TAG
+ *
+ * @since 8
+ */
+ function off(type: "notify", callback?:Callback): void;
+
+ /**
+ * Describes the NFC RF type.
+ *
+ * @since 8
+ */
+ enum NfcRfType {
+ /** NFC RF LEAVE */
+ NFC_RF_LEAVE = 0;
+
+ /** NFC RF ENTER */
+ NFC_RF_ENTER = 1;
+ }
+}
+
+export default connectedTag;
\ No newline at end of file
diff --git a/api/ohos.contact.d.ts b/api/@ohos.contact.d.ts
similarity index 94%
rename from api/ohos.contact.d.ts
rename to api/@ohos.contact.d.ts
index 8242ea2aa908223940061fe16f7ff3421e38f5e7..17d1ce7ad0c40fbb4d88207d1f132705bbd52ad4 100644
--- a/api/ohos.contact.d.ts
+++ b/api/@ohos.contact.d.ts
@@ -26,22 +26,31 @@ declare namespace contact {
/**
* Creates a contact.
*
- * Permissions required: {@code ohos.permission.READ_CONTACTS} and {@code ohos.permission.WRITE_CONTACTS}
- *
* @param contact Indicates the contact information.
* @return Returns the contact ID (which can be obtained by {@link Contact#getId()}) if the creation is successful;
* returns {@link Contact#INVALID_CONTACT_ID} if the creation fails.
+ * @permision ohos.permission.WRITE_CONTACTS
*/
function addContact(contact: Contact, callback: AsyncCallback): void;
function addContact(contact: Contact): Promise;
/**
- * Deletes a specified contact.
+ * Select contact.
*
- * Permissions required: {@code ohos.permission.READ_CONTACTS} and {@code ohos.permission.WRITE_CONTACTS}
+ * @return Returns the contact list which user select;
+ * returns empty contact list if user not select.
+ * @syscap SystemCapability.Applications.ContactsData, SystemCapability.Applications.Contacts
+ * @permission ohos.permission.READ_CONTACTS
+ */
+ function selectContact(callback: AsyncCallback>): void;
+ function selectContact(): Promise>;
+
+ /**
+ * Deletes a specified contact.
*
* @param key Indicates the unique query key of a contact to delete.
* @return Returns {@code true} if the contact is deleted; returns {@code false} otherwise.
+ * @permision ohos.permission.WRITE_CONTACTS
*/
function deleteContact(key: string, callback: AsyncCallback): void;
function deleteContact(key: string): Promise;
@@ -49,12 +58,11 @@ declare namespace contact {
/**
* Queries a specified contact of specified attributes.
*
- * Permissions required: {@code ohos.permission.READ_CONTACTS} and {@code ohos.permission.WRITE_CONTACTS}
- *
* @param key Indicates the unique query key of a contact.
* @param holder Indicates the contact holder. If this parameter is null, the default holder is used for matching.
* @param attrs Indicates the contact attributes. If this parameter is null, all attributes are used for matching.
* @return Returns the specified contact.
+ * @permission ohos.permission.READ_CONTACTS
*/
function queryContact(key: string, callback: AsyncCallback): void;
function queryContact(key: string, holder: Holder, callback: AsyncCallback): void;
@@ -65,11 +73,10 @@ declare namespace contact {
/**
* Queries contacts with query conditions.
*
- * Permissions required: {@code ohos.permission.READ_CONTACTS} and {@code ohos.permission.WRITE_CONTACTS}
- *
* @param holder Indicates the contact holder. If this parameter is null, the default holder is used for matching.
* @param attrs Indicates the contact attributes. If this parameter is null, all attributes are used for matching.
* @return Returns the {@code Contact} list object.
+ * @permission ohos.permission.READ_CONTACTS
*/
function queryContacts(callback: AsyncCallback>): void;
function queryContacts(holder: Holder, callback: AsyncCallback>): void;
@@ -80,12 +87,11 @@ declare namespace contact {
/**
* Queries contacts by a specified email address, contact holder, and contact attributes.
*
- * Permissions required: {@code ohos.permission.READ_CONTACTS} and {@code ohos.permission.WRITE_CONTACTS}
- *
* @param email Indicates the email address.
* @param holder Indicates the contact holder. If this parameter is null, the default holder is used for matching.
* @param attrs Indicates the contact attributes. If this parameter is null, all attributes are used for matching.
* @return Returns a {@code Contact} list object.
+ * @permission ohos.permission.READ_CONTACTS
*/
function queryContactsByEmail(email: string, callback: AsyncCallback>): void;
function queryContactsByEmail(email: string, holder: Holder, callback: AsyncCallback>): void;
@@ -96,13 +102,12 @@ declare namespace contact {
/**
* Queries contacts by a phone number, holder, and contact attribute.
*
- * Permissions required: {@code ohos.permission.READ_CONTACTS} and {@code ohos.permission.WRITE_CONTACTS}.
- *
* @param phoneNumber Indicates the phone number. Only full match is supported, and wildcards are not supported.
* @param holder Indicates the contact holder. If this parameter is null, the default holder is used for matching.
* @param attrs Indicates the contact attribute. If this parameter is null,
* all attributes will be used for matching.
* @return Returns the {@code Contact} list object.
+ * @permission ohos.permission.READ_CONTACTS
*/
function queryContactsByPhoneNumber(phoneNumber: string, callback: AsyncCallback>): void;
function queryContactsByPhoneNumber(phoneNumber: string, holder: Holder, callback: AsyncCallback>): void;
@@ -113,10 +118,9 @@ declare namespace contact {
/**
* Queries contact groups.
*
- * Permissions required: {@code ohos.permission.READ_CONTACTS} and {@code ohos.permission.WRITE_CONTACTS}
- *
* @param holder Indicates the contact holder. If this parameter is null, the default holder is used for matching.
* @return Returns the contact group list.
+ * @permission ohos.permission.READ_CONTACTS
*/
function queryGroups(callback: AsyncCallback>): void;
function queryGroups(holder: Holder, callback: AsyncCallback>): void;
@@ -125,9 +129,8 @@ declare namespace contact {
/**
* Queries contact holders.
*
- * Permissions required: {@code ohos.permission.READ_CONTACTS} and {@code ohos.permission.WRITE_CONTACTS}
- *
* @return Returns the {@code Holder} list object.
+ * @permission ohos.permission.READ_CONTACTS
*/
function queryHolders(callback: AsyncCallback>): void;
function queryHolders(): Promise>;
@@ -135,11 +138,10 @@ declare namespace contact {
/**
* Obtains the query key of a contact based on a specified ID and holder.
*
- * Permissions required: {@code ohos.permission.READ_CONTACTS} and {@code ohos.permission.WRITE_CONTACTS}
- *
* @param id Indicates the contact ID.
* @param holder Indicates the contact holder. If this parameter is null, the default holder is used for matching.
* @return Returns the query key of the contact.
+ * @permission ohos.permission.READ_CONTACTS
*/
function queryKey(id: number, callback: AsyncCallback): void;
function queryKey(id: number, holder: Holder, callback: AsyncCallback): void;
@@ -148,10 +150,9 @@ declare namespace contact {
/**
* Queries information about "my card".
*
- *