From 96b3a46364df163de891819e218c247355b0d95d Mon Sep 17 00:00:00 2001 From: yan-shuifeng Date: Wed, 20 Oct 2021 17:37:00 +0800 Subject: [PATCH 1/3] add new ets define in sdk8 Signed-off-by: yan-shuifeng --- .../component/ets/ability_component.d.ts | 238 +++++----- api/@internal/component/ets/action_sheet.d.ts | 186 ++++---- api/@internal/component/ets/alert_dialog.d.ts | 438 +++++++++--------- api/@internal/component/ets/badge.d.ts | 246 +++++----- .../ets/custom_dialog_controller.d.ts | 102 ++-- api/@internal/component/ets/datapanel.d.ts | 116 ++--- api/@internal/component/ets/gauge.d.ts | 198 ++++---- api/@internal/component/ets/gesture.d.ts | 238 ++++++---- api/@internal/component/ets/gridItem.d.ts | 170 +++---- api/@internal/component/ets/line.d.ts | 146 +++--- api/@internal/component/ets/marquee.d.ts | 214 ++++----- api/@internal/component/ets/polygon.d.ts | 118 ++--- api/@internal/component/ets/polyline.d.ts | 126 ++--- api/@internal/component/ets/rating.d.ts | 160 +++---- api/@internal/component/ets/refresh.d.ts | 210 ++++----- api/@internal/component/ets/search.d.ts | 66 +-- api/@internal/component/ets/slider.d.ts | 310 ++++++------- api/@internal/component/ets/textarea.d.ts | 168 +++---- api/@internal/component/ets/textinput.d.ts | 386 +++++++-------- api/@internal/component/ets/web.d.ts | 68 +-- 20 files changed, 1982 insertions(+), 1922 deletions(-) diff --git a/api/@internal/component/ets/ability_component.d.ts b/api/@internal/component/ets/ability_component.d.ts index 9c5cb73a28..e42b318799 100644 --- a/api/@internal/component/ets/ability_component.d.ts +++ b/api/@internal/component/ets/ability_component.d.ts @@ -1,119 +1,119 @@ -/* - * 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"; - -/** - * controller of ability. - * @devices phone, tablet, car. - * @since 7 - */ -export declare class AbilityController { - /** - * constructor. - * @devices phone, tablet, car. - * @since 7 - */ - constructor(); - - /** - * load the ability in the AbilityComponent. - * Want: Capability description to be loaded - * @devices phone, tablet, car. - * @since 7 - */ - startAbility(value: Want); - - /** - * Perform a return operation inside the AbilityComponent. - * @devices phone, tablet, car. - * @since 7 - */ - performBackPress(); - - /** - * Obtains the number of tasks in the internal task stack of the AbilityComponent. - * @devices phone, tablet, car. - * @since 7 - */ - getStackCount(); -} - -/** - * @devices phone, tablet, car. - * @since 7 - */ -export declare class AbilityComponentExtend extends AbilityComponentAttribute { -} - -/** - * AbilityComponent inheritance abilitycomponentattribute. - * Want: Capability description to be loaded. - * controller: Ability Controller. - * @devices phone, tablet, car. - * @since 7 - */ -interface AbilityComponent extends AbilityComponentAttribute { - (value: { want: Want, controller?: AbilityController }): AbilityComponent; -} - -/** - * The attribute of ability. - * @devices phone, tablet, car. - * @since 7 - */ -declare class AbilityComponentAttribute extends CommonMethod { - /** - * Callback when the abilityComponent environment starts up, after which the abilityController methods can be used. - * @devices phone, tablet, car. - * @since 7 - */ - onReady(event: () => void): T; - - /** - * Callback when the abilityComponent environment is destroyed. - * @devices phone, tablet, car. - * @since 7 - */ - onDestroy(event: () => void): T; - - /** - * This event is triggered when the abilityComponent loads the mobility. Name indicates the Ability name. - * @devices phone, tablet, car. - * @since 7 - */ - onAbilityCreated(event: (name: string) => void): T; - - /** - * Internal to the AbilityComponent, which is triggered when the Ability moves to the foreground. - * @devices phone, tablet, car. - * @since 7 - */ - onAbilityMoveToFront(event: () => void): T; - - /** - * Internal to the AbilityComponent, which is triggered before the Mobility is removed. - * @devices phone, tablet, car. - * @since 7 - */ - onAbilityWillRemove(event: () => void): T; -} - -/** - * @devices phone, tablet, car. - * @since 7 - */ -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"; + +/** + * controller of ability. + * @devices phone, tablet, car. + * @since 7 + */ +export declare class AbilityController { + /** + * constructor. + * @devices phone, tablet, car. + * @since 7 + */ + constructor(); + + /** + * load the ability in the AbilityComponent. + * Want: Capability description to be loaded + * @devices phone, tablet, car. + * @since 7 + */ + startAbility(value: Want); + + /** + * Perform a return operation inside the AbilityComponent. + * @devices phone, tablet, car. + * @since 7 + */ + performBackPress(); + + /** + * Obtains the number of tasks in the internal task stack of the AbilityComponent. + * @devices phone, tablet, car. + * @since 7 + */ + getStackCount(); +} + +/** + * @devices phone, tablet, car. + * @since 7 + */ +export declare class AbilityComponentExtend extends AbilityComponentAttribute { +} + +/** + * AbilityComponent inheritance abilitycomponentattribute. + * Want: Capability description to be loaded. + * controller: Ability Controller. + * @devices phone, tablet, car. + * @since 7 + */ +interface AbilityComponent extends AbilityComponentAttribute { + (value: { want: Want, controller?: AbilityController }): AbilityComponent; +} + +/** + * The attribute of ability. + * @devices phone, tablet, car. + * @since 7 + */ +declare class AbilityComponentAttribute extends CommonMethod { + /** + * Callback when the abilityComponent environment starts up, after which the abilityController methods can be used. + * @devices phone, tablet, car. + * @since 7 + */ + onReady(event: () => void): T; + + /** + * Callback when the abilityComponent environment is destroyed. + * @devices phone, tablet, car. + * @since 7 + */ + onDestroy(event: () => void): T; + + /** + * This event is triggered when the abilityComponent loads the mobility. Name indicates the Ability name. + * @devices phone, tablet, car. + * @since 7 + */ + onAbilityCreated(event: (name: string) => void): T; + + /** + * Internal to the AbilityComponent, which is triggered when the Ability moves to the foreground. + * @devices phone, tablet, car. + * @since 7 + */ + onAbilityMoveToFront(event: () => void): T; + + /** + * Internal to the AbilityComponent, which is triggered before the Mobility is removed. + * @devices phone, tablet, car. + * @since 7 + */ + onAbilityWillRemove(event: () => void): T; +} + +/** + * @devices phone, tablet, car. + * @since 7 + */ +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 index cffda34912..e62fcda996 100644 --- a/api/@internal/component/ets/action_sheet.d.ts +++ b/api/@internal/component/ets/action_sheet.d.ts @@ -1,93 +1,93 @@ -/* - * 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" - -/** - * The information of sheet. - * @devices phone, tablet, car. - * @since 7 - */ -interface SheetInfo { - /** - * Title Properties - * @devices phone, tablet, car. - * @since 7 - */ - title: string | Resource; - - /** - * Icon Properties. - * @devices phone, tablet, car. - * @since 7 - */ - icon?: string | Resource; - - /** - * Callback method after the operation. - * @devices phone, tablet, car. - * @since 7 - */ - action: () => void; -} - -/** - * Callback method after the operation. - * @devices phone, tablet, car. - * @since 7 - */ -export declare class ActionSheetExtend extends ActionSheetAttribute { -} - -/** - * create ActionSheet. - * @devices phone, tablet, car. - * @since 7 - */ -interface ActionSheet extends ActionSheetAttribute { -} - -/** - * @devices phone, tablet, car. - * @since 7 - */ -declare class ActionSheetAttribute extends CommonMethod { - /** - * Invoking method display. - * @devices phone, tablet, car. - * @since 7 - */ - 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 }; - }); -} - -/** - * Definitions ActionSheetInterface. - * @devices phone, tablet, car. - * @since 7 - */ -export declare const ActionSheetInterface: ActionSheet; +/* + * 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" + +/** + * The information of sheet. + * @devices phone, tablet, car. + * @since 7 + */ +interface SheetInfo { + /** + * Title Properties + * @devices phone, tablet, car. + * @since 7 + */ + title: string | Resource; + + /** + * Icon Properties. + * @devices phone, tablet, car. + * @since 7 + */ + icon?: string | Resource; + + /** + * Callback method after the operation. + * @devices phone, tablet, car. + * @since 7 + */ + action: () => void; +} + +/** + * Callback method after the operation. + * @devices phone, tablet, car. + * @since 7 + */ +export declare class ActionSheetExtend extends ActionSheetAttribute { +} + +/** + * create ActionSheet. + * @devices phone, tablet, car. + * @since 7 + */ +interface ActionSheet extends ActionSheetAttribute { +} + +/** + * @devices phone, tablet, car. + * @since 7 + */ +declare class ActionSheetAttribute extends CommonMethod { + /** + * Invoking method display. + * @devices phone, tablet, car. + * @since 7 + */ + 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 }; + }); +} + +/** + * Definitions ActionSheetInterface. + * @devices phone, tablet, car. + * @since 7 + */ +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 f87e0485b4..ee366295f9 100644 --- a/api/@internal/component/ets/alert_dialog.d.ts +++ b/api/@internal/component/ets/alert_dialog.d.ts @@ -1,219 +1,219 @@ -/* - * 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" - -/** - * The alignment of dialog, - * @devices phone, tablet, car. - * @since 7 - */ -export declare enum DialogAlignment { - /** - * Vertical top alignment. - * @devices phone, tablet, car. - * @since 7 - */ - Top, - - /** - * Align vertically to the center. - * @devices phone, tablet, car. - * @since 7 - */ - Center, - - /** - * Vertical bottom alignment. - * @devices phone, tablet, car. - * @since 7 - */ - Bottom, - - /** - * Default alignment. - * @devices phone, tablet, car. - * @since 7 - */ - Default -} - -/** - * @devices phone, tablet, car. - * @since 7 - */ -interface AlertDialog { - /** - * Invoking method display. - * @devices phone, tablet, car. - * @since 7 - */ - show(value: { - /** - * Title Properties - * @devices phone, tablet, car. - * @since 7 - */ - title?: string | Resource; - - /** - * message Properties - * @devices phone, tablet, car. - * @since 7 - */ - message: string | Resource; - - /** - * Allows users to click the mask layer to exit. - * @devices phone, tablet, car. - * @since 7 - */ - autoCancel?: boolean; - - /** - * Invoke the commit function. - * @devices phone, tablet, car. - * @since 7 - */ - confirm?: { - - /** - * Text content of the confirmation button. - * @devices phone, tablet, car. - * @since 7 - */ - value: string | Resource; - - /** - * Method executed by the callback. - * @devices phone, tablet, car. - * @since 7 - */ - action: () => void; - }; - - /** - * Execute Cancel Function. - * @devices phone, tablet, car. - * @since 7 - */ - cancel?: () => void; - - /** - * Alignment in the vertical direction. - * @devices phone, tablet, car. - * @since 7 - */ - alignment?: DialogAlignment; - - /** - * Offset of the pop-up window relative to the alignment position. - * @devices phone, tablet, car. - * @since 7 - */ - offset?: { dx: number | string | Resource, dy: number | string | Resource }; - } | { - - /** - * Title Properties - * @devices phone, tablet, car. - * @since 7 - */ - title?: string | Resource; - - /** - * message Properties - * @devices phone, tablet, car. - * @since 7 - */ - message: string | Resource; - - /** - * Allows users to click the mask layer to exit. - * @devices phone, tablet, car. - * @since 7 - */ - autoCancel?: boolean; - - /** - * First button. - * @devices phone, tablet, car. - * @since 7 - */ - primaryButton: { - /** - * Text content of the confirmation button. - * @devices phone, tablet, car. - * @since 7 - */ - value: string | Resource; - - /** - * Method executed by the callback. - * @devices phone, tablet, car. - * @since 7 - */ - action: () => void; - }; - - /** - * Second button. - * @devices phone, tablet, car. - * @since 7 - */ - secondaryButton: { - /** - * Text content of the confirmation button. - * @devices phone, tablet, car. - * @since 7 - */ - value: string | Resource; - - /** - * Method executed by the callback. - * @devices phone, tablet, car. - * @since 7 - */ - action: () => void; - }; - - /** - * Execute Cancel Function. - * @devices phone, tablet, car. - * @since 7 - */ - cancel?: () => void; - - /** - * Alignment in the vertical direction. - * @devices phone, tablet, car. - * @since 7 - */ - alignment?: DialogAlignment; - - /** - * Offset of the pop-up window relative to the alignment position. - * @devices phone, tablet, car. - * @since 7 - */ - offset?: { dx: number | string | Resource, dy: number | string | Resource }; - }); -} - -/** - * @devices phone, tablet, car. - * @since 7 - */ -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" + +/** + * The alignment of dialog, + * @devices phone, tablet, car. + * @since 7 + */ +export declare enum DialogAlignment { + /** + * Vertical top alignment. + * @devices phone, tablet, car. + * @since 7 + */ + Top, + + /** + * Align vertically to the center. + * @devices phone, tablet, car. + * @since 7 + */ + Center, + + /** + * Vertical bottom alignment. + * @devices phone, tablet, car. + * @since 7 + */ + Bottom, + + /** + * Default alignment. + * @devices phone, tablet, car. + * @since 7 + */ + Default +} + +/** + * @devices phone, tablet, car. + * @since 7 + */ +interface AlertDialog { + /** + * Invoking method display. + * @devices phone, tablet, car. + * @since 7 + */ + show(value: { + /** + * Title Properties + * @devices phone, tablet, car. + * @since 7 + */ + title?: string | Resource; + + /** + * message Properties + * @devices phone, tablet, car. + * @since 7 + */ + message: string | Resource; + + /** + * Allows users to click the mask layer to exit. + * @devices phone, tablet, car. + * @since 7 + */ + autoCancel?: boolean; + + /** + * Invoke the commit function. + * @devices phone, tablet, car. + * @since 7 + */ + confirm?: { + + /** + * Text content of the confirmation button. + * @devices phone, tablet, car. + * @since 7 + */ + value: string | Resource; + + /** + * Method executed by the callback. + * @devices phone, tablet, car. + * @since 7 + */ + action: () => void; + }; + + /** + * Execute Cancel Function. + * @devices phone, tablet, car. + * @since 7 + */ + cancel?: () => void; + + /** + * Alignment in the vertical direction. + * @devices phone, tablet, car. + * @since 7 + */ + alignment?: DialogAlignment; + + /** + * Offset of the pop-up window relative to the alignment position. + * @devices phone, tablet, car. + * @since 7 + */ + offset?: { dx: number | string | Resource, dy: number | string | Resource }; + } | { + + /** + * Title Properties + * @devices phone, tablet, car. + * @since 7 + */ + title?: string | Resource; + + /** + * message Properties + * @devices phone, tablet, car. + * @since 7 + */ + message: string | Resource; + + /** + * Allows users to click the mask layer to exit. + * @devices phone, tablet, car. + * @since 7 + */ + autoCancel?: boolean; + + /** + * First button. + * @devices phone, tablet, car. + * @since 7 + */ + primaryButton: { + /** + * Text content of the confirmation button. + * @devices phone, tablet, car. + * @since 7 + */ + value: string | Resource; + + /** + * Method executed by the callback. + * @devices phone, tablet, car. + * @since 7 + */ + action: () => void; + }; + + /** + * Second button. + * @devices phone, tablet, car. + * @since 7 + */ + secondaryButton: { + /** + * Text content of the confirmation button. + * @devices phone, tablet, car. + * @since 7 + */ + value: string | Resource; + + /** + * Method executed by the callback. + * @devices phone, tablet, car. + * @since 7 + */ + action: () => void; + }; + + /** + * Execute Cancel Function. + * @devices phone, tablet, car. + * @since 7 + */ + cancel?: () => void; + + /** + * Alignment in the vertical direction. + * @devices phone, tablet, car. + * @since 7 + */ + alignment?: DialogAlignment; + + /** + * Offset of the pop-up window relative to the alignment position. + * @devices phone, tablet, car. + * @since 7 + */ + offset?: { dx: number | string | Resource, dy: number | string | Resource }; + }); +} + +/** + * @devices phone, tablet, car. + * @since 7 + */ +export declare const AlertDialogInterface: AlertDialog; diff --git a/api/@internal/component/ets/badge.d.ts b/api/@internal/component/ets/badge.d.ts index b29e7a7f32..dfd4fdc485 100644 --- a/api/@internal/component/ets/badge.d.ts +++ b/api/@internal/component/ets/badge.d.ts @@ -1,124 +1,124 @@ -/* - * 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, Resource} from "./common" - -/** - * @devices phone, tablet, car. - * @since 7 - */ -declare enum BadgePosition { - /** - * The dot is displayed vertically centered on the right. - * @devices phone, tablet, car. - * @since 7 - */ - RightTop, - - /** - * Dots are displayed in the upper right corner. - * @devices phone, tablet, car. - * @since 7 - */ - Right, - - /** - * The dot is displayed in the left vertical center. - * @devices phone, tablet, car. - * @since 7 - */ - Left -} - -/** - * BadgeStyle object - * @devices phone, tablet, car. - * @since 7 - */ -interface BadgeStyle { - /** - * Text Color - * @devices phone, tablet, car. - * @since 7 - */ - color?: Color | number | string | Resource; - - /** - * Text size. - * @devices phone, tablet, car. - * @since 7 - */ - fontSize?: number | string; - - /** - * Size of a badge. - * @devices phone, tablet, car. - * @since 7 - */ - badgeSize: number | string; - - /** - * Color of the badge. - * @devices phone, tablet, car. - * @since 7 - */ - badgeColor: Color | number | string | Resource; -} - -/** - * @devices phone, tablet, car. - * @since 7 - */ -export declare class BadgeExtend extends BadgeAttribute { -} - -/** - * @devices phone, tablet, car. - * @since 7 - */ -interface Badge extends BadgeAttribute { - /** - * 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. - * count: Set the number of reminder messages. - * style: You can set the style of the Badge component, including the text color, size, dot color, and size. - * @devices phone, tablet, car. - * @since 7 - */ - (value: {count: number, position?: BadgePosition, maxCount?: number, style: BadgeStyle}): Badge; - - /** - * value: Text string of the prompt content. - * 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. - * style: You can set the style of the Badge component, including the text color, size, dot color, and size. - * @devices phone, tablet, car. - * @since 7 - */ - (value: {value: string, position?: BadgePosition, maxCount?: number, style: BadgeStyle}): Badge; -} - -/** - * @devices phone, tablet, car. - * @since 7 - */ -declare class BadgeAttribute extends CommonMethod { -} - -/** - * @devices phone, tablet, car. - * @since 7 - */ +/* + * 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, Resource} from "./common" + +/** + * @devices phone, tablet, car. + * @since 7 + */ +declare enum BadgePosition { + /** + * The dot is displayed vertically centered on the right. + * @devices phone, tablet, car. + * @since 7 + */ + RightTop, + + /** + * Dots are displayed in the upper right corner. + * @devices phone, tablet, car. + * @since 7 + */ + Right, + + /** + * The dot is displayed in the left vertical center. + * @devices phone, tablet, car. + * @since 7 + */ + Left +} + +/** + * BadgeStyle object + * @devices phone, tablet, car. + * @since 7 + */ +interface BadgeStyle { + /** + * Text Color + * @devices phone, tablet, car. + * @since 7 + */ + color?: Color | number | string | Resource; + + /** + * Text size. + * @devices phone, tablet, car. + * @since 7 + */ + fontSize?: number | string; + + /** + * Size of a badge. + * @devices phone, tablet, car. + * @since 7 + */ + badgeSize: number | string; + + /** + * Color of the badge. + * @devices phone, tablet, car. + * @since 7 + */ + badgeColor: Color | number | string | Resource; +} + +/** + * @devices phone, tablet, car. + * @since 7 + */ +export declare class BadgeExtend extends BadgeAttribute { +} + +/** + * @devices phone, tablet, car. + * @since 7 + */ +interface Badge extends BadgeAttribute { + /** + * 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. + * count: Set the number of reminder messages. + * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * @devices phone, tablet, car. + * @since 7 + */ + (value: {count: number, position?: BadgePosition, maxCount?: number, style: BadgeStyle}): Badge; + + /** + * value: Text string of the prompt content. + * 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. + * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * @devices phone, tablet, car. + * @since 7 + */ + (value: {value: string, position?: BadgePosition, maxCount?: number, style: BadgeStyle}): Badge; +} + +/** + * @devices phone, tablet, car. + * @since 7 + */ +declare class BadgeAttribute extends CommonMethod { +} + +/** + * @devices phone, tablet, car. + * @since 7 + */ export declare const BadgeInterface: Badge \ No newline at end of file diff --git a/api/@internal/component/ets/custom_dialog_controller.d.ts b/api/@internal/component/ets/custom_dialog_controller.d.ts index e31974b2b8..d89d70cd07 100644 --- a/api/@internal/component/ets/custom_dialog_controller.d.ts +++ b/api/@internal/component/ets/custom_dialog_controller.d.ts @@ -1,51 +1,51 @@ -/* - * 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"; - -/** - * Use the CustomDialogController class to display the custom pop-up window. - * @devices phone, tablet, car. - * @since 7 - */ -export declare class CustomDialogController { - /** - * The constructor transfers parameter settings. - * @devices phone, tablet, car. - * @since 7 - */ - constructor(value: { - builder: any, cancel?: () => void, - autoCancel?: boolean, - alignment?: DialogAlignment, - offset?: { dx: number | string | Resource, dy: number | string | Resource }, - customStyle?: boolean - }); - - /** - * Display the content of the customized pop-up window. If the content has been displayed, it does not take effect. - * @devices phone, tablet, car. - * @since 7 - */ - open(); - - /** - * Closes the custom pop-up window. If the window is closed, the window does not take effect. - * @devices phone, tablet, car. - * @since 7 - */ - close(); -} +/* + * 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"; + +/** + * Use the CustomDialogController class to display the custom pop-up window. + * @devices phone, tablet, car. + * @since 7 + */ +export declare class CustomDialogController { + /** + * The constructor transfers parameter settings. + * @devices phone, tablet, car. + * @since 7 + */ + constructor(value: { + builder: any, cancel?: () => void, + autoCancel?: boolean, + alignment?: DialogAlignment, + offset?: { dx: number | string | Resource, dy: number | string | Resource }, + customStyle?: boolean + }); + + /** + * Display the content of the customized pop-up window. If the content has been displayed, it does not take effect. + * @devices phone, tablet, car. + * @since 7 + */ + open(); + + /** + * Closes the custom pop-up window. If the window is closed, the window does not take effect. + * @devices phone, tablet, car. + * @since 7 + */ + close(); +} diff --git a/api/@internal/component/ets/datapanel.d.ts b/api/@internal/component/ets/datapanel.d.ts index 700d2805ce..309f5fd967 100644 --- a/api/@internal/component/ets/datapanel.d.ts +++ b/api/@internal/component/ets/datapanel.d.ts @@ -1,58 +1,58 @@ -/* - * 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"; - -/** - * The data panel component is used to display multiple data proportions in a circular proportion chart. - * @devices phone, tablet, car. - * @since 7 - */ -export declare class DataPanelExtend extends DataPanelAttribute { -} - -/** - * @devices phone, tablet, car. - * @since 7 - */ -interface DataPanel extends DataPanelAttribute { - /** - * Return a DataPanel. - * values: Current data value. A maximum of nine data records are supported. - * max: Maximum value of the current data. - * @devices phone, tablet, car. - * @since 7 - */ - (options: {values: number[], max?: number}): DataPanel; -} - -/** - * @devices phone, tablet, car. - * @since 7 - */ -declare class DataPanelAttribute extends CommonMethod { - /** - * Disable the special effect of the data ratio chart. - * @devices phone, tablet, car. - * @since 7 - */ - closeEffect(value: boolean): T; -} - -/** - * @devices phone, tablet, car - * @since 7 - */ -export declare const DataPanelInterface: DataPanel; +/* + * 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"; + +/** + * The data panel component is used to display multiple data proportions in a circular proportion chart. + * @devices phone, tablet, car. + * @since 7 + */ +export declare class DataPanelExtend extends DataPanelAttribute { +} + +/** + * @devices phone, tablet, car. + * @since 7 + */ +interface DataPanel extends DataPanelAttribute { + /** + * Return a DataPanel. + * values: Current data value. A maximum of nine data records are supported. + * max: Maximum value of the current data. + * @devices phone, tablet, car. + * @since 7 + */ + (options: {values: number[], max?: number}): DataPanel; +} + +/** + * @devices phone, tablet, car. + * @since 7 + */ +declare class DataPanelAttribute extends CommonMethod { + /** + * Disable the special effect of the data ratio chart. + * @devices phone, tablet, car. + * @since 7 + */ + closeEffect(value: boolean): T; +} + +/** + * @devices phone, tablet, car + * @since 7 + */ +export declare const DataPanelInterface: DataPanel; diff --git a/api/@internal/component/ets/gauge.d.ts b/api/@internal/component/ets/gauge.d.ts index a277ad5a78..5d957579e8 100644 --- a/api/@internal/component/ets/gauge.d.ts +++ b/api/@internal/component/ets/gauge.d.ts @@ -1,100 +1,100 @@ -/* - * 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"; - -/** - * Data gauge chart component, used to display data as a ring chart. - * @devices phone, tablet, car. - * @since 7 - */ -export declare class GaugeExtend extends GaugeAttribute { -} - -/** - * @devices phone, tablet, car. - * @since 7 - */ -interface Gauge extends GaugeAttribute { - /** - * value:Current data value. - * min: Current Segment Minimum Value - * max: Current Segment Maximum Value - * @devices phone, tablet, car. - * @since 7 - */ - (options: {value: number, min?: number, max?: number}): Gauge; -} - -/** - * @devices phone, tablet, car. - * @since 7 - */ -declare class GaugeAttribute extends CommonMethod { - /** - * Sets the value for the current profile. - * @devices phone, tablet, car. - * @since 7 - */ - value(value: number): T; - - /** - * Set the start angle. Clock 0 is 0 degrees and clockwise is positive. - * @devices phone, tablet, car. - * @since 7 - */ - startAngle(angle: number): T; - - /** - * Sets the end angle position. Clock 0 is 0 degrees and clockwise is positive. - * @devices phone, tablet, car. - * @since 7 - */ - endAngle(angle: number): T; - - /** - * Set the color of the chart. You can set the solid color and segmented gradient color. - * @devices phone, tablet, car. - * @since 7 - */ - colors(colors: Array): T; - - /** - * Sets the thickness of the ring chart. - * @devices phone, tablet, car. - * @since 7 - */ - strokeWidth(length: number): T; - - /** - * Mark points describe the content of the text. - * @devices phone, tablet, car. - * @since 7 - */ - labelTextConfig(markedLabelText: string): T; - - /** - * Color of the marker point description text. - * @devices phone, tablet, car. - * @since 7 - */ - labelColorConfig(markedLabelColor: Color): T; -} - -/** - * @devices phone, tablet, car - * @since 7 - */ +/* + * 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"; + +/** + * Data gauge chart component, used to display data as a ring chart. + * @devices phone, tablet, car. + * @since 7 + */ +export declare class GaugeExtend extends GaugeAttribute { +} + +/** + * @devices phone, tablet, car. + * @since 7 + */ +interface Gauge extends GaugeAttribute { + /** + * value:Current data value. + * min: Current Segment Minimum Value + * max: Current Segment Maximum Value + * @devices phone, tablet, car. + * @since 7 + */ + (options: {value: number, min?: number, max?: number}): Gauge; +} + +/** + * @devices phone, tablet, car. + * @since 7 + */ +declare class GaugeAttribute extends CommonMethod { + /** + * Sets the value for the current profile. + * @devices phone, tablet, car. + * @since 7 + */ + value(value: number): T; + + /** + * Set the start angle. Clock 0 is 0 degrees and clockwise is positive. + * @devices phone, tablet, car. + * @since 7 + */ + startAngle(angle: number): T; + + /** + * Sets the end angle position. Clock 0 is 0 degrees and clockwise is positive. + * @devices phone, tablet, car. + * @since 7 + */ + endAngle(angle: number): T; + + /** + * Set the color of the chart. You can set the solid color and segmented gradient color. + * @devices phone, tablet, car. + * @since 7 + */ + colors(colors: Array): T; + + /** + * Sets the thickness of the ring chart. + * @devices phone, tablet, car. + * @since 7 + */ + strokeWidth(length: number): T; + + /** + * Mark points describe the content of the text. + * @devices phone, tablet, car. + * @since 7 + */ + labelTextConfig(markedLabelText: string): T; + + /** + * Color of the marker point description text. + * @devices phone, tablet, car. + * @since 7 + */ + labelColorConfig(markedLabelColor: Color): T; +} + +/** + * @devices phone, tablet, car + * @since 7 + */ export declare const GaugeInterface: Gauge; \ No newline at end of file diff --git a/api/@internal/component/ets/gesture.d.ts b/api/@internal/component/ets/gesture.d.ts index b0815edca3..0bba272bf1 100644 --- a/api/@internal/component/ets/gesture.d.ts +++ b/api/@internal/component/ets/gesture.d.ts @@ -47,61 +47,61 @@ export declare enum GestureDirection { * @since 7 */ export declare enum PanDirection { - /** - * Default. - * @devices phone, tablet, car. - * @since 7 - */ - None, - - /** - * Sliding horizontally. - * @devices phone, tablet, car. - * @since 7 - */ - Horizontal, - - /** - * Sliding left. - * @devices phone, tablet, car. - * @since 7 - */ - Left, - - /** - * Sliding right. - * @devices phone, tablet, car. - * @since 7 - */ - Right, - - /** - * Sliding Vertical - * @devices phone, tablet, car. - * @since 7 - */ - Vertical, - - /** - * Sliding up. - * @devices phone, tablet, car. - * @since 7 - */ - Up, - - /** - * Sliding Down. - * @devices phone, tablet, car. - * @since 7 - */ - Down, - - /** - * Sliding in all directions. - * @devices phone, tablet, car. - * @since 7 - */ - All + /** + * Default. + * @devices phone, tablet, car. + * @since 7 + */ + None, + + /** + * Sliding horizontally. + * @devices phone, tablet, car. + * @since 7 + */ + Horizontal, + + /** + * Sliding left. + * @devices phone, tablet, car. + * @since 7 + */ + Left, + + /** + * Sliding right. + * @devices phone, tablet, car. + * @since 7 + */ + Right, + + /** + * Sliding Vertical + * @devices phone, tablet, car. + * @since 7 + */ + Vertical, + + /** + * Sliding up. + * @devices phone, tablet, car. + * @since 7 + */ + Up, + + /** + * Sliding Down. + * @devices phone, tablet, car. + * @since 7 + */ + Down, + + /** + * Sliding in all directions. + * @devices phone, tablet, car. + * @since 7 + */ + All } @@ -174,90 +174,150 @@ export declare type GestureType = | RotationGesture | GestureGroup -export interface GestureEvent { +/** + * long press gesture event used in the longpress scenario. + * @devices phone, tablet, car. + * @since 7 + */ +export interface LongPressGestureEvent extends GestureEvent { /** - * Indicates whether an event is triggered repeatedly. This parameter is used in the longpress scenario. + * Indicates whether an event is triggered repeatedly. * @devices phone, tablet, car. * @since 7 */ repeat: boolean; /** - * Gesture event offset X, which is used in the pan gesture triggering scenario. + * 手指信息。 + * @since 8 + */ + fingerInfos: Array; +} + +/** + * pan gesture event used in the pan gesture triggering scenario. + */ +export interface PanGestureEvent extends GestureEvent { + /** + * Gesture event offset X. * @devices phone, tablet, car. * @since 7 */ offsetX: number; /** - * Gesture event offset Y, which is used in the pan gesture triggering scenario. + * Gesture event offset Y. * @devices phone, tablet, car. * @since 7 */ offsetY: number; +} +/** + * pinch gesture event used for triggering the pinch gesture. + * @since 7 + */ +export interface PinchGestureEvent extends GestureEvent { /** - * Scaling ratio, which is used for triggering the pinch gesture. + * Scaling ratio. * @devices phone, tablet, car. * @since 7 */ scale: number; /** - * Rotation angle, which is used to trigger the rotation gesture.. + * X-axis coordinate of the kneading center point, in pixels. * @devices phone, tablet, car. * @since 7 */ - angle: number; + pinchCenterX: number; /** - * Event timestamp. + * Y-axis coordinate of the kneading center point, in pixels. * @devices phone, tablet, car. * @since 7 */ - timestamp: number; + pinchCenterY: number; +} +/** + * rotation gesture event used for triggering the pinch gesture. + * @since 7 + */ +export interface RotationGestureEvent extends GestureEvent { /** - * Indicates whether an event is triggered repeatedly. This parameter is used in the longpress scenario. + * Rotation angle. * @devices phone, tablet, car. * @since 7 */ + angle: number; +} + +/** + * tap gesture event used in tap gesture triggering scenario. + */ +export interface TapGestureEvent extends GestureEvent { + + /** + * 手指信息。 + * @since 8 + */ + fingerInfos: Array; +} + +/** + * 手指信息,在点击和长按场景下触发。 + * @since 8 + */ +export interface FingerInfo { + /** + * finger id. + * @devices phone, tablet, car. + * @since 8 + */ + fingerId: number; + + /** + * Indicates whether an event is triggered repeatedly. This parameter is used in the longpress scenario. + * @devices phone, tablet, car. + * @since 8 + */ globalX: number; /** * Indicates whether an event is triggered repeatedly. This parameter is used in the longpress scenario. * @devices phone, tablet, car. - * @since 7 + * @since 8 */ globalY: number; /** * Horizontal distance from the upper left corner of the touched component. The upper left corner of the component is the origin. * @devices phone, tablet, car. - * @since 7 + * @since 8 */ localX: number; /** * Longitudinal distance from the upper left corner of the touched component. The upper left corner of the component is the origin. * @devices phone, tablet, car. - * @since 7 + * @since 8 */ localY: number; +} +/** + * base event for gesture. + * @devices phone, tablet, car. + * @since 7 + */ +export interface GestureEvent { /** - * X-axis coordinate of the kneading center point, in pixels. - * @devices phone, tablet, car. - * @since 7 - */ - pinchCenterX: number; - - /** - * Y-axis coordinate of the kneading center point, in pixels. + * Event timestamp. * @devices phone, tablet, car. * @since 7 */ - pinchCenterY: number; + timestamp: number; } @@ -281,7 +341,7 @@ interface TapGesture { * @devices phone, tablet, car. * @since 7 */ - onAction(event: (event?: GestureEvent) => void): TapGesture; + onAction(event: (event?: TapGestureEvent) => void): TapGesture; } /** @@ -305,14 +365,14 @@ interface LongPressGesture { * @devices phone, tablet, car. * @since 7 */ - onAction(event: (event?: GestureEvent) => void): LongPressGesture; + onAction(event: (event?: LongPressGestureEvent) => void): LongPressGesture; /** * The LongPress gesture is successfully recognized. When the finger is lifted, the callback is triggered. * @devices phone, tablet, car. * @since 7 */ - onActionEnd(event: (event?: GestureEvent) => void): LongPressGesture; + onActionEnd(event: (event?: LongPressGestureEvent) => void): LongPressGesture; /** * The LongPress gesture is successfully recognized and a callback is triggered when the touch cancel event is received. @@ -373,21 +433,21 @@ interface PanGesture { * @devices phone, tablet, car. * @since 7 */ - onActionStart(event: (event?: GestureEvent) => void): PanGesture; + onActionStart(event: (event?: PanGestureEvent) => void): PanGesture; /** * Callback when the Pan gesture is moving. * @devices phone, tablet, car. * @since 7 */ - onActionUpdate(event: (event?: GestureEvent) => void): PanGesture; + onActionUpdate(event: (event?: PanGestureEvent) => void): PanGesture; /** * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. * @devices phone, tablet, car. * @since 7 */ - onActionEnd(event: (event?: GestureEvent) => void): PanGesture; + onActionEnd(event: (event?: PanGestureEvent) => void): PanGesture; /** * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. @@ -414,21 +474,21 @@ interface PinchGesture { * @devices phone, tablet, car. * @since 7 */ - onActionStart(event: (event?: GestureEvent) => void): PinchGesture; + onActionStart(event: (event?: PinchGestureEvent) => void): PinchGesture; /** * Callback when the Pan gesture is moving. * @devices phone, tablet, car. * @since 7 */ - onActionUpdate(event: (event?: GestureEvent) => void): PinchGesture; + onActionUpdate(event: (event?: PinchGestureEvent) => void): PinchGesture; /** * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. * @devices phone, tablet, car. * @since 7 */ - onActionEnd(event: (event?: GestureEvent) => void): PinchGesture; + onActionEnd(event: (event?: PinchGestureEvent) => void): PinchGesture; /** * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. @@ -455,21 +515,21 @@ interface RotationGesture { * @devices phone, tablet, car. * @since 7 */ - onActionStart(event: (event?: GestureEvent) => void): RotationGesture; + onActionStart(event: (event?: RotationGestureEvent) => void): RotationGesture; /** * Callback when the Pan gesture is moving. * @devices phone, tablet, car. * @since 7 */ - onActionUpdate(event: (event?: GestureEvent) => void): RotationGesture; + onActionUpdate(event: (event?: RotationGestureEvent) => void): RotationGesture; /** * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. * @devices phone, tablet, car. * @since 7 */ - onActionEnd(event: (event?: GestureEvent) => void): RotationGesture; + onActionEnd(event: (event?: RotationGestureEvent) => void): RotationGesture; /** * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. diff --git a/api/@internal/component/ets/gridItem.d.ts b/api/@internal/component/ets/gridItem.d.ts index d2751a1ce8..918b3f0631 100644 --- a/api/@internal/component/ets/gridItem.d.ts +++ b/api/@internal/component/ets/gridItem.d.ts @@ -1,85 +1,85 @@ -/* - * 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"; - -/** - * Mesh container for static fixed-size layout scenarios. - * @devices phone, tablet, car. - * @since 7 - */ -export declare class GridItemExtend extends GridItemAttribute { -} - -/** - * Mesh container for static fixed-size layout scenarios. - * @devices phone, tablet, car. - * @since 7 - */ -interface GridItem extends GridItemAttribute { - /** - * Return to get GridItem. - * @devices phone, tablet, car. - * @since 7 - */ - (): GridItem; -} - -/** - * @devices phone, tablet, car. - * @since 7 - */ -declare class GridItemAttribute extends CommonMethod { - /** - * This parameter specifies the start line number of the current element. - * @devices phone, tablet, car. - * @since 7 - */ - rowStart(value: number): T; - - /** - * Specifies the end line number of the current element. - * @devices phone, tablet, car. - * @since 7 - */ - rowEnd(value: number): T; - - /** - * This parameter specifies the start column number of the current element. - * @devices phone, tablet, car. - * @since 7 - */ - columnStart(value: number): T; - - /** - * This parameter specifies the end column number of the current element. - * @devices phone, tablet, car. - * @since 7 - */ - columnEnd(value: number): T; - - /** - * This parameter specifies whether to recreate the node when the component build is triggered. - * @devices phone, tablet, car. - * @since 7 - */ - forceRebuild(value: boolean): T; -} - -/** - * @devices phone, tablet, car - * @since 7 - */ -export declare const GridItemInterface: GridItem; +/* + * 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"; + +/** + * Mesh container for static fixed-size layout scenarios. + * @devices phone, tablet, car. + * @since 7 + */ +export declare class GridItemExtend extends GridItemAttribute { +} + +/** + * Mesh container for static fixed-size layout scenarios. + * @devices phone, tablet, car. + * @since 7 + */ +interface GridItem extends GridItemAttribute { + /** + * Return to get GridItem. + * @devices phone, tablet, car. + * @since 7 + */ + (): GridItem; +} + +/** + * @devices phone, tablet, car. + * @since 7 + */ +declare class GridItemAttribute extends CommonMethod { + /** + * This parameter specifies the start line number of the current element. + * @devices phone, tablet, car. + * @since 7 + */ + rowStart(value: number): T; + + /** + * Specifies the end line number of the current element. + * @devices phone, tablet, car. + * @since 7 + */ + rowEnd(value: number): T; + + /** + * This parameter specifies the start column number of the current element. + * @devices phone, tablet, car. + * @since 7 + */ + columnStart(value: number): T; + + /** + * This parameter specifies the end column number of the current element. + * @devices phone, tablet, car. + * @since 7 + */ + columnEnd(value: number): T; + + /** + * This parameter specifies whether to recreate the node when the component build is triggered. + * @devices phone, tablet, car. + * @since 7 + */ + forceRebuild(value: boolean): T; +} + +/** + * @devices phone, tablet, car + * @since 7 + */ +export declare const GridItemInterface: GridItem; diff --git a/api/@internal/component/ets/line.d.ts b/api/@internal/component/ets/line.d.ts index 5e861d90bb..7443dfd34b 100644 --- a/api/@internal/component/ets/line.d.ts +++ b/api/@internal/component/ets/line.d.ts @@ -1,74 +1,74 @@ -/* - * 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 {CommonShapeMethod} from "./common"; - -/** - * Line drawing component. - * @devices phone, tablet, car. - * @since 7 - */ -export declare class LineExtend extends LineAttribute { -} - -/** - * Line drawing component. - * @devices phone, tablet, car. - * @since 7 - */ -interface Line extends LineAttribute { - /** - * Returns the line. - * height: Height of the rectangle where the line resides. - * @devices phone, tablet, car. - * @since 7 - */ - (): Line; - /** - * The return value of the parameter is Line. - * width: Width of the rectangle where the line resides.. - * height: Height of the rectangle where the line resides. - * @devices phone, tablet, car. - * @since 7 - */ - (value?: { width?: string | number, height?: string | number }) :Line; -} - -/** - * inheritance CommonShapeMethod. - * @devices phone, tablet, car. - * @since 7 - */ -declare class LineAttribute extends CommonShapeMethod { - /** - * Coordinate of the start point of the line (relative coordinate). - * @devices phone, tablet, car. - * @since 7 - */ - startPoint(value: Array): T; - - /** - * Line end coordinates (relative coordinates). - * @devices phone, tablet, car. - * @since 7 - */ - endPoint(value: Array): T; -} - -/** - * @devices phone, tablet, car - * @since 7 - */ +/* + * 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 {CommonShapeMethod} from "./common"; + +/** + * Line drawing component. + * @devices phone, tablet, car. + * @since 7 + */ +export declare class LineExtend extends LineAttribute { +} + +/** + * Line drawing component. + * @devices phone, tablet, car. + * @since 7 + */ +interface Line extends LineAttribute { + /** + * Returns the line. + * height: Height of the rectangle where the line resides. + * @devices phone, tablet, car. + * @since 7 + */ + (): Line; + /** + * The return value of the parameter is Line. + * width: Width of the rectangle where the line resides.. + * height: Height of the rectangle where the line resides. + * @devices phone, tablet, car. + * @since 7 + */ + (value?: { width?: string | number, height?: string | number }) :Line; +} + +/** + * inheritance CommonShapeMethod. + * @devices phone, tablet, car. + * @since 7 + */ +declare class LineAttribute extends CommonShapeMethod { + /** + * Coordinate of the start point of the line (relative coordinate). + * @devices phone, tablet, car. + * @since 7 + */ + startPoint(value: Array): T; + + /** + * Line end coordinates (relative coordinates). + * @devices phone, tablet, car. + * @since 7 + */ + endPoint(value: Array): T; +} + +/** + * @devices phone, tablet, car + * @since 7 + */ export declare const LineInterface: Line; \ No newline at end of file diff --git a/api/@internal/component/ets/marquee.d.ts b/api/@internal/component/ets/marquee.d.ts index bcbdf4cda5..31115e58bd 100644 --- a/api/@internal/component/ets/marquee.d.ts +++ b/api/@internal/component/ets/marquee.d.ts @@ -1,107 +1,107 @@ -/* - * 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, Resource} from "./common"; -import {FontWeight} from "./text"; - -/** - * @devices phone, tablet - * @since 5 - */ -export declare class MarqueeExtend extends MarqueeAttribute { -} - -/** - * Provides the interface for the marquee attributes. - * @devices phone, tablet - * @since 5 - */ -interface Marquee extends MarqueeAttribute { - /** - * Create marquee. - * @devices phone, tablet - * @since 5 - */ - (value: {start: boolean, step?: number, loop?: number, fromStart?: boolean, src: string}): Marquee; -} - -/** - * Declares marquee properties. - * @devices phone, tablet - * @since 5 - */ -declare class MarqueeAttribute extends CommonMethod { - /** - * Set marquee font Color. - * @devices phone, tablet - * @since 5 - */ - fontColor(value: Color | number | string | Resource): T; - - /** - * Set marquee font size. - * @devices phone, tablet - * @since 5 - */ - fontSize(value: number | string | Resource): T; - - /** - * Set marquee allow scale. - * @devices phone, tablet - * @since 5 - */ - allowScale(value: boolean): T; - - /** - * Set marquee font weight. - * @devices phone, tablet - * @since 5 - */ - fontWeight(value: number | FontWeight | string): T; - - /** - * Set marquee font family. - * @devices phone, tablet - * @since 5 - */ - fontFamily(value: string | Resource): T; - - /** - * Called when scrolling starts. - * @devices phone, tablet - * @since 5 - */ - onStart(event: () => void): T; - - /** - * Called when scrolling to the bottom. - * @devices phone, tablet - * @since 5 - */ - onBounce(event: () => void): T; - - /** - * Called when scrolling is complete. - * @devices phone, tablet - * @since 5 - */ - onFinish(event: () => void): T; -} - -/** - * @devices phone, tablet - * @since 5 - */ -export declare const MarqueeInterface: Marquee; +/* + * 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, Resource} from "./common"; +import {FontWeight} from "./text"; + +/** + * @devices phone, tablet + * @since 5 + */ +export declare class MarqueeExtend extends MarqueeAttribute { +} + +/** + * Provides the interface for the marquee attributes. + * @devices phone, tablet + * @since 5 + */ +interface Marquee extends MarqueeAttribute { + /** + * Create marquee. + * @devices phone, tablet + * @since 5 + */ + (value: {start: boolean, step?: number, loop?: number, fromStart?: boolean, src: string}): Marquee; +} + +/** + * Declares marquee properties. + * @devices phone, tablet + * @since 5 + */ +declare class MarqueeAttribute extends CommonMethod { + /** + * Set marquee font Color. + * @devices phone, tablet + * @since 5 + */ + fontColor(value: Color | number | string | Resource): T; + + /** + * Set marquee font size. + * @devices phone, tablet + * @since 5 + */ + fontSize(value: number | string | Resource): T; + + /** + * Set marquee allow scale. + * @devices phone, tablet + * @since 5 + */ + allowScale(value: boolean): T; + + /** + * Set marquee font weight. + * @devices phone, tablet + * @since 5 + */ + fontWeight(value: number | FontWeight | string): T; + + /** + * Set marquee font family. + * @devices phone, tablet + * @since 5 + */ + fontFamily(value: string | Resource): T; + + /** + * Called when scrolling starts. + * @devices phone, tablet + * @since 5 + */ + onStart(event: () => void): T; + + /** + * Called when scrolling to the bottom. + * @devices phone, tablet + * @since 5 + */ + onBounce(event: () => void): T; + + /** + * Called when scrolling is complete. + * @devices phone, tablet + * @since 5 + */ + onFinish(event: () => void): T; +} + +/** + * @devices phone, tablet + * @since 5 + */ +export declare const MarqueeInterface: Marquee; diff --git a/api/@internal/component/ets/polygon.d.ts b/api/@internal/component/ets/polygon.d.ts index 4ef162caa2..64de83a9e5 100644 --- a/api/@internal/component/ets/polygon.d.ts +++ b/api/@internal/component/ets/polygon.d.ts @@ -1,60 +1,60 @@ -/* - * 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 {CommonShapeMethod} from "./common"; - -/** - * Polygon drawing. - * @devices phone, tablet, car. - * @since 7 - */ -export declare class PolygonExtend extends PolygonAttribute { -} - -/** - * Provides the polygon drawing interface. - * @devices phone, tablet, car. - * @since 7 - */ -interface Polygon extends PolygonAttribute { - /** - * Called when the draw polygon interface is used. - * @devices phone, tablet, car. - * @since 7 - */ - (): Polygon; - - /** - * Called when drawing a polygon. - * @devices phone, tablet, car. - * @since 7 - */ - (value?: { width?: string | number, height?: string | number }): Polygon; -} - -declare class PolygonAttribute extends CommonShapeMethod { - /** - * Called when the vertex coordinate list of a polygon is set. - * @devices phone, tablet, car. - * @since 7 - */ - points(value: Array): T; -} - -/** - * @devices phone, tablet, car. - * @since 7 - */ +/* + * 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 {CommonShapeMethod} from "./common"; + +/** + * Polygon drawing. + * @devices phone, tablet, car. + * @since 7 + */ +export declare class PolygonExtend extends PolygonAttribute { +} + +/** + * Provides the polygon drawing interface. + * @devices phone, tablet, car. + * @since 7 + */ +interface Polygon extends PolygonAttribute { + /** + * Called when the draw polygon interface is used. + * @devices phone, tablet, car. + * @since 7 + */ + (): Polygon; + + /** + * Called when drawing a polygon. + * @devices phone, tablet, car. + * @since 7 + */ + (value?: { width?: string | number, height?: string | number }): Polygon; +} + +declare class PolygonAttribute extends CommonShapeMethod { + /** + * Called when the vertex coordinate list of a polygon is set. + * @devices phone, tablet, car. + * @since 7 + */ + points(value: Array): T; +} + +/** + * @devices phone, tablet, car. + * @since 7 + */ export declare const PolygonInterface: Polygon; \ No newline at end of file diff --git a/api/@internal/component/ets/polyline.d.ts b/api/@internal/component/ets/polyline.d.ts index aff378ab08..899f820fe6 100644 --- a/api/@internal/component/ets/polyline.d.ts +++ b/api/@internal/component/ets/polyline.d.ts @@ -1,64 +1,64 @@ -/* - * 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 {CommonShapeMethod} from "./common"; - -/** - * Discounted drawing. - * @devices phone, tablet, car. - * @since 7 - */ -export declare class PolylineExtend extends PolylineAttribute { -} - -/** - * Provides an interface for drawing polylines. - * @devices phone, tablet, car. - * @since 7 - */ -interface Polyline extends PolylineAttribute { - /** - * Called when using the draw polyline interface. - * @devices phone, tablet, car. - * @since 7 - */ - (): Polyline; - - /** - * Called when using the draw fold. - * @devices phone, tablet, car. - * @since 7 - */ - (value?: { width?: string | number, height?: string | number }): Polyline; -} - -/** - * @devices phone, tablet, car. - * @since 7 - */ -declare class PolylineAttribute extends CommonShapeMethod { - /** - * Called when the polyline is set to pass through the coordinate point list. - * @devices phone, tablet, car. - * @since 7 - */ - points(value: Array): T; -} - -/** - * @devices phone, tablet, car. - * @since 7 - */ +/* + * 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 {CommonShapeMethod} from "./common"; + +/** + * Discounted drawing. + * @devices phone, tablet, car. + * @since 7 + */ +export declare class PolylineExtend extends PolylineAttribute { +} + +/** + * Provides an interface for drawing polylines. + * @devices phone, tablet, car. + * @since 7 + */ +interface Polyline extends PolylineAttribute { + /** + * Called when using the draw polyline interface. + * @devices phone, tablet, car. + * @since 7 + */ + (): Polyline; + + /** + * Called when using the draw fold. + * @devices phone, tablet, car. + * @since 7 + */ + (value?: { width?: string | number, height?: string | number }): Polyline; +} + +/** + * @devices phone, tablet, car. + * @since 7 + */ +declare class PolylineAttribute extends CommonShapeMethod { + /** + * Called when the polyline is set to pass through the coordinate point list. + * @devices phone, tablet, car. + * @since 7 + */ + points(value: Array): T; +} + +/** + * @devices phone, tablet, car. + * @since 7 + */ export declare const PolylineInterface: Polyline; \ No newline at end of file diff --git a/api/@internal/component/ets/rating.d.ts b/api/@internal/component/ets/rating.d.ts index 900fa1ad4e..a52df5c41e 100644 --- a/api/@internal/component/ets/rating.d.ts +++ b/api/@internal/component/ets/rating.d.ts @@ -1,81 +1,81 @@ -/* - * 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"; - -/** - * Scoring bar - * @devices phone, tablet, car. - * @since 7 - */ -export declare class RatingExtend extends RatingAttribute { -} - -/** - * Provides the interface for scoring bars. - * @devices phone, tablet, car. - * @since 7 - */ -interface Rating extends RatingAttribute { - /** - * Called when a score bar is created. - * @devices phone, tablet, car. - * @since 7 - */ - (options?: { rating: number, indicator?: boolean }): Rating; -} - -/** - * @devices phone, tablet, car. - * @since 7 - */ -declare class RatingAttribute extends CommonMethod { - /** - * Called when the total number of stars is set. - * @devices phone, tablet, car. - * @since 7 - */ - stars(value: number): T; - - /** - * Called when the step size of the operation rating. - * @devices phone, tablet, car. - * @since 7 - */ - stepSize(value: number): T; - - /** - * Called when a picture is set. - * @devices phone, tablet, car. - * @since 7 - */ - starStyle(value: { - backgroundUri: string, - foregroundUri: string, - secondaryUri?: string}): T; - - /** - * Called when the star rating of the operation scoring bar changes. - * @devices phone, tablet, car. - * @since 7 - */ - onChange(callback:(value: number) => void): T; -} - -/** - * @devices phone, tablet, car. - * @since 7 - */ +/* + * 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"; + +/** + * Scoring bar + * @devices phone, tablet, car. + * @since 7 + */ +export declare class RatingExtend extends RatingAttribute { +} + +/** + * Provides the interface for scoring bars. + * @devices phone, tablet, car. + * @since 7 + */ +interface Rating extends RatingAttribute { + /** + * Called when a score bar is created. + * @devices phone, tablet, car. + * @since 7 + */ + (options?: { rating: number, indicator?: boolean }): Rating; +} + +/** + * @devices phone, tablet, car. + * @since 7 + */ +declare class RatingAttribute extends CommonMethod { + /** + * Called when the total number of stars is set. + * @devices phone, tablet, car. + * @since 7 + */ + stars(value: number): T; + + /** + * Called when the step size of the operation rating. + * @devices phone, tablet, car. + * @since 7 + */ + stepSize(value: number): T; + + /** + * Called when a picture is set. + * @devices phone, tablet, car. + * @since 7 + */ + starStyle(value: { + backgroundUri: string, + foregroundUri: string, + secondaryUri?: string}): T; + + /** + * Called when the star rating of the operation scoring bar changes. + * @devices phone, tablet, car. + * @since 7 + */ + onChange(callback:(value: number) => void): T; +} + +/** + * @devices phone, tablet, car. + * @since 7 + */ export declare const RatingInterface: Rating; \ No newline at end of file diff --git a/api/@internal/component/ets/refresh.d.ts b/api/@internal/component/ets/refresh.d.ts index 773864ed2a..a3f87902b6 100644 --- a/api/@internal/component/ets/refresh.d.ts +++ b/api/@internal/component/ets/refresh.d.ts @@ -1,105 +1,105 @@ -/* - * 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"; - -/** - * The refresh status of the drop-down refresh. - * @devices phone, tablet, car. - * @since 7 - */ -export declare enum RefreshStatus { - /** - * The refresh status of the drop-down refresh. - * @devices phone, tablet, car. - * @since 7 - */ - Inactive, - - /** - * Drop down, but the drop-down distance is less than the refresh distance. - * @devices phone, tablet, car. - * @since 7 - */ - Drag, - - /** - * The pull-down exceeds the refresh distance. - * @devices phone, tablet, car. - * @since 7 - */ - OverDrag, - - /** - * After the pull-down, it rebounds to the refresh distance and enters the refresh state. - * @devices phone, tablet, car. - * @since 7 - */ - Refresh, - - /** - * After refresh, return to the initial state. - * @devices phone, tablet, car. - * @since 7 - */ - Done, -} - -/** - * @devices phone, tablet, car. - * @since 7 - */ -export declare class RefreshExtend extends RefreshAttribute { -} - -/** - * Provides a pull-down refresh interface. - * @devices phone, tablet, car. - * @since 7 - */ -interface Refresh extends RefreshAttribute { - /** - * Called when the drop-down refresh is set. - * @devices phone, tablet, car. - * @since 7 - */ - (value: {refreshing: boolean,offset?: number | string,friction?: number | string }): Refresh; -} - -/** - * @devices phone, tablet, car. - * @since 7 - */ -declare class RefreshAttribute extends CommonMethod { - /** - * Called when the refresh state changes. - * @devices phone, tablet, car. - * @since 7 - */ - onStateChange(callback: (state: RefreshStatus) => void): T; - - /** - * Called when the refresh state is entered. - * @devices phone, tablet, car. - * @since 7 - */ - onRefreshing(callback: () => void): T; -} - -/** - * @devices phone, tablet, car. - * @since 7 - */ -export declare const RefreshInterface: Refresh; +/* + * 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"; + +/** + * The refresh status of the drop-down refresh. + * @devices phone, tablet, car. + * @since 7 + */ +export declare enum RefreshStatus { + /** + * The refresh status of the drop-down refresh. + * @devices phone, tablet, car. + * @since 7 + */ + Inactive, + + /** + * Drop down, but the drop-down distance is less than the refresh distance. + * @devices phone, tablet, car. + * @since 7 + */ + Drag, + + /** + * The pull-down exceeds the refresh distance. + * @devices phone, tablet, car. + * @since 7 + */ + OverDrag, + + /** + * After the pull-down, it rebounds to the refresh distance and enters the refresh state. + * @devices phone, tablet, car. + * @since 7 + */ + Refresh, + + /** + * After refresh, return to the initial state. + * @devices phone, tablet, car. + * @since 7 + */ + Done, +} + +/** + * @devices phone, tablet, car. + * @since 7 + */ +export declare class RefreshExtend extends RefreshAttribute { +} + +/** + * Provides a pull-down refresh interface. + * @devices phone, tablet, car. + * @since 7 + */ +interface Refresh extends RefreshAttribute { + /** + * Called when the drop-down refresh is set. + * @devices phone, tablet, car. + * @since 7 + */ + (value: {refreshing: boolean,offset?: number | string,friction?: number | string }): Refresh; +} + +/** + * @devices phone, tablet, car. + * @since 7 + */ +declare class RefreshAttribute extends CommonMethod { + /** + * Called when the refresh state changes. + * @devices phone, tablet, car. + * @since 7 + */ + onStateChange(callback: (state: RefreshStatus) => void): T; + + /** + * Called when the refresh state is entered. + * @devices phone, tablet, car. + * @since 7 + */ + onRefreshing(callback: () => void): T; +} + +/** + * @devices phone, tablet, car. + * @since 7 + */ +export declare const RefreshInterface: Refresh; diff --git a/api/@internal/component/ets/search.d.ts b/api/@internal/component/ets/search.d.ts index c46db2a637..8a75a41ec2 100644 --- a/api/@internal/component/ets/search.d.ts +++ b/api/@internal/component/ets/search.d.ts @@ -1,34 +1,34 @@ -/* - * 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, Resource} from "./common"; -import {TextAlign, FontWeight, FontStyle} from "./text"; - -export declare class SearchExtend extends SearchAttribute { -} - -interface Search extends SearchAttribute { - (options?: {value?: string, placeholder?: string, icon?: string}): Search; -} - -declare class SearchAttribute extends CommonMethod { - searchButton(value: string): T; - placeholderColor(value: Color | number | string | Resource): T; - placeholderFont(value: {size: number, weight: FontWeight, family: string, style: FontStyle}): T; - onSubmit(callback:(value: string) => void): T; - onChange(callback:(value: string) => void): T; -} - +/* + * 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, Resource} from "./common"; +import {TextAlign, FontWeight, FontStyle} from "./text"; + +export declare class SearchExtend extends SearchAttribute { +} + +interface Search extends SearchAttribute { + (options?: {value?: string, placeholder?: string, icon?: string}): Search; +} + +declare class SearchAttribute extends CommonMethod { + searchButton(value: string): T; + placeholderColor(value: Color | number | string | Resource): T; + placeholderFont(value: {size: number, weight: FontWeight, family: string, style: FontStyle}): T; + onSubmit(callback:(value: string) => void): T; + onChange(callback:(value: string) => void): T; +} + export declare const SearchInterface: Search \ No newline at end of file diff --git a/api/@internal/component/ets/slider.d.ts b/api/@internal/component/ets/slider.d.ts index 93d0e50c6a..b8a08a403d 100644 --- a/api/@internal/component/ets/slider.d.ts +++ b/api/@internal/component/ets/slider.d.ts @@ -1,155 +1,155 @@ -/* - * 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, Resource} from "./common"; - -/** - * Declare sliderstyle - * @devices phone, tablet, car. - * @since 7 - */ -export declare enum SliderStyle { - /** - * The slider is on the slide rail. - * @devices phone, tablet, car. - * @since 7 - */ - OutSet = 0, - - /** - * The slider is in the slide rail. - * @devices phone, tablet, car. - * @since 7 - */ - InSet, -} - -/** - * Declare SliderChangeMode - * @devices phone, tablet, car. - * @since 7 - */ -export declare enum SliderChangeMode { - /** - * Start dragging the slider. - * @devices phone, tablet, car. - * @since 7 - */ - Begin = 0, - - /** - * Drag the slider. - * @devices phone, tablet, car. - * @since 7 - */ - Moving, - - /** - * End dragging the slider. - * @devices phone, tablet, car. - * @since 7 - */ - End, -} - -/** - * Declare SliderChangeMode. - * @devices phone, tablet, car. - * @since 7 - */ -export declare class SliderExtend extends SliderAttribute { -} - -/** - * Provides an interface for the slide bar component. - * @devices phone, tablet, car. - * @since 7 - */ -interface Slider extends SliderAttribute { - /** - * Called when the slider bar component is used. - * @devices phone, tablet, car. - * @since 7 - */ - (options?: {value?: number,min?: number,max?: number,step?: number,style?: SliderStyle}): Slider; -} - -/** - * @devices phone, tablet, car. - * @since 7 - */ -declare class SliderAttribute extends CommonMethod { - /** - * Called when the slider color of the slider bar is set. - * @devices phone, tablet, car. - * @since 7 - */ - blockColor(value: Color | number | string | Resource): T; - - /** - * Called when the track color of the slider is set. - * @devices phone, tablet, car. - * @since 7 - */ - trackColor(value: Color | number | string | Resource): T; - - /** - * Called when the slider of the slider bar is set to slide over the area color. - * @devices phone, tablet, car. - * @since 7 - */ - selectedColor(value: Color | number | string | Resource): T; - - /** - * Called when the minimum label is set. - * @devices phone, tablet, car. - * @since 7 - */ - minLabel(value: string): T; - - /** - * Called when the maximum label is set. - * @devices phone, tablet, car. - * @since 7 - */ - maxLabel(value: string): T; - - /** - * Called when setting whether to display step size. - * @devices phone, tablet, car - * @since 7 - */ - showSteps(value: boolean): T; - - /** - * Called when the percentage of bubble prompt is set when sliding. - * @devices phone, tablet, car - * @since 7 - */ - showTips(value: boolean): T; - - /** - * Called when the selection value changes. - * @devices phone, tablet, car - * @since 7 - */ - onChange(callback:(value: number, mode: SliderChangeMode) => void): T; -} - -/** - * @devices phone, tablet, car. - * @since 7 - */ -export declare const SliderInterface: Slider; +/* + * 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, Resource} from "./common"; + +/** + * Declare sliderstyle + * @devices phone, tablet, car. + * @since 7 + */ +export declare enum SliderStyle { + /** + * The slider is on the slide rail. + * @devices phone, tablet, car. + * @since 7 + */ + OutSet = 0, + + /** + * The slider is in the slide rail. + * @devices phone, tablet, car. + * @since 7 + */ + InSet, +} + +/** + * Declare SliderChangeMode + * @devices phone, tablet, car. + * @since 7 + */ +export declare enum SliderChangeMode { + /** + * Start dragging the slider. + * @devices phone, tablet, car. + * @since 7 + */ + Begin = 0, + + /** + * Drag the slider. + * @devices phone, tablet, car. + * @since 7 + */ + Moving, + + /** + * End dragging the slider. + * @devices phone, tablet, car. + * @since 7 + */ + End, +} + +/** + * Declare SliderChangeMode. + * @devices phone, tablet, car. + * @since 7 + */ +export declare class SliderExtend extends SliderAttribute { +} + +/** + * Provides an interface for the slide bar component. + * @devices phone, tablet, car. + * @since 7 + */ +interface Slider extends SliderAttribute { + /** + * Called when the slider bar component is used. + * @devices phone, tablet, car. + * @since 7 + */ + (options?: {value?: number,min?: number,max?: number,step?: number,style?: SliderStyle}): Slider; +} + +/** + * @devices phone, tablet, car. + * @since 7 + */ +declare class SliderAttribute extends CommonMethod { + /** + * Called when the slider color of the slider bar is set. + * @devices phone, tablet, car. + * @since 7 + */ + blockColor(value: Color | number | string | Resource): T; + + /** + * Called when the track color of the slider is set. + * @devices phone, tablet, car. + * @since 7 + */ + trackColor(value: Color | number | string | Resource): T; + + /** + * Called when the slider of the slider bar is set to slide over the area color. + * @devices phone, tablet, car. + * @since 7 + */ + selectedColor(value: Color | number | string | Resource): T; + + /** + * Called when the minimum label is set. + * @devices phone, tablet, car. + * @since 7 + */ + minLabel(value: string): T; + + /** + * Called when the maximum label is set. + * @devices phone, tablet, car. + * @since 7 + */ + maxLabel(value: string): T; + + /** + * Called when setting whether to display step size. + * @devices phone, tablet, car + * @since 7 + */ + showSteps(value: boolean): T; + + /** + * Called when the percentage of bubble prompt is set when sliding. + * @devices phone, tablet, car + * @since 7 + */ + showTips(value: boolean): T; + + /** + * Called when the selection value changes. + * @devices phone, tablet, car + * @since 7 + */ + onChange(callback:(value: number, mode: SliderChangeMode) => void): T; +} + +/** + * @devices phone, tablet, car. + * @since 7 + */ +export declare const SliderInterface: Slider; diff --git a/api/@internal/component/ets/textarea.d.ts b/api/@internal/component/ets/textarea.d.ts index c9882b4dd7..0ef359b46b 100644 --- a/api/@internal/component/ets/textarea.d.ts +++ b/api/@internal/component/ets/textarea.d.ts @@ -1,85 +1,85 @@ -/* - * 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, Resource} from "./common"; -import {TextAlign, FontWeight, FontStyle} from "./text"; - -/** - * @devices phone, tablet, car. - * @since 7 - */ -export declare class TextAreaExtend extends TextAreaAttribute { -} - -/** - * Provides an interface for the multi-line text input component. - * @devices phone, tablet, car. - * @since 7 - */ -interface TextArea extends TextAreaAttribute