From cb5fbeccbc4703b128123146aa2a0350ab6ec882 Mon Sep 17 00:00:00 2001 From: lihong Date: Thu, 13 Jan 2022 11:43:41 +0800 Subject: [PATCH 1/5] lihong67@huawei.com update d.ts file Signed-off-by: lihong Change-Id: I09c6ed0309c06987aa55662ab2cd220b7ce46424 --- api/@internal/component/ets/action_sheet.d.ts | 4 +- api/@internal/component/ets/alert_dialog.d.ts | 13 +- .../component/ets/alphabet_indexer.d.ts | 47 +++-- api/@internal/component/ets/animator.d.ts | 49 +++--- api/@internal/component/ets/badge.d.ts | 25 ++- api/@internal/component/ets/blank.d.ts | 17 +- api/@internal/component/ets/button.d.ts | 36 ++-- api/@internal/component/ets/calendar.d.ts | 53 +++--- api/@internal/component/ets/canvas.d.ts | 49 +++--- api/@internal/component/ets/checkbox.d.ts | 21 +-- .../component/ets/checkboxgroup.d.ts | 23 ++- api/@internal/component/ets/circle.d.ts | 16 +- api/@internal/component/ets/column.d.ts | 15 +- api/@internal/component/ets/column_split.d.ts | 14 +- api/@internal/component/ets/common.d.ts | 119 +++++-------- api/@internal/component/ets/counter.d.ts | 16 +- .../ets/custom_dialog_controller.d.ts | 6 +- api/@internal/component/ets/data_panel.d.ts | 17 +- api/@internal/component/ets/date_picker.d.ts | 32 ++-- api/@internal/component/ets/divider.d.ts | 21 +-- api/@internal/component/ets/ellipse.d.ts | 13 +- api/@internal/component/ets/enums.d.ts | 88 +++++----- api/@internal/component/ets/flex.d.ts | 15 +- api/@internal/component/ets/forEach.d.ts | 6 +- .../component/ets/form_component.d.ts | 8 +- api/@internal/component/ets/gauge.d.ts | 23 ++- api/@internal/component/ets/gesture.d.ts | 129 +++++++------- api/@internal/component/ets/grid.d.ts | 56 +++--- api/@internal/component/ets/gridItem.d.ts | 22 ++- .../component/ets/grid_container.d.ts | 16 +- api/@internal/component/ets/hyperlink.d.ts | 15 +- api/@internal/component/ets/image.d.ts | 52 +++--- .../component/ets/image_animator.d.ts | 39 ++--- api/@internal/component/ets/index.d.ts | 164 +++++++++--------- api/@internal/component/ets/inspector.d.ts | 26 ++- api/@internal/component/ets/lazyForEach.d.ts | 10 +- api/@internal/component/ets/line.d.ts | 18 +- api/@internal/component/ets/list.d.ts | 60 +++---- api/@internal/component/ets/listItem.d.ts | 20 +-- .../component/ets/loading_progress.d.ts | 26 ++- api/@internal/component/ets/marquee.d.ts | 30 ++-- api/@internal/component/ets/matrix2d.d.ts | 2 +- api/@internal/component/ets/navigation.d.ts | 36 ++-- api/@internal/component/ets/navigator.d.ts | 24 ++- .../component/ets/pageTransition.d.ts | 24 ++- api/@internal/component/ets/panel.d.ts | 32 ++-- api/@internal/component/ets/path.d.ts | 16 +- api/@internal/component/ets/pattern_lock.d.ts | 35 ++-- api/@internal/component/ets/piece.d.ts | 31 ++-- .../component/ets/plugin_component.d.ts | 18 +- api/@internal/component/ets/polygon.d.ts | 16 +- api/@internal/component/ets/polyline.d.ts | 16 +- api/@internal/component/ets/progress.d.ts | 23 ++- api/@internal/component/ets/qrcode.d.ts | 17 +- api/@internal/component/ets/radio.d.ts | 18 +- api/@internal/component/ets/rating.d.ts | 20 +-- api/@internal/component/ets/rect.d.ts | 19 +- api/@internal/component/ets/refresh.d.ts | 18 +- api/@internal/component/ets/row.d.ts | 15 +- api/@internal/component/ets/row_split.d.ts | 13 +- api/@internal/component/ets/scroll.d.ts | 33 ++-- api/@internal/component/ets/scroll_bar.d.ts | 18 +- api/@internal/component/ets/search.d.ts | 33 ++-- api/@internal/component/ets/select.d.ts | 37 ++-- api/@internal/component/ets/shape.d.ts | 40 ++--- api/@internal/component/ets/sheet.d.ts | 12 +- api/@internal/component/ets/slider.d.ts | 35 ++-- api/@internal/component/ets/span.d.ts | 30 ++-- api/@internal/component/ets/stack.d.ts | 15 +- .../component/ets/stateManagement.d.ts | 20 +-- api/@internal/component/ets/stepper.d.ts | 22 ++- api/@internal/component/ets/stepperItem.d.ts | 29 ++-- api/@internal/component/ets/swiper.d.ts | 45 +++-- api/@internal/component/ets/tab_content.d.ts | 15 +- api/@internal/component/ets/tabs.d.ts | 32 ++-- api/@internal/component/ets/text.d.ts | 50 +++--- api/@internal/component/ets/text_area.d.ts | 46 +++-- api/@internal/component/ets/text_clock.d.ts | 30 ++-- api/@internal/component/ets/text_input.d.ts | 58 +++---- api/@internal/component/ets/text_picker.d.ts | 31 ++-- api/@internal/component/ets/text_timer.d.ts | 30 ++-- api/@internal/component/ets/toggle.d.ts | 21 +-- api/@internal/component/ets/units.d.ts | 22 ++- api/@internal/component/ets/video.d.ts | 44 +++-- api/@internal/component/ets/xcomponent.d.ts | 18 +- 85 files changed, 1177 insertions(+), 1411 deletions(-) diff --git a/api/@internal/component/ets/action_sheet.d.ts b/api/@internal/component/ets/action_sheet.d.ts index 54d279ddb6..05b10052b2 100644 --- a/api/@internal/component/ets/action_sheet.d.ts +++ b/api/@internal/component/ets/action_sheet.d.ts @@ -13,8 +13,6 @@ * limitations under the License. */ -import { DialogAlignment } from "./alert_dialog"; -import { Resource } from "."; /** * The information of sheet. @@ -44,7 +42,7 @@ interface SheetInfo { * Declare the ActionSheet * @since 8 */ -export declare class ActionSheet { +declare class ActionSheet { /** * Invoking method display. * @since 8 diff --git a/api/@internal/component/ets/alert_dialog.d.ts b/api/@internal/component/ets/alert_dialog.d.ts index ccb7d6c8b0..e88783f82c 100644 --- a/api/@internal/component/ets/alert_dialog.d.ts +++ b/api/@internal/component/ets/alert_dialog.d.ts @@ -13,14 +13,11 @@ * limitations under the License. */ -import { ResourceColor } from "."; -import { Offset, ResourceStr } from "./units"; - /** * The alignment of dialog, * @since 7 */ -export declare enum DialogAlignment { +declare enum DialogAlignment { /** * Vertical top alignment. * @since 7 @@ -86,7 +83,7 @@ export declare enum DialogAlignment { * Base param used for AlertDialog.show method. * @since 7 */ -export declare interface AlertDialogParam { +declare interface AlertDialogParam { /** * Title Properties * @since 7 @@ -134,7 +131,7 @@ export declare interface AlertDialogParam { * Defines the AlertDialog with confirm button. * @since 7 */ -export declare interface AlertDialogParamWithConfirm extends AlertDialogParam { +declare interface AlertDialogParamWithConfirm extends AlertDialogParam { /** * Invoke the commit function. * @since 7 @@ -166,7 +163,7 @@ export declare interface AlertDialogParamWithConfirm extends AlertDialogParam { }; } -export declare interface AlertDialogParamWithButtons extends AlertDialogParam { +declare interface AlertDialogParamWithButtons extends AlertDialogParam { /** * First button. * @since 7 @@ -232,7 +229,7 @@ export declare interface AlertDialogParamWithButtons extends AlertDialogParam { * Defines AlertDialog which uses show method to show alert dialog. * @since 7 */ -export declare class AlertDialog { +declare class AlertDialog { /** * Invoking method display. * @since 7 diff --git a/api/@internal/component/ets/alphabet_indexer.d.ts b/api/@internal/component/ets/alphabet_indexer.d.ts index 100e14bc28..b479afdc67 100644 --- a/api/@internal/component/ets/alphabet_indexer.d.ts +++ b/api/@internal/component/ets/alphabet_indexer.d.ts @@ -13,14 +13,11 @@ * limitations under the License. */ -import { CommonMethod } from "./common"; -import { ResourceColor, Font } from "./units"; - /** * indexer align property. * @since 7 */ -export declare enum IndexerAlign { +declare enum IndexerAlign { /** * A dialog box is displayed on the right of the index bar. * @since 7 @@ -38,116 +35,116 @@ export declare enum IndexerAlign { * Alphabet index bar. * @since 7 */ -interface AlphabetIndexer extends AlphabetIndexerAttribute { +interface AlphabetIndexerInterface { /** * ArrayValue: Alphabetical index string array. * selected: ID of the selected item. * @since 7 */ - (value: { arrayValue: Array; selected: number }): AlphabetIndexer; + (value: { arrayValue: Array; selected: number }): AlphabetIndexerAttribute; } /** * Defines the alphabet index bar attribute functions. * @since 7 */ -declare class AlphabetIndexerAttribute extends CommonMethod { +declare class AlphabetIndexerAttribute extends CommonMethod { /** * Index bar selection callback. * @since 7 */ - onSelected(event: (index: number) => void): T; + onSelected(event: (index: number) => void): AlphabetIndexerAttribute; /** * Definitions color. * @since 7 */ - color(value: ResourceColor): T; + color(value: ResourceColor): AlphabetIndexerAttribute; /** * Select the text color. * @since 7 */ - selectedColor(value: ResourceColor): T; + selectedColor(value: ResourceColor): AlphabetIndexerAttribute; /** * Font color of the pop-up prompt text. * @since 7 */ - popupColor(value: ResourceColor): T; + popupColor(value: ResourceColor): AlphabetIndexerAttribute; /** * Select the text background color. * @since 7 */ - selectedBackgroundColor(value: ResourceColor): T; + selectedBackgroundColor(value: ResourceColor): AlphabetIndexerAttribute; /** * Background color of the pop-up window index. * @since 7 */ - popupBackground(value: ResourceColor): T; + popupBackground(value: ResourceColor): AlphabetIndexerAttribute; /** * Whether to use pop-up index hints. * @since 7 */ - usingPopup(value: boolean): T; + usingPopup(value: boolean): AlphabetIndexerAttribute; /** * Select the text text style, * @since 7 */ - selectedFont(value: Font): T; + selectedFont(value: Font): AlphabetIndexerAttribute; /** * Select the text background color. * @since 7 */ - popupFont(value: Font): T; + popupFont(value: Font): AlphabetIndexerAttribute; /** * Size of the letter area on the letter index bar. The letter area is a square. Set the length of the square side. * @since 7 */ - itemSize(value: string | number): T; + itemSize(value: string | number): AlphabetIndexerAttribute; /** * Definitions fonts. * @since 7 */ - font(value: Font): T; + font(value: Font): AlphabetIndexerAttribute; /** * Alphabet index bar alignment style. The left and right alignment styles are supported, which affects the pop-up position of the pop-up window. * @since 7 */ - alignStyle(value: IndexerAlign): T; + alignStyle(value: IndexerAlign): AlphabetIndexerAttribute; /** * Index bar selection callback and return the strings which display on pop-up. * @since 8 */ - onRequestPopupData(event: (index: number) => Array): T; + onRequestPopupData(event: (index: number) => Array): AlphabetIndexerAttribute; /** * Pop-up selection callback. * @since 8 */ - onPopupSelected(event: (index: number) => void): T; + onPopupSelected(event: (index: number) => void): AlphabetIndexerAttribute; /** * Select the index. * @since 8 */ - selectedIndex(index: number): T; + selectedIndex(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}): T; + popupPosition(value: {offsetX: number, offsetY: number}): AlphabetIndexerAttribute; } -export declare const AlphabetIndexerInterface: AlphabetIndexer; -export declare class AlphabetIndexerExtend extends AlphabetIndexerAttribute {} +declare const AlphabetIndexerInterface: AlphabetIndexerInterface; +declare const AlphabetIndexerIntance: AlphabetIndexerAttribute; diff --git a/api/@internal/component/ets/animator.d.ts b/api/@internal/component/ets/animator.d.ts index 55c27f5f67..8adc7dc1f2 100644 --- a/api/@internal/component/ets/animator.d.ts +++ b/api/@internal/component/ets/animator.d.ts @@ -13,15 +13,12 @@ * limitations under the License. */ -import { CommonMethod } from "./common"; -import { AnimationStatus, Curve, FillMode, PlayMode } from "./enums"; - /** * Customize spring properties. * @since 7 * @systemapi */ -export declare class SpringProp { +declare class SpringProp { /** * Constructor parameters * @since 7 @@ -35,7 +32,7 @@ export declare class SpringProp { * @since 7 * @systemapi */ -export declare class SpringMotion { +declare class SpringMotion { /** * Constructor parameters * @since 7 @@ -49,7 +46,7 @@ export declare class SpringMotion { * @since 7 * @systemapi */ -export declare class FrictionMotion { +declare class FrictionMotion { /** * Constructor parameters * @since 7 @@ -63,7 +60,7 @@ export declare class FrictionMotion { * @since 7 * @systemapi */ -export declare class ScrollMotion { +declare class ScrollMotion { /** * Constructor parameters * @since 7 @@ -77,13 +74,13 @@ export declare class ScrollMotion { * @since 7 * @systemapi */ -interface Animator extends AnimatorAttribute { +interface AnimatorInterface { /** * Constructor parameters * @since 7 * @systemapi */ - (value: string): Animator; + (value: string): AnimatorAttribute; } /** @@ -91,105 +88,105 @@ interface Animator extends AnimatorAttribute { * @since 7 * @systemapi */ -declare class AnimatorAttribute extends CommonMethod { +declare class AnimatorAttribute extends CommonMethod { /** * Controls the playback status. The default value is the initial state. * @since 7 * @systemapi */ - state(value: AnimationStatus): T; + state(value: AnimationStatus): AnimatorAttribute; /** * Animation duration, in milliseconds. * @since 7 * @systemapi */ - duration(value: number): T; + duration(value: number): AnimatorAttribute; /** * Animation curve, default to linear curve * @since 7 * @systemapi */ - curve(value: Curve): T; + curve(value: Curve): AnimatorAttribute; /** * Delayed animation playback duration, in milliseconds. By default, the animation is not delayed. * @since 7 * @systemapi */ - delay(value: number): T; + delay(value: number): AnimatorAttribute; /** * Sets the state before and after the animation starts. * @since 7 * @systemapi */ - fillMode(value: FillMode): T; + fillMode(value: FillMode): AnimatorAttribute; /** * The default playback is once. If the value is -1, the playback is unlimited. * @since 7 * @systemapi */ - iterations(value: number): T; + iterations(value: number): AnimatorAttribute; /** * Sets the animation playback mode. By default, the animation starts to play again after the playback is complete. * @since 7 * @systemapi */ - playMode(value: PlayMode): T; + playMode(value: PlayMode): AnimatorAttribute; /** * Configure the physical animation algorithm. * @since 7 * @systemapi */ - motion(value: SpringMotion | FrictionMotion | ScrollMotion): T; + motion(value: SpringMotion | FrictionMotion | ScrollMotion): AnimatorAttribute; /** * Status callback, which is triggered when the animation starts to play. * @since 7 * @systemapi */ - onStart(event: () => void): T; + onStart(event: () => void): AnimatorAttribute; /** * Status callback, triggered when the animation pauses. * @since 7 * @systemapi */ - onPause(event: () => void): T; + onPause(event: () => void): AnimatorAttribute; /** * Status callback, triggered when the animation is replayed. * @since 7 * @systemapi */ - onRepeat(event: () => void): T; + onRepeat(event: () => void): AnimatorAttribute; /** * Status callback, which is triggered when the animation is canceled. * @since 7 * @systemapi */ - onCancel(event: () => void): T; + onCancel(event: () => void): AnimatorAttribute; /** * Status callback, which is triggered when the animation playback is complete. * @since 7 * @systemapi */ - onFinish(event: () => void): T; + onFinish(event: () => void): AnimatorAttribute; /** * The callback input parameter is the interpolation during animation playback. * @since 7 * @systemapi */ - onFrame(event: (value: number) => void): T; + onFrame(event: (value: number) => void): AnimatorAttribute; } -export declare class AnimatorExtend extends AnimatorAttribute {} -export declare const AnimatorInterface: Animator; +declare const Animator: AnimatorInterface; +declare const AnimatorIntance: AnimatorAttribute; diff --git a/api/@internal/component/ets/badge.d.ts b/api/@internal/component/ets/badge.d.ts index 8b955feb71..5c7d354ea0 100644 --- a/api/@internal/component/ets/badge.d.ts +++ b/api/@internal/component/ets/badge.d.ts @@ -13,14 +13,11 @@ * limitations under the License. */ -import { CommonMethod } from "./common"; -import { ResourceColor } from "./units"; - /** * Defines the badge position property. * @since 7 */ -export declare enum BadgePosition { +declare enum BadgePosition { /** * The dot is displayed vertically centered on the right. * @since 7 @@ -44,7 +41,7 @@ export declare enum BadgePosition { * BadgeStyle object * @since 7 */ -export declare interface BadgeStyle { +declare interface BadgeStyle { /** * Text Color * @since 7 @@ -74,7 +71,7 @@ export declare interface BadgeStyle { * Defines the base param of badge. * @since 7 */ -export declare interface BadgeParam { +declare interface BadgeParam { /** * Set the display position of the prompt point. * @since 7 @@ -92,7 +89,7 @@ export declare interface BadgeParam { * Defines the badge param with count and maxCount. * @since 7 */ -export declare interface BadgeParamWithNumber extends BadgeParam { +declare interface BadgeParamWithNumber extends BadgeParam { /** * Set the number of reminder messages. * @since 7 @@ -110,7 +107,7 @@ export declare interface BadgeParamWithNumber extends BadgeParam { * Defines the badge param with string value. * @since 7 */ -export declare interface BadgeParamWithString extends BadgeParam { +declare interface BadgeParamWithString extends BadgeParam { /** * Text string of the prompt content. * @since 7 @@ -122,7 +119,7 @@ export declare interface BadgeParamWithString extends BadgeParam { * Defines Badge Componrnt. * @since 7 */ -interface Badge extends BadgeAttribute { +interface BadgeInterface { /** * position: Set the display position of the prompt point. * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. @@ -130,7 +127,7 @@ interface Badge extends BadgeAttribute { * style: You can set the style of the Badge component, including the text color, size, dot color, and size. * @since 7 */ - (value: BadgeParamWithNumber): Badge; + (value: BadgeParamWithNumber): BadgeAttribute; /** * value: Text string of the prompt content. @@ -139,14 +136,14 @@ interface Badge extends BadgeAttribute { * style: You can set the style of the Badge component, including the text color, size, dot color, and size. * @since 7 */ - (value: BadgeParamWithString): Badge; + (value: BadgeParamWithString): BadgeAttribute; } /** * Defines Badge Componrnt attribute. * @since 7 */ -declare class BadgeAttribute extends CommonMethod {} +declare class BadgeAttribute extends CommonMethod {} -export declare class BadgeExtend extends BadgeAttribute {} -export declare const BadgeInterface: Badge; +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 782cf284d3..1742aa3dec 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. @@ -13,32 +13,29 @@ * limitations under the License. */ -import { CommonMethod } from "./common"; -import { ResourceColor } from "./units"; - /** * Create Blank. * @since 7 */ -interface Blank extends BlankAttribute { +interface BlankInterface { /** * The minimum size of the blank fill assembly on the container spindle. * @since 7 */ - (min?: number | string): Blank; + (min?: number | string): BlankAttribute; } /** * Inheritance CommonMethod Set Styles * @since 7 */ -declare class BlankAttribute extends CommonMethod { +declare class BlankAttribute extends CommonMethod { /** * color: set color. * @since 7 */ - color(value: ResourceColor): T; + color(value: ResourceColor): BlankAttribute; } -export declare class BlankExtend extends BlankAttribute {} -export declare const BlankInterface: Blank; +declare const Blank: BlankInterface; +declare const BlankIntancee: BlankAttribute; diff --git a/api/@internal/component/ets/button.d.ts b/api/@internal/component/ets/button.d.ts index e0f94093e6..68f472819d 100644 --- a/api/@internal/component/ets/button.d.ts +++ b/api/@internal/component/ets/button.d.ts @@ -13,15 +13,11 @@ * limitations under the License. */ -import { CommonMethod } from "./common"; -import { FontWeight, FontStyle } from "./enums"; -import { Length, ResourceColor, ResourceStr, Resource } from "./units"; - /** * Provides a button component. * @since 7 */ -export declare enum ButtonType { +declare enum ButtonType { /** * Capsule button (rounded corners default to half the height). * @since 7 @@ -45,7 +41,7 @@ export declare enum ButtonType { * Defines the button options. * @since 7 */ -export declare interface ButtonOption { +declare interface ButtonOption { /** * Describes the button style. * @since 7 @@ -63,73 +59,73 @@ export declare interface ButtonOption { * Defines the Button Component. * @since 7 */ -interface Button extends ButtonAttribute