diff --git a/BUILD.gn b/BUILD.gn
index 9e3164720c9ebc438e035f6f5a00f2f3374a032c..69b5e80e5c8dc360be6c4f94d79f590f9b871e48 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -28,9 +28,11 @@ ohos_copy("ets_internal_api") {
ohos_copy("ets_component") {
sources = [
"api/@internal/component/ets/ability_component.d.ts",
+ "api/@internal/component/ets/action_sheet.d.ts",
"api/@internal/component/ets/alert_dialog.d.ts",
"api/@internal/component/ets/alphabet_indexer.d.ts",
"api/@internal/component/ets/animator.d.ts",
+ "api/@internal/component/ets/badge.d.ts",
"api/@internal/component/ets/blank.d.ts",
"api/@internal/component/ets/button.d.ts",
"api/@internal/component/ets/calendar.d.ts",
@@ -42,25 +44,32 @@ ohos_copy("ets_component") {
"api/@internal/component/ets/counter.d.ts",
"api/@internal/component/ets/custom_dialog_controller.d.ts",
"api/@internal/component/ets/datapanel.d.ts",
+ "api/@internal/component/ets/datePicker.d.ts",
"api/@internal/component/ets/divider.d.ts",
"api/@internal/component/ets/ellipse.d.ts",
"api/@internal/component/ets/flex.d.ts",
"api/@internal/component/ets/forEach.d.ts",
"api/@internal/component/ets/form_component.d.ts",
+ "api/@internal/component/ets/gauge.d.ts",
"api/@internal/component/ets/geometryView.d.ts",
"api/@internal/component/ets/gesture.d.ts",
"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.d.ts",
"api/@internal/component/ets/lazyForEach.d.ts",
+ "api/@internal/component/ets/line.d.ts",
"api/@internal/component/ets/list.d.ts",
"api/@internal/component/ets/listItem.d.ts",
"api/@internal/component/ets/loadingProgress.d.ts",
+ "api/@internal/component/ets/marquee.d.ts",
+ "api/@internal/component/ets/menu.d.ts",
"api/@internal/component/ets/navigator.d.ts",
"api/@internal/component/ets/navigatorView.d.ts",
+ "api/@internal/component/ets/option.d.ts",
"api/@internal/component/ets/pageTransition.d.ts",
"api/@internal/component/ets/panel.d.ts",
"api/@internal/component/ets/path.d.ts",
@@ -84,6 +93,9 @@ ohos_copy("ets_component") {
"api/@internal/component/ets/tab_content.d.ts",
"api/@internal/component/ets/tabs.d.ts",
"api/@internal/component/ets/text.d.ts",
+ "api/@internal/component/ets/textPicker.d.ts",
+ "api/@internal/component/ets/textarea.d.ts",
+ "api/@internal/component/ets/textinput.d.ts",
"api/@internal/component/ets/toggle.d.ts",
"api/@internal/component/ets/video.d.ts",
]
diff --git a/README.md b/README.md
deleted file mode 100644
index 5c6f8b5693c4c30bd71c14bcc690392f47b74686..0000000000000000000000000000000000000000
--- a/README.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# Public JS API Repository
-
-- [Introduction](#section11660541593)
-
-## Introduction
-
-This repository is used to submit **d.ts** declaration files of JS APIs.
-
diff --git a/api/@internal/component/ets/ability_component.d.ts b/api/@internal/component/ets/ability_component.d.ts
index 06bb6c2d78768190c05f83dd9c480b34b64f9897..2ca00277284586bbe46e14156c25f717b9f2f150 100644
--- a/api/@internal/component/ets/ability_component.d.ts
+++ b/api/@internal/component/ets/ability_component.d.ts
@@ -1,36 +1,41 @@
-/*
- * 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 {CommonMethod} from "./common";
-import {Want} from "../../../ability/want";
-
-export declare class AbilityController {
- constructor();
- startAbility(value: Want);
- performBackPress();
- getStackCount();
-}
-
-interface AbilityComponent extends CommonMethod {
- (value: { want: Want, controller?: AbilityController }): AbilityComponent;
-
- onReady(event: () => void): AbilityComponent;
- onDestroy(event: () => void): AbilityComponent;
- onAbilityCreated(event: (name: string) => void): AbilityComponent;
- onAbilityMoveToFront(event: () => void): AbilityComponent;
- onAbilityWillRemove(event: () => void): AbilityComponent;
-}
-
-export declare const AbilityComponentInterface: AbilityComponent;
+/*
+ * 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 {CommonMethod} from "./common";
+import {Want} from "../api/common/ability/want";
+
+export declare class AbilityController {
+ constructor();
+ startAbility(value: Want);
+ performBackPress();
+ getStackCount();
+}
+
+export declare class AbilityComponentExtend extends AbilityComponentAttribute {
+}
+
+interface AbilityComponent extends AbilityComponentAttribute {
+ (value: { want: Want, controller?: AbilityController }): AbilityComponent;
+}
+
+declare class AbilityComponentAttribute extends CommonMethod {
+ onReady(event: () => void): T;
+ onDestroy(event: () => void): T;
+ onAbilityCreated(event: (name: string) => void): T;
+ onAbilityMoveToFront(event: () => void): T;
+ onAbilityWillRemove(event: () => void): T;
+}
+
+export declare const AbilityComponentInterface: AbilityComponent;
diff --git a/api/@internal/component/ets/action_sheet.d.ts b/api/@internal/component/ets/action_sheet.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..26a0620988ba02a72140f0e6594110ea990e3817
--- /dev/null
+++ b/api/@internal/component/ets/action_sheet.d.ts
@@ -0,0 +1,47 @@
+/*
+ * 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 { DialogAlignment } from "./alert_dialog";
+import {CommonMethod, Resource} from "./common"
+
+interface SheetInfo {
+ title: string | Resource;
+ icon?: string | Resource;
+ action: () => void;
+}
+
+export declare class ActionSheetExtend extends ActionSheetAttribute {
+}
+
+interface ActionSheet extends ActionSheetAttribute {
+}
+
+declare class ActionSheetAttribute extends CommonMethod {
+ show(value: {
+ title: string | Resource;
+ message: string | Resource;
+ confirm?: {
+ value: string | Resource;
+ action: () => void;
+ };
+ cancel?: () => void;
+ sheets: Array;
+ autoCancel?: boolean;
+ alignment?: DialogAlignment;
+ offset?: { dx: number | string | Resource, dy: number | string | Resource };
+ });
+}
+
+export declare const ActionSheetInterface: ActionSheet;
diff --git a/api/@internal/component/ets/alert_dialog.d.ts b/api/@internal/component/ets/alert_dialog.d.ts
index 620f47db15360d2d22437bfdba9591eda0e3cfa9..361b9823cc132048c5780b626f13d481cb3cfdf3 100644
--- a/api/@internal/component/ets/alert_dialog.d.ts
+++ b/api/@internal/component/ets/alert_dialog.d.ts
@@ -1,44 +1,55 @@
-/*
- * 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 {CommonMethod, Resource} from "./common"
-
-interface AlertDialog extends CommonMethod {
- show(value: {
- title?: string | Resource;
- message: string | Resource;
- autoCancel?: boolean;
- confirm?: {
- value: string | Resource;
- action: () => void;
- };
- cancel?: () => void;
- } | {
- title?: string | Resource;
- message: string | Resource;
- autoCancel?: boolean;
- primaryButton: {
- value: string | Resource;
- action: () => void;
- };
- secondaryButton: {
- value: string | Resource;
- action: () => void;
- };
- cancel?: () => void;
- });
-}
-
-export declare const AlertDialogInterface: AlertDialog;
+/*
+ * 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 {CommonMethod, Resource} from "./common"
+
+export declare enum DialogAlignment {
+ Top,
+ Center,
+ Bottom,
+ Default
+}
+
+interface AlertDialog {
+ show(value: {
+ title?: string | Resource;
+ message: string | Resource;
+ autoCancel?: boolean;
+ confirm?: {
+ value: string | Resource;
+ action: () => void;
+ };
+ cancel?: () => void;
+ alignment?: DialogAlignment;
+ offset?: { dx: number | string | Resource, dy: number | string | Resource };
+ } | {
+ title?: string | Resource;
+ message: string | Resource;
+ autoCancel?: boolean;
+ primaryButton: {
+ value: string | Resource;
+ action: () => void;
+ };
+ secondaryButton: {
+ value: string | Resource;
+ action: () => void;
+ };
+ cancel?: () => void;
+ alignment?: DialogAlignment;
+ offset?: { dx: number | string | Resource, dy: number | string | Resource };
+ });
+}
+
+export declare const AlertDialogInterface: AlertDialog;
diff --git a/api/@internal/component/ets/alphabet_indexer.d.ts b/api/@internal/component/ets/alphabet_indexer.d.ts
index db74e50e4cf284eb1cde57d1d6ff21a9f618c22a..27d0858af6d35065cd5795a3082390cb79f7ef05 100644
--- a/api/@internal/component/ets/alphabet_indexer.d.ts
+++ b/api/@internal/component/ets/alphabet_indexer.d.ts
@@ -17,36 +17,41 @@ import {CommonMethod, Color, Resource} from "./common";
import {FontWeight, FontStyle} from "./text";
export declare enum IndexerAlign {
- Left,
- Right
+ Left,
+ Right
}
-interface AlphabetIndexer extends CommonMethod {
+export declare class AlphabetIndexerExtend extends AlphabetIndexerAttribute {
+}
+
+interface AlphabetIndexer extends AlphabetIndexerAttribute {
(value: {ArrayValue : Array, selected : number}): AlphabetIndexer;
+}
- onSelected(event: (index: number) => void): AlphabetIndexer;
+declare class AlphabetIndexerAttribute extends CommonMethod {
+ onSelected(event: (index: number) => void): T;
- color(value: Color | number | string | Resource): AlphabetIndexer;
+ color(value: Color | number | string | Resource): T;
- selectedColor(value: Color | number | string | Resource): AlphabetIndexer;
+ selectedColor(value: Color | number | string | Resource): T;
- popupColor(value: Color | number | string | Resource): AlphabetIndexer;
+ popupColor(value: Color | number | string | Resource): T;
- selectedBackgroundColor(value: Color | number | string | Resource): AlphabetIndexer;
+ selectedBackgroundColor(value: Color | number | string | Resource): T;
- popupBackground(value: Color | number | string | Resource): AlphabetIndexer;
+ popupBackground(value: Color | number | string | Resource): T;
- usingPopup(value: boolean): AlphabetIndexer;
+ usingPopup(value: boolean): T;
- selectedFont(value: { size?: number, weight?: FontWeight, family?: string, style?: FontStyle}): AlphabetIndexer;
+ selectedFont(value: { size?: number, weight?: FontWeight, family?: string, style?: FontStyle}): T;
- popupFont(value: { size?: number, weight?: FontWeight, family?: string, style?: FontStyle}): AlphabetIndexer;
+ popupFont(value: { size?: number, weight?: FontWeight, family?: string, style?: FontStyle}): T;
- iteamSize(value: string | number): AlphabetIndexer;
+ itemSize(value: string | number): T;
- font(value: { size?: number, weight?: FontWeight, family?: string, style?: FontStyle}): AlphabetIndexer;
+ font(value: { size?: number, weight?: FontWeight, family?: string, style?: FontStyle}): T;
- alignStyle(value: IndexerAlign): AlphabetIndexer;
+ alignStyle(value: IndexerAlign): T;
}
export declare const AlphabetIndexerInterface: AlphabetIndexer;
diff --git a/api/@internal/component/ets/animator.d.ts b/api/@internal/component/ets/animator.d.ts
index 5b2b585be9b07839347aa037032d62c593f87dc0..2e51167d79395db85b2229575965e5b04518afca 100644
--- a/api/@internal/component/ets/animator.d.ts
+++ b/api/@internal/component/ets/animator.d.ts
@@ -16,51 +16,56 @@
import {CommonMethod, AnimationStatus, Curve, FillMode, PlayMode} from "./common";
export declare class SpringProp {
- constructor(mass: number, stiffness: number, damping: number): SpringProp;
+ constructor(mass: number, stiffness: number, damping: number);
}
export declare class SpringMotion {
- constructor(start: number, end: number, velocity: number, prop: SpringProp): SpringMotion;
+ constructor(start: number, end: number, velocity: number, prop: SpringProp);
}
export declare class FrictionMotion {
- constructor(friction: number, position: number, velocity: number): FrictionMotion;
+ constructor(friction: number, position: number, velocity: number);
}
export declare class ScrollMotion {
- constructor(position: number, velocity: number, min: number, max: number, prop: SpringProp): ScrollMotion;
+ constructor(position: number, velocity: number, min: number, max: number, prop: SpringProp);
}
-interface Animator extends CommonMethod {
- (value: string): Animator;
+export declare class AnimatorExtend extends AnimatorAttribute {
+}
+
+interface Animator extends AnimatorAttribute {
+ (value: string): Animator;
+}
- state(value: AnimationStatus): Animator;
+declare class AnimatorAttribute extends CommonMethod {
+ state(value: AnimationStatus): T;
- duration(value: number): Animator;
+ duration(value: number): T;
- curve(value: Curve): Animator;
+ curve(value: Curve): T;
- delay(value: number): Animator;
+ delay(value: number): T;
- fillMode(value: FillMode): Animator;
+ fillMode(value: FillMode): T;
- iterations(value: number): Animator;
+ iterations(value: number): T;
- playMode(value: PlayMode): Animator;
+ playMode(value: PlayMode): T;
- motion(value: Motion): Animator;
+ motion(value: SpringMotion | FrictionMotion | ScrollMotion): T;
- onStart(event: () => void): Animator;
+ onStart(event: () => void): T;
- onPause(event: () => void): Animator;
+ onPause(event: () => void): T;
- onRepeat(event: () => void): Animator;
+ onRepeat(event: () => void): T;
- onCancel(event: () => void): Animator;
+ onCancel(event: () => void): T;
- onFinish(event: () => void): Animator;
+ onFinish(event: () => void): T;
- onFrame(event: (value: number) => void): Animator;
+ onFrame(event: (value: number) => void): T;
}
export declare const AnimatorInterface: Animator;
\ No newline at end of file
diff --git a/api/@internal/component/ets/badge.d.ts b/api/@internal/component/ets/badge.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..49587d21ee2bd80205bd31d44c626d767193c63c
--- /dev/null
+++ b/api/@internal/component/ets/badge.d.ts
@@ -0,0 +1,42 @@
+/*
+ * 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 {CommonMethod, Color} from "./common"
+
+declare enum BadgePosition {
+ Right,
+ RightTop,
+ Left
+}
+
+interface BadgeStyle {
+ color?: Color;
+ fontSize?: number | string;
+ badgeSize?: number | string;
+ badgeColor: Color;
+}
+
+export declare class BadgeExtend extends BadgeAttribute {
+}
+
+interface Badge extends BadgeAttribute {
+ (value: {count: number, position?: BadgePosition, maxCount?: number, style?: BadgeStyle}): Badge;
+ (value: {value: string, position?: BadgePosition, maxCount?: number, style?: BadgeStyle}): Badge;
+}
+
+declare class BadgeAttribute extends CommonMethod {
+}
+
+export declare const BadgeInterface: Badge
\ No newline at end of file
diff --git a/api/@internal/component/ets/blank.d.ts b/api/@internal/component/ets/blank.d.ts
index 91fcb25f9be5d7aedb4be61b2458ea3517049bbe..42a841d29d59dd3b8c6f03ffbf8ae2ab277b198a 100644
--- a/api/@internal/component/ets/blank.d.ts
+++ b/api/@internal/component/ets/blank.d.ts
@@ -15,10 +15,15 @@
import {CommonMethod, Color, Resource} from "./common"
-interface Blank extends CommonMethod {
+export declare class BlankExtend extends BlankAttribute {
+}
+
+interface Blank extends BlankAttribute {
(min?: number | string): Blank;
+}
- color(value: Color | number | string | Resource): Blank;
+declare class BlankAttribute extends CommonMethod {
+ color(value: Color | number | string | Resource): T;
}
export declare const BlankInterface: Blank
\ No newline at end of file
diff --git a/api/@internal/component/ets/button.d.ts b/api/@internal/component/ets/button.d.ts
index a27720e294d7dac0d8792f5fd9b4207fd7ff487a..8f7fd66a661e841cab04781a665e23344d266a7b 100644
--- a/api/@internal/component/ets/button.d.ts
+++ b/api/@internal/component/ets/button.d.ts
@@ -23,22 +23,27 @@ export declare enum ButtonType {
Normal
}
-interface Button extends CommonMethod