diff --git a/BUILD.gn b/BUILD.gn index 8386556495fcb4f056eeea3d6c3d224a64de8cb0..1ae0d641a83505ed7e4f9cb32c55e131283c4cce 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -96,9 +96,10 @@ ohos_copy("ets_component") { "api/@internal/component/ets/tab_content.d.ts", "api/@internal/component/ets/tabs.d.ts", "api/@internal/component/ets/text.d.ts", - "api/@internal/component/ets/textPicker.d.ts", - "api/@internal/component/ets/textarea.d.ts", - "api/@internal/component/ets/textinput.d.ts", + "api/@internal/component/ets/text_area.d.ts", + "api/@internal/component/ets/text_clock.d.ts", + "api/@internal/component/ets/text_input.d.ts", + "api/@internal/component/ets/text_picker.d.ts", "api/@internal/component/ets/toggle.d.ts", "api/@internal/component/ets/video.d.ts", "api/@internal/component/ets/web.d.ts", diff --git a/api/@internal/component/ets/ability_component.d.ts b/api/@internal/component/ets/ability_component.d.ts index 9c5cb73a2855dbafa99ee28534ae686c1ce3c07e..e42b3187999703a2f2f440cb6a39049d866aac96 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 cffda349124564c3bbc28f1e150418497b8c4226..e62fcda996945bfb126a0a2d78bd28cde7466589 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 f87e0485b4816e0f0d40d6177156fdda93e47a52..ee366295f90c8303c7f473a67c4e885618d0c409 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 b29e7a7f32f52fa730619900ead5a8f2838a7b01..dfd4fdc485611ff3602f6b68f0895132f6913dc9 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/common.d.ts b/api/@internal/component/ets/common.d.ts index b561748e5da25c61241f9d3ac8434ff7e73c1454..faaec809ee7445867e865e6d377a56a9047b6184 100644 --- a/api/@internal/component/ets/common.d.ts +++ b/api/@internal/component/ets/common.d.ts @@ -13,11 +13,11 @@ * limitations under the License. */ -import {GestureType, GestureMask} from "./gesture" -import {Circle} from "./circle"; -import {Ellipse} from "./ellipse"; -import {Path} from "./path"; -import {Rect} from "./rect"; +import { GestureType, GestureMask } from "./gesture" +import { Circle } from "./circle"; +import { Ellipse } from "./ellipse"; +import { Path } from "./path"; +import { Rect } from "./rect"; /** * Defining Component ClassDecorator @@ -1983,7 +1983,7 @@ export declare class CommonMethod { * @devices phone, tablet, car. * @since 7 */ - size(value: { width?: number | string | Resource, height?: number | string | Resource}): T; + size(value: { width?: number | string | Resource, height?: number | string | Resource }): T; /** * constraint Size: @@ -1991,7 +1991,7 @@ export declare class CommonMethod { * @devices phone, tablet, car. * @since 7 */ - constraintSize(value: { minWidth?: number | string | Resource, maxWidth?: number | string | Resource, minHeight?: number | string | Resource, maxHeight?: number | string | Resource}): T; + constraintSize(value: { minWidth?: number | string | Resource, maxWidth?: number | string | Resource, minHeight?: number | string | Resource, maxHeight?: number | string | Resource }): T; /** * layout Priority @@ -2012,14 +2012,14 @@ export declare class CommonMethod { * @devices phone, tablet, car. * @since 7 */ - padding(value: { top?: number | string | Resource, right?: number | string | Resource, bottom?: number | string | Resource, left?: number | string | Resource} | number | string | Resource): T; + padding(value: { top?: number | string | Resource, right?: number | string | Resource, bottom?: number | string | Resource, left?: number | string | Resource } | number | string | Resource): T; /** * Outer Margin * @devices phone, tablet, car. * @since 7 */ - margin(value: { top?: number | string | Resource, right?: number | string | Resource, bottom?: number | string | Resource, left?: number | string | Resource} | number | string | Resource): T; + margin(value: { top?: number | string | Resource, right?: number | string | Resource, bottom?: number | string | Resource, left?: number | string | Resource } | number | string | Resource): T; /** * Background color @@ -2123,11 +2123,11 @@ export declare class CommonMethod { hideNavigationBackButton(value: boolean): T; /** - * Tool bar + * 通过自定义builder方式创建toolbar。 * @devices phone, tablet, car. - * @since 7 + * @since 8 */ - toolBar(value: object): T; + toolBar(value: { builder: any }): T; /** * Hide tool bar @@ -2757,7 +2757,7 @@ export declare class CommonMethod { * @devices phone, tablet, car. * @since 7 */ - bindMenu(content: {value: string, action: () => void}[]): T; + bindMenu(content: { value: string, action: () => void }[]): T; } /** diff --git a/api/@internal/component/ets/custom_dialog_controller.d.ts b/api/@internal/component/ets/custom_dialog_controller.d.ts index e31974b2b864a97f71d7d5028b3508dd9798a228..d89d70cd07acceaae553e1e4255393dc09a627ea 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 700d2805ce1e0d0155f8483e5fb75456f497625f..309f5fd96741c8d4e1456dd36ad211b170813bef 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 a277ad5a78766ce211d198ad9d7683a15fd4bdfe..5d957579e8902ff6e9867cec52578e26ab8df6e7 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 b0815edca354cc8ff24725395f97b8d98366a805..ab451192759e6c1e6f473b8040224a64343bbd4b 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 } @@ -173,91 +173,187 @@ export declare type GestureType = | PinchGesture | RotationGesture | GestureGroup + | SwipeGesture -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; +} +/** + * swipe事件参数。 + * @since 8 + */ +export interface SwipeGestureEvent extends GestureEvent { /** - * X-axis coordinate of the kneading center point, in pixels. - * @devices phone, tablet, car. - * @since 7 + * Swipe滑动方向。 + * @since 8 */ - pinchCenterX: number; + direction: SwipeDirection; /** - * Y-axis coordinate of the kneading center point, in pixels. + * Swipe滑动速度。 + * @since 8 + */ + velocity: number; + + /** + * Swipe滑动距离。 + * @since 8 + */ + distance: number; +} + +/** + * Swipe滑动方向。 + * @since 8 + */ +export enum SwipeDirection { + Up, + Down, + Left, + Right +} + +/** + * base event for gesture. + * @devices phone, tablet, car. + * @since 7 + */ +export interface GestureEvent { + /** + * Event timestamp. * @devices phone, tablet, car. * @since 7 */ - pinchCenterY: number; + timestamp: number; } @@ -281,7 +377,7 @@ interface TapGesture { * @devices phone, tablet, car. * @since 7 */ - onAction(event: (event?: GestureEvent) => void): TapGesture; + onAction(event: (event?: TapGestureEvent) => void): TapGesture; } /** @@ -305,14 +401,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 +469,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 +510,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 +551,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. @@ -499,6 +595,23 @@ interface GestureGroup { onCancel(event: () => void): GestureGroup; } +/** + * 提供Swipe手势识别器,用于swipe手势场景识别。 + */ +interface SwipeGesture { + /** + * 构造SwipeGesture手势处理器。 + * @since 8 + */ + (options?: { fingers?: number }): SwipeGesture; + + /** + * SwipeGesture手势触发时触发的事件。 + * @since 8 + */ + onAction(event: SwipeGestureEvent): void; +} + /** * @devices phone, tablet, car. * @since 7 @@ -534,3 +647,8 @@ export declare const RotationGestureInterface: RotationGesture; * @since 7 */ export declare const GestureGroupInterface: GestureGroup; + +/** + * @since 8 + */ +export declare const SwipeGestureInterface: SwipeGesture; diff --git a/api/@internal/component/ets/gridItem.d.ts b/api/@internal/component/ets/gridItem.d.ts index d2751a1ce8b01e191e8e7a3164b265156dffca2a..918b3f0631766f8415668a96c25765c3a309b759 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/index.d.ts b/api/@internal/component/ets/index.d.ts index 344a5e393d0bc87289fdb937e12f4aaef26c51c3..bd7f6f4555a89b505f183a5b4341cd66e78b5e6b 100644 --- a/api/@internal/component/ets/index.d.ts +++ b/api/@internal/component/ets/index.d.ts @@ -18,8 +18,6 @@ export * from './action_sheet'; export * from './alert_dialog'; export * from './alphabet_indexer'; export * from './animator'; -export * from './badge'; -export * from './blank'; export * from './button'; export * from './calendar'; export * from './camera'; @@ -71,9 +69,9 @@ export * from './swiper'; export * from './tab_content'; export * from './tabs'; export * from './text'; -export * from './textarea'; -export * from './textinput'; -export * from './textPicker'; +export * from './text_area'; +export * from './text_input'; +export * from './text_picker'; export * from './toggle'; export * from './video'; export * from './progress'; diff --git a/api/@internal/component/ets/line.d.ts b/api/@internal/component/ets/line.d.ts index 5e861d90bbd19ee362ca7a5040c7cfee01827c0f..7443dfd34b009550414449c264926276be53d27a 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 bcbdf4cda5b80ac7c1bfb5f9005dd4d8f8ebee53..31115e58bd65de9690da262b2d4cee0442cac325 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 4ef162caa2924026f71811511c3335acb2bdf76f..64de83a9e54a73111bd03395f66a0d35f79167cd 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 aff378ab08ad36580be19197b606e38e91dc3490..899f820fe65d9f49daf05719e7add5845bf57f9c 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 900fa1ad4e03874d14b27988b7aba6e816bef7cf..a52df5c41eab3ba9542f151d776d8cd08ff54012 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 773864ed2a35ce9ddafec1c7a568d19a39efe5f7..a3f87902b62878c7b5199338391e4216393c8f12 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 c46db2a63779a5f3659308523a75337340913fa2..8a75a41ec24acde2cdcdf26bd7ddd9c724001964 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 93d0e50c6acfa0c395bb3c26574ee29291b0ac4f..b8a08a403d11555b939e86c899b5c135d5b335d8 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/swiper.d.ts b/api/@internal/component/ets/swiper.d.ts index c65a8ff1fc16ffef58af7a111766b5ef166fce5c..9aa64434932fc30123e155a7b6bfa7715e557da4 100644 --- a/api/@internal/component/ets/swiper.d.ts +++ b/api/@internal/component/ets/swiper.d.ts @@ -154,6 +154,13 @@ declare class SwiperAttribute extends CommonMethod { */ displayMode(value: SwiperDisplayMode): T; + /** + * 是否开启通过手势进行切换。 + * @default true + * @since 8 + */ + gestureSwipe(value: boolean): T; + /** * Called when the index value changes. * @devices phone, tablet, car. diff --git a/api/@internal/component/ets/tab_content.d.ts b/api/@internal/component/ets/tab_content.d.ts index a19bf4867b7d53d9f923da8a3875188f5e01d3a2..ca7bd809580df2c52353c35dbc4ad1be0c7f4f3c 100644 --- a/api/@internal/component/ets/tab_content.d.ts +++ b/api/@internal/component/ets/tab_content.d.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import {CommonMethod, Resource} from "./common"; +import { CommonMethod, Resource } from "./common"; /** * Declaration extension. @@ -48,6 +48,12 @@ declare class TabContentAttribute extends CommonMethod { * @since 7 */ tabBar(value: string | Resource | { icon?: string | Resource, text?: string | Resource }): T; + + /** + * 通过builder方式自定义tabbar内容。 + * @since 8 + */ + tabbar(value: { builder: any }): T; } /** diff --git a/api/@internal/component/ets/textarea.d.ts b/api/@internal/component/ets/text_area.d.ts similarity index 96% rename from api/@internal/component/ets/textarea.d.ts rename to api/@internal/component/ets/text_area.d.ts index c9882b4dd7fc7a407c7d8b964caf178d30a98fe9..0ef359b46b76ddbed6e1ba610f621e12ea7ea608 100644 --- a/api/@internal/component/ets/textarea.d.ts +++ b/api/@internal/component/ets/text_area.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