From 1f7f9e1eab93df8a7566f71fe26b237c464eea95 Mon Sep 17 00:00:00 2001 From: houhaoyu Date: Wed, 22 Dec 2021 15:56:12 +0800 Subject: [PATCH 1/2] houhaoyu@huawei.com update component declaration Signed-off-by: houhaoyu Change-Id: I5952e9e4bb2754053e5efc81c3c91c23d7ad38d5 --- api/@internal/component/ets/action_sheet.d.ts | 226 +++++++++--------- api/@internal/component/ets/alert_dialog.d.ts | 6 +- .../component/ets/bundleInstaller.d.ts | 88 +++---- api/@internal/component/ets/button.d.ts | 9 +- api/@internal/component/ets/calendar.d.ts | 6 +- api/@internal/component/ets/canvas.d.ts | 28 +-- api/@internal/component/ets/circle.d.ts | 2 +- api/@internal/component/ets/common.d.ts | 34 +-- api/@internal/component/ets/counter.d.ts | 2 +- .../ets/custom_dialog_controller.d.ts | 2 +- api/@internal/component/ets/data_panel.d.ts | 5 +- api/@internal/component/ets/ellipse.d.ts | 3 +- api/@internal/component/ets/enums.d.ts | 5 +- api/@internal/component/ets/gauge.d.ts | 2 +- api/@internal/component/ets/gesture.d.ts | 42 ++-- .../component/ets/grid_container.d.ts | 2 +- api/@internal/component/ets/hyperlink.d.ts | 2 +- api/@internal/component/ets/image.d.ts | 1 + api/@internal/component/ets/index.d.ts | 2 - api/@internal/component/ets/inspector.d.ts | 11 +- api/@internal/component/ets/line.d.ts | 1 + api/@internal/component/ets/list.d.ts | 10 +- api/@internal/component/ets/navigation.d.ts | 6 +- api/@internal/component/ets/path.d.ts | 3 +- api/@internal/component/ets/piece.d.ts | 3 +- api/@internal/component/ets/polygon.d.ts | 4 +- api/@internal/component/ets/polyline.d.ts | 7 +- api/@internal/component/ets/progress.d.ts | 10 +- api/@internal/component/ets/radio.d.ts | 5 +- api/@internal/component/ets/rect.d.ts | 25 +- api/@internal/component/ets/scroll_bar.d.ts | 2 +- api/@internal/component/ets/search.d.ts | 6 + api/@internal/component/ets/shape.d.ts | 6 + api/@internal/component/ets/sheet.d.ts | 74 +++--- api/@internal/component/ets/slider.d.ts | 2 + .../component/ets/stateManagement.d.ts | 6 +- api/@internal/component/ets/stepper.d.ts | 9 +- api/@internal/component/ets/swiper.d.ts | 1 + api/@internal/component/ets/tab_content.d.ts | 5 +- api/@internal/component/ets/text_area.d.ts | 27 ++- api/@internal/component/ets/text_input.d.ts | 52 ++-- api/@internal/component/ets/text_picker.d.ts | 2 +- api/@internal/component/ets/toggle.d.ts | 4 +- api/@internal/component/ets/units.d.ts | 3 +- api/@internal/component/ets/video.d.ts | 2 +- api/@internal/component/ets/web.d.ts | 97 -------- api/@internal/component/ets/xcomponent.d.ts | 15 +- api/config/css/cssConfig.json | 6 +- 48 files changed, 413 insertions(+), 458 deletions(-) delete mode 100644 api/@internal/component/ets/web.d.ts diff --git a/api/@internal/component/ets/action_sheet.d.ts b/api/@internal/component/ets/action_sheet.d.ts index f1d2ba8b55..54d279ddb6 100644 --- a/api/@internal/component/ets/action_sheet.d.ts +++ b/api/@internal/component/ets/action_sheet.d.ts @@ -1,113 +1,113 @@ -/* - * 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 { Resource } from "."; - -/** - * The information of sheet. - * @since 8 - */ -export interface SheetInfo { - /** - * Title Properties - * @since 8 - */ - title: string | Resource; - - /** - * Icon Properties. - * @since 8 - */ - icon?: string | Resource; - - /** - * Callback method after the operation. - * @since 8 - */ - action: () => void; -} - -/** - * Declare the ActionSheet - * @since 8 - */ -export declare class ActionSheet { - /** - * Invoking method display. - * @since 8 - */ - static show(value: { - /** - * Title Properties - * @since 8 - */ - title: string | Resource; - - /** - * message Properties - * @since 8 - */ - message: string | Resource; - - /** - * Invoke the commit function. - * @since 8 - */ - confirm?: { - /** - * Text content of the confirmation button. - * @since 8 - */ - value: string | Resource; - - /** - * Method executed by the callback. - * @since 8 - */ - action: () => void; - }; - - /** - * Execute Cancel Function. - * @since 8 - */ - cancel?: () => void; - - /** - * The Array of sheets - * @since 8 - */ - sheets: Array; - - /** - * Allows users to click the mask layer to exit. - * @since 8 - */ - autoCancel?: boolean; - - /** - * Alignment in the vertical direction. - * @since 8 - */ - alignment?: DialogAlignment; - - /** - * Offset of the pop-up window relative to the alignment position. - * @since 8 - */ - offset?: { dx: number | string | Resource; dy: number | string | Resource }; - }); -} +/* + * 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 { Resource } from "."; + +/** + * The information of sheet. + * @since 8 + */ +interface SheetInfo { + /** + * Title Properties + * @since 8 + */ + title: string | Resource; + + /** + * Icon Properties. + * @since 8 + */ + icon?: string | Resource; + + /** + * Callback method after the operation. + * @since 8 + */ + action: () => void; +} + +/** + * Declare the ActionSheet + * @since 8 + */ +export declare class ActionSheet { + /** + * Invoking method display. + * @since 8 + */ + static show(value: { + /** + * Title Properties + * @since 8 + */ + title: string | Resource; + + /** + * message Properties + * @since 8 + */ + message: string | Resource; + + /** + * Invoke the commit function. + * @since 8 + */ + confirm?: { + /** + * Text content of the confirmation button. + * @since 8 + */ + value: string | Resource; + + /** + * Method executed by the callback. + * @since 8 + */ + action: () => void; + }; + + /** + * Execute Cancel Function. + * @since 8 + */ + cancel?: () => void; + + /** + * The Array of sheets + * @since 8 + */ + sheets: Array; + + /** + * Allows users to click the mask layer to exit. + * @since 8 + */ + autoCancel?: boolean; + + /** + * Alignment in the vertical direction. + * @since 8 + */ + alignment?: DialogAlignment; + + /** + * Offset of the pop-up window relative to the alignment position. + * @since 8 + */ + offset?: { dx: number | string | Resource; dy: number | string | Resource }; + }); +} diff --git a/api/@internal/component/ets/alert_dialog.d.ts b/api/@internal/component/ets/alert_dialog.d.ts index 632988ed22..6a017f1979 100644 --- a/api/@internal/component/ets/alert_dialog.d.ts +++ b/api/@internal/component/ets/alert_dialog.d.ts @@ -117,7 +117,7 @@ export declare interface AlertDialogParamWithConfirm extends AlertDialogParam { fontColor?: ResourceColor; /** - * Backgound color of the confirmation button. + * Background color of the confirmation button. * @since 7 */ backgroundColor?: ResourceColor; @@ -149,7 +149,7 @@ export declare interface AlertDialogParamWithButtons extends AlertDialogParam { fontColor?: ResourceColor; /** - * Backgound color of the confirmation button. + * Background color of the confirmation button. * @since 7 */ backgroundColor?: ResourceColor; @@ -179,7 +179,7 @@ export declare interface AlertDialogParamWithButtons extends AlertDialogParam { fontColor?: ResourceColor; /** - * Backgound color of the confirmation button. + * Background color of the confirmation button. * @since 7 */ backgroundColor?: ResourceColor; diff --git a/api/@internal/component/ets/bundleInstaller.d.ts b/api/@internal/component/ets/bundleInstaller.d.ts index c5b36fc124..bcfd16488e 100644 --- a/api/@internal/component/ets/bundleInstaller.d.ts +++ b/api/@internal/component/ets/bundleInstaller.d.ts @@ -1,44 +1,44 @@ -/* - * 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. - */ - -/** - * @name Provides parameters required for installing or uninstalling an application. - * @since 7 - * @SysCap SystemCapability.Appexecfwk - * @permission NA - * @devices phone, tablet, tv, wearable, car - */ -export declare interface InstallParam { - /** - * @default Indicates the user id - * @since 7 - * @SysCap SystemCapability.Appexecfwk - */ - userId: number; - - /** - * @default Indicates the install flag - * @since 7 - * @SysCap SystemCapability.Appexecfwk - */ - installFlag: number; - - /** - * @default Indicates whether the param has data - * @since 7 - * @SysCap SystemCapability.Appexecfwk - */ - isKeepData: boolean; -} +/* + * 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. + */ + +/** + * @name Provides parameters required for installing or uninstalling an application. + * @since 7 + * @SysCap SystemCapability.Appexecfwk + * @permission NA + * @devices phone, tablet, tv, wearable, car + */ +export declare interface InstallParam { + /** + * @default Indicates the user id + * @since 7 + * @SysCap SystemCapability.Appexecfwk + */ + userId: number; + + /** + * @default Indicates the install flag + * @since 7 + * @SysCap SystemCapability.Appexecfwk + */ + installFlag: number; + + /** + * @default Indicates whether the param has data + * @since 7 + * @SysCap SystemCapability.Appexecfwk + */ + isKeepData: boolean; +} diff --git a/api/@internal/component/ets/button.d.ts b/api/@internal/component/ets/button.d.ts index 08b11f64b3..86a5962119 100644 --- a/api/@internal/component/ets/button.d.ts +++ b/api/@internal/component/ets/button.d.ts @@ -13,10 +13,10 @@ * limitations under the License. */ +import { Resource } from '.'; import { CommonMethod } from "./common"; -import { FontWeight,FontStyle } from "./enums"; +import { FontWeight, FontStyle } from "./enums"; import { Length, ResourceColor, ResourceStr } from "./units"; -import { Resource } from "."; /** * Provides a button component. @@ -85,7 +85,7 @@ interface Button extends ButtonAttribute