From e40fb2ea01d7084b2d1033789d8223784c1aa47e Mon Sep 17 00:00:00 2001 From: zhongjianfei Date: Tue, 17 Aug 2021 15:59:28 +0800 Subject: [PATCH] zhongjianfei@huawei.com Signed-off-by: zhongjianfei Change-Id: I6a2927d4f1c92241f8335870f9cffe26701595c8 --- BUILD.gn | 118 +- .../component/ets/ability_component.d.ts | 36 + api/@internal/component/ets/alert_dialog.d.ts | 44 + api/@internal/component/ets/animator.d.ts | 66 + api/@internal/component/ets/blank.d.ts | 24 + api/@internal/component/ets/button.d.ts | 44 + api/@internal/component/ets/calendar.d.ts | 133 + api/@internal/component/ets/camera.d.ts | 29 + api/@internal/component/ets/circle.d.ts | 23 + api/@internal/component/ets/column.d.ts | 24 + api/@internal/component/ets/column_split.d.ts | 24 + api/@internal/component/ets/common.d.ts | 526 ++ api/@internal/component/ets/counter.d.ts | 28 + api/@internal/component/ets/divider.d.ts | 30 + api/@internal/component/ets/ellipse.d.ts | 23 + api/@internal/component/ets/flex.d.ts | 25 + api/@internal/component/ets/forEach.d.ts | 21 + api/@internal/component/ets/gesture.d.ts | 113 + api/@internal/component/ets/grid.d.ts | 30 + api/@internal/component/ets/gridItem.d.ts | 32 + .../component/ets/grid_container.d.ts | 37 + api/@internal/component/ets/image.d.ts | 58 + .../component/ets/image_animator.d.ts | 51 + api/@internal/component/ets/index.d.ts | 58 + api/@internal/component/ets/lazyForEach.d.ts | 37 + api/@internal/component/ets/list.d.ts | 70 + api/@internal/component/ets/listItem.d.ts | 32 + api/@internal/component/ets/navigator.d.ts | 38 + .../component/ets/navigatorView.d.ts | 22 + .../component/ets/pageTransition.d.ts | 56 + api/@internal/component/ets/panel.d.ts | 50 + api/@internal/component/ets/path.d.ts | 25 + api/@internal/component/ets/qrcode.d.ts | 25 + api/@internal/component/ets/rect.d.ts | 37 + api/@internal/component/ets/row.d.ts | 24 + api/@internal/component/ets/row_split.d.ts | 24 + api/@internal/component/ets/scroll.d.ts | 52 + api/@internal/component/ets/shape.d.ts | 49 + api/@internal/component/ets/span.d.ts | 39 + api/@internal/component/ets/stack.d.ts | 24 + .../component/ets/stateManagement.d.ts | 111 + api/@internal/component/ets/swiper.d.ts | 46 + api/@internal/component/ets/tab_content.d.ts | 24 + api/@internal/component/ets/tabs.d.ts | 46 + api/@internal/component/ets/text.d.ts | 84 + api/@internal/component/ets/toggle.d.ts | 29 + api/@internal/component/ets/video.d.ts | 40 + api/@internal/ets/index.d.ts | 16 + api/@internal/global.d.ts | 10 +- api/@ohos.animator.d.ts | 133 + api/@system.prompt.d.ts | 12 + api/@system.router.d.ts | 13 + api/config/css/css-json-schema.json | 0 api/config/css/cssConfig.json | 1200 +++- api/config/hml/basic/block.json | 0 api/config/hml/basic/button.json | 277 +- api/config/hml/basic/chart.json | 1046 +++- api/config/hml/basic/divider.json | 557 +- api/config/hml/basic/image-animator.json | 1014 +++- api/config/hml/basic/image.json | 955 +++- api/config/hml/basic/input.json | 1027 +++- api/config/hml/basic/label.json | 517 +- api/config/hml/basic/marquee.json | 579 +- api/config/hml/basic/menu.json | 512 +- api/config/hml/basic/option.json | 566 +- api/config/hml/basic/picker-view.json | 554 +- api/config/hml/basic/picker.json | 974 +++- api/config/hml/basic/piece.json | 1037 +++- api/config/hml/basic/progress.json | 1020 +++- api/config/hml/basic/qrcode.json | 967 +++- api/config/hml/basic/rating.json | 533 +- api/config/hml/basic/richtext.json | 460 +- api/config/hml/basic/search.json | 993 +++- api/config/hml/basic/select.json | 956 +++- api/config/hml/basic/slider.json | 1026 +++- api/config/hml/basic/span.json | 607 +- api/config/hml/basic/switch.json | 950 +++- api/config/hml/basic/text.json | 442 +- api/config/hml/basic/textarea.json | 1059 +++- api/config/hml/basic/toggle.json | 1031 +++- api/config/hml/basic/toolbar-item.json | 1029 +++- api/config/hml/basic/toolbar.json | 8 +- api/config/hml/basic/web.json | 77 + api/config/hml/basic/xcomponent.json | 58 + api/config/hml/canvas/canvas.json | 440 +- api/config/hml/container/badge.json | 1051 +++- api/config/hml/container/dialog.json | 583 +- api/config/hml/container/div.json | 1010 +++- api/config/hml/container/form.json | 950 +++- api/config/hml/container/list-item-group.json | 967 +++- api/config/hml/container/list-item.json | 988 +++- api/config/hml/container/list.json | 1143 +++- api/config/hml/container/panel.json | 669 ++- api/config/hml/container/popup.json | 1118 +++- api/config/hml/container/refresh.json | 605 +- api/config/hml/container/stack.json | 999 +++- api/config/hml/container/stepper-item.json | 1031 +++- api/config/hml/container/stepper.json | 492 +- api/config/hml/container/swiper.json | 1057 +++- api/config/hml/container/tab-bar.json | 971 +++- api/config/hml/container/tab-content.json | 971 +++- api/config/hml/container/tabs.json | 971 +++- api/config/hml/custom/element.json | 0 api/config/hml/grid/grid-col.json | 1051 +++- api/config/hml/grid/grid-container.json | 1088 +++- api/config/hml/grid/grid-row.json | 1015 +++- api/config/hml/hml-json-schema.json | 0 api/config/hml/media/camera.json | 1306 +++++ api/config/hml/media/video.json | 92 +- api/form/action/form-schema.json | 18 + api/form/css/css-json-schema.json | 283 + api/form/css/cssConfig.json | 4981 +++++++++++++++++ api/form/hml/basic/block.json | 54 + api/form/hml/basic/button.json | 400 ++ api/form/hml/basic/calendar.json | 373 ++ api/form/hml/basic/chart.json | 407 ++ api/form/hml/basic/clock.json | 284 + api/form/hml/basic/divider.json | 296 + api/form/hml/basic/image.json | 351 ++ api/form/hml/basic/input.json | 401 ++ api/form/hml/basic/progress.json | 363 ++ api/form/hml/basic/span.json | 281 + api/form/hml/basic/text.json | 313 ++ api/form/hml/container/badge.json | 417 ++ api/form/hml/container/div.json | 330 ++ api/form/hml/container/list-item.json | 380 ++ api/form/hml/container/list.json | 491 ++ api/form/hml/container/stack.json | 267 + api/form/hml/container/swiper.json | 454 ++ api/form/hml/custom/element.json | 46 + api/form/hml/hml-json-schema.json | 266 + api/phone/@internal/console.d.ts | 10 +- api/phone/@internal/global.d.ts | 18 + api/phone/@internal/viewmodel.d.ts | 688 ++- api/phone/@system.prompt.d.ts | 6 + 135 files changed, 53395 insertions(+), 4147 deletions(-) mode change 100755 => 100644 BUILD.gn create mode 100644 api/@internal/component/ets/ability_component.d.ts create mode 100644 api/@internal/component/ets/alert_dialog.d.ts create mode 100644 api/@internal/component/ets/animator.d.ts create mode 100644 api/@internal/component/ets/blank.d.ts create mode 100644 api/@internal/component/ets/button.d.ts create mode 100644 api/@internal/component/ets/calendar.d.ts create mode 100644 api/@internal/component/ets/camera.d.ts create mode 100644 api/@internal/component/ets/circle.d.ts create mode 100644 api/@internal/component/ets/column.d.ts create mode 100644 api/@internal/component/ets/column_split.d.ts create mode 100644 api/@internal/component/ets/common.d.ts create mode 100644 api/@internal/component/ets/counter.d.ts create mode 100644 api/@internal/component/ets/divider.d.ts create mode 100644 api/@internal/component/ets/ellipse.d.ts create mode 100644 api/@internal/component/ets/flex.d.ts create mode 100644 api/@internal/component/ets/forEach.d.ts create mode 100644 api/@internal/component/ets/gesture.d.ts create mode 100644 api/@internal/component/ets/grid.d.ts create mode 100644 api/@internal/component/ets/gridItem.d.ts create mode 100644 api/@internal/component/ets/grid_container.d.ts create mode 100644 api/@internal/component/ets/image.d.ts create mode 100644 api/@internal/component/ets/image_animator.d.ts create mode 100644 api/@internal/component/ets/index.d.ts create mode 100644 api/@internal/component/ets/lazyForEach.d.ts create mode 100644 api/@internal/component/ets/list.d.ts create mode 100644 api/@internal/component/ets/listItem.d.ts create mode 100644 api/@internal/component/ets/navigator.d.ts create mode 100644 api/@internal/component/ets/navigatorView.d.ts create mode 100644 api/@internal/component/ets/pageTransition.d.ts create mode 100644 api/@internal/component/ets/panel.d.ts create mode 100644 api/@internal/component/ets/path.d.ts create mode 100644 api/@internal/component/ets/qrcode.d.ts create mode 100644 api/@internal/component/ets/rect.d.ts create mode 100644 api/@internal/component/ets/row.d.ts create mode 100644 api/@internal/component/ets/row_split.d.ts create mode 100644 api/@internal/component/ets/scroll.d.ts create mode 100644 api/@internal/component/ets/shape.d.ts create mode 100644 api/@internal/component/ets/span.d.ts create mode 100644 api/@internal/component/ets/stack.d.ts create mode 100644 api/@internal/component/ets/stateManagement.d.ts create mode 100644 api/@internal/component/ets/swiper.d.ts create mode 100644 api/@internal/component/ets/tab_content.d.ts create mode 100644 api/@internal/component/ets/tabs.d.ts create mode 100644 api/@internal/component/ets/text.d.ts create mode 100644 api/@internal/component/ets/toggle.d.ts create mode 100644 api/@internal/component/ets/video.d.ts create mode 100644 api/@internal/ets/index.d.ts mode change 100755 => 100644 api/@internal/global.d.ts create mode 100644 api/@ohos.animator.d.ts mode change 100755 => 100644 api/@system.prompt.d.ts mode change 100755 => 100644 api/@system.router.d.ts mode change 100755 => 100644 api/config/css/css-json-schema.json mode change 100755 => 100644 api/config/css/cssConfig.json mode change 100755 => 100644 api/config/hml/basic/block.json mode change 100755 => 100644 api/config/hml/basic/button.json mode change 100755 => 100644 api/config/hml/basic/chart.json mode change 100755 => 100644 api/config/hml/basic/divider.json mode change 100755 => 100644 api/config/hml/basic/image-animator.json mode change 100755 => 100644 api/config/hml/basic/image.json mode change 100755 => 100644 api/config/hml/basic/input.json mode change 100755 => 100644 api/config/hml/basic/label.json mode change 100755 => 100644 api/config/hml/basic/marquee.json mode change 100755 => 100644 api/config/hml/basic/menu.json mode change 100755 => 100644 api/config/hml/basic/option.json mode change 100755 => 100644 api/config/hml/basic/picker-view.json mode change 100755 => 100644 api/config/hml/basic/picker.json mode change 100755 => 100644 api/config/hml/basic/piece.json mode change 100755 => 100644 api/config/hml/basic/progress.json mode change 100755 => 100644 api/config/hml/basic/qrcode.json mode change 100755 => 100644 api/config/hml/basic/rating.json mode change 100755 => 100644 api/config/hml/basic/richtext.json mode change 100755 => 100644 api/config/hml/basic/search.json mode change 100755 => 100644 api/config/hml/basic/select.json mode change 100755 => 100644 api/config/hml/basic/slider.json mode change 100755 => 100644 api/config/hml/basic/span.json mode change 100755 => 100644 api/config/hml/basic/switch.json mode change 100755 => 100644 api/config/hml/basic/text.json mode change 100755 => 100644 api/config/hml/basic/textarea.json mode change 100755 => 100644 api/config/hml/basic/toggle.json mode change 100755 => 100644 api/config/hml/basic/toolbar-item.json mode change 100755 => 100644 api/config/hml/basic/toolbar.json create mode 100644 api/config/hml/basic/web.json create mode 100644 api/config/hml/basic/xcomponent.json mode change 100755 => 100644 api/config/hml/canvas/canvas.json mode change 100755 => 100644 api/config/hml/container/badge.json mode change 100755 => 100644 api/config/hml/container/dialog.json mode change 100755 => 100644 api/config/hml/container/div.json mode change 100755 => 100644 api/config/hml/container/form.json mode change 100755 => 100644 api/config/hml/container/list-item-group.json mode change 100755 => 100644 api/config/hml/container/list-item.json mode change 100755 => 100644 api/config/hml/container/list.json mode change 100755 => 100644 api/config/hml/container/panel.json mode change 100755 => 100644 api/config/hml/container/popup.json mode change 100755 => 100644 api/config/hml/container/refresh.json mode change 100755 => 100644 api/config/hml/container/stack.json mode change 100755 => 100644 api/config/hml/container/stepper-item.json mode change 100755 => 100644 api/config/hml/container/stepper.json mode change 100755 => 100644 api/config/hml/container/swiper.json mode change 100755 => 100644 api/config/hml/container/tab-bar.json mode change 100755 => 100644 api/config/hml/container/tab-content.json mode change 100755 => 100644 api/config/hml/container/tabs.json mode change 100755 => 100644 api/config/hml/custom/element.json mode change 100755 => 100644 api/config/hml/grid/grid-col.json mode change 100755 => 100644 api/config/hml/grid/grid-container.json mode change 100755 => 100644 api/config/hml/grid/grid-row.json mode change 100755 => 100644 api/config/hml/hml-json-schema.json create mode 100644 api/config/hml/media/camera.json mode change 100755 => 100644 api/config/hml/media/video.json create mode 100644 api/form/action/form-schema.json create mode 100644 api/form/css/css-json-schema.json create mode 100644 api/form/css/cssConfig.json create mode 100644 api/form/hml/basic/block.json create mode 100644 api/form/hml/basic/button.json create mode 100644 api/form/hml/basic/calendar.json create mode 100644 api/form/hml/basic/chart.json create mode 100644 api/form/hml/basic/clock.json create mode 100644 api/form/hml/basic/divider.json create mode 100644 api/form/hml/basic/image.json create mode 100644 api/form/hml/basic/input.json create mode 100644 api/form/hml/basic/progress.json create mode 100644 api/form/hml/basic/span.json create mode 100644 api/form/hml/basic/text.json create mode 100644 api/form/hml/container/badge.json create mode 100644 api/form/hml/container/div.json create mode 100644 api/form/hml/container/list-item.json create mode 100644 api/form/hml/container/list.json create mode 100644 api/form/hml/container/stack.json create mode 100644 api/form/hml/container/swiper.json create mode 100644 api/form/hml/custom/element.json create mode 100644 api/form/hml/hml-json-schema.json mode change 100755 => 100644 api/phone/@internal/console.d.ts mode change 100755 => 100644 api/phone/@internal/global.d.ts mode change 100755 => 100644 api/phone/@internal/viewmodel.d.ts mode change 100755 => 100644 api/phone/@system.prompt.d.ts diff --git a/BUILD.gn b/BUILD.gn old mode 100755 new mode 100644 index 954f8e873d..13f1954634 --- a/BUILD.gn +++ b/BUILD.gn @@ -13,6 +13,111 @@ import("//build/ohos.gni") +ohos_copy("ets_internal_api") { + sources = [ + "api/@internal/ets/index.d.ts", + "api/@internal/global.d.ts", + ] + outputs = [ target_out_dir + "/$target_name/{{source_file_part}}" ] + module_source_dir = target_out_dir + "/$target_name" + module_install_name = "" +} + +ohos_copy("ets_component") { + sources = [ + "api/@internal/component/ets/ability_component.d.ts", + "api/@internal/component/ets/alert_dialog.d.ts", + "api/@internal/component/ets/animator.d.ts", + "api/@internal/component/ets/blank.d.ts", + "api/@internal/component/ets/button.d.ts", + "api/@internal/component/ets/calendar.d.ts", + "api/@internal/component/ets/camera.d.ts", + "api/@internal/component/ets/circle.d.ts", + "api/@internal/component/ets/column.d.ts", + "api/@internal/component/ets/column_split.d.ts", + "api/@internal/component/ets/common.d.ts", + "api/@internal/component/ets/counter.d.ts", + "api/@internal/component/ets/divider.d.ts", + "api/@internal/component/ets/ellipse.d.ts", + "api/@internal/component/ets/flex.d.ts", + "api/@internal/component/ets/forEach.d.ts", + "api/@internal/component/ets/gesture.d.ts", + "api/@internal/component/ets/grid.d.ts", + "api/@internal/component/ets/gridItem.d.ts", + "api/@internal/component/ets/grid_container.d.ts", + "api/@internal/component/ets/image.d.ts", + "api/@internal/component/ets/image_animator.d.ts", + "api/@internal/component/ets/index.d.ts", + "api/@internal/component/ets/list.d.ts", + "api/@internal/component/ets/listItem.d.ts", + "api/@internal/component/ets/navigator.d.ts", + "api/@internal/component/ets/navigatorView.d.ts", + "api/@internal/component/ets/pageTransition.d.ts", + "api/@internal/component/ets/panel.d.ts", + "api/@internal/component/ets/path.d.ts", + "api/@internal/component/ets/qrcode.d.ts", + "api/@internal/component/ets/rect.d.ts", + "api/@internal/component/ets/row.d.ts", + "api/@internal/component/ets/row_split.d.ts", + "api/@internal/component/ets/scroll.d.ts", + "api/@internal/component/ets/shape.d.ts", + "api/@internal/component/ets/span.d.ts", + "api/@internal/component/ets/stack.d.ts", + "api/@internal/component/ets/stateManagement.d.ts", + "api/@internal/component/ets/swiper.d.ts", + "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/video.d.ts", + ] + outputs = [ target_out_dir + "/$target_name/{{source_file_part}}" ] + module_source_dir = target_out_dir + "/$target_name" + module_install_name = "" +} + +ohos_copy("common_api") { + sources = [ + "api/phone/@ohos.account.distributedaccount.d.ts", + "api/phone/@ohos.batteryinfo.d.ts", + "api/phone/@ohos.brightness.d.ts", + "api/phone/@ohos.bundle_mgr.d.ts", + "api/phone/@ohos.commonevent.d.ts", + "api/phone/@ohos.data.distributeddata.d.ts", + "api/phone/@ohos.data.storage.d.ts", + "api/phone/@ohos.deviceinfo.d.ts", + "api/phone/@ohos.distributedHardware.deviceManager.d.ts", + "api/phone/@ohos.feature_ability.d.ts", + "api/phone/@ohos.fileio.d.ts", + "api/phone/@ohos.intl.d.ts", + "api/phone/@ohos.multimedia.audio.d.ts", + "api/phone/@ohos.multimedia.media.d.ts", + "api/phone/@ohos.napi_ability_manager.d.ts", + "api/phone/@ohos.resmgr.d.ts", + "api/phone/@ohos.systemparameter.d.ts", + "api/phone/@ohos.systemtime.d.ts", + "api/phone/@ohos.telephony.call.d.ts", + "api/phone/@ohos.telephony.data.d.ts", + "api/phone/@ohos.telephony.observer.d.ts", + "api/phone/@ohos.telephony.radio.d.ts", + "api/phone/@ohos.telephony.sim.d.ts", + "api/phone/@ohos.telephony.sms.d.ts", + "api/phone/@ohos.update.d.ts", + "api/phone/@ohos.wifi.d.ts", + "api/phone/@ohos.window.d.ts", + "api/phone/@system.device.d.ts", + "api/phone/@system.prompt.d.ts", + "api/phone/@system.router.d.ts", + "api/phone/app", + "api/phone/basic.d.ts", + "api/phone/commonevent", + "api/phone/data", + "api/phone/@ohos.process.d.ts", + ] + outputs = [ target_out_dir + "/$target_name/{{source_file_part}}" ] + module_source_dir = target_out_dir + "/$target_name" + module_install_name = "" +} + ohos_copy("ace_platform") { sources = [ "api/config", @@ -21,4 +126,15 @@ ohos_copy("ace_platform") { outputs = [ target_out_dir + "/$target_name/{{source_file_part}}" ] module_source_dir = target_out_dir + "/$target_name" module_install_name = "" -} \ No newline at end of file +} + +ohos_copy("form_declaration") { + sources = [ + "api/form/action", + "api/form/css", + "api/form/hml", + ] + outputs = [ target_out_dir + "/$target_name/{{source_file_part}}" ] + module_source_dir = target_out_dir + "/$target_name" + module_install_name = "" +} diff --git a/api/@internal/component/ets/ability_component.d.ts b/api/@internal/component/ets/ability_component.d.ts new file mode 100644 index 0000000000..893b60b8ff --- /dev/null +++ b/api/@internal/component/ets/ability_component.d.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {CommonMethod} from "./common"; +import {Want} from "../../../ability/want"; + +export declare class AbilityController { + constructor(); + startAbility(value: Want); + performBackPress(); + getStackCount(); +} + +interface AbilityComponent extends CommonMethod { + (value: { want: Want, controller: AbilityController }): AbilityComponent; + + onReady(event: () => void): AbilityComponent; + onDestroy(event: () => void): AbilityComponent; + onAbilityCreated(event: (name: string) => void): AbilityComponent; + onAbilityMovedFront(event: () => void): AbilityComponent; + onAbilityWillRemove(event: () => void): AbilityComponent; +} + +export declare const AbilityComponentInterface: AbilityComponent; diff --git a/api/@internal/component/ets/alert_dialog.d.ts b/api/@internal/component/ets/alert_dialog.d.ts new file mode 100644 index 0000000000..0c8d8752fe --- /dev/null +++ b/api/@internal/component/ets/alert_dialog.d.ts @@ -0,0 +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. + */ + +import {CommonMethod} from "./common" + +interface AlertDialog extends CommonMethod { + show(value: { + title?: string; + message: string; + autoCancel?: boolean; + confirm?: { + value: string; + action: () => void; + }; + cancel?: () => void; + } | { + title?: string; + message: string; + autoCancel?: boolean; + primaryButton: { + value: string; + action: () => void; + }; + secondaryButton: { + value: string; + action: () => void; + }; + cancel?: () => void; + }); +} + +export declare const AlertDialogInterface: AlertDialog; diff --git a/api/@internal/component/ets/animator.d.ts b/api/@internal/component/ets/animator.d.ts new file mode 100644 index 0000000000..5b2b585be9 --- /dev/null +++ b/api/@internal/component/ets/animator.d.ts @@ -0,0 +1,66 @@ +/* + * 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, AnimationStatus, Curve, FillMode, PlayMode} from "./common"; + +export declare class SpringProp { + constructor(mass: number, stiffness: number, damping: number): SpringProp; +} + +export declare class SpringMotion { + constructor(start: number, end: number, velocity: number, prop: SpringProp): SpringMotion; +} + +export declare class FrictionMotion { + constructor(friction: number, position: number, velocity: number): FrictionMotion; +} + +export declare class ScrollMotion { + constructor(position: number, velocity: number, min: number, max: number, prop: SpringProp): ScrollMotion; +} + +interface Animator extends CommonMethod { + (value: string): Animator; + + state(value: AnimationStatus): Animator; + + duration(value: number): Animator; + + curve(value: Curve): Animator; + + delay(value: number): Animator; + + fillMode(value: FillMode): Animator; + + iterations(value: number): Animator; + + playMode(value: PlayMode): Animator; + + motion(value: Motion): Animator; + + onStart(event: () => void): Animator; + + onPause(event: () => void): Animator; + + onRepeat(event: () => void): Animator; + + onCancel(event: () => void): Animator; + + onFinish(event: () => void): Animator; + + onFrame(event: (value: number) => void): Animator; +} + +export declare const AnimatorInterface: Animator; \ No newline at end of file diff --git a/api/@internal/component/ets/blank.d.ts b/api/@internal/component/ets/blank.d.ts new file mode 100644 index 0000000000..9d614c21f4 --- /dev/null +++ b/api/@internal/component/ets/blank.d.ts @@ -0,0 +1,24 @@ +/* + * 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" + +interface Blank extends CommonMethod { + (min?: number | string): Blank; + + color(value: Color | number | string): Blank; +} + +export declare const BlankInterface: Blank \ No newline at end of file diff --git a/api/@internal/component/ets/button.d.ts b/api/@internal/component/ets/button.d.ts new file mode 100644 index 0000000000..e1c1d58f38 --- /dev/null +++ b/api/@internal/component/ets/button.d.ts @@ -0,0 +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. + */ + +import {CommonMethod, Color} from "./common" +import {FontWeight} from "./text" + +export declare enum ButtonType { + Capsule, + Circle, + Arc, + Normal +} + +interface Button extends CommonMethod