diff --git a/CommonEventAndNotification/AlarmClock/AppScope/app.json5 b/CommonEventAndNotification/AlarmClock/AppScope/app.json5 deleted file mode 100644 index 00ff99ff66e6427ede10ea6cc010542e86e18871..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/AppScope/app.json5 +++ /dev/null @@ -1,10 +0,0 @@ -{ - "app": { - "bundleName": "com.huawei.alarmclock", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name" - } -} diff --git a/CommonEventAndNotification/AlarmClock/AppScope/resources/base/element/string.json b/CommonEventAndNotification/AlarmClock/AppScope/resources/base/element/string.json deleted file mode 100644 index 0135ac818a531d0adc91a4f9f9d765deed56c748..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "AlarmClock" - } - ] -} diff --git a/CommonEventAndNotification/AlarmClock/AppScope/resources/base/media/app_icon.png b/CommonEventAndNotification/AlarmClock/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/CommonEventAndNotification/AlarmClock/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/CommonEventAndNotification/AlarmClock/LICENSE b/CommonEventAndNotification/AlarmClock/LICENSE deleted file mode 100644 index 381eb507bc1eef9b5158e496dedab769e810b657..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/LICENSE +++ /dev/null @@ -1,78 +0,0 @@ - Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. - - 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. - -Apache License, Version 2.0 -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: -1.You must give any other recipients of the Work or Derivative Works a copy of this License; and -2.You must cause any modified files to carry prominent notices stating that You changed the files; and -3.You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and -4.If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. - -You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/README.md b/CommonEventAndNotification/AlarmClock/README.md deleted file mode 100644 index 3e1b62f2214c3dc271cc7d8528fd3d3e04ced1b2..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/README.md +++ /dev/null @@ -1,406 +0,0 @@ -# 闹钟(ArkTS) - -## 介绍 - -基于ArkTS的声明式开发范式及OpenHarmony的后台代理提醒能力,实现简单的闹钟提醒功能。本篇Codelab实现如下功能: - -1. 展示指针表盘或数字时间。 -2. 添加、修改和删除闹钟。 -3. 展示闹钟列表,并可打开和关闭单个闹钟。 -4. 闹钟到设定的时间后弹出提醒。 -5. 将闹钟的定时数据保存到轻量级数据库。 - -最终效果图如图所示: - -![](figures/AlarmClock.gif) - -### 相关概念 - -- [Canvas](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/arkui-ts/ts-components-canvas-canvas.md):提供画布组件,用于自定义绘制图形。 - -- [CanvasRenderingContext2D](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/arkui-ts/ts-canvasrenderingcontext2d.md):使用RenderingContext在Canvas组件上进行绘制,绘制对象可以是矩形、文本、图片等。 - -- 后台代理提醒:开发应用时,开发者可以调用后台提醒发布的接口创建定时提醒,包括倒计时、日历、闹钟三种提醒类型。使用后台代理提醒能力后,应用可以被冻结或退出,计时和弹出提醒的功能将被后台系统服务代理。本应用中主要使用到后台代理提醒的两个接口: - -- publishReminder - - 发布一个后台代理提醒,使用callback方式实现异步调用,该方法需要申请通知弹窗Notification.requestEnableNotification后才能调用。 - -- cancelReminder - - 取消指定id的提醒,使用callback方式实现异步调用。 - -> ![](public_sys-resources/icon-note.gif) **说明:** -> 本篇Codelab需要在module.json5中配置如下权限: -> -> ```typescript -> "reqPermissions": [ -> { -> "name": "ohos.permission.PUBLISH_AGENT_REMINDER" -> } -> ] -> ``` - -## 环境搭建 - -### 软件要求 - -- [DevEco Studio](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/start-overview.md#%E5%B7%A5%E5%85%B7%E5%87%86%E5%A4%87)版本:DevEco Studio 3.1 Beta2及以上版本。 -- OpenHarmony SDK版本:API version 9及以上版本。 - -### 硬件要求 - -- 开发板类型:[润和RK3568开发板](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-appendix-rk3568.md)。 -- OpenHarmony系统:3.2 Release及以上版本。 - -### 环境搭建 - -完成本篇Codelab我们首先要完成开发环境的搭建,本示例以**RK3568**开发板为例,参照以下步骤进行: - -1. [获取OpenHarmony系统版本](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/get-code/sourcecode-acquire.md#%E8%8E%B7%E5%8F%96%E6%96%B9%E5%BC%8F3%E4%BB%8E%E9%95%9C%E5%83%8F%E7%AB%99%E7%82%B9%E8%8E%B7%E5%8F%96):标准系统解决方案(二进制)。以以3.2 Release版本为例: - - ![](figures/zh-cn_image_0000001405854998.png) - -2. 搭建烧录环境。 - - 1. [完成DevEco Device Tool的安装](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-ide-env-win.md) - 2. [完成RK3568开发板的烧录](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-ide-3568-burn.md) - -3. 搭建开发环境。 - - 1. 开始前请参考[工具准备](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/start-overview.md#%E5%B7%A5%E5%85%B7%E5%87%86%E5%A4%87),完成DevEco Studio的安装和开发环境配置。 - 2. 开发环境配置完成后,请参考[使用工程向导](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/start-with-ets-stage.md#创建ets工程)创建工程(模板选择“Empty Ability”)。 - 3. 工程创建完成后,选择使用[真机进行调测](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/start-with-ets-stage.md#使用真机运行应用)。 - -## 代码结构解读 - -本篇Codelab只对核心代码进行讲解,完整代码可以直接从gitee获取。 - -``` -├──entry/src/main/ets // 代码区 -│ ├──common -│ │ ├──bean -│ │ │ ├──AlarmItemBean.ets // 闹钟属性类 -│ │ │ ├──AlarmSettingBean.ets // 闹钟设置属性类 -│ │ │ └──ReminderItemBean.ets // 后台提醒属性类 -│ │ ├──constants -│ │ │ ├──AlarmSettingType.ets // 闹钟设置类型枚举 -│ │ │ ├──CommonConstants.ets // 公共常量类 -│ │ │ ├──DetailConstant.ets // 详情页常量类 -│ │ │ └──MainConstant.ets // 首页常量类 -│ │ └──utils -│ │ ├──DataTypeUtils.ets // 数据类型工具类 -│ │ └──DimensionUtil.ets // 屏幕适配工具类 -│ ├──entryability -│ │ └──EntryAbility.ets // 程序入口类 -│ ├──model -│ │ ├──database -│ │ │ ├──PreferencesHandler.ets // 轻量级数据库操作类 -│ │ │ └──PreferencesListener.ets // 轻量级数据库回调接口 -│ │ └──ReminderService.ets // 系统后台提醒服务类 -│ │──pages -│ │ ├──DetailIndex.ets // 详情页入口文件 -│ │ └──MainIndex.ets // 主页入口文件 -│ │──view -│ │ ├──Detail -│ │ │ ├──dialog -│ │ │ │ ├──CommonDialog.ets // 公共Dialog组件 -│ │ │ │ ├──DurationDialog.ets // 闹铃时长选择Dialog组件 -│ │ │ │ ├──IntervalDialog.ets // 闹铃间隔选择Dialog组件 -│ │ │ │ ├──RenameDialog.ets // 闹铃名设置Dialog组件 -│ │ │ │ └──RepeatDialog.ets // 闹铃重复设置Dialog组件 -│ │ │ ├──DatePickArea.ets // 详情页时间选择组件 -│ │ │ └──SettingItem.ets // 详情页设置组件 -│ │ ├──Main -│ │ │ ├──AlarmList.ets // 主页闹钟列表组件 -│ │ │ ├──AlarmListItem.ets // 主页闹钟列表子项组件 -│ │ │ └──ClockArea.ets // 主页时钟组件 -│ │ └──BackContainer.ets // 自定义头部组件 -│ └──viewmodel -│ ├──DetailViewModel.ets // 详情模块逻辑功能类 -│ └──MainViewModel.ets // 主页逻辑功能类 -└──entry/src/main/resources // 资源文件目录 -``` - -## 闹钟主页面 - -闹钟界面包括当前时间、闹钟列表、添加闹钟子组件,具体包括以下模块: - -1. 当前时间使用了Cavas组件绘制,默认展示指针表盘,点击表盘区域切换为数字时钟。效果如图所示: - - ![](figures/AlarmClock-main.png) - - 在主页的ClockArea组件中初始化Canvas画布,并绑定指针表盘和数字时钟切换事件。 - - ```typescript - build() { - Canvas(this.renderContext) - .width(this.canvasSize) - .aspectRatio(CommonConstants.DEFAULT_LAYOUT_WEIGHT) - .onReady(() => { - if (this.drawInterval === CommonConstants.DEFAULT_NUMBER_NEGATIVE) { - this.startDrawTask(); - } - }) - .onClick(() => { - this.showClock = !this.showClock; - }) - } - - // 启动绘画任务 - private startDrawTask() { - let that = this; - that.renderContext.translate( - this.canvasSize / CommonConstants.DEFAULT_DOUBLE, - this.canvasSize / CommonConstants.DEFAULT_DOUBLE); - that.drawClockArea(); - this.drawInterval = setInterval(() => { - that.drawClockArea(); - }, MainConstant.DEFAULT_ONE_SECOND_MS); - } - ``` - - 绘画任务是使用CanvasRenderingContext2D对象在Canvas画布组件上绘制指针表盘和数字时钟。 - - ```typescript - // 开始绘制时钟区域 - private drawClockArea(): void{ - this.renderContext.clearRect( - -this.canvasSize, - -this.canvasSize / Constants.DEFAULT_DOUBLE, - this.canvasSize * Constants.DEFAULT_DOUBLE, - this.canvasSize); - let date = new Date(); - let hours = date.getHours(); - let minutes = date.getMinutes(); - let seconds = date.getSeconds(); - if (this.showClock) { - // 绘制表盘时钟 - } else { - // 绘制数字时钟 - } - } - ``` - -2. 闹钟列表组件,展示已添加的闹钟信息,可对闹钟进行启停操作,点击闹钟可跳转到闹钟操作界面(修改和删除闹钟)。 - - 主页启动后获取轻量级数据库中的闹钟定时数据,并监控数据库数据变化。 - - ```typescript - public queryAlarmsTasker(callback: (alarms: Array) => void) { - let that = this; - that.queryDatabaseAlarms(callback); - globalThis.preference.addPreferencesListener({ - onDataChanged() { - that.queryDatabaseAlarms(callback); - } - }) - } - ``` - - 在AlarmList.ets中添加闹钟列表子组件,并绑定启停、跳转事件。 - - ```typescript - @Component - export default struct AlarmList { - @Link alarmItems: Array; - - build() { - List({ space: DimensionUtil.getVp($r('app.float.alarm_list_space')) }) { - ForEach(this.alarmItems, (item: AlarmItem) => { - ListItem() { - AlarmListItem({ alarmItem: item }) - }.onClick(() => { - router.pushUrl({ url: "pages/DetailIndex", params: { alarmItem: item } }); - }) - }, item => JSON.stringify(item)) - } - .padding({ - left: DimensionUtil.getVp($r('app.float.alarm_list_content_distance')), - right: DimensionUtil.getVp($r('app.float.alarm_list_content_distance')) - }) - .listDirection(Axis.Vertical) - .layoutWeight(CommonConstants.DEFAULT_LAYOUT_WEIGHT) - .margin({ top: DimensionUtil.getVp($r('app.float.alarm_list_content_distance')) }) - } - } - ``` - -3. 添加闹钟,点击界面底部闹钟添加按钮,跳转到闹钟操作界面(新增闹钟),在MainIndex.ets中为添加按钮绑定跳转事件。 - - ```typescript - Button() { - Image($r('app.media.ic_add')).objectFit(ImageFit.Fill) - } - .backgroundColor($r('app.color.trans_parent')) - .width(DimensionUtil.getVp($r('app.float.new_alarm_button_size'))) - .height(DimensionUtil.getVp($r('app.float.new_alarm_button_size'))) - .margin({ - bottom: DimensionUtil.getVp($r('app.float.new_alarm_button_margin_vertical')), - top: DimensionUtil.getVp($r('app.float.new_alarm_button_margin_vertical')) - }) - .onClick(() => { - router.pushUrl({ url: "pages/DetailIndex" }); - }) - ``` - -4. 后台代理提醒,根据闹钟列表中的数据来设置(启停)闹钟实例。 - - ```typescript - // 开启/关闭闹钟 - public openAlarm(id: number, isOpen: boolean) { - for (let i = 0; i < this.alarms.length; i++) { - if (this.alarms[i].id === id) { - this.alarms[i].isOpen = isOpen; - if (isOpen) { - this.reminderService.addReminder(this.alarms[i]); - } else { - this.reminderService.deleteReminder(this.alarms[i].id); - } - globalThis.preference.set(ALARM_KEY, JSON.stringify(this.alarms)); - break; - } - } - } - ``` - -## 闹钟详情页 - -闹钟操作界面分为新增和修改界面,其中在修改界面可删除闹钟。具体分为以下模块: - -1. 关闭闹钟操作界面子组件,点击左上角“x”图标关闭操作界面,点击右上角“√”图标,保存当前设置并关闭操作界面。效果如图所示: - - ![](figures/AlarmClock-detail.png) - - 在DetailIndex.ets入口页面中引入头部组件BackContainer,自定义了返回按钮和返回逻辑操作,添加确定(“√”)子组件,并绑定点击事件。 - - ```typescript - build() { - Row() { - Button() { - Image(this.backImgRes == null ? $r('app.media.ic_public_back') : this.backImgRes).objectFit(ImageFit.Fill) - } - .backgroundColor($r('app.color.trans_parent')) - .width(DimensionUtil.getVp($r('app.float.title_button_size'))) - .height(DimensionUtil.getVp($r('app.float.title_button_size'))) - .onClick(() => { - this.backFunc ? this.backFunc() : router.back(); - }) - - Text(this.header) - .fontSize(DimensionUtil.getFp($r('app.float.detail_title_font_size'))) - .lineHeight(DimensionUtil.getVp($r('app.float.title_line_height'))) - .margin({ left: DimensionUtil.getVp($r('app.float.title_margin')) }) - .fontColor($r('app.color.grey_divider')) - .fontWeight(FontWeight.Bold) - Blank() - if (this.closer) { - this.closer(); - } - } - .padding({ - left: DimensionUtil.getVp($r('app.float.title_horizon_margin')), - right: DimensionUtil.getVp($r('app.float.title_horizon_margin')) - }) - .height(DimensionUtil.getVp($r('app.float.page_title_height'))) - .width(CommonConstants.FULL_LENGTH) - } - ``` - -2. 设置闹钟提醒时间,在闹钟操作界面可通过滑动选择器设置闹钟的提醒时间(包括:时段、小时、分钟) - - 详情页DetailIndex.ets中添加闹钟时间选择器子组件DatePickArea.ets。 - - ```typescript - @Component - export default struct DatePickArea { - build() { - Stack({ alignContent: Alignment.Center }) { - Row() { - ForEach(DetailConstant.DAY_DATA, (item) => { - TextPicker({ range: item.data, selected: item.delSelect }) - .layoutWeight(CommonConstants.DEFAULT_LAYOUT_WEIGHT) - .backgroundColor($r('app.color.grey_light')) - .onChange((value: string, index: number) => { - item.delSelect = index; - }) - }, item => JSON.stringify(item)) - } - } - .height(DimensionUtil.getVp($r('app.float.date_picker_height'))) - .padding({ - left: DimensionUtil.getVp($r('app.float.date_picker_padding_horizon')), - right: DimensionUtil.getVp($r('app.float.date_picker_padding_horizon')) - }) - } - } - ``` - -3. 点击详情页DetailIndex.ets设置条目组件SettingItem.ets支持设置闹钟重复时间、闹钟名称、重复次数和闹铃时长。 - - ```typescript - build() { - Column() { - ForEach(this.settingInfo, (item: SettingInfo, index: number) => { - Divider()... - Row() { - Text(item.title)... - Text(item.content)... - Image($r('app.media.ic_right'))... - } - ... - .onClick(() => { - this.showSettingDialog(item.sType); - }) - }, (item, index) => JSON.stringify(item) + index) - } - ... - } - ``` - - 4、导入系统提醒服务类ReminderService.ets,它由系统后台代理提醒能力封装,支持新增、修改、删除系统闹钟功能,在设置、删除闹钟后同步更新到轻量级数据库中并刷新主页页面。 - - ```typescript - public async setAlarmRemind(alarmItem: AlarmItem) { - alarmItem.hour = this.getAlarmTime(Constants.DEFAULT_SINGLE); - alarmItem.minute = this.getAlarmTime(Constants.DEFAULT_DATA_PICKER_HOUR_SELECTION); - let index = await this.findAlarmWithId(alarmItem.id); - if (index !== Constants.DEFAULT_NUMBER_NEGATIVE) { - // 已存在,删除原有提醒 - this.reminderService.deleteReminder(alarmItem.id); - } else { - // 不存在,以数据长度为notificationId新增闹钟数据 - index = this.alarms.length; - alarmItem.notificationId = index; - this.alarms.push(alarmItem); - } - this.reminderService.addReminder(alarmItem, (newId) => { - alarmItem.id = newId; - alarmItem.isOpen = true; - this.alarms[index] = alarmItem; - globalThis.preference.set(ALARM_KEY, JSON.stringify(this.alarms)); - }) - } - - public async removeAlarmRemind(id: number) { - this.reminderService.deleteReminder(id); - let index = await this.findAlarmWithId(id); - if (index !== Constants.DEFAULT_NUMBER_NEGATIVE) { - this.alarms.splice(index, Constants.DEFAULT_SINGLE); - } - globalThis.preference.set(ALARM_KEY, JSON.stringify(this.alarms)); - } - ``` - -## 总结 - -您已经完成了本次Codelab的学习,并了解到以下知识点: - -1. 展示指针表盘或数字时间。 -2. 添加、修改和删除闹钟。 -3. 展示闹钟列表,并可打开和关闭单个闹钟。 -4. 闹钟到设定的时间后弹出提醒。 -5. 将闹钟的定时数据保存到轻量级数据库。 - -![](figures/zh-cn_image_0000001409470914.gif) - diff --git a/CommonEventAndNotification/AlarmClock/build-profile.json5 b/CommonEventAndNotification/AlarmClock/build-profile.json5 deleted file mode 100644 index 7d18441853f8bbde636911803a4b3f3d5668cd97..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/build-profile.json5 +++ /dev/null @@ -1,26 +0,0 @@ -{ - "app": { - "compileSdkVersion": 9, - "compatibleSdkVersion": 9, - "products": [ - { - "name": "default", - "signingConfig": "default" - } - ] - }, - "modules": [ - { - "name": "entry", - "srcPath": "./entry", - "targets": [ - { - "name": "default", - "applyToProducts": [ - "default" - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/build-profile.json5 b/CommonEventAndNotification/AlarmClock/entry/build-profile.json5 deleted file mode 100644 index befa10141dfc5999e35f60a36a9f948e664732b1..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/build-profile.json5 +++ /dev/null @@ -1,10 +0,0 @@ -{ - "apiType": 'stageMode', - "buildOption": { - }, - "targets": [ - { - "name": "default" - } - ] -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/hvigorfile.ts b/CommonEventAndNotification/AlarmClock/entry/hvigorfile.ts deleted file mode 100644 index 80e4ec5b81689f238c34614b167a0b9e9c83e8d9..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/hvigorfile.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently. -export { hapTasks } from '@ohos/hvigor-ohos-plugin'; diff --git a/CommonEventAndNotification/AlarmClock/entry/oh-package.json5 b/CommonEventAndNotification/AlarmClock/entry/oh-package.json5 deleted file mode 100644 index a7afd4ec1017198e9d8017e9f28e8e1d786a9e39..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/oh-package.json5 +++ /dev/null @@ -1,9 +0,0 @@ -{ - "license": "ISC", - "devDependencies": {}, - "name": "entry", - "description": "example description", - "repository": {}, - "version": "1.0.0", - "dependencies": {} -} diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/common/bean/AlarmItemBean.ets b/CommonEventAndNotification/AlarmClock/entry/src/main/ets/common/bean/AlarmItemBean.ets deleted file mode 100644 index a071be657a15166b4f76cf5fd9931e55dcf1d4c5..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/common/bean/AlarmItemBean.ets +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2022 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 ReminderItem from './ReminderItemBean'; - -/** - * Alarm item description. - */ -@Observed export default class AlarmItemBean extends ReminderItem { - /** - * Custom alarm name. - */ - name = '闹钟'; - - /** - * Custom alarm is open. - */ - isOpen: boolean = true; - - /** - * Custom alarm is repeat. - */ - isRepeat: boolean = false; - - /** - * Custom alarm duration. - */ - duration: number = 5; - - /** - * Custom alarm interval minute. - */ - intervalMinute: number = 10; - - /** - * Custom alarm interval times. - */ - intervalTimes: number = 3; - - /** - * Custom alarm notification id. - */ - notificationId: number; -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/common/bean/AlarmSettingBean.ets b/CommonEventAndNotification/AlarmClock/entry/src/main/ets/common/bean/AlarmSettingBean.ets deleted file mode 100644 index fbc5e480314000b387c07e4b183a2ab7c7a9e94a..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/common/bean/AlarmSettingBean.ets +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2022 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 { AlarmSettingType } from '../constants/AlarmSettingType'; - -/** - * Alarm setting bean information. - */ -export default class AlarmSettingBean { - /** - * Alarm setting title. - */ - public title: string; - - /** - * Alarm setting content. - */ - public content: string; - - /** - * Alarm setting type. - */ - public sType: AlarmSettingType; - - constructor(title, content, sType) { - this.title = title; - this.content = content; - this.sType = sType; - } -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/common/bean/ReminderItemBean.ets b/CommonEventAndNotification/AlarmClock/entry/src/main/ets/common/bean/ReminderItemBean.ets deleted file mode 100644 index c77d2fc30cfcd8bc0f21c43423659cbc6a0f67ef..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/common/bean/ReminderItemBean.ets +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2022 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 reminderAgent from '@ohos.reminderAgentManager'; - -export default class ReminderItemBean { - id: number; - remindType: reminderAgent.ReminderType = reminderAgent.ReminderType.REMINDER_TYPE_ALARM; - name: string; - hour: number; - minute: number; - duration: number; - intervalMinute: number; - intervalTimes: number; - repeatDays: Array = []; - notificationId: number; -} - diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/common/constants/AlarmSettingType.ets b/CommonEventAndNotification/AlarmClock/entry/src/main/ets/common/constants/AlarmSettingType.ets deleted file mode 100644 index 9fb1bab182077ae8353df2928364d3ae62a18855..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/common/constants/AlarmSettingType.ets +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2022 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. - */ - -//export { AlarmSettingBean }; - -/** - * Alarm setting type enum description. - */ -export enum AlarmSettingType { - /** - * Alarm setting type repeat. - */ - REPEAT, - - /** - * Alarm setting type name. - */ - ALARM_NAME, - - /** - * Alarm setting type ring duration. - */ - RING_DURATION, - - /** - * Alarm setting type interval. - */ - INTERVAL -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/common/constants/CommonConstants.ets b/CommonEventAndNotification/AlarmClock/entry/src/main/ets/common/constants/CommonConstants.ets deleted file mode 100644 index 15ac20646a2f30252c41cff0a8da531b7c574795..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/common/constants/CommonConstants.ets +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Copyright (c) 2022 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. - */ - -/** - * database preference id. - */ -export const PREFERENCE_ID = 'storageId'; - -/** - * database alarm data key. - */ -export const ALARM_KEY = 'alarmData'; - -/** - * database alarm item key. - */ -export const PARAM_KEY = 'alarmItem'; - -export const CommonConstants = { - /** - * common full length - */ - FULL_LENGTH: '100%', - - /** - * default string space. - */ - DEFAULT_STRING_SPACE: ' ', - - /** - * default string comma. - */ - DEFAULT_STRING_COMMA: ',', - - /** - * default string no repeat. - */ - DEFAULT_STRING_NO_REPEAT: '不重复', - - /** - * default number negative. - */ - DEFAULT_NUMBER_NEGATIVE: -1, - - /** - * default layout weight. - */ - DEFAULT_LAYOUT_WEIGHT: 1, - - /** - * default number monday. - */ - DEFAULT_NUMBER_MONDAY: 1, - - /** - * default number tuesday. - */ - DEFAULT_NUMBER_TUESDAY: 2, - - /** - * default number wednesday. - */ - DEFAULT_NUMBER_WEDNESDAY: 3, - - /** - * default number thursday. - */ - DEFAULT_NUMBER_THURSDAY: 4, - - /** - * default number friday. - */ - DEFAULT_NUMBER_FRIDAY: 5, - - /** - * default number saturday. - */ - DEFAULT_NUMBER_SATURDAY: 6, - - /** - * default number sunday. - */ - DEFAULT_NUMBER_SUNDAY: 7, - - /** - * default single. - */ - DEFAULT_SINGLE: 1, - - /** - * default double. - */ - DEFAULT_DOUBLE: 2, - - /** - * default data picker hour selection. - */ - DEFAULT_DATA_PICKER_HOUR_SELECTION: 2, - - /** - * default total minute. - */ - DEFAULT_TOTAL_MINUTE: 60, - - /** - * default string monday. - */ - DEFAULT_STRING_MONDAY: '周一', - - /** - * default string tuesday. - */ - DEFAULT_STRING_TUESDAY: '周二', - - /** - * default string wednesday. - */ - DEFAULT_STRING_WEDNESDAY: '周三', - - /** - * default string thursday. - */ - DEFAULT_STRING_THURSDAY: '周四', - - /** - * default string friday. - */ - DEFAULT_STRING_FRIDAY: '周五', - - /** - * default string saturday. - */ - DEFAULT_STRING_SATURDAY: '周六', - - /** - * default string sunday. - */ - DEFAULT_STRING_SUNDAY: '周日', - - /** - * default number moment. - */ - DEFAULT_NUMBER_MOMENT: 3, - - /** - * default interval step. - */ - DEFAULT_INTERVAL_STEP: 5, - - /** - * default common degree - */ - DEFAULT_COMMON_DEGREE: 6, - - /** - * default pointer width. - */ - DEFAULT_POINTER_WIDTH: 10, - - /** - * default total hour. - */ - DEFAULT_TOTAL_HOUR: 12, - - /** - * default interval time max. - */ - DEFAULT_INTERVAL_TIME_MAX: 10, - - /** - * default interval minute max. - */ - DEFAULT_INTERVAL_MINUTE_MAX: 30, -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/common/constants/DetailConstant.ets b/CommonEventAndNotification/AlarmClock/entry/src/main/ets/common/constants/DetailConstant.ets deleted file mode 100644 index 7d8e114439644e6b241258d56d0f140d7954e757..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/common/constants/DetailConstant.ets +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2022 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. - */ - -/** - * Detail page constant description. - */ -export const DetailConstant = { - /** - * detail page day data. - */ - DAY_DATA: [ - { timeType: 0, delSelect: 0, data: ['上午', '下午'] }, - { timeType: 1, delSelect: 0, data: ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'] }, - { timeType: 2, delSelect: 0, data: ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', - '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', - '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', - '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', - '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '00', - ] } - ], - - /** - * week day data. - */ - WEEKDAY_DATA: [1, 2, 3, 4, 5, 6, 7], - - /** - * ring duration list data. - */ - RING_DURATION: [1, 5, 10, 15, 20, 30], - - /** - * default string minute. - */ - DEFAULT_STRING_MINUTE: '分钟', - - /** - * default string group name. - */ - DEFAULT_STRING_GROUP_NAME: 'radioGroup', - - /** - * default string provider key. - */ - DEFAULT_PROVIDER_KEY: 'alarmItemProvide', - - /** - * default string repeat. - */ - DEFAULT_STRING_REPEAT: '重复', - - /** - * default string alarm name. - */ - DEFAULT_STRING_ALARM_NAME: '闹钟名', - - /** - * default string interval. - */ - DEFAULT_STRING_INTERVAL: '再响间隔', - - /** - * default string duration. - */ - DEFAULT_STRING_DURATION: '闹铃时长', - - /** - * default string times. - */ - DEFAULT_STRING_TIMES: '次', -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/common/constants/MainConstant.ets b/CommonEventAndNotification/AlarmClock/entry/src/main/ets/common/constants/MainConstant.ets deleted file mode 100644 index 20aaeaa749bf916d71d081f226c4358d5052e476..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/common/constants/MainConstant.ets +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2022 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. - */ - -/** - * Main page constant description. - */ -export const MainConstant = { - /** - * Main page times list. - */ - TIMES: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2], - - /** - * Default single digit max. - */ - DEFAULT_SINGLE_DIGIT_MAX: 9, - - /** - * Default horizontal angle. - */ - DEFAULT_HORIZONTAL_ANGLE: 180, - - /** - * Default one second ms. - */ - DEFAULT_ONE_SECOND_MS: 1000, - - /** - * Default zeroing. - */ - DEFAULT_ZEROING: "0", - - /** - * Default string morning. - */ - DEFAULT_STRING_MORNING: '上午', - - /** - * Default string afternoon. - */ - DEFAULT_STRING_AFTERNOON: '下午', - - /** - * Default string alarm name. - */ - DEFAULT_STRING_ALARM: '闹钟', - - /** - * Default string quotation. - */ - DEFAULT_STRING_NULL: "", - - /** - * Default string colon. - */ - DEFAULT_STRING_COLON: ':', - - /** - * Default clock time font size unit. - */ - CLOCK_TIME_FONT_SIZE_UNIT: 'px', - - /** - * Hour pointer image url. - */ - HOUR_POINTER_IMAGE_URL: "../../../resources/base/media/ic_hour_pointer.png", - - /** - * Minute pointer image url. - */ - MINUTE_POINTER_IMAGE_URL: "../../../resources/base/media/ic_minute_pointer.png", - - /** - * Second pointer image url. - */ - SECOND_POINTER_IMAGE_URL: "../../../resources/base/media/ic_second_pointer.png", - - /** - * Clock pan image url. - */ - CLOCK_PAN_IMAGE_URL: '../../../resources/base/media/ic_clock_pan.png', -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/common/utils/DataTypeUtils.ets b/CommonEventAndNotification/AlarmClock/entry/src/main/ets/common/utils/DataTypeUtils.ets deleted file mode 100644 index 90f063727525fcea471edce6da9e751db4ef3a56..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/common/utils/DataTypeUtils.ets +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2022 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. - */ - -/** - * Data type utils. - */ -export default class DataTypeUtils { - /** - * return value is number. - * - * @return boolean. - */ - static isNumber(value): boolean{ - return typeof value === 'number' && isFinite(value); - } - - /** - * return obj is null. - * - * @return boolean. - */ - static isNull(obj): boolean { - return (typeof obj === 'undefined' || obj == null || obj === ''); - } - - /** - * return new deep copy object from obj. - * - * @return type in obj. - */ - static deepCopy(obj) { - var newObj = obj.constructor === Array ? [] : {}; - if (typeof obj !== 'object') { - return obj; - } else { - for (var i in obj) { - if (typeof obj[i] === 'object') { - newObj[i] = this.deepCopy(obj[i]); - } else { - newObj[i] = obj[i]; - } - } - } - return newObj; - } -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/common/utils/DimensionUtil.ets b/CommonEventAndNotification/AlarmClock/entry/src/main/ets/common/utils/DimensionUtil.ets deleted file mode 100644 index 82edab1d0d73cdb8c22a13ee331481510f0972fe..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/common/utils/DimensionUtil.ets +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2022 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. - */ - -var context = getContext(this); - -/** - * Design drawing width. - */ -const DESIGN_WIDTH = 360; - -/** - * Design drawing height. - */ -const DESIGN_HEIGHT = 780; - -/** - * Fits tools with different sizes and lengths. - */ -export default class DimensionUtil { - /** - * Obtains the screen horizontal adaptation value. - * - * @return number - */ - static adaptDimension(value: number): number { - let deviceDisplay = globalThis.display; - let widthScale = deviceDisplay.width / DESIGN_WIDTH; - let virtualHeight = widthScale * DESIGN_HEIGHT; - let designDim = Math.sqrt(DESIGN_WIDTH * DESIGN_WIDTH + DESIGN_HEIGHT * DESIGN_HEIGHT); - let virtualDim = Math.sqrt(deviceDisplay.width * deviceDisplay.width + virtualHeight * virtualHeight); - return virtualDim * value / designDim; // 放缩后长度 - } - - /** - * Obtains the screen horizontal adaptation px. - * - * @return number - */ - static getPx(value: Resource): number { - let beforeVp = context.resourceManager.getNumber(value.id); - return this.adaptDimension(beforeVp); - } - - /** - * Obtains the screen horizontal adaptation vp. - * - * @return number - */ - static getVp(value: Resource): number { - let beforeVp = context.resourceManager.getNumber(value.id); - return px2vp(this.adaptDimension(beforeVp)); - } - - /** - * Obtains the screen horizontal adaptation fp. - * - * @return number - */ - static getFp(value: Resource): number { - let beforeFp = context.resourceManager.getNumber(value.id); - return px2fp(this.adaptDimension(beforeFp)); - } -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/entryability/EntryAbility.ets b/CommonEventAndNotification/AlarmClock/entry/src/main/ets/entryability/EntryAbility.ets deleted file mode 100644 index 238b0819020eab0db5db6a70eebc10f5b76a2010..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/entryability/EntryAbility.ets +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2022 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 display from '@ohos.display'; -import UIAbility from '@ohos.app.ability.UIAbility'; -import PreferencesHandler from '../model/database/PreferencesHandler'; - -export default class EntryAbility extends UIAbility { - onCreate(want) { - let abilityInfo = this.context.abilityInfo; - globalThis.bundleName = abilityInfo.bundleName; - globalThis.abilityName = abilityInfo.name; - globalThis.abilityWant = want; - globalThis.preference = PreferencesHandler.getInstance(); - } - - async onWindowStageCreate(windowStage) { - globalThis.display = await display.getDefaultDisplay(); - await globalThis.preference.configure(this.context.getApplicationContext()); - windowStage.setUIContent(this.context, "pages/MainIndex", null); - } -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/model/ReminderService.ets b/CommonEventAndNotification/AlarmClock/entry/src/main/ets/model/ReminderService.ets deleted file mode 100644 index e4c1078d2f416184e04364f0bae051931b08f5b1..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/model/ReminderService.ets +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2022 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 reminderAgent from '@ohos.reminderAgentManager'; -import notification from '@ohos.notificationManager'; -import { CommonConstants } from '../common/constants/CommonConstants'; -import ReminderItem from '../common/bean/ReminderItemBean'; - -/** - * Base on ohos reminder agent service - */ -export default class ReminderService { - /** - * open notification permission - */ - public openNotificationPermission() { - notification.requestEnableNotification().then(() => { - console.info('Enable notification success'); - }).catch((err) => { - console.error('Enable notification failed because ' + JSON.stringify(err)); - }); - } - - /** - * Adding and modifying alarm reminders - * - * @param alarmItem ReminderItem - * @param callback callback - */ - public addReminder(alarmItem: ReminderItem, callback?) { - let reminder = this.initReminder(alarmItem); - reminderAgent.publishReminder(reminder, (err, reminderId) => { - if (callback != null) { - callback(reminderId); - } - }); - } - - /** - * Adding and modifying alarm reminders - * - * @param reminderId number - */ - public deleteReminder(reminderId: number) { - reminderAgent.cancelReminder(reminderId); - } - - private initReminder(item: ReminderItem): reminderAgent.ReminderRequestAlarm{ - return { - reminderType: item.remindType, - hour: item.hour, - minute: item.minute, - daysOfWeek: item.repeatDays, - title: item.name, - ringDuration: item.duration * CommonConstants.DEFAULT_TOTAL_MINUTE, - snoozeTimes: item.intervalTimes, - timeInterval: item.intervalMinute, - actionButton: [ - { - title: '关闭', - type: reminderAgent.ActionButtonType.ACTION_BUTTON_TYPE_CLOSE - }, - { - title: '稍后提醒', - type: reminderAgent.ActionButtonType.ACTION_BUTTON_TYPE_SNOOZE - }, - ], - wantAgent: { - pkgName: globalThis.bundleName, - abilityName: globalThis.abilityName - }, - notificationId: item.notificationId, - expiredContent: 'this reminder has expired', - snoozeContent: 'remind later', - slotType: notification.SlotType.SERVICE_INFORMATION - } - } -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/model/database/PreferencesHandler.ets b/CommonEventAndNotification/AlarmClock/entry/src/main/ets/model/database/PreferencesHandler.ets deleted file mode 100644 index 7c84d33a7d29a43e46aad1d9f62d11d59a9eaa95..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/model/database/PreferencesHandler.ets +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (c) 2022 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 data_preferences from '@ohos.data.preferences'; -import { PREFERENCE_ID } from '../../common/constants/CommonConstants'; -import PreferencesListener from './PreferencesListener'; - -/** - * Based on lightweight databases preferences handler. - */ -export default class PreferencesHandler { - private static instance: PreferencesHandler; - private preferences; - private defaultValue = ''; - private listeners: PreferencesListener[]; - - private constructor() { - this.listeners = new Array(); - } - - /** - * Get PreferencesHandler instance. - * - * @return instance - */ - public static getInstance() { - if (this.instance == null) { - this.instance = new PreferencesHandler(); - } - return this.instance; - } - - /** - * Configure PreferencesHandler. - * - * @param context Context - */ - public async configure(context) { - this.preferences = await data_preferences.getPreferences(context, PREFERENCE_ID); - this.preferences.on('change', (key) => { - for (let preferencesListener of this.listeners) { - preferencesListener.onDataChanged(key); - } - }); - } - - /** - * Set data in PreferencesHandler. - * - * @param key string - * @param value any - */ - public async set(key: string, value) { - if (this.preferences != null) { - await this.preferences.put(key, value); - await this.preferences.flush(); - } - } - - /** - * Get data in PreferencesHandler. - * - * @param key string - * @param defValue any - * @return data about key - */ - public async get(key: string, defValue?) { - let data; - if (this.preferences != null) { - data = await this.preferences.get(key, defValue == null ? this.defaultValue : defValue); - } - return data; - } - - /** - * Clear data in PreferencesHandler. - */ - public clear() { - if (this.preferences != null) { - this.preferences.clear(); - } - } - - /** - * Get all data in PreferencesHandler. - * - * @return data - */ - public async getAll() { - let data; - if (this.preferences != null) { - data = await this.preferences.getAll(); - } - return data; - } - - /** - * Add preferences listener in PreferencesHandler. - * - * @param listener PreferencesListener - */ - public addPreferencesListener(listener: PreferencesListener) { - this.listeners.push(listener); - } -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/model/database/PreferencesListener.ets b/CommonEventAndNotification/AlarmClock/entry/src/main/ets/model/database/PreferencesListener.ets deleted file mode 100644 index d863486554de7fd15ef6c95f7f4248f7444dae77..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/model/database/PreferencesListener.ets +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2022 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. - */ - -/** - * Preferences listener interface. - */ -export default interface PreferencesListener { - /** - * Preferences on data changed listener. - * - * @param key string - */ - onDataChanged(key: string): void -} diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/pages/DetailIndex.ets b/CommonEventAndNotification/AlarmClock/entry/src/main/ets/pages/DetailIndex.ets deleted file mode 100644 index a7c2b8aa556b7caf785dfb3bac969e05acc2fa5c..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/pages/DetailIndex.ets +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (c) 2022 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 router from '@ohos.router'; -import { PARAM_KEY, CommonConstants } from '../common/constants/CommonConstants'; -import AlarmItem from '../common/bean/AlarmItemBean'; -import AlarmSettingBean from '../common/bean/AlarmSettingBean'; -import { AlarmSettingType } from '../common/constants/AlarmSettingType'; -import { DetailConstant } from '../common/constants/DetailConstant'; -import BackContainer from '../view/BackContainer'; -import DetailModel from '../viewmodel/DetailViewModel'; -import DatePickArea from '../view/detail/DatePickArea'; -import SettingItem from '../view/Detail/SettingItem'; -import DimensionUtil from '../common/utils/DimensionUtil'; - -@Entry -@Component -struct DetailIndex { - @Watch('onAlarmItemChange') @Provide(DetailConstant.DEFAULT_PROVIDER_KEY) alarmItem: AlarmItem = new AlarmItem(); - @State repeatSettingArr: Array = []; - @State alarmSettingInfoArr: Array = []; - private isNow: boolean = true; - private viewModel: DetailModel = DetailModel.getInstant(); - - aboutToAppear() { - if (router.getParams() != null && router.getParams().hasOwnProperty(PARAM_KEY)) { - this.isNow = false; - this.alarmItem = router.getParams()[PARAM_KEY]; - this.viewModel.setAlarmDefaultTime(this.alarmItem); - } else { - this.viewModel.setAlarmDefaultTime(); - } - this.initData(); - } - - onAlarmItemChange() { - this.initData(); - } - - initData() { - this.repeatSettingArr = [ - new AlarmSettingBean(DetailConstant.DEFAULT_STRING_REPEAT, - this.alarmItem.isRepeat ? DetailConstant.DEFAULT_STRING_REPEAT - : CommonConstants.DEFAULT_STRING_NO_REPEAT, AlarmSettingType.REPEAT) - ]; - this.alarmSettingInfoArr = [ - new AlarmSettingBean(DetailConstant.DEFAULT_STRING_ALARM_NAME, this.alarmItem.name, AlarmSettingType.ALARM_NAME), - new AlarmSettingBean(DetailConstant.DEFAULT_STRING_DURATION, - this.alarmItem.duration + DetailConstant.DEFAULT_STRING_MINUTE, AlarmSettingType.RING_DURATION), - new AlarmSettingBean(DetailConstant.DEFAULT_STRING_INTERVAL, this.alarmItem.intervalMinute - + DetailConstant.DEFAULT_STRING_MINUTE + CommonConstants.DEFAULT_STRING_COMMA - + this.alarmItem.intervalTimes + DetailConstant.DEFAULT_STRING_TIMES, AlarmSettingType.INTERVAL) - ] - } - - build() { - Column() { - BackContainer({ - header: this.isNow ? $r('app.string.new_alarm') : $r('app.string.update_alarm'), - backImgRes: $r('app.media.ic_cancel'), - }) { - Button() { - Image($r('app.media.ic_confirm')).objectFit(ImageFit.Fill) - } - .backgroundColor($r('app.color.trans_parent')) - .width(DimensionUtil.getVp($r('app.float.title_button_size'))) - .height(DimensionUtil.getVp($r('app.float.title_button_size'))) - .onClick(() => { - this.viewModel.setAlarmRemind(this.alarmItem); - router.back(); - }) - } - - DatePickArea() - - SettingItem({ - settingInfo: $repeatSettingArr - }) - SettingItem({ - settingInfo: $alarmSettingInfoArr - }) - - Blank() - - Button($r('app.string.delete')) - .visibility(this.isNow ? Visibility.None : Visibility.Visible) - .width(DimensionUtil.getVp($r('app.float.delete_button_width'))) - .height(DimensionUtil.getVp($r('app.float.delete_button_height'))) - .fontSize(DimensionUtil.getFp($r('app.float.delete_button_font_size'))) - .fontColor($r('app.color.red_light')) - .backgroundColor($r('app.color.grey_with_opacity')) - .borderRadius(DimensionUtil.getVp($r('app.float.delete_button_radius'))) - .margin({ - bottom: DimensionUtil.getVp($r('app.float.delete_button_margin_bottom')) - }) - .onClick(() => { - this.viewModel.removeAlarmRemind(this.alarmItem.id); - router.back(); - }) - } - .backgroundColor($r('app.color.grey_light')) - .width(CommonConstants.FULL_LENGTH) - .height(CommonConstants.FULL_LENGTH) - } -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/pages/MainIndex.ets b/CommonEventAndNotification/AlarmClock/entry/src/main/ets/pages/MainIndex.ets deleted file mode 100644 index 005c59ed6923b91ff20f3c3171b3e74547707115..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/pages/MainIndex.ets +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2022 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 router from '@ohos.router'; -import { CommonConstants } from '../common/constants/CommonConstants'; -import AlarmItem from '../common/bean/AlarmItemBean'; -import { MainConstant } from '../common/constants/MainConstant'; -import MainModel from '../viewmodel/MainViewModel'; -import ClockArea from './../view/Main/ClockArea'; -import AlarmList from './../view/Main/AlarmList'; -import DimensionUtil from '../common/utils/DimensionUtil'; - -@Entry -@Component -struct MainIndex { - private mainModel: MainModel = MainModel.getInstant(); - @State alarmItems: Array = new Array(); - @State isAuth: boolean = false; - - aboutToAppear() { - let that = this; - that.mainModel.queryAlarmsTasker((alarms: Array) => { - that.alarmItems = alarms; - }) - } - - build() { - Column() { - Text(MainConstant.DEFAULT_STRING_ALARM) - .height(DimensionUtil.getVp($r('app.float.page_title_height'))) - .textAlign(TextAlign.Start) - .fontSize(DimensionUtil.getFp($r('app.float.title_font_size'))) - .width(CommonConstants.FULL_LENGTH) - .fontColor($r('app.color.grey_divider')) - .fontWeight(FontWeight.Bold) - .margin({ bottom: DimensionUtil.getVp($r('app.float.content_margin_body')) }) - .padding({ left: DimensionUtil.getVp($r('app.float.title_horizon_margin')) }) - - ClockArea() - - AlarmList({ alarmItems: $alarmItems }) - - Blank() - - Button() { - Image($r('app.media.ic_add')).objectFit(ImageFit.Fill) - } - .backgroundColor($r('app.color.trans_parent')) - .width(DimensionUtil.getVp($r('app.float.new_alarm_button_size'))) - .height(DimensionUtil.getVp($r('app.float.new_alarm_button_size'))) - .margin({ - bottom: DimensionUtil.getVp($r('app.float.new_alarm_button_margin_vertical')), - top: DimensionUtil.getVp($r('app.float.new_alarm_button_margin_vertical')) - }) - .onClick(() => { - router.pushUrl({ url: "pages/DetailIndex" }); - }) - } - .width(CommonConstants.FULL_LENGTH) - .height(CommonConstants.FULL_LENGTH) - .backgroundColor($r('app.color.grey_light')) - } -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/BackContainer.ets b/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/BackContainer.ets deleted file mode 100644 index 9f5c92ae857fafa67efa3def2c4050d0949488d2..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/BackContainer.ets +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2022 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 router from '@ohos.router'; -import { CommonConstants } from '../common/constants/CommonConstants'; -import DimensionUtil from '../common/utils/DimensionUtil'; - -@Component -export default struct BackContainer { - private header: string | Resource; - private backImgRes: string | Resource; - private backFunc: () => void; - @BuilderParam closer: () => void; - - build() { - Row() { - Button() { - Image(this.backImgRes == null ? $r('app.media.ic_public_back') : this.backImgRes).objectFit(ImageFit.Fill) - } - .backgroundColor($r('app.color.trans_parent')) - .width(DimensionUtil.getVp($r('app.float.title_button_size'))) - .height(DimensionUtil.getVp($r('app.float.title_button_size'))) - .onClick(() => { - this.backFunc ? this.backFunc() : router.back(); - }) - - Text(this.header) - .fontSize(DimensionUtil.getFp($r('app.float.detail_title_font_size'))) - .lineHeight(DimensionUtil.getVp($r('app.float.title_line_height'))) - .margin({ left: DimensionUtil.getVp($r('app.float.title_margin')) }) - .fontColor($r('app.color.grey_divider')) - .fontWeight(FontWeight.Bold) - Blank() - if (this.closer) { - this.closer(); - } - } - .padding({ - left: DimensionUtil.getVp($r('app.float.title_horizon_margin')), - right: DimensionUtil.getVp($r('app.float.title_horizon_margin')) - }) - .height(DimensionUtil.getVp($r('app.float.page_title_height'))) - .width(CommonConstants.FULL_LENGTH) - } -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Detail/DatePickArea.ets b/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Detail/DatePickArea.ets deleted file mode 100644 index 27e08ffb1f0b5be46ceb2195026acd5f4016a8af..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Detail/DatePickArea.ets +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2022 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 { DetailConstant } from '../../common/constants/DetailConstant'; -import { CommonConstants } from '../../common/constants/CommonConstants'; -import DimensionUtil from '../../common/utils/DimensionUtil'; - -@Component -export default struct DatePickArea { - build() { - Stack({ alignContent: Alignment.Center }) { - Row() { - ForEach(DetailConstant.DAY_DATA, (item) => { - TextPicker({ range: item.data, selected: item.delSelect }) - .layoutWeight(CommonConstants.DEFAULT_LAYOUT_WEIGHT) - .backgroundColor($r('app.color.grey_light')) - .onChange((value: string, index: number) => { - item.delSelect = index; - }) - }, item => JSON.stringify(item)) - } - } - .height(DimensionUtil.getVp($r('app.float.date_picker_height'))) - .padding({ - left: DimensionUtil.getVp($r('app.float.date_picker_padding_horizon')), - right: DimensionUtil.getVp($r('app.float.date_picker_padding_horizon')) - }) - } -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Detail/SettingItem.ets b/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Detail/SettingItem.ets deleted file mode 100644 index 31e639ee040d6856c4451cb5dd4e6da7e3bff023..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Detail/SettingItem.ets +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2022 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 { CommonConstants } from '../../common/constants/CommonConstants'; -import { AlarmSettingType } from '../../common/constants/AlarmSettingType'; -import AlarmSettingBean from '../../common/bean/AlarmSettingBean'; -import DimensionUtil from '../../common/utils/DimensionUtil'; -import IntervalDialog from './dialog/IntervalDialog'; -import DurationDialog from './dialog/DurationDialog'; -import RenameDialog from './dialog/RenameDialog'; -import RepeatDialog from './dialog/RepeatDialog'; - -@Component -export default struct SettingItem { - @Link settingInfo: Array; - repeatDialogController: CustomDialogController = new CustomDialogController({ - builder: RepeatDialog(), - autoCancel: true - }); - reNameDialogController: CustomDialogController = new CustomDialogController({ - builder: RenameDialog(), - autoCancel: true - }); - durationDialogController: CustomDialogController = new CustomDialogController({ - builder: DurationDialog(), - autoCancel: true - }); - intervalDialogController: CustomDialogController = new CustomDialogController({ - builder: IntervalDialog(), - autoCancel: true - }); - - private showSettingDialog(sType: AlarmSettingType) { - switch (sType) { - case AlarmSettingType.REPEAT: - this.repeatDialogController.open(); - break; - case AlarmSettingType.ALARM_NAME: - this.reNameDialogController.open(); - break; - case AlarmSettingType.RING_DURATION: - this.durationDialogController.open(); - break; - case AlarmSettingType.INTERVAL: - this.intervalDialogController.open(); - break; - default: - break - } - } - - build() { - Column() { - ForEach(this.settingInfo, (item: AlarmSettingBean, index: number) => { - Divider() - .visibility(index === 0 ? Visibility.Hidden : Visibility.Visible) - .opacity($r('app.float.divider_opacity')) - .color($r('app.color.grey_divider')) - .lineCap(LineCapStyle.Round) - .margin({ - left: DimensionUtil.getVp($r('app.float.setting_item_divider_margin_horizon')), - right: DimensionUtil.getVp($r('app.float.setting_item_divider_margin_horizon')) - }) - Row() { - Text(item.title) - .fontSize(DimensionUtil.getFp($r('app.float.setting_item_name_font_size'))) - .fontWeight(FontWeight.Regular) - .fontColor($r('app.color.grey_divider')) - .layoutWeight(CommonConstants.DEFAULT_LAYOUT_WEIGHT) - Text(item.content) - .fontSize(DimensionUtil.getFp($r('app.float.setting_item_content_font_size'))) - .fontWeight(FontWeight.Normal) - .fontColor($r('app.color.grey_divider')) - .opacity($r('app.float.setting_item_content_font_opacity')) - Image($r('app.media.ic_right')) - .width(DimensionUtil.getVp($r('app.float.setting_item_image_width'))) - .height(DimensionUtil.getVp($r('app.float.setting_item_image_height'))) - .objectFit(ImageFit.Fill) - .margin({ - left: DimensionUtil.getVp($r('app.float.setting_item_image_margin_horizon')) - }) - } - .height(DimensionUtil.getVp($r('app.float.setting_item_height'))) - .alignItems(VerticalAlign.Center) - .padding({ - left: DimensionUtil.getVp($r('app.float.setting_item_interval')), - right: DimensionUtil.getVp($r('app.float.setting_item_interval')) - }) - .onClick(() => { - this.showSettingDialog(item.sType); - }) - }, (item, index) => JSON.stringify(item) + index) - } - .margin({ - bottom: DimensionUtil.getVp($r('app.float.setting_item_interval')), - left: DimensionUtil.getVp($r('app.float.setting_item_interval')), - right: DimensionUtil.getVp($r('app.float.setting_item_interval')) - }) - .borderRadius(DimensionUtil.getVp($r('app.float.setting_item_border_radius'))) - .backgroundColor(Color.White) - } -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Detail/dialog/CommonDialog.ets b/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Detail/dialog/CommonDialog.ets deleted file mode 100644 index 6061004fc5a338740f33ca8c274f6d418036b19f..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Detail/dialog/CommonDialog.ets +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2022 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 { CommonConstants } from '../../../common/constants/CommonConstants'; -import DimensionUtil from '../../../common/utils/DimensionUtil'; - -@Component -export default struct CommonDialog { - private title: string | Resource; - private controller: CustomDialogController; - private onConfirm: () => void; - @BuilderParam closer: () => void; - - build() { - Column() { - Text(this.title) - .fontSize(DimensionUtil.getFp($r('app.float.common_dialog_title_font_size'))) - .width(CommonConstants.FULL_LENGTH) - .fontColor($r('app.color.grey_divider')) - .margin({ - bottom: DimensionUtil.getVp($r('app.float.common_dialog_title_margin_vertical')) - }) - this.closer() - Row() { - Button($r('app.string.cancel')).actionBtnStyle().onClick(() => { - this.controller.close(); - }) - if (this.onConfirm) { - Button($r('app.string.confirm')).actionBtnStyle().onClick(() => { - this.onConfirm(); - this.controller.close(); - }) - } - } - .margin({ top: DimensionUtil.getVp($r('app.float.common_dialog_margin_vertical')) }) - } - .width(CommonConstants.FULL_LENGTH) - .padding(DimensionUtil.getVp($r('app.float.common_dialog_padding'))) - .justifyContent(FlexAlign.Center) - } -} - -@Extend(Button) function actionBtnStyle () { - .fontSize(DimensionUtil.getFp($r('app.float.common_dialog_button_font_size'))) - .height(DimensionUtil.getVp($r('app.float.common_dialog_button_height'))) - .layoutWeight(CommonConstants.DEFAULT_LAYOUT_WEIGHT) - .fontColor($r('app.color.green_light')) - .backgroundColor($r('app.color.trans_parent')) -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Detail/dialog/DurationDialog.ets b/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Detail/dialog/DurationDialog.ets deleted file mode 100644 index e9c1d7c3ab763fbb599f3db4ae3058030aa9b901..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Detail/dialog/DurationDialog.ets +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2022 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 { CommonConstants } from '../../../common/constants/CommonConstants'; -import { DetailConstant } from '../../../common/constants/DetailConstant'; -import AlarmItem from '../../../common/bean/AlarmItemBean'; -import CommonDialog from './CommonDialog'; -import DimensionUtil from '../../../common/utils/DimensionUtil'; - -@CustomDialog -export default struct DurationDialog { - @Consume(DetailConstant.DEFAULT_PROVIDER_KEY) alarmItem: AlarmItem; - private durations: Array = DetailConstant.RING_DURATION; //响铃时长,分钟 - controller: CustomDialogController; - - build() { - Flex() { - CommonDialog({ - title: $r('app.string.ring_duration'), - controller: this.controller - }) { - ForEach(this.durations, item => { - Row() { - Text(item + CommonConstants.DEFAULT_STRING_SPACE + DetailConstant.DEFAULT_STRING_MINUTE) - .layoutWeight(CommonConstants.DEFAULT_LAYOUT_WEIGHT) - .fontColor($r('app.color.grey_divider')) - .fontSize(DimensionUtil.getFp($r('app.float.duration_dialog_content_font_size'))) - Radio({ value: item, group: DetailConstant.DEFAULT_STRING_GROUP_NAME }) - .checked(item === this.alarmItem.duration ? true : false) - .height(DimensionUtil.getVp($r('app.float.duration_dialog_radio_size'))) - .width(DimensionUtil.getVp($r('app.float.duration_dialog_radio_size'))) - .onChange(() => { - this.controller.close(); - this.alarmItem.duration = item - }) - } - .width(CommonConstants.FULL_LENGTH) - - Divider() - .opacity($r('app.float.divider_opacity')) - .color($r('app.color.grey_divider')) - .lineCap(LineCapStyle.Round) - }) - } - } - } -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Detail/dialog/IntervalDialog.ets b/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Detail/dialog/IntervalDialog.ets deleted file mode 100644 index bad0e73e4d975bc965478ec98eb982b0bd6aca4a..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Detail/dialog/IntervalDialog.ets +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2022 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 { CommonConstants } from '../../../common/constants/CommonConstants'; -import { DetailConstant } from '../../../common/constants/DetailConstant'; -import AlarmItem from '../../../common/bean/AlarmItemBean'; -import CommonDialog from './CommonDialog'; -import DimensionUtil from '../../../common/utils/DimensionUtil'; - -@CustomDialog -export default struct IntervalDialog { - @Consume(DetailConstant.DEFAULT_PROVIDER_KEY) alarmItem: AlarmItem; - @State intervalMinuteSelect: number = 0; - @State intervalTimesSelect: number = 0; - controller: CustomDialogController; - - aboutToAppear(): void{ - this.intervalMinuteSelect = this.alarmItem.intervalMinute; - this.intervalTimesSelect = this.alarmItem.intervalTimes; - } - - build() { - Flex() { - if ((this.intervalTimesSelect | this.intervalMinuteSelect) > 0) { - CommonDialog({ - title: $r('app.string.ring_interval'), - controller: this.controller, - onConfirm: () => { - this.alarmItem.intervalMinute = Number(this.intervalMinuteSelect.toFixed(0)) - this.alarmItem.intervalTimes = Number(this.intervalTimesSelect.toFixed(0)) - } - }) { - this.IntervalItem($r('app.string.ring_interval_content'), 0) - Divider() - .opacity($r('app.float.divider_opacity')) - .color($r('app.color.grey_divider')) - .lineCap(LineCapStyle.Round) - this.IntervalItem($r('app.string.ring_times_content'), CommonConstants.DEFAULT_SINGLE) - } - } - } - } - - @Builder IntervalItem(title: string | Resource, intervalType: number) { - Text(title) - .fontSize(DimensionUtil.getFp($r('app.float.interval_dialog_title_font_size'))) - .width(CommonConstants.FULL_LENGTH) - .textAlign(TextAlign.Start) - .margin({ - top: DimensionUtil.getVp($r('app.float.interval_dialog_title_margin_top')) - }) - Row() { - Slider({ - value: (intervalType === 0 ? this.intervalMinuteSelect : this.intervalTimesSelect), - min: (intervalType === 0 ? CommonConstants.DEFAULT_INTERVAL_STEP : 0), - max: (intervalType === 0 - ? CommonConstants.DEFAULT_INTERVAL_MINUTE_MAX - : CommonConstants.DEFAULT_INTERVAL_TIME_MAX), - step: (intervalType === 0 ? CommonConstants.DEFAULT_INTERVAL_STEP : CommonConstants.DEFAULT_DOUBLE), - style: SliderStyle.OutSet - }) - .blockColor(Color.Blue) - .trackColor(Color.Gray) - .selectedColor(Color.Blue) - .showSteps(true) - .showTips(false) - .onChange((value: number) => { - if (intervalType === 0) { - this.intervalMinuteSelect = value; - } else { - this.intervalTimesSelect = value; - } - }) - Text((intervalType === 0 ? this.intervalMinuteSelect : this.intervalTimesSelect).toFixed(0)) - .fontSize(DimensionUtil.getFp($r('app.float.interval_dialog_result_font_size'))) - } - .width(CommonConstants.FULL_LENGTH) - } -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Detail/dialog/RenameDialog.ets b/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Detail/dialog/RenameDialog.ets deleted file mode 100644 index 732e28790ddadc268b0a6e873efdbffa6d626fb7..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Detail/dialog/RenameDialog.ets +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2022 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 { CommonConstants } from '../../../common/constants/CommonConstants'; -import { DetailConstant } from '../../../common/constants/DetailConstant'; -import AlarmItem from '../../../common/bean/AlarmItemBean'; -import CommonDialog from './CommonDialog'; -import DimensionUtil from '../../../common/utils/DimensionUtil'; - -@CustomDialog -export default struct RenameDialog { - @Consume(DetailConstant.DEFAULT_PROVIDER_KEY) alarmItem: AlarmItem; - private name: string; - controller: CustomDialogController; - - build() { - Flex() { - CommonDialog({ - title: $r('app.string.alarm_name'), - controller: this.controller, - onConfirm: () => { - this.alarmItem.name = this.name; - } - }) { - TextArea({ text: this.alarmItem.name }) - .width(CommonConstants.FULL_LENGTH) - .margin({ bottom: DimensionUtil.getVp($r('app.float.rename_dialog_text_margin_bottom')) }) - .onChange((value: string) => { - this.name = value; - }) - Divider() - .opacity($r('app.float.divider_opacity')) - .color($r('app.color.grey_divider')) - .lineCap(LineCapStyle.Round) - } - } - } -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Detail/dialog/RepeatDialog.ets b/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Detail/dialog/RepeatDialog.ets deleted file mode 100644 index 9879d3cbc1e2fa1c32ed4ccaaf76603727b2a7ac..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Detail/dialog/RepeatDialog.ets +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2022 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 { CommonConstants } from '../../../common/constants/CommonConstants'; -import { DetailConstant } from '../../../common/constants/DetailConstant'; -import AlarmItem from '../../../common/bean/AlarmItemBean'; -import DetailModel from '../../../viewmodel/DetailViewModel'; -import CommonDialog from './CommonDialog'; -import DataTypeUtils from '../../../common/utils/DataTypeUtils'; -import DimensionUtil from '../../../common/utils/DimensionUtil'; - -@CustomDialog -export default struct RepeatDialog { - @Consume(DetailConstant.DEFAULT_PROVIDER_KEY) alarmItem: AlarmItem; - private viewModel: DetailModel = DetailModel.getInstant(); - private selects: number[] = []; - controller: CustomDialogController; - - aboutToAppear() { - this.selects = DataTypeUtils.deepCopy(this.alarmItem.repeatDays); - } - - build() { - Flex() { - CommonDialog({ - title: $r('app.string.repeat_name'), - controller: this.controller, - onConfirm: () => { - this.selects.sort(); - this.alarmItem.repeatDays = this.selects; - this.alarmItem.isRepeat = this.selects.length > 0; - } - }) { - ForEach(DetailConstant.WEEKDAY_DATA, (item) => { - Row() { - Text(this.viewModel.transAlarmRepeatDayContent(item)) - .layoutWeight(CommonConstants.DEFAULT_LAYOUT_WEIGHT) - .fontColor($r('app.color.grey_divider')) - .fontSize(DimensionUtil.getFp($r('app.float.repeat_dialog_check_font_size'))) - - Checkbox({ name: item }) - .select(this.alarmItem.repeatDays.indexOf(item) !== CommonConstants.DEFAULT_NUMBER_NEGATIVE) - .width(DimensionUtil.getVp($r('app.float.repeat_dialog_check_box_size'))) - .height(DimensionUtil.getVp($r('app.float.repeat_dialog_check_box_size'))) - .onChange((value: boolean) => { - if (value) { - this.selects.push(item); - } else { - let index = this.selects.indexOf(item); - this.selects.splice(index, CommonConstants.DEFAULT_SINGLE); - } - }) - } - .width(CommonConstants.FULL_LENGTH) - - Divider() - .opacity($r('app.float.divider_opacity')) - .color($r('app.color.grey_divider')) - .lineCap(LineCapStyle.Round) - }) - } - } - } -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Main/AlarmList.ets b/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Main/AlarmList.ets deleted file mode 100644 index 416d8ff19a2b8ddd75d52f45c066cf543df71a54..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Main/AlarmList.ets +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2022 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 router from '@ohos.router'; -import { CommonConstants } from '../../common/constants/CommonConstants'; -import AlarmItem from '../../common/bean/AlarmItemBean'; -import AlarmListItem from '../Main/AlarmListItem'; -import DimensionUtil from '../../common/utils/DimensionUtil'; - -@Component -export default struct AlarmList { - @Link alarmItems: Array; - - build() { - List({ space: DimensionUtil.getVp($r('app.float.alarm_list_space')) }) { - ForEach(this.alarmItems, (item: AlarmItem) => { - ListItem() { - AlarmListItem({ alarmItem: item }) - }.onClick(() => { - router.pushUrl({ url: "pages/DetailIndex", params: { alarmItem: item } }); - }) - }, item => JSON.stringify(item)) - } - .padding({ - left: DimensionUtil.getVp($r('app.float.alarm_list_content_distance')), - right: DimensionUtil.getVp($r('app.float.alarm_list_content_distance')) - }) - .listDirection(Axis.Vertical) - .layoutWeight(CommonConstants.DEFAULT_LAYOUT_WEIGHT) - .margin({ top: DimensionUtil.getVp($r('app.float.alarm_list_content_distance')) }) - } -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Main/AlarmListItem.ets b/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Main/AlarmListItem.ets deleted file mode 100644 index 460ed043c95ea816373f9f4acf9529435b78d9a7..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Main/AlarmListItem.ets +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2022 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 MainModel from './../../viewmodel/MainViewModel'; -import { CommonConstants } from '../../common/constants/CommonConstants'; -import AlarmItem from '../../common/bean/AlarmItemBean'; -import DimensionUtil from '../../common/utils/DimensionUtil'; - -@Component -export default struct AlarmListItem { - private mainModel: MainModel = MainModel.getInstant(); - private alarmItem: AlarmItem; - - build() { - Row() { - Column() { - Row() { - Text(this.mainModel.getNoonContent(this.alarmItem.hour)) - .CommonTextAttr(DimensionUtil.getFp($r('app.float.alarms_item_noon_font_size')), - FontWeight.Regular) - Text(this.mainModel.getTaskTimeContent(this.alarmItem.hour, this.alarmItem.minute)) - .CommonTextAttr(DimensionUtil.getFp($r('app.float.alarms_item_time_font_size')), - FontWeight.Regular, - { left: DimensionUtil.getVp($r('app.float.alarms_item_time_margin_left')) }) - } - - Text(this.mainModel.getDescContent(this.alarmItem)) - .CommonTextAttr(DimensionUtil.getFp($r('app.float.alarms_item_dec_font_size')), - FontWeight.Normal, - { top: DimensionUtil.getVp($r('app.float.alarms_item_dec_margin_top')) }, - $r('app.float.alarms_item_desc_text_opacity')) - } - .width(CommonConstants.FULL_LENGTH) - .alignItems(HorizontalAlign.Start) - .layoutWeight(CommonConstants.DEFAULT_LAYOUT_WEIGHT) - - Toggle({ type: ToggleType.Switch, isOn: this.alarmItem.isOpen }) - .onChange((isOn: boolean) => { - this.mainModel.openAlarm(this.alarmItem.id, isOn); - }) - .width(DimensionUtil.getVp($r('app.float.alarms_item_toggle_width'))) - .height(DimensionUtil.getVp($r('app.float.alarms_item_toggle_height'))) - } - .padding({ - left: DimensionUtil.getVp($r('app.float.alarm_list_content_distance')), - right: DimensionUtil.getVp($r('app.float.alarm_list_content_distance')) - }) - .width(CommonConstants.FULL_LENGTH) - .height(DimensionUtil.getVp($r('app.float.alarms_item_height'))) - .backgroundColor(Color.White) - .borderRadius(DimensionUtil.getVp($r('app.float.alarms_item_radius'))) - } -} - -@Extend(Text) function CommonTextAttr (fontSize: number, fontWeight: number, margin?, opacity?) { - .fontColor($r('app.color.grey_divider')) - .fontSize(fontSize) - .fontWeight(fontWeight) - .margin(margin) - .opacity(opacity) -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Main/ClockArea.ets b/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Main/ClockArea.ets deleted file mode 100644 index b3b0a7a1a8d3a114dd6f94ca0b5cd36c169b1d08..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/view/Main/ClockArea.ets +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) 2022 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 { CommonConstants } from '../../common/constants/CommonConstants'; -import MainModel from '../../viewmodel/MainViewModel'; -import { MainConstant } from '../../common/constants/MainConstant'; -import DimensionUtil from '../../common/utils/DimensionUtil'; - -@Component -export default struct ClockArea { - private mainModel: MainModel; - private drawInterval: any = CommonConstants.DEFAULT_NUMBER_NEGATIVE; - @State showClock: boolean = true; - private canvasSize: number; - private clockRadius: number; - private settings: RenderingContextSettings = new RenderingContextSettings(true); - private renderContext: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); - - aboutToAppear() { - this.mainModel = MainModel.getInstant(); - this.canvasSize = DimensionUtil.getVp($r('app.float.clock_size')); - this.clockRadius = this.canvasSize / CommonConstants.DEFAULT_DOUBLE - CommonConstants.DEFAULT_DOUBLE; - } - - aboutToDisappear() { - clearInterval(this.drawInterval); - } - - build() { - Canvas(this.renderContext) - .width(this.canvasSize) - .aspectRatio(CommonConstants.DEFAULT_LAYOUT_WEIGHT) - .onReady(() => { - if (this.drawInterval === CommonConstants.DEFAULT_NUMBER_NEGATIVE) { - this.startDrawTask(); - } - }) - .onClick(() => { - this.showClock = !this.showClock; - }) - } - - // 启动绘画任务 - private startDrawTask() { - let that = this; - that.renderContext.translate( - this.canvasSize / CommonConstants.DEFAULT_DOUBLE, - this.canvasSize / CommonConstants.DEFAULT_DOUBLE); - that.drawClockArea(); - this.drawInterval = setInterval(() => { - that.drawClockArea(); - }, MainConstant.DEFAULT_ONE_SECOND_MS); - } - - // 开始绘制时钟区域 - private drawClockArea(): void{ - this.renderContext.clearRect( - -this.canvasSize, - -this.canvasSize / CommonConstants.DEFAULT_DOUBLE, - this.canvasSize * CommonConstants.DEFAULT_DOUBLE, - this.canvasSize); - let date = new Date(); - let hours = date.getHours(); - let minutes = date.getMinutes(); - let seconds = date.getSeconds(); - if (this.showClock) { - this.drawPan(); - this.drawPointer( - CommonConstants.DEFAULT_INTERVAL_MINUTE_MAX * (hours > CommonConstants.DEFAULT_TOTAL_HOUR - ? hours - CommonConstants.DEFAULT_TOTAL_HOUR - : hours) - + minutes / CommonConstants.DEFAULT_TOTAL_HOUR * CommonConstants.DEFAULT_COMMON_DEGREE - , MainConstant.HOUR_POINTER_IMAGE_URL); - this.drawPointer(CommonConstants.DEFAULT_COMMON_DEGREE * minutes, MainConstant.MINUTE_POINTER_IMAGE_URL); - this.drawPointer(CommonConstants.DEFAULT_COMMON_DEGREE * seconds, MainConstant.SECOND_POINTER_IMAGE_URL); - } else { - this.drawTime(hours, minutes, seconds); - } - } - - // 绘制表盘 - private drawPan(): void{ - this.renderContext.beginPath(); - let secondImg = new ImageBitmap(MainConstant.CLOCK_PAN_IMAGE_URL); - let imgWidth = this.clockRadius * 2; - this.renderContext.drawImage(secondImg, -this.clockRadius, -this.clockRadius, imgWidth, imgWidth); - this.renderContext.restore(); - } - - // 绘制时针、分针、秒针 - private drawPointer(degree, pointerImgRes) { - this.renderContext.save(); - var theta = (degree + MainConstant.DEFAULT_HORIZONTAL_ANGLE) * Math.PI / MainConstant.DEFAULT_HORIZONTAL_ANGLE; - this.renderContext.rotate(theta); - this.renderContext.beginPath(); - let secondImg = new ImageBitmap(pointerImgRes); - let imgWidth = CommonConstants.DEFAULT_POINTER_WIDTH; - this.renderContext.drawImage( - secondImg, - -imgWidth / CommonConstants.DEFAULT_DOUBLE, - -this.clockRadius, - imgWidth, - this.clockRadius * CommonConstants.DEFAULT_DOUBLE); - this.renderContext.restore(); - } - - // 绘制完整时间回显 - private drawTime(hour: number, minute: number, second: number): void{ - let time = this.mainModel.fillZero(hour) - + MainConstant.DEFAULT_STRING_COLON - + this.mainModel.fillZero(minute) - + MainConstant.DEFAULT_STRING_COLON - + this.mainModel.fillZero(second); - this.renderContext.save(); - this.renderContext.font = DimensionUtil.getPx($r('app.float.clock_time_font_size')) - + MainConstant.CLOCK_TIME_FONT_SIZE_UNIT; - this.renderContext.beginPath(); - this.renderContext.textAlign = 'center'; - this.renderContext.fillText(time, 0, 0); - this.renderContext.restore(); - } -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/viewmodel/DetailViewModel.ets b/CommonEventAndNotification/AlarmClock/entry/src/main/ets/viewmodel/DetailViewModel.ets deleted file mode 100644 index 9fbf5cd42b39484b0d6dccfe34f95ddefe2ce89f..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/viewmodel/DetailViewModel.ets +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright (c) 2022 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 { DetailConstant } from '../common/constants/DetailConstant'; -import { ALARM_KEY, CommonConstants } from '../common/constants/CommonConstants'; -import AlarmItem from '../common/bean/AlarmItemBean'; -import ReminderService from '../model/ReminderService'; -import DataTypeUtils from '../common/utils/DataTypeUtils'; - -/** - * Detail page view model description - */ -export default class DetailViewModel { - private static instant; - private reminderService: ReminderService; - private alarms: Array; - - private constructor() { - this.reminderService = new ReminderService(); - this.alarms = new Array(); - } - - /** - * Get DetailViewModel instance. - * - * @return instance - */ - public static getInstant() { - if (this.instant == null) { - this.instant = new DetailViewModel(); - } - return this.instant; - } - - /** - * Conversion alarm repeat day content - * - * @param repeatDay number - * @return repeatContent string - */ - public transAlarmRepeatDayContent(repeatDay: number): string{ - let repeatContent; - switch (repeatDay) { - case CommonConstants.DEFAULT_NUMBER_MONDAY: - repeatContent = CommonConstants.DEFAULT_STRING_MONDAY; - break; - case CommonConstants.DEFAULT_NUMBER_TUESDAY: - repeatContent = CommonConstants.DEFAULT_STRING_TUESDAY; - break; - case CommonConstants.DEFAULT_NUMBER_WEDNESDAY: - repeatContent = CommonConstants.DEFAULT_STRING_WEDNESDAY; - break; - case CommonConstants.DEFAULT_NUMBER_THURSDAY: - repeatContent = CommonConstants.DEFAULT_STRING_THURSDAY; - break; - case CommonConstants.DEFAULT_NUMBER_FRIDAY: - repeatContent = CommonConstants.DEFAULT_STRING_FRIDAY; - break; - case CommonConstants.DEFAULT_NUMBER_SATURDAY: - repeatContent = CommonConstants.DEFAULT_STRING_SATURDAY; - break; - case CommonConstants.DEFAULT_NUMBER_SUNDAY: - repeatContent = CommonConstants.DEFAULT_STRING_SUNDAY; - break; - default: - break; - } - return repeatContent; - } - - /** - * Set the initial time of the alarm. - * - * @param alarmItem AlarmItem - */ - public setAlarmDefaultTime(alarmItem?: AlarmItem) { - let hour; - let minute; - if (alarmItem == null) { - let date = new Date(); - hour = date.getHours(); - minute = date.getMinutes(); - } else { - hour = alarmItem.hour; - minute = alarmItem.minute; - } - DetailConstant.DAY_DATA[0].delSelect = (hour >= CommonConstants.DEFAULT_TOTAL_HOUR - ? CommonConstants.DEFAULT_SINGLE - : 0); - DetailConstant.DAY_DATA[CommonConstants.DEFAULT_SINGLE].delSelect = (hour === 0 - ? CommonConstants.DEFAULT_TOTAL_HOUR - : (hour > CommonConstants.DEFAULT_TOTAL_HOUR ? hour - CommonConstants.DEFAULT_TOTAL_HOUR : hour)) - - CommonConstants.DEFAULT_SINGLE; - DetailConstant.DAY_DATA[CommonConstants.DEFAULT_DATA_PICKER_HOUR_SELECTION].delSelect = - (minute === 0 ? CommonConstants.DEFAULT_TOTAL_MINUTE : minute) - CommonConstants.DEFAULT_SINGLE; - } - - /** - * Set the alarm remind. - * - * @param alarmItem AlarmItem - */ - public async setAlarmRemind(alarmItem: AlarmItem) { - alarmItem.hour = this.getAlarmTime(CommonConstants.DEFAULT_SINGLE); - alarmItem.minute = this.getAlarmTime(CommonConstants.DEFAULT_DATA_PICKER_HOUR_SELECTION); - let index = await this.findAlarmWithId(alarmItem.id); - if (index !== CommonConstants.DEFAULT_NUMBER_NEGATIVE) { // 已存在,删除原有提醒 - this.reminderService.deleteReminder(alarmItem.id); - } else { // 不存在,以数据长度为notificationId新增闹钟数据 - index = this.alarms.length; - alarmItem.notificationId = index; - this.alarms.push(alarmItem); - } - this.reminderService.addReminder(alarmItem, (newId) => { - alarmItem.id = newId; - alarmItem.isOpen = true; - this.alarms[index] = alarmItem; - globalThis.preference.set(ALARM_KEY, JSON.stringify(this.alarms)); - }) - } - - /** - * Remove the alarm remind. - * - * @param id number - */ - public async removeAlarmRemind(id: number) { - this.reminderService.deleteReminder(id); - let index = await this.findAlarmWithId(id); - if (index !== CommonConstants.DEFAULT_NUMBER_NEGATIVE) { - this.alarms.splice(index, CommonConstants.DEFAULT_SINGLE); - } - globalThis.preference.set(ALARM_KEY, JSON.stringify(this.alarms)); - } - - private getAlarmTime(aType: number): number{ - let times = DetailConstant.DAY_DATA[aType]; - let selectedIndex = times.delSelect; - let time = Number(times.data[selectedIndex]); - if (aType === CommonConstants.DEFAULT_SINGLE) { - time = (time === CommonConstants.DEFAULT_TOTAL_HOUR ? 0 : time) - + (DetailConstant.DAY_DATA[0].delSelect === CommonConstants.DEFAULT_SINGLE - ? CommonConstants.DEFAULT_TOTAL_HOUR - : 0); - } - return time; - } - - private async findAlarmWithId(id: number) { - let data = await globalThis.preference.get(ALARM_KEY); - if (!DataTypeUtils.isNull(data)) { - this.alarms = JSON.parse(data); - for (let i = 0;i < this.alarms.length; i++) { - if (this.alarms[i].id === id) { - return i; - } - } - } - return CommonConstants.DEFAULT_NUMBER_NEGATIVE; - } -} - diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/viewmodel/MainViewModel.ets b/CommonEventAndNotification/AlarmClock/entry/src/main/ets/viewmodel/MainViewModel.ets deleted file mode 100644 index 733e304e121f8c172c5a14d11729ba622a4be7ec..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/ets/viewmodel/MainViewModel.ets +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright (c) 2022 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 { MainConstant } from '../common/constants/MainConstant'; -import ReminderService from '../model/ReminderService'; -import { ALARM_KEY, CommonConstants } from '../common/constants/CommonConstants'; -import AlarmItem from '../common/bean/AlarmItemBean'; -import DataTypeUtils from '../common/utils/DataTypeUtils'; - -/** - * Declare class of main view model. - */ -export default class MainViewModel { - private static instant; - private reminderService: ReminderService; - private alarms: Array; - private drawInterval: any = CommonConstants.DEFAULT_NUMBER_NEGATIVE; - private showClock: boolean = true; - - private constructor() { - this.alarms = new Array(); - this.reminderService = new ReminderService(); - this.reminderService.openNotificationPermission(); - } - - /** - * Get instant in MainViewModel. - */ - public static getInstant() { - if (this.instant == null) { - this.instant = new MainViewModel(); - } - return this.instant; - } - - /** - * Querying alarm task database tables. - * - * @param callback (alarms: Array) => void - */ - private queryDatabaseAlarms(callback: (alarms: Array) => void) { - globalThis.preference.get(ALARM_KEY).then((data) => { - if (!DataTypeUtils.isNull(data)) { - this.alarms = JSON.parse(data); - callback(this.alarms); - } - }) - } - - /** - * Refresh alarm task. - * - * @param callback (alarms: Array) => void - */ - public queryAlarmsTasker(callback: (alarms: Array) => void) { - let that = this; - that.queryDatabaseAlarms(callback); - globalThis.preference.addPreferencesListener({ - onDataChanged() { - that.queryDatabaseAlarms(callback); - } - }) - } - - /** - * Padding zeros for insufficient digits - * - * @param val number - * @return content string - */ - public fillZero(val: number): string{ - return (val > MainConstant.DEFAULT_SINGLE_DIGIT_MAX - ? val.toString() - : (MainConstant.DEFAULT_ZEROING + val)); - } - - /** - * Get noon content in MainViewModel. - * - * @param hour number - * @return content string - */ - public getNoonContent(hour: number): string{ - return (hour < CommonConstants.DEFAULT_TOTAL_HOUR - ? MainConstant.DEFAULT_STRING_MORNING - : MainConstant.DEFAULT_STRING_AFTERNOON); - } - - /** - * Get task time content in MainViewModel. - * - * @param hour number - * @param minute number - * @return content string - */ - public getTaskTimeContent(hour: number, minute: number): string { - return (this.fillZero(hour > CommonConstants.DEFAULT_TOTAL_HOUR ? hour - CommonConstants.DEFAULT_TOTAL_HOUR : hour) - + MainConstant.DEFAULT_STRING_COLON - + this.fillZero(minute)); - } - - /** - * Get description content in MainViewModel. - * - * @param alarmItem AlarmItem - * @return content string - */ - public getDescContent(alarmItem: AlarmItem): string{ - return (alarmItem.name + CommonConstants.DEFAULT_STRING_COMMA - + (alarmItem.isRepeat - ? this.getAlarmRepeatDayContent(alarmItem.repeatDays) - : CommonConstants.DEFAULT_STRING_NO_REPEAT)); - } - - /** - * Obtains the number of repetition days of an alarm task. - * - * @param repeatDays Array - * @return content string - */ - public getAlarmRepeatDayContent(repeatDays: Array): string{ - let content = MainConstant.DEFAULT_STRING_NULL; - for (var i = 0; i < repeatDays.length; i++) { - let repeatDay = repeatDays[i]; - let repeatContent; - switch (repeatDay) { - case CommonConstants.DEFAULT_NUMBER_MONDAY: - repeatContent = CommonConstants.DEFAULT_STRING_MONDAY; - break; - case CommonConstants.DEFAULT_NUMBER_TUESDAY: - repeatContent = CommonConstants.DEFAULT_STRING_TUESDAY; - break; - case CommonConstants.DEFAULT_NUMBER_WEDNESDAY: - repeatContent = CommonConstants.DEFAULT_STRING_WEDNESDAY; - break; - case CommonConstants.DEFAULT_NUMBER_THURSDAY: - repeatContent = CommonConstants.DEFAULT_STRING_THURSDAY; - break; - case CommonConstants.DEFAULT_NUMBER_FRIDAY: - repeatContent = CommonConstants.DEFAULT_STRING_FRIDAY; - break; - case CommonConstants.DEFAULT_NUMBER_SATURDAY: - repeatContent = CommonConstants.DEFAULT_STRING_SATURDAY; - break; - case CommonConstants.DEFAULT_NUMBER_SUNDAY: - repeatContent = CommonConstants.DEFAULT_STRING_SUNDAY; - break; - default: - break; - } - content += (repeatContent + CommonConstants.DEFAULT_STRING_SPACE); - } - return content; - } - - /** - * Enabling/Disabling alarms. - * - * @param id number - * @return isOpen boolean - */ - public openAlarm(id: number, isOpen: boolean) { - for (let i = 0; i < this.alarms.length; i++) { - if (this.alarms[i].id === id) { - this.alarms[i].isOpen = isOpen; - if (isOpen) { - this.reminderService.addReminder(this.alarms[i]); - } else { - this.reminderService.deleteReminder(this.alarms[i].id); - } - globalThis.preference.set(ALARM_KEY, JSON.stringify(this.alarms)); - break; - } - } - } -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/module.json5 b/CommonEventAndNotification/AlarmClock/entry/src/main/module.json5 deleted file mode 100644 index 38c9995fce4b992ee22a366cd1092b8b240f3082..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/module.json5 +++ /dev/null @@ -1,42 +0,0 @@ -{ - "module": { - "name": "entry", - "type": "entry", - "description": "$string:entry_desc", - "mainElement": "EntryAbility", - "deviceTypes": [ - "default" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "abilities": [ - { - "name": "EntryAbility", - "srcEntry": "./ets/entryability/EntryAbility.ets", - "description": "$string:MainAbility_desc", - "icon": "$media:icon", - "label": "$string:MainAbility_label", - "startWindowIcon": "$media:icon", - "startWindowBackground": "$color:white", - "exported": true, - "orientation": "portrait", - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ] - } - ], - "requestPermissions": [ - { - "name": "ohos.permission.PUBLISH_AGENT_REMINDER" - } - ] - } -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/element/color.json b/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/element/color.json deleted file mode 100644 index 90aa8c1a168703e5fcf54536837ab360dc96072a..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/element/color.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "color": [ - { - "name": "white", - "value": "#FFFFFF" - }, - { - "name": "grey_light", - "value": "#F1F3F5" - }, - { - "name": "grey_divider", - "value": "#182431" - }, - { - "name": "blue_light", - "value": "#007DFF" - }, - { - "name": "grey_with_opacity", - "value": "#0C182431" - }, - { - "name": "red_light", - "value": "#FA2A2D" - }, - { - "name": "trans_parent", - "value": "#00000000" - }, - { - "name": "green_light", - "value": "#17A98E" - } - ] -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/element/dimen.json b/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/element/dimen.json deleted file mode 100644 index 406dcfbf954b1f0a301bf2966487076a6ad01b39..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/element/dimen.json +++ /dev/null @@ -1,228 +0,0 @@ -{ - "float": [ - { - "name": "alarms_item_desc_text_opacity", - "value": "0.6" - }, - { - "name": "divider_opacity", - "value": "0.05" - }, - { - "name": "setting_item_content_font_opacity", - "value": "0.6" - }, - { - "name": "page_title_height", - "value": "56" - }, - { - "name": "content_margin_body", - "value": "16" - }, - { - "name": "title_horizon_margin", - "value": "24" - }, - { - "name": "title_font_size", - "value": "24" - }, - { - "name": "new_alarm_button_size", - "value": "48" - }, - { - "name": "new_alarm_button_margin_vertical", - "value": "24" - }, - { - "name": "title_button_size", - "value": "24" - }, - { - "name": "delete_button_width", - "value": "120" - }, - { - "name": "delete_button_height", - "value": "40" - }, - { - "name": "delete_button_font_size", - "value": "16" - }, - { - "name": "delete_button_radius", - "value": "20" - }, - { - "name": "delete_button_margin_bottom", - "value": "24" - }, - { - "name": "alarm_list_space", - "value": "12" - }, - { - "name": "alarm_list_content_distance", - "value": "12" - }, - { - "name": "alarms_item_noon_font_size", - "value": "16" - }, - { - "name": "alarms_item_time_font_size", - "value": "24" - }, - { - "name": "alarms_item_time_margin_left", - "value": "4" - }, - { - "name": "alarms_item_dec_font_size", - "value": "14" - }, - { - "name": "alarms_item_dec_margin_top", - "value": "2" - }, - { - "name": "alarms_item_toggle_width", - "value": "36" - }, - { - "name": "alarms_item_toggle_height", - "value": "20" - }, - { - "name": "alarms_item_height", - "value": "72" - }, - { - "name": "alarms_item_radius", - "value": "24" - }, - { - "name": "clock_size", - "value": "252" - }, - { - "name": "clock_time_font_size", - "value": "60" - }, - { - "name": "detail_title_font_size", - "value": "20" - }, - { - "name": "title_line_height", - "value": "28" - }, - { - "name": "title_margin", - "value": "16" - }, - { - "name": "common_dialog_title_font_size", - "value": "20" - }, - { - "name": "common_dialog_title_margin_vertical", - "value": "12" - }, - { - "name": "common_dialog_margin_vertical", - "value": "12" - }, - { - "name": "common_dialog_padding", - "value": "24" - }, - { - "name": "common_dialog_button_font_size", - "value": "15" - }, - { - "name": "common_dialog_button_height", - "value": "40" - }, - { - "name": "duration_dialog_content_font_size", - "value": "14" - }, - { - "name": "duration_dialog_radio_size", - "value": "20" - }, - { - "name": "interval_dialog_title_font_size", - "value": "10" - }, - { - "name": "interval_dialog_title_margin_top", - "value": "10" - }, - { - "name": "interval_dialog_result_font_size", - "value": "16" - }, - { - "name": "rename_dialog_text_margin_bottom", - "value": "20" - }, - { - "name": "repeat_dialog_check_font_size", - "value": "14" - }, - { - "name": "repeat_dialog_check_box_size", - "value": "20" - }, - { - "name": "date_picker_height", - "value": "200" - }, - { - "name": "date_picker_padding_horizon", - "value": "24" - }, - { - "name": "setting_item_divider_margin_horizon", - "value": "12" - }, - { - "name": "setting_item_name_font_size", - "value": "16" - }, - { - "name": "setting_item_content_font_size", - "value": "14" - }, - { - "name": "setting_item_image_width", - "value": "6.7" - }, - { - "name": "setting_item_image_height", - "value": "12.8" - }, - { - "name": "setting_item_image_margin_horizon", - "value": "7" - }, - { - "name": "setting_item_height", - "value": "56" - }, - { - "name": "setting_item_interval", - "value": "12" - }, - { - "name": "setting_item_border_radius", - "value": "24" - } - ] -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/element/string.json b/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/element/string.json deleted file mode 100644 index b3d9b333286ae69cd8a2b2e194efb9935d21b0b5..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "AlarmClock" - }, - { - "name": "confirm", - "value": "确定" - }, - { - "name": "cancel", - "value": "取消" - }, - { - "name": "ring_duration", - "value": "闹铃时长" - }, - { - "name": "ring_interval", - "value": "再响间隔" - }, - { - "name": "ring_interval_content", - "value": "响铃间隔时间(分钟)" - }, - { - "name": "ring_times_content", - "value": "重复响铃次数" - }, - { - "name": "alarm_name", - "value": "闹钟名" - }, - { - "name": "repeat_name", - "value": "重复" - }, - { - "name": "new_alarm", - "value": "新建闹钟" - }, - { - "name": "update_alarm", - "value": "修改闹钟" - }, - { - "name": "delete", - "value": "删除" - }, - { - "name": "main_page_title_font_family", - "value": "HarmonyHeiTi-Bold" - } - ] -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/ic_add.png b/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/ic_add.png deleted file mode 100644 index 53968d7c9da7182d73a2e8d3c7c3c9a3cca83b63..0000000000000000000000000000000000000000 Binary files a/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/ic_add.png and /dev/null differ diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/ic_cancel.png b/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/ic_cancel.png deleted file mode 100644 index c0bece832d3b81d53ac6993e974c0296e73bad8f..0000000000000000000000000000000000000000 Binary files a/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/ic_cancel.png and /dev/null differ diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/ic_clock_pan.png b/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/ic_clock_pan.png deleted file mode 100644 index ea0d3f082b3c160bd326048acf9ec79bdb9ac221..0000000000000000000000000000000000000000 Binary files a/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/ic_clock_pan.png and /dev/null differ diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/ic_confirm.png b/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/ic_confirm.png deleted file mode 100644 index 5d790967e67818c6fbd09788f80149a368cb98b8..0000000000000000000000000000000000000000 Binary files a/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/ic_confirm.png and /dev/null differ diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/ic_hour_pointer.png b/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/ic_hour_pointer.png deleted file mode 100644 index 18d556e197631be29574bd413332ddf6d5b22929..0000000000000000000000000000000000000000 Binary files a/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/ic_hour_pointer.png and /dev/null differ diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/ic_minute_pointer.png b/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/ic_minute_pointer.png deleted file mode 100644 index 60cd4375a30e955ad631316e963bc8ac794405ef..0000000000000000000000000000000000000000 Binary files a/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/ic_minute_pointer.png and /dev/null differ diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/ic_public_back.png b/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/ic_public_back.png deleted file mode 100644 index d3a807db149dd77830017e15eb9a499e8948be25..0000000000000000000000000000000000000000 Binary files a/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/ic_public_back.png and /dev/null differ diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/ic_right.png b/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/ic_right.png deleted file mode 100644 index f95236854b0e477956269cfe9fecb661e82c6c66..0000000000000000000000000000000000000000 Binary files a/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/ic_right.png and /dev/null differ diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/ic_second_pointer.png b/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/ic_second_pointer.png deleted file mode 100644 index 0f3d604e988165e4bf9fd5d5e42984430389977e..0000000000000000000000000000000000000000 Binary files a/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/ic_second_pointer.png and /dev/null differ diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/icon.png b/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/profile/main_pages.json b/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 2ec1d513234bfb8bc4257e908322c70d4c95cf5d..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "src": [ - "pages/MainIndex", - "pages/DetailIndex" - ] -} diff --git a/CommonEventAndNotification/AlarmClock/figures/AlarmClock-detail.png b/CommonEventAndNotification/AlarmClock/figures/AlarmClock-detail.png deleted file mode 100644 index b2084f14d19da93057e2a30a91f7dab6701afe00..0000000000000000000000000000000000000000 Binary files a/CommonEventAndNotification/AlarmClock/figures/AlarmClock-detail.png and /dev/null differ diff --git a/CommonEventAndNotification/AlarmClock/figures/AlarmClock-main.png b/CommonEventAndNotification/AlarmClock/figures/AlarmClock-main.png deleted file mode 100644 index f02eddb90fd2290e3bec0db89a4eb0de665c566f..0000000000000000000000000000000000000000 Binary files a/CommonEventAndNotification/AlarmClock/figures/AlarmClock-main.png and /dev/null differ diff --git a/CommonEventAndNotification/AlarmClock/figures/AlarmClock.gif b/CommonEventAndNotification/AlarmClock/figures/AlarmClock.gif deleted file mode 100644 index 2f17c7942ebfa0a9e7a1d6bffc0be44eaf55ac42..0000000000000000000000000000000000000000 Binary files a/CommonEventAndNotification/AlarmClock/figures/AlarmClock.gif and /dev/null differ diff --git a/CommonEventAndNotification/AlarmClock/figures/zh-cn_image_0000001405854998.png b/CommonEventAndNotification/AlarmClock/figures/zh-cn_image_0000001405854998.png deleted file mode 100644 index 7b00b63e899143d879c0dd88290bec64580169ae..0000000000000000000000000000000000000000 Binary files a/CommonEventAndNotification/AlarmClock/figures/zh-cn_image_0000001405854998.png and /dev/null differ diff --git a/CommonEventAndNotification/AlarmClock/figures/zh-cn_image_0000001409470914.gif b/CommonEventAndNotification/AlarmClock/figures/zh-cn_image_0000001409470914.gif deleted file mode 100644 index 0d4a2fc153a9ae074efdb8d8f7579ad73501a98c..0000000000000000000000000000000000000000 Binary files a/CommonEventAndNotification/AlarmClock/figures/zh-cn_image_0000001409470914.gif and /dev/null differ diff --git a/CommonEventAndNotification/AlarmClock/hvigor/hvigor-config.json5 b/CommonEventAndNotification/AlarmClock/hvigor/hvigor-config.json5 deleted file mode 100644 index 5d9bed6108611f15d956e823594d7824ce7cfd74..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/hvigor/hvigor-config.json5 +++ /dev/null @@ -1,6 +0,0 @@ -{ - "hvigorVersion": "2.0.0", - "dependencies": { - "@ohos/hvigor-ohos-plugin": "2.0.0" - } -} \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/hvigor/hvigor-wrapper.js b/CommonEventAndNotification/AlarmClock/hvigor/hvigor-wrapper.js deleted file mode 100644 index ed520df42d9190418c6ade156daa022ec8f43e21..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/hvigor/hvigor-wrapper.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var u=require("fs"),e=require("path"),t=require("os"),r=require("crypto"),n=require("child_process"),i=require("constants"),o=require("stream"),D=require("util"),c=require("assert");function a(u){return u&&"object"==typeof u&&"default"in u?u:{default:u}}var s=a(u),f=a(e),E=a(t),l=a(r),F=a(n),C=a(i),A=a(o),d=a(D),y=a(c),p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},h={},m={},B={},v=p&&p.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(B,"__esModule",{value:!0}),B.isMac=B.isLinux=B.isWindows=void 0;const S=v(E.default),_="Windows_NT",O="Linux",w="Darwin";B.isWindows=function(){return S.default.type()===_},B.isLinux=function(){return S.default.type()===O},B.isMac=function(){return S.default.type()===w};var P={},b=p&&p.__createBinding||(Object.create?function(u,e,t,r){void 0===r&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(u,r,n)}:function(u,e,t,r){void 0===r&&(r=t),u[r]=e[t]}),g=p&&p.__setModuleDefault||(Object.create?function(u,e){Object.defineProperty(u,"default",{enumerable:!0,value:e})}:function(u,e){u.default=e}),N=p&&p.__importStar||function(u){if(u&&u.__esModule)return u;var e={};if(null!=u)for(var t in u)"default"!==t&&Object.prototype.hasOwnProperty.call(u,t)&&b(e,u,t);return g(e,u),e};Object.defineProperty(P,"__esModule",{value:!0}),P.hash=void 0;const R=N(l.default);P.hash=function(u,e="md5"){return R.createHash(e).update(u,"utf-8").digest("hex")},function(u){var e=p&&p.__createBinding||(Object.create?function(u,e,t,r){void 0===r&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(u,r,n)}:function(u,e,t,r){void 0===r&&(r=t),u[r]=e[t]}),t=p&&p.__setModuleDefault||(Object.create?function(u,e){Object.defineProperty(u,"default",{enumerable:!0,value:e})}:function(u,e){u.default=e}),r=p&&p.__importStar||function(u){if(u&&u.__esModule)return u;var r={};if(null!=u)for(var n in u)"default"!==n&&Object.prototype.hasOwnProperty.call(u,n)&&e(r,u,n);return t(r,u),r};Object.defineProperty(u,"__esModule",{value:!0}),u.HVIGOR_PROJECT_DEPENDENCY_PACKAGE_JSON_PATH=u.HVIGOR_PROJECT_DEPENDENCIES_HOME=u.HVIGOR_PROJECT_WRAPPER_HOME=u.HVIGOR_PROJECT_NAME=u.HVIGOR_PROJECT_ROOT_DIR=u.HVIGOR_PROJECT_CACHES_HOME=u.HVIGOR_PNPM_STORE_PATH=u.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=u.HVIGOR_WRAPPER_TOOLS_HOME=u.HVIGOR_USER_HOME=u.DEFAULT_PACKAGE_JSON=u.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME=u.NPM_TOOL=u.PNPM_TOOL=u.HVIGOR_ENGINE_PACKAGE_NAME=void 0;const n=r(f.default),i=r(E.default),o=B,D=P;u.HVIGOR_ENGINE_PACKAGE_NAME="@ohos/hvigor",u.PNPM_TOOL=(0,o.isWindows)()?"pnpm.cmd":"pnpm",u.NPM_TOOL=(0,o.isWindows)()?"npm.cmd":"npm",u.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME="hvigor-config.json5",u.DEFAULT_PACKAGE_JSON="package.json",u.HVIGOR_USER_HOME=n.resolve(i.homedir(),".hvigor"),u.HVIGOR_WRAPPER_TOOLS_HOME=n.resolve(u.HVIGOR_USER_HOME,"wrapper","tools"),u.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=n.resolve(u.HVIGOR_WRAPPER_TOOLS_HOME,"node_modules",".bin",u.PNPM_TOOL),u.HVIGOR_PNPM_STORE_PATH=n.resolve(u.HVIGOR_USER_HOME,"caches"),u.HVIGOR_PROJECT_CACHES_HOME=n.resolve(u.HVIGOR_USER_HOME,"project_caches"),u.HVIGOR_PROJECT_ROOT_DIR=process.cwd(),u.HVIGOR_PROJECT_NAME=n.basename((0,D.hash)(u.HVIGOR_PROJECT_ROOT_DIR)),u.HVIGOR_PROJECT_WRAPPER_HOME=n.resolve(u.HVIGOR_PROJECT_ROOT_DIR,"hvigor"),u.HVIGOR_PROJECT_DEPENDENCIES_HOME=n.resolve(u.HVIGOR_PROJECT_CACHES_HOME,u.HVIGOR_PROJECT_NAME,"workspace"),u.HVIGOR_PROJECT_DEPENDENCY_PACKAGE_JSON_PATH=n.resolve(u.HVIGOR_PROJECT_DEPENDENCIES_HOME,u.DEFAULT_PACKAGE_JSON)}(m);var I={},k={};Object.defineProperty(k,"__esModule",{value:!0}),k.logErrorAndExit=void 0,k.logErrorAndExit=function(u){u instanceof Error?console.error(u.message):console.error(u),process.exit(-1)};var T=p&&p.__createBinding||(Object.create?function(u,e,t,r){void 0===r&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(u,r,n)}:function(u,e,t,r){void 0===r&&(r=t),u[r]=e[t]}),x=p&&p.__setModuleDefault||(Object.create?function(u,e){Object.defineProperty(u,"default",{enumerable:!0,value:e})}:function(u,e){u.default=e}),M=p&&p.__importStar||function(u){if(u&&u.__esModule)return u;var e={};if(null!=u)for(var t in u)"default"!==t&&Object.prototype.hasOwnProperty.call(u,t)&&T(e,u,t);return x(e,u),e};Object.defineProperty(I,"__esModule",{value:!0}),I.executeCommand=I.getNpmPath=I.hasNpmPackInPaths=void 0;const H=F.default,j=M(f.default),J=m,L=k;I.hasNpmPackInPaths=function(u,e){try{return require.resolve(u,{paths:[...e]}),!0}catch(u){return!1}},I.getNpmPath=function(){const u=process.execPath;return j.join(j.dirname(u),J.NPM_TOOL)},I.executeCommand=function(u,e,t){0!==(0,H.spawnSync)(u,e,t).status&&(0,L.logErrorAndExit)(`Error: ${u} execute failed.See above for details.`)};var G=p&&p.__createBinding||(Object.create?function(u,e,t,r){void 0===r&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(u,r,n)}:function(u,e,t,r){void 0===r&&(r=t),u[r]=e[t]}),V=p&&p.__setModuleDefault||(Object.create?function(u,e){Object.defineProperty(u,"default",{enumerable:!0,value:e})}:function(u,e){u.default=e}),$=p&&p.__importStar||function(u){if(u&&u.__esModule)return u;var e={};if(null!=u)for(var t in u)"default"!==t&&Object.prototype.hasOwnProperty.call(u,t)&&G(e,u,t);return V(e,u),e};Object.defineProperty(h,"__esModule",{value:!0});var U=h.executeInstallPnpm=Z=h.isPnpmAvailable=void 0;const W=$(s.default),q=m,K=I,Y=$(f.default),z=k;var Z=h.isPnpmAvailable=function(){return!!W.existsSync(q.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH)&&(0,K.hasNpmPackInPaths)("pnpm",[q.HVIGOR_WRAPPER_TOOLS_HOME])};U=h.executeInstallPnpm=function(){const u=(0,K.getNpmPath)();!function(){const u=Y.resolve(q.HVIGOR_WRAPPER_TOOLS_HOME,q.DEFAULT_PACKAGE_JSON);try{W.existsSync(q.HVIGOR_WRAPPER_TOOLS_HOME)||W.mkdirSync(q.HVIGOR_WRAPPER_TOOLS_HOME,{recursive:!0});const e={dependencies:{}};W.writeFileSync(u,JSON.stringify(e))}catch(e){(0,z.logErrorAndExit)(`Error: EPERM: operation not permitted,create ${u} failed.`)}}(),(0,K.executeCommand)(u,["install","pnpm"],{cwd:q.HVIGOR_WRAPPER_TOOLS_HOME,stdio:["inherit","inherit","inherit"]})};var X={},Q={},uu={},eu={};Object.defineProperty(eu,"__esModule",{value:!0}),eu.Unicode=void 0;class tu{}eu.Unicode=tu,tu.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,tu.ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,tu.ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Object.defineProperty(uu,"__esModule",{value:!0}),uu.JudgeUtil=void 0;const ru=eu;uu.JudgeUtil=class{static isIgnoreChar(u){return"string"==typeof u&&("\t"===u||"\v"===u||"\f"===u||" "===u||" "===u||"\ufeff"===u||"\n"===u||"\r"===u||"\u2028"===u||"\u2029"===u)}static isSpaceSeparator(u){return"string"==typeof u&&ru.Unicode.Space_Separator.test(u)}static isIdStartChar(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||ru.Unicode.ID_Start.test(u))}static isIdContinueChar(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||"‌"===u||"‍"===u||ru.Unicode.ID_Continue.test(u))}static isDigitWithoutZero(u){return/[1-9]/.test(u)}static isDigit(u){return"string"==typeof u&&/[0-9]/.test(u)}static isHexDigit(u){return"string"==typeof u&&/[0-9A-Fa-f]/.test(u)}};var nu={},iu={fromCallback:function(u){return Object.defineProperty((function(...e){if("function"!=typeof e[e.length-1])return new Promise(((t,r)=>{u.call(this,...e,((u,e)=>null!=u?r(u):t(e)))}));u.apply(this,e)}),"name",{value:u.name})},fromPromise:function(u){return Object.defineProperty((function(...e){const t=e[e.length-1];if("function"!=typeof t)return u.apply(this,e);u.apply(this,e.slice(0,-1)).then((u=>t(null,u)),t)}),"name",{value:u.name})}},ou=C.default,Du=process.cwd,cu=null,au=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return cu||(cu=Du.call(process)),cu};try{process.cwd()}catch(u){}if("function"==typeof process.chdir){var su=process.chdir;process.chdir=function(u){cu=null,su.call(process,u)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,su)}var fu=function(u){ou.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(u){u.lchmod=function(e,t,r){u.open(e,ou.O_WRONLY|ou.O_SYMLINK,t,(function(e,n){e?r&&r(e):u.fchmod(n,t,(function(e){u.close(n,(function(u){r&&r(e||u)}))}))}))},u.lchmodSync=function(e,t){var r,n=u.openSync(e,ou.O_WRONLY|ou.O_SYMLINK,t),i=!0;try{r=u.fchmodSync(n,t),i=!1}finally{if(i)try{u.closeSync(n)}catch(u){}else u.closeSync(n)}return r}}(u);u.lutimes||function(u){ou.hasOwnProperty("O_SYMLINK")&&u.futimes?(u.lutimes=function(e,t,r,n){u.open(e,ou.O_SYMLINK,(function(e,i){e?n&&n(e):u.futimes(i,t,r,(function(e){u.close(i,(function(u){n&&n(e||u)}))}))}))},u.lutimesSync=function(e,t,r){var n,i=u.openSync(e,ou.O_SYMLINK),o=!0;try{n=u.futimesSync(i,t,r),o=!1}finally{if(o)try{u.closeSync(i)}catch(u){}else u.closeSync(i)}return n}):u.futimes&&(u.lutimes=function(u,e,t,r){r&&process.nextTick(r)},u.lutimesSync=function(){})}(u);u.chown=r(u.chown),u.fchown=r(u.fchown),u.lchown=r(u.lchown),u.chmod=e(u.chmod),u.fchmod=e(u.fchmod),u.lchmod=e(u.lchmod),u.chownSync=n(u.chownSync),u.fchownSync=n(u.fchownSync),u.lchownSync=n(u.lchownSync),u.chmodSync=t(u.chmodSync),u.fchmodSync=t(u.fchmodSync),u.lchmodSync=t(u.lchmodSync),u.stat=i(u.stat),u.fstat=i(u.fstat),u.lstat=i(u.lstat),u.statSync=o(u.statSync),u.fstatSync=o(u.fstatSync),u.lstatSync=o(u.lstatSync),u.chmod&&!u.lchmod&&(u.lchmod=function(u,e,t){t&&process.nextTick(t)},u.lchmodSync=function(){});u.chown&&!u.lchown&&(u.lchown=function(u,e,t,r){r&&process.nextTick(r)},u.lchownSync=function(){});"win32"===au&&(u.rename="function"!=typeof u.rename?u.rename:function(e){function t(t,r,n){var i=Date.now(),o=0;e(t,r,(function D(c){if(c&&("EACCES"===c.code||"EPERM"===c.code)&&Date.now()-i<6e4)return setTimeout((function(){u.stat(r,(function(u,i){u&&"ENOENT"===u.code?e(t,r,D):n(c)}))}),o),void(o<100&&(o+=10));n&&n(c)}))}return Object.setPrototypeOf&&Object.setPrototypeOf(t,e),t}(u.rename));function e(e){return e?function(t,r,n){return e.call(u,t,r,(function(u){D(u)&&(u=null),n&&n.apply(this,arguments)}))}:e}function t(e){return e?function(t,r){try{return e.call(u,t,r)}catch(u){if(!D(u))throw u}}:e}function r(e){return e?function(t,r,n,i){return e.call(u,t,r,n,(function(u){D(u)&&(u=null),i&&i.apply(this,arguments)}))}:e}function n(e){return e?function(t,r,n){try{return e.call(u,t,r,n)}catch(u){if(!D(u))throw u}}:e}function i(e){return e?function(t,r,n){function i(u,e){e&&(e.uid<0&&(e.uid+=4294967296),e.gid<0&&(e.gid+=4294967296)),n&&n.apply(this,arguments)}return"function"==typeof r&&(n=r,r=null),r?e.call(u,t,r,i):e.call(u,t,i)}:e}function o(e){return e?function(t,r){var n=r?e.call(u,t,r):e.call(u,t);return n&&(n.uid<0&&(n.uid+=4294967296),n.gid<0&&(n.gid+=4294967296)),n}:e}function D(u){return!u||("ENOSYS"===u.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==u.code&&"EPERM"!==u.code))}u.read="function"!=typeof u.read?u.read:function(e){function t(t,r,n,i,o,D){var c;if(D&&"function"==typeof D){var a=0;c=function(s,f,E){if(s&&"EAGAIN"===s.code&&a<10)return a++,e.call(u,t,r,n,i,o,c);D.apply(this,arguments)}}return e.call(u,t,r,n,i,o,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(t,e),t}(u.read),u.readSync="function"!=typeof u.readSync?u.readSync:(c=u.readSync,function(e,t,r,n,i){for(var o=0;;)try{return c.call(u,e,t,r,n,i)}catch(u){if("EAGAIN"===u.code&&o<10){o++;continue}throw u}});var c};var Eu=A.default.Stream,lu=function(u){return{ReadStream:function e(t,r){if(!(this instanceof e))return new e(t,r);Eu.call(this);var n=this;this.path=t,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,r=r||{};for(var i=Object.keys(r),o=0,D=i.length;othis.end)throw new Error("start must be <= end");this.pos=this.start}if(null!==this.fd)return void process.nextTick((function(){n._read()}));u.open(this.path,this.flags,this.mode,(function(u,e){if(u)return n.emit("error",u),void(n.readable=!1);n.fd=e,n.emit("open",e),n._read()}))},WriteStream:function e(t,r){if(!(this instanceof e))return new e(t,r);Eu.call(this),this.path=t,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,r=r||{};for(var n=Object.keys(r),i=0,o=n.length;i= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=u.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}};var Fu=function(u){if(null===u||"object"!=typeof u)return u;if(u instanceof Object)var e={__proto__:Cu(u)};else e=Object.create(null);return Object.getOwnPropertyNames(u).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(u,t))})),e},Cu=Object.getPrototypeOf||function(u){return u.__proto__};var Au,du,yu=s.default,pu=fu,hu=lu,mu=Fu,Bu=d.default;function vu(u,e){Object.defineProperty(u,Au,{get:function(){return e}})}"function"==typeof Symbol&&"function"==typeof Symbol.for?(Au=Symbol.for("graceful-fs.queue"),du=Symbol.for("graceful-fs.previous")):(Au="___graceful-fs.queue",du="___graceful-fs.previous");var Su=function(){};if(Bu.debuglog?Su=Bu.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Su=function(){var u=Bu.format.apply(Bu,arguments);u="GFS4: "+u.split(/\n/).join("\nGFS4: "),console.error(u)}),!yu[Au]){var _u=p[Au]||[];vu(yu,_u),yu.close=function(u){function e(e,t){return u.call(yu,e,(function(u){u||gu(),"function"==typeof t&&t.apply(this,arguments)}))}return Object.defineProperty(e,du,{value:u}),e}(yu.close),yu.closeSync=function(u){function e(e){u.apply(yu,arguments),gu()}return Object.defineProperty(e,du,{value:u}),e}(yu.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",(function(){Su(yu[Au]),y.default.equal(yu[Au].length,0)}))}p[Au]||vu(p,yu[Au]);var Ou,wu=Pu(mu(yu));function Pu(u){pu(u),u.gracefulify=Pu,u.createReadStream=function(e,t){return new u.ReadStream(e,t)},u.createWriteStream=function(e,t){return new u.WriteStream(e,t)};var e=u.readFile;u.readFile=function(u,t,r){"function"==typeof t&&(r=t,t=null);return function u(t,r,n,i){return e(t,r,(function(e){!e||"EMFILE"!==e.code&&"ENFILE"!==e.code?"function"==typeof n&&n.apply(this,arguments):bu([u,[t,r,n],e,i||Date.now(),Date.now()])}))}(u,t,r)};var t=u.writeFile;u.writeFile=function(u,e,r,n){"function"==typeof r&&(n=r,r=null);return function u(e,r,n,i,o){return t(e,r,n,(function(t){!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?"function"==typeof i&&i.apply(this,arguments):bu([u,[e,r,n,i],t,o||Date.now(),Date.now()])}))}(u,e,r,n)};var r=u.appendFile;r&&(u.appendFile=function(u,e,t,n){"function"==typeof t&&(n=t,t=null);return function u(e,t,n,i,o){return r(e,t,n,(function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?"function"==typeof i&&i.apply(this,arguments):bu([u,[e,t,n,i],r,o||Date.now(),Date.now()])}))}(u,e,t,n)});var n=u.copyFile;n&&(u.copyFile=function(u,e,t,r){"function"==typeof t&&(r=t,t=0);return function u(e,t,r,i,o){return n(e,t,r,(function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?"function"==typeof i&&i.apply(this,arguments):bu([u,[e,t,r,i],n,o||Date.now(),Date.now()])}))}(u,e,t,r)});var i=u.readdir;u.readdir=function(u,e,t){"function"==typeof e&&(t=e,e=null);var r=o.test(process.version)?function(u,e,t,r){return i(u,n(u,e,t,r))}:function(u,e,t,r){return i(u,e,n(u,e,t,r))};return r(u,e,t);function n(u,e,t,n){return function(i,o){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?(o&&o.sort&&o.sort(),"function"==typeof t&&t.call(this,i,o)):bu([r,[u,e,t],i,n||Date.now(),Date.now()])}}};var o=/^v[0-5]\./;if("v0.8"===process.version.substr(0,4)){var D=hu(u);E=D.ReadStream,l=D.WriteStream}var c=u.ReadStream;c&&(E.prototype=Object.create(c.prototype),E.prototype.open=function(){var u=this;C(u.path,u.flags,u.mode,(function(e,t){e?(u.autoClose&&u.destroy(),u.emit("error",e)):(u.fd=t,u.emit("open",t),u.read())}))});var a=u.WriteStream;a&&(l.prototype=Object.create(a.prototype),l.prototype.open=function(){var u=this;C(u.path,u.flags,u.mode,(function(e,t){e?(u.destroy(),u.emit("error",e)):(u.fd=t,u.emit("open",t))}))}),Object.defineProperty(u,"ReadStream",{get:function(){return E},set:function(u){E=u},enumerable:!0,configurable:!0}),Object.defineProperty(u,"WriteStream",{get:function(){return l},set:function(u){l=u},enumerable:!0,configurable:!0});var s=E;Object.defineProperty(u,"FileReadStream",{get:function(){return s},set:function(u){s=u},enumerable:!0,configurable:!0});var f=l;function E(u,e){return this instanceof E?(c.apply(this,arguments),this):E.apply(Object.create(E.prototype),arguments)}function l(u,e){return this instanceof l?(a.apply(this,arguments),this):l.apply(Object.create(l.prototype),arguments)}Object.defineProperty(u,"FileWriteStream",{get:function(){return f},set:function(u){f=u},enumerable:!0,configurable:!0});var F=u.open;function C(u,e,t,r){return"function"==typeof t&&(r=t,t=null),function u(e,t,r,n,i){return F(e,t,r,(function(o,D){!o||"EMFILE"!==o.code&&"ENFILE"!==o.code?"function"==typeof n&&n.apply(this,arguments):bu([u,[e,t,r,n],o,i||Date.now(),Date.now()])}))}(u,e,t,r)}return u.open=C,u}function bu(u){Su("ENQUEUE",u[0].name,u[1]),yu[Au].push(u),Nu()}function gu(){for(var u=Date.now(),e=0;e2&&(yu[Au][e][3]=u,yu[Au][e][4]=u);Nu()}function Nu(){if(clearTimeout(Ou),Ou=void 0,0!==yu[Au].length){var u=yu[Au].shift(),e=u[0],t=u[1],r=u[2],n=u[3],i=u[4];if(void 0===n)Su("RETRY",e.name,t),e.apply(null,t);else if(Date.now()-n>=6e4){Su("TIMEOUT",e.name,t);var o=t.pop();"function"==typeof o&&o.call(null,r)}else{var D=Date.now()-i,c=Math.max(i-n,1);D>=Math.min(1.2*c,100)?(Su("RETRY",e.name,t),e.apply(null,t.concat([n]))):yu[Au].push(u)}void 0===Ou&&(Ou=setTimeout(Nu,0))}}process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!yu.__patched&&(wu=Pu(yu),yu.__patched=!0),function(u){const e=iu.fromCallback,t=wu,r=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter((u=>"function"==typeof t[u]));Object.assign(u,t),r.forEach((r=>{u[r]=e(t[r])})),u.exists=function(u,e){return"function"==typeof e?t.exists(u,e):new Promise((e=>t.exists(u,e)))},u.read=function(u,e,r,n,i,o){return"function"==typeof o?t.read(u,e,r,n,i,o):new Promise(((o,D)=>{t.read(u,e,r,n,i,((u,e,t)=>{if(u)return D(u);o({bytesRead:e,buffer:t})}))}))},u.write=function(u,e,...r){return"function"==typeof r[r.length-1]?t.write(u,e,...r):new Promise(((n,i)=>{t.write(u,e,...r,((u,e,t)=>{if(u)return i(u);n({bytesWritten:e,buffer:t})}))}))},"function"==typeof t.writev&&(u.writev=function(u,e,...r){return"function"==typeof r[r.length-1]?t.writev(u,e,...r):new Promise(((n,i)=>{t.writev(u,e,...r,((u,e,t)=>{if(u)return i(u);n({bytesWritten:e,buffers:t})}))}))}),"function"==typeof t.realpath.native?u.realpath.native=e(t.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")}(nu);var Ru={},Iu={};const ku=f.default;Iu.checkPath=function(u){if("win32"===process.platform){if(/[<>:"|?*]/.test(u.replace(ku.parse(u).root,""))){const e=new Error(`Path contains invalid characters: ${u}`);throw e.code="EINVAL",e}}};const Tu=nu,{checkPath:xu}=Iu,Mu=u=>"number"==typeof u?u:{mode:511,...u}.mode;Ru.makeDir=async(u,e)=>(xu(u),Tu.mkdir(u,{mode:Mu(e),recursive:!0})),Ru.makeDirSync=(u,e)=>(xu(u),Tu.mkdirSync(u,{mode:Mu(e),recursive:!0}));const Hu=iu.fromPromise,{makeDir:ju,makeDirSync:Ju}=Ru,Lu=Hu(ju);var Gu={mkdirs:Lu,mkdirsSync:Ju,mkdirp:Lu,mkdirpSync:Ju,ensureDir:Lu,ensureDirSync:Ju};const Vu=iu.fromPromise,$u=nu;var Uu={pathExists:Vu((function(u){return $u.access(u).then((()=>!0)).catch((()=>!1))})),pathExistsSync:$u.existsSync};const Wu=wu;var qu=function(u,e,t,r){Wu.open(u,"r+",((u,n)=>{if(u)return r(u);Wu.futimes(n,e,t,(u=>{Wu.close(n,(e=>{r&&r(u||e)}))}))}))},Ku=function(u,e,t){const r=Wu.openSync(u,"r+");return Wu.futimesSync(r,e,t),Wu.closeSync(r)};const Yu=nu,zu=f.default,Zu=d.default;function Xu(u,e,t){const r=t.dereference?u=>Yu.stat(u,{bigint:!0}):u=>Yu.lstat(u,{bigint:!0});return Promise.all([r(u),r(e).catch((u=>{if("ENOENT"===u.code)return null;throw u}))]).then((([u,e])=>({srcStat:u,destStat:e})))}function Qu(u,e){return e.ino&&e.dev&&e.ino===u.ino&&e.dev===u.dev}function ue(u,e){const t=zu.resolve(u).split(zu.sep).filter((u=>u)),r=zu.resolve(e).split(zu.sep).filter((u=>u));return t.reduce(((u,e,t)=>u&&r[t]===e),!0)}function ee(u,e,t){return`Cannot ${t} '${u}' to a subdirectory of itself, '${e}'.`}var te={checkPaths:function(u,e,t,r,n){Zu.callbackify(Xu)(u,e,r,((r,i)=>{if(r)return n(r);const{srcStat:o,destStat:D}=i;if(D){if(Qu(o,D)){const r=zu.basename(u),i=zu.basename(e);return"move"===t&&r!==i&&r.toLowerCase()===i.toLowerCase()?n(null,{srcStat:o,destStat:D,isChangingCase:!0}):n(new Error("Source and destination must not be the same."))}if(o.isDirectory()&&!D.isDirectory())return n(new Error(`Cannot overwrite non-directory '${e}' with directory '${u}'.`));if(!o.isDirectory()&&D.isDirectory())return n(new Error(`Cannot overwrite directory '${e}' with non-directory '${u}'.`))}return o.isDirectory()&&ue(u,e)?n(new Error(ee(u,e,t))):n(null,{srcStat:o,destStat:D})}))},checkPathsSync:function(u,e,t,r){const{srcStat:n,destStat:i}=function(u,e,t){let r;const n=t.dereference?u=>Yu.statSync(u,{bigint:!0}):u=>Yu.lstatSync(u,{bigint:!0}),i=n(u);try{r=n(e)}catch(u){if("ENOENT"===u.code)return{srcStat:i,destStat:null};throw u}return{srcStat:i,destStat:r}}(u,e,r);if(i){if(Qu(n,i)){const r=zu.basename(u),o=zu.basename(e);if("move"===t&&r!==o&&r.toLowerCase()===o.toLowerCase())return{srcStat:n,destStat:i,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(n.isDirectory()&&!i.isDirectory())throw new Error(`Cannot overwrite non-directory '${e}' with directory '${u}'.`);if(!n.isDirectory()&&i.isDirectory())throw new Error(`Cannot overwrite directory '${e}' with non-directory '${u}'.`)}if(n.isDirectory()&&ue(u,e))throw new Error(ee(u,e,t));return{srcStat:n,destStat:i}},checkParentPaths:function u(e,t,r,n,i){const o=zu.resolve(zu.dirname(e)),D=zu.resolve(zu.dirname(r));if(D===o||D===zu.parse(D).root)return i();Yu.stat(D,{bigint:!0},((o,c)=>o?"ENOENT"===o.code?i():i(o):Qu(t,c)?i(new Error(ee(e,r,n))):u(e,t,D,n,i)))},checkParentPathsSync:function u(e,t,r,n){const i=zu.resolve(zu.dirname(e)),o=zu.resolve(zu.dirname(r));if(o===i||o===zu.parse(o).root)return;let D;try{D=Yu.statSync(o,{bigint:!0})}catch(u){if("ENOENT"===u.code)return;throw u}if(Qu(t,D))throw new Error(ee(e,r,n));return u(e,t,o,n)},isSrcSubdir:ue,areIdentical:Qu};const re=wu,ne=f.default,ie=Gu.mkdirs,oe=Uu.pathExists,De=qu,ce=te;function ae(u,e,t,r,n){const i=ne.dirname(t);oe(i,((o,D)=>o?n(o):D?fe(u,e,t,r,n):void ie(i,(i=>i?n(i):fe(u,e,t,r,n)))))}function se(u,e,t,r,n,i){Promise.resolve(n.filter(t,r)).then((o=>o?u(e,t,r,n,i):i()),(u=>i(u)))}function fe(u,e,t,r,n){(r.dereference?re.stat:re.lstat)(e,((i,o)=>i?n(i):o.isDirectory()?function(u,e,t,r,n,i){return e?Ce(t,r,n,i):function(u,e,t,r,n){re.mkdir(t,(i=>{if(i)return n(i);Ce(e,t,r,(e=>e?n(e):Fe(t,u,n)))}))}(u.mode,t,r,n,i)}(o,u,e,t,r,n):o.isFile()||o.isCharacterDevice()||o.isBlockDevice()?function(u,e,t,r,n,i){return e?function(u,e,t,r,n){if(!r.overwrite)return r.errorOnExist?n(new Error(`'${t}' already exists`)):n();re.unlink(t,(i=>i?n(i):Ee(u,e,t,r,n)))}(u,t,r,n,i):Ee(u,t,r,n,i)}(o,u,e,t,r,n):o.isSymbolicLink()?function(u,e,t,r,n){re.readlink(e,((e,i)=>e?n(e):(r.dereference&&(i=ne.resolve(process.cwd(),i)),u?void re.readlink(t,((e,o)=>e?"EINVAL"===e.code||"UNKNOWN"===e.code?re.symlink(i,t,n):n(e):(r.dereference&&(o=ne.resolve(process.cwd(),o)),ce.isSrcSubdir(i,o)?n(new Error(`Cannot copy '${i}' to a subdirectory of itself, '${o}'.`)):u.isDirectory()&&ce.isSrcSubdir(o,i)?n(new Error(`Cannot overwrite '${o}' with '${i}'.`)):function(u,e,t){re.unlink(e,(r=>r?t(r):re.symlink(u,e,t)))}(i,t,n)))):re.symlink(i,t,n))))}(u,e,t,r,n):o.isSocket()?n(new Error(`Cannot copy a socket file: ${e}`)):o.isFIFO()?n(new Error(`Cannot copy a FIFO pipe: ${e}`)):n(new Error(`Unknown file: ${e}`))))}function Ee(u,e,t,r,n){re.copyFile(e,t,(i=>i?n(i):r.preserveTimestamps?function(u,e,t,r){if(function(u){return 0==(128&u)}(u))return function(u,e,t){return Fe(u,128|e,t)}(t,u,(n=>n?r(n):le(u,e,t,r)));return le(u,e,t,r)}(u.mode,e,t,n):Fe(t,u.mode,n)))}function le(u,e,t,r){!function(u,e,t){re.stat(u,((u,r)=>u?t(u):De(e,r.atime,r.mtime,t)))}(e,t,(e=>e?r(e):Fe(t,u,r)))}function Fe(u,e,t){return re.chmod(u,e,t)}function Ce(u,e,t,r){re.readdir(u,((n,i)=>n?r(n):Ae(i,u,e,t,r)))}function Ae(u,e,t,r,n){const i=u.pop();return i?function(u,e,t,r,n,i){const o=ne.join(t,e),D=ne.join(r,e);ce.checkPaths(o,D,"copy",n,((e,c)=>{if(e)return i(e);const{destStat:a}=c;!function(u,e,t,r,n){r.filter?se(fe,u,e,t,r,n):fe(u,e,t,r,n)}(a,o,D,n,(e=>e?i(e):Ae(u,t,r,n,i)))}))}(u,i,e,t,r,n):n()}var de=function(u,e,t,r){"function"!=typeof t||r?"function"==typeof t&&(t={filter:t}):(r=t,t={}),r=r||function(){},(t=t||{}).clobber=!("clobber"in t)||!!t.clobber,t.overwrite="overwrite"in t?!!t.overwrite:t.clobber,t.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0001"),ce.checkPaths(u,e,"copy",t,((n,i)=>{if(n)return r(n);const{srcStat:o,destStat:D}=i;ce.checkParentPaths(u,o,e,"copy",(n=>n?r(n):t.filter?se(ae,D,u,e,t,r):ae(D,u,e,t,r)))}))};const ye=wu,pe=f.default,he=Gu.mkdirsSync,me=Ku,Be=te;function ve(u,e,t,r){const n=(r.dereference?ye.statSync:ye.lstatSync)(e);if(n.isDirectory())return function(u,e,t,r,n){return e?Oe(t,r,n):function(u,e,t,r){return ye.mkdirSync(t),Oe(e,t,r),_e(t,u)}(u.mode,t,r,n)}(n,u,e,t,r);if(n.isFile()||n.isCharacterDevice()||n.isBlockDevice())return function(u,e,t,r,n){return e?function(u,e,t,r){if(r.overwrite)return ye.unlinkSync(t),Se(u,e,t,r);if(r.errorOnExist)throw new Error(`'${t}' already exists`)}(u,t,r,n):Se(u,t,r,n)}(n,u,e,t,r);if(n.isSymbolicLink())return function(u,e,t,r){let n=ye.readlinkSync(e);r.dereference&&(n=pe.resolve(process.cwd(),n));if(u){let u;try{u=ye.readlinkSync(t)}catch(u){if("EINVAL"===u.code||"UNKNOWN"===u.code)return ye.symlinkSync(n,t);throw u}if(r.dereference&&(u=pe.resolve(process.cwd(),u)),Be.isSrcSubdir(n,u))throw new Error(`Cannot copy '${n}' to a subdirectory of itself, '${u}'.`);if(ye.statSync(t).isDirectory()&&Be.isSrcSubdir(u,n))throw new Error(`Cannot overwrite '${u}' with '${n}'.`);return function(u,e){return ye.unlinkSync(e),ye.symlinkSync(u,e)}(n,t)}return ye.symlinkSync(n,t)}(u,e,t,r);if(n.isSocket())throw new Error(`Cannot copy a socket file: ${e}`);if(n.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${e}`);throw new Error(`Unknown file: ${e}`)}function Se(u,e,t,r){return ye.copyFileSync(e,t),r.preserveTimestamps&&function(u,e,t){(function(u){return 0==(128&u)})(u)&&function(u,e){_e(u,128|e)}(t,u);(function(u,e){const t=ye.statSync(u);me(e,t.atime,t.mtime)})(e,t)}(u.mode,e,t),_e(t,u.mode)}function _e(u,e){return ye.chmodSync(u,e)}function Oe(u,e,t){ye.readdirSync(u).forEach((r=>function(u,e,t,r){const n=pe.join(e,u),i=pe.join(t,u),{destStat:o}=Be.checkPathsSync(n,i,"copy",r);return function(u,e,t,r){if(!r.filter||r.filter(e,t))return ve(u,e,t,r)}(o,n,i,r)}(r,u,e,t)))}var we=function(u,e,t){"function"==typeof t&&(t={filter:t}),(t=t||{}).clobber=!("clobber"in t)||!!t.clobber,t.overwrite="overwrite"in t?!!t.overwrite:t.clobber,t.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0002");const{srcStat:r,destStat:n}=Be.checkPathsSync(u,e,"copy",t);return Be.checkParentPathsSync(u,r,e,"copy"),function(u,e,t,r){if(r.filter&&!r.filter(e,t))return;const n=pe.dirname(t);ye.existsSync(n)||he(n);return ve(u,e,t,r)}(n,u,e,t)};var Pe={copy:(0,iu.fromCallback)(de),copySync:we};const be=wu,ge=f.default,Ne=y.default,Re="win32"===process.platform;function Ie(u){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach((e=>{u[e]=u[e]||be[e],u[e+="Sync"]=u[e]||be[e]})),u.maxBusyTries=u.maxBusyTries||3}function ke(u,e,t){let r=0;"function"==typeof e&&(t=e,e={}),Ne(u,"rimraf: missing path"),Ne.strictEqual(typeof u,"string","rimraf: path should be a string"),Ne.strictEqual(typeof t,"function","rimraf: callback function required"),Ne(e,"rimraf: invalid options argument provided"),Ne.strictEqual(typeof e,"object","rimraf: options should be object"),Ie(e),Te(u,e,(function n(i){if(i){if(("EBUSY"===i.code||"ENOTEMPTY"===i.code||"EPERM"===i.code)&&rTe(u,e,n)),100*r)}"ENOENT"===i.code&&(i=null)}t(i)}))}function Te(u,e,t){Ne(u),Ne(e),Ne("function"==typeof t),e.lstat(u,((r,n)=>r&&"ENOENT"===r.code?t(null):r&&"EPERM"===r.code&&Re?xe(u,e,r,t):n&&n.isDirectory()?He(u,e,r,t):void e.unlink(u,(r=>{if(r){if("ENOENT"===r.code)return t(null);if("EPERM"===r.code)return Re?xe(u,e,r,t):He(u,e,r,t);if("EISDIR"===r.code)return He(u,e,r,t)}return t(r)}))))}function xe(u,e,t,r){Ne(u),Ne(e),Ne("function"==typeof r),e.chmod(u,438,(n=>{n?r("ENOENT"===n.code?null:t):e.stat(u,((n,i)=>{n?r("ENOENT"===n.code?null:t):i.isDirectory()?He(u,e,t,r):e.unlink(u,r)}))}))}function Me(u,e,t){let r;Ne(u),Ne(e);try{e.chmodSync(u,438)}catch(u){if("ENOENT"===u.code)return;throw t}try{r=e.statSync(u)}catch(u){if("ENOENT"===u.code)return;throw t}r.isDirectory()?Je(u,e,t):e.unlinkSync(u)}function He(u,e,t,r){Ne(u),Ne(e),Ne("function"==typeof r),e.rmdir(u,(n=>{!n||"ENOTEMPTY"!==n.code&&"EEXIST"!==n.code&&"EPERM"!==n.code?n&&"ENOTDIR"===n.code?r(t):r(n):function(u,e,t){Ne(u),Ne(e),Ne("function"==typeof t),e.readdir(u,((r,n)=>{if(r)return t(r);let i,o=n.length;if(0===o)return e.rmdir(u,t);n.forEach((r=>{ke(ge.join(u,r),e,(r=>{if(!i)return r?t(i=r):void(0==--o&&e.rmdir(u,t))}))}))}))}(u,e,r)}))}function je(u,e){let t;Ie(e=e||{}),Ne(u,"rimraf: missing path"),Ne.strictEqual(typeof u,"string","rimraf: path should be a string"),Ne(e,"rimraf: missing options"),Ne.strictEqual(typeof e,"object","rimraf: options should be object");try{t=e.lstatSync(u)}catch(t){if("ENOENT"===t.code)return;"EPERM"===t.code&&Re&&Me(u,e,t)}try{t&&t.isDirectory()?Je(u,e,null):e.unlinkSync(u)}catch(t){if("ENOENT"===t.code)return;if("EPERM"===t.code)return Re?Me(u,e,t):Je(u,e,t);if("EISDIR"!==t.code)throw t;Je(u,e,t)}}function Je(u,e,t){Ne(u),Ne(e);try{e.rmdirSync(u)}catch(r){if("ENOTDIR"===r.code)throw t;if("ENOTEMPTY"===r.code||"EEXIST"===r.code||"EPERM"===r.code)!function(u,e){if(Ne(u),Ne(e),e.readdirSync(u).forEach((t=>je(ge.join(u,t),e))),!Re){return e.rmdirSync(u,e)}{const t=Date.now();do{try{return e.rmdirSync(u,e)}catch{}}while(Date.now()-t<500)}}(u,e);else if("ENOENT"!==r.code)throw r}}var Le=ke;ke.sync=je;const Ge=wu,Ve=iu.fromCallback,$e=Le;var Ue={remove:Ve((function(u,e){if(Ge.rm)return Ge.rm(u,{recursive:!0,force:!0},e);$e(u,e)})),removeSync:function(u){if(Ge.rmSync)return Ge.rmSync(u,{recursive:!0,force:!0});$e.sync(u)}};const We=iu.fromPromise,qe=nu,Ke=f.default,Ye=Gu,ze=Ue,Ze=We((async function(u){let e;try{e=await qe.readdir(u)}catch{return Ye.mkdirs(u)}return Promise.all(e.map((e=>ze.remove(Ke.join(u,e)))))}));function Xe(u){let e;try{e=qe.readdirSync(u)}catch{return Ye.mkdirsSync(u)}e.forEach((e=>{e=Ke.join(u,e),ze.removeSync(e)}))}var Qe={emptyDirSync:Xe,emptydirSync:Xe,emptyDir:Ze,emptydir:Ze};const ut=iu.fromCallback,et=f.default,tt=wu,rt=Gu;var nt={createFile:ut((function(u,e){function t(){tt.writeFile(u,"",(u=>{if(u)return e(u);e()}))}tt.stat(u,((r,n)=>{if(!r&&n.isFile())return e();const i=et.dirname(u);tt.stat(i,((u,r)=>{if(u)return"ENOENT"===u.code?rt.mkdirs(i,(u=>{if(u)return e(u);t()})):e(u);r.isDirectory()?t():tt.readdir(i,(u=>{if(u)return e(u)}))}))}))})),createFileSync:function(u){let e;try{e=tt.statSync(u)}catch{}if(e&&e.isFile())return;const t=et.dirname(u);try{tt.statSync(t).isDirectory()||tt.readdirSync(t)}catch(u){if(!u||"ENOENT"!==u.code)throw u;rt.mkdirsSync(t)}tt.writeFileSync(u,"")}};const it=iu.fromCallback,ot=f.default,Dt=wu,ct=Gu,at=Uu.pathExists,{areIdentical:st}=te;var ft={createLink:it((function(u,e,t){function r(u,e){Dt.link(u,e,(u=>{if(u)return t(u);t(null)}))}Dt.lstat(e,((n,i)=>{Dt.lstat(u,((n,o)=>{if(n)return n.message=n.message.replace("lstat","ensureLink"),t(n);if(i&&st(o,i))return t(null);const D=ot.dirname(e);at(D,((n,i)=>n?t(n):i?r(u,e):void ct.mkdirs(D,(n=>{if(n)return t(n);r(u,e)}))))}))}))})),createLinkSync:function(u,e){let t;try{t=Dt.lstatSync(e)}catch{}try{const e=Dt.lstatSync(u);if(t&&st(e,t))return}catch(u){throw u.message=u.message.replace("lstat","ensureLink"),u}const r=ot.dirname(e);return Dt.existsSync(r)||ct.mkdirsSync(r),Dt.linkSync(u,e)}};const Et=f.default,lt=wu,Ft=Uu.pathExists;var Ct={symlinkPaths:function(u,e,t){if(Et.isAbsolute(u))return lt.lstat(u,(e=>e?(e.message=e.message.replace("lstat","ensureSymlink"),t(e)):t(null,{toCwd:u,toDst:u})));{const r=Et.dirname(e),n=Et.join(r,u);return Ft(n,((e,i)=>e?t(e):i?t(null,{toCwd:n,toDst:u}):lt.lstat(u,(e=>e?(e.message=e.message.replace("lstat","ensureSymlink"),t(e)):t(null,{toCwd:u,toDst:Et.relative(r,u)})))))}},symlinkPathsSync:function(u,e){let t;if(Et.isAbsolute(u)){if(t=lt.existsSync(u),!t)throw new Error("absolute srcpath does not exist");return{toCwd:u,toDst:u}}{const r=Et.dirname(e),n=Et.join(r,u);if(t=lt.existsSync(n),t)return{toCwd:n,toDst:u};if(t=lt.existsSync(u),!t)throw new Error("relative srcpath does not exist");return{toCwd:u,toDst:Et.relative(r,u)}}}};const At=wu;var dt={symlinkType:function(u,e,t){if(t="function"==typeof e?e:t,e="function"!=typeof e&&e)return t(null,e);At.lstat(u,((u,r)=>{if(u)return t(null,"file");e=r&&r.isDirectory()?"dir":"file",t(null,e)}))},symlinkTypeSync:function(u,e){let t;if(e)return e;try{t=At.lstatSync(u)}catch{return"file"}return t&&t.isDirectory()?"dir":"file"}};const yt=iu.fromCallback,pt=f.default,ht=nu,mt=Gu.mkdirs,Bt=Gu.mkdirsSync,vt=Ct.symlinkPaths,St=Ct.symlinkPathsSync,_t=dt.symlinkType,Ot=dt.symlinkTypeSync,wt=Uu.pathExists,{areIdentical:Pt}=te;function bt(u,e,t,r){vt(u,e,((n,i)=>{if(n)return r(n);u=i.toDst,_t(i.toCwd,t,((t,n)=>{if(t)return r(t);const i=pt.dirname(e);wt(i,((t,o)=>t?r(t):o?ht.symlink(u,e,n,r):void mt(i,(t=>{if(t)return r(t);ht.symlink(u,e,n,r)}))))}))}))}var gt={createSymlink:yt((function(u,e,t,r){r="function"==typeof t?t:r,t="function"!=typeof t&&t,ht.lstat(e,((n,i)=>{!n&&i.isSymbolicLink()?Promise.all([ht.stat(u),ht.stat(e)]).then((([n,i])=>{if(Pt(n,i))return r(null);bt(u,e,t,r)})):bt(u,e,t,r)}))})),createSymlinkSync:function(u,e,t){let r;try{r=ht.lstatSync(e)}catch{}if(r&&r.isSymbolicLink()){const t=ht.statSync(u),r=ht.statSync(e);if(Pt(t,r))return}const n=St(u,e);u=n.toDst,t=Ot(n.toCwd,t);const i=pt.dirname(e);return ht.existsSync(i)||Bt(i),ht.symlinkSync(u,e,t)}};const{createFile:Nt,createFileSync:Rt}=nt,{createLink:It,createLinkSync:kt}=ft,{createSymlink:Tt,createSymlinkSync:xt}=gt;var Mt={createFile:Nt,createFileSync:Rt,ensureFile:Nt,ensureFileSync:Rt,createLink:It,createLinkSync:kt,ensureLink:It,ensureLinkSync:kt,createSymlink:Tt,createSymlinkSync:xt,ensureSymlink:Tt,ensureSymlinkSync:xt};var Ht={stringify:function(u,{EOL:e="\n",finalEOL:t=!0,replacer:r=null,spaces:n}={}){const i=t?e:"";return JSON.stringify(u,r,n).replace(/\n/g,e)+i},stripBom:function(u){return Buffer.isBuffer(u)&&(u=u.toString("utf8")),u.replace(/^\uFEFF/,"")}};let jt;try{jt=wu}catch(u){jt=s.default}const Jt=iu,{stringify:Lt,stripBom:Gt}=Ht;const Vt=Jt.fromPromise((async function(u,e={}){"string"==typeof e&&(e={encoding:e});const t=e.fs||jt,r=!("throws"in e)||e.throws;let n,i=await Jt.fromCallback(t.readFile)(u,e);i=Gt(i);try{n=JSON.parse(i,e?e.reviver:null)}catch(e){if(r)throw e.message=`${u}: ${e.message}`,e;return null}return n}));const $t=Jt.fromPromise((async function(u,e,t={}){const r=t.fs||jt,n=Lt(e,t);await Jt.fromCallback(r.writeFile)(u,n,t)}));const Ut={readFile:Vt,readFileSync:function(u,e={}){"string"==typeof e&&(e={encoding:e});const t=e.fs||jt,r=!("throws"in e)||e.throws;try{let r=t.readFileSync(u,e);return r=Gt(r),JSON.parse(r,e.reviver)}catch(e){if(r)throw e.message=`${u}: ${e.message}`,e;return null}},writeFile:$t,writeFileSync:function(u,e,t={}){const r=t.fs||jt,n=Lt(e,t);return r.writeFileSync(u,n,t)}};var Wt={readJson:Ut.readFile,readJsonSync:Ut.readFileSync,writeJson:Ut.writeFile,writeJsonSync:Ut.writeFileSync};const qt=iu.fromCallback,Kt=wu,Yt=f.default,zt=Gu,Zt=Uu.pathExists;var Xt={outputFile:qt((function(u,e,t,r){"function"==typeof t&&(r=t,t="utf8");const n=Yt.dirname(u);Zt(n,((i,o)=>i?r(i):o?Kt.writeFile(u,e,t,r):void zt.mkdirs(n,(n=>{if(n)return r(n);Kt.writeFile(u,e,t,r)}))))})),outputFileSync:function(u,...e){const t=Yt.dirname(u);if(Kt.existsSync(t))return Kt.writeFileSync(u,...e);zt.mkdirsSync(t),Kt.writeFileSync(u,...e)}};const{stringify:Qt}=Ht,{outputFile:ur}=Xt;var er=async function(u,e,t={}){const r=Qt(e,t);await ur(u,r,t)};const{stringify:tr}=Ht,{outputFileSync:rr}=Xt;var nr=function(u,e,t){const r=tr(e,t);rr(u,r,t)};const ir=iu.fromPromise,or=Wt;or.outputJson=ir(er),or.outputJsonSync=nr,or.outputJSON=or.outputJson,or.outputJSONSync=or.outputJsonSync,or.writeJSON=or.writeJson,or.writeJSONSync=or.writeJsonSync,or.readJSON=or.readJson,or.readJSONSync=or.readJsonSync;var Dr=or;const cr=wu,ar=f.default,sr=Pe.copy,fr=Ue.remove,Er=Gu.mkdirp,lr=Uu.pathExists,Fr=te;function Cr(u,e,t,r,n){return r?Ar(u,e,t,n):t?fr(e,(r=>r?n(r):Ar(u,e,t,n))):void lr(e,((r,i)=>r?n(r):i?n(new Error("dest already exists.")):Ar(u,e,t,n)))}function Ar(u,e,t,r){cr.rename(u,e,(n=>n?"EXDEV"!==n.code?r(n):function(u,e,t,r){const n={overwrite:t,errorOnExist:!0};sr(u,e,n,(e=>e?r(e):fr(u,r)))}(u,e,t,r):r()))}var dr=function(u,e,t,r){"function"==typeof t&&(r=t,t={});const n=(t=t||{}).overwrite||t.clobber||!1;Fr.checkPaths(u,e,"move",t,((t,i)=>{if(t)return r(t);const{srcStat:o,isChangingCase:D=!1}=i;Fr.checkParentPaths(u,o,e,"move",(t=>t?r(t):function(u){const e=ar.dirname(u);return ar.parse(e).root===e}(e)?Cr(u,e,n,D,r):void Er(ar.dirname(e),(t=>t?r(t):Cr(u,e,n,D,r)))))}))};const yr=wu,pr=f.default,hr=Pe.copySync,mr=Ue.removeSync,Br=Gu.mkdirpSync,vr=te;function Sr(u,e,t){try{yr.renameSync(u,e)}catch(r){if("EXDEV"!==r.code)throw r;return function(u,e,t){const r={overwrite:t,errorOnExist:!0};return hr(u,e,r),mr(u)}(u,e,t)}}var _r=function(u,e,t){const r=(t=t||{}).overwrite||t.clobber||!1,{srcStat:n,isChangingCase:i=!1}=vr.checkPathsSync(u,e,"move",t);return vr.checkParentPathsSync(u,n,e,"move"),function(u){const e=pr.dirname(u);return pr.parse(e).root===e}(e)||Br(pr.dirname(e)),function(u,e,t,r){if(r)return Sr(u,e,t);if(t)return mr(e),Sr(u,e,t);if(yr.existsSync(e))throw new Error("dest already exists.");return Sr(u,e,t)}(u,e,r,i)};var Or={move:(0,iu.fromCallback)(dr),moveSync:_r},wr={...nu,...Pe,...Qe,...Mt,...Dr,...Gu,...Or,...Xt,...Uu,...Ue},Pr=p&&p.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Q,"__esModule",{value:!0}),Q.parseJsonText=Q.parseJsonFile=void 0;const br=uu,gr=Pr(wr),Nr=Pr(f.default),Rr=Pr(E.default),Ir=k;var kr;!function(u){u[u.Char=0]="Char",u[u.EOF=1]="EOF",u[u.Identifier=2]="Identifier"}(kr||(kr={}));let Tr,xr,Mr,Hr,jr,Jr,Lr="start",Gr=[],Vr=0,$r=1,Ur=0,Wr=!1,qr="default",Kr="'",Yr=1;function zr(u,e=!1){xr=String(u),Lr="start",Gr=[],Vr=0,$r=1,Ur=0,Hr=void 0,Wr=e;do{Tr=Zr(),nn[Lr]()}while("eof"!==Tr.type);return Hr}function Zr(){for(qr="default",jr="",Kr="'",Yr=1;;){Jr=Xr();const u=un[qr]();if(u)return u}}function Xr(){if(xr[Vr])return String.fromCodePoint(xr.codePointAt(Vr))}function Qr(){const u=Xr();return"\n"===u?($r++,Ur=0):u?Ur+=u.length:Ur++,u&&(Vr+=u.length),u}Q.parseJsonFile=function(u,e=!1,t="utf-8"){const r=gr.default.readFileSync(Nr.default.resolve(u),{encoding:t});try{return zr(r,e)}catch(e){if(e instanceof SyntaxError){const t=e.message.split("at");2===t.length&&(0,Ir.logErrorAndExit)(`${t[0].trim()}${Rr.default.EOL}\t at ${u}:${t[1].trim()}`)}(0,Ir.logErrorAndExit)(`${u} is not in valid JSON/JSON5 format.`)}},Q.parseJsonText=zr;const un={default(){switch(Jr){case"/":return Qr(),void(qr="comment");case void 0:return Qr(),en("eof")}if(!br.JudgeUtil.isIgnoreChar(Jr)&&!br.JudgeUtil.isSpaceSeparator(Jr))return un[Lr]();Qr()},start(){qr="value"},beforePropertyName(){switch(Jr){case"$":case"_":return jr=Qr(),void(qr="identifierName");case"\\":return Qr(),void(qr="identifierNameStartEscape");case"}":return en("punctuator",Qr());case'"':case"'":return Kr=Jr,Qr(),void(qr="string")}if(br.JudgeUtil.isIdStartChar(Jr))return jr+=Qr(),void(qr="identifierName");throw an(kr.Char,Qr())},afterPropertyName(){if(":"===Jr)return en("punctuator",Qr());throw an(kr.Char,Qr())},beforePropertyValue(){qr="value"},afterPropertyValue(){switch(Jr){case",":case"}":return en("punctuator",Qr())}throw an(kr.Char,Qr())},beforeArrayValue(){if("]"===Jr)return en("punctuator",Qr());qr="value"},afterArrayValue(){switch(Jr){case",":case"]":return en("punctuator",Qr())}throw an(kr.Char,Qr())},end(){throw an(kr.Char,Qr())},comment(){switch(Jr){case"*":return Qr(),void(qr="multiLineComment");case"/":return Qr(),void(qr="singleLineComment")}throw an(kr.Char,Qr())},multiLineComment(){switch(Jr){case"*":return Qr(),void(qr="multiLineCommentAsterisk");case void 0:throw an(kr.Char,Qr())}Qr()},multiLineCommentAsterisk(){switch(Jr){case"*":return void Qr();case"/":return Qr(),void(qr="default");case void 0:throw an(kr.Char,Qr())}Qr(),qr="multiLineComment"},singleLineComment(){switch(Jr){case"\n":case"\r":case"\u2028":case"\u2029":return Qr(),void(qr="default");case void 0:return Qr(),en("eof")}Qr()},value(){switch(Jr){case"{":case"[":return en("punctuator",Qr());case"n":return Qr(),tn("ull"),en("null",null);case"t":return Qr(),tn("rue"),en("boolean",!0);case"f":return Qr(),tn("alse"),en("boolean",!1);case"-":case"+":return"-"===Qr()&&(Yr=-1),void(qr="numerical");case".":case"0":case"I":case"N":return void(qr="numerical");case'"':case"'":return Kr=Jr,Qr(),jr="",void(qr="string")}if(void 0===Jr||!br.JudgeUtil.isDigitWithoutZero(Jr))throw an(kr.Char,Qr());qr="numerical"},numerical(){switch(Jr){case".":return jr=Qr(),void(qr="decimalPointLeading");case"0":return jr=Qr(),void(qr="zero");case"I":return Qr(),tn("nfinity"),en("numeric",Yr*(1/0));case"N":return Qr(),tn("aN"),en("numeric",NaN)}if(void 0!==Jr&&br.JudgeUtil.isDigitWithoutZero(Jr))return jr=Qr(),void(qr="decimalInteger");throw an(kr.Char,Qr())},zero(){switch(Jr){case".":case"e":case"E":return void(qr="decimal");case"x":case"X":return jr+=Qr(),void(qr="hexadecimal")}return en("numeric",0)},decimalInteger(){switch(Jr){case".":case"e":case"E":return void(qr="decimal")}if(!br.JudgeUtil.isDigit(Jr))return en("numeric",Yr*Number(jr));jr+=Qr()},decimal(){switch(Jr){case".":jr+=Qr(),qr="decimalFraction";break;case"e":case"E":jr+=Qr(),qr="decimalExponent"}},decimalPointLeading(){if(br.JudgeUtil.isDigit(Jr))return jr+=Qr(),void(qr="decimalFraction");throw an(kr.Char,Qr())},decimalFraction(){switch(Jr){case"e":case"E":return jr+=Qr(),void(qr="decimalExponent")}if(!br.JudgeUtil.isDigit(Jr))return en("numeric",Yr*Number(jr));jr+=Qr()},decimalExponent(){switch(Jr){case"+":case"-":return jr+=Qr(),void(qr="decimalExponentSign")}if(br.JudgeUtil.isDigit(Jr))return jr+=Qr(),void(qr="decimalExponentInteger");throw an(kr.Char,Qr())},decimalExponentSign(){if(br.JudgeUtil.isDigit(Jr))return jr+=Qr(),void(qr="decimalExponentInteger");throw an(kr.Char,Qr())},decimalExponentInteger(){if(!br.JudgeUtil.isDigit(Jr))return en("numeric",Yr*Number(jr));jr+=Qr()},hexadecimal(){if(br.JudgeUtil.isHexDigit(Jr))return jr+=Qr(),void(qr="hexadecimalInteger");throw an(kr.Char,Qr())},hexadecimalInteger(){if(!br.JudgeUtil.isHexDigit(Jr))return en("numeric",Yr*Number(jr));jr+=Qr()},identifierNameStartEscape(){if("u"!==Jr)throw an(kr.Char,Qr());Qr();const u=rn();switch(u){case"$":case"_":break;default:if(!br.JudgeUtil.isIdStartChar(u))throw an(kr.Identifier)}jr+=u,qr="identifierName"},identifierName(){switch(Jr){case"$":case"_":case"‌":case"‍":return void(jr+=Qr());case"\\":return Qr(),void(qr="identifierNameEscape")}if(!br.JudgeUtil.isIdContinueChar(Jr))return en("identifier",jr);jr+=Qr()},identifierNameEscape(){if("u"!==Jr)throw an(kr.Char,Qr());Qr();const u=rn();switch(u){case"$":case"_":case"‌":case"‍":break;default:if(!br.JudgeUtil.isIdContinueChar(u))throw an(kr.Identifier)}jr+=u,qr="identifierName"},string(){switch(Jr){case"\\":return Qr(),void(jr+=function(){const u=Xr(),e=function(){switch(Xr()){case"b":return Qr(),"\b";case"f":return Qr(),"\f";case"n":return Qr(),"\n";case"r":return Qr(),"\r";case"t":return Qr(),"\t";case"v":return Qr(),"\v"}return}();if(e)return e;switch(u){case"0":if(Qr(),br.JudgeUtil.isDigit(Xr()))throw an(kr.Char,Qr());return"\0";case"x":return Qr(),function(){let u="",e=Xr();if(!br.JudgeUtil.isHexDigit(e))throw an(kr.Char,Qr());if(u+=Qr(),e=Xr(),!br.JudgeUtil.isHexDigit(e))throw an(kr.Char,Qr());return u+=Qr(),String.fromCodePoint(parseInt(u,16))}();case"u":return Qr(),rn();case"\n":case"\u2028":case"\u2029":return Qr(),"";case"\r":return Qr(),"\n"===Xr()&&Qr(),""}if(void 0===u||br.JudgeUtil.isDigitWithoutZero(u))throw an(kr.Char,Qr());return Qr()}());case'"':case"'":if(Jr===Kr){const u=en("string",jr);return Qr(),u}return void(jr+=Qr());case"\n":case"\r":case void 0:throw an(kr.Char,Qr());case"\u2028":case"\u2029":!function(u){(0,Ir.logErrorAndExit)(`JSON5: '${cn(u)}' in strings is not valid ECMAScript; consider escaping.`)}(Jr)}jr+=Qr()}};function en(u,e){return{type:u,value:e,line:$r,column:Ur}}function tn(u){for(const e of u){if(Xr()!==e)throw an(kr.Char,Qr());Qr()}}function rn(){let u="",e=4;for(;e-- >0;){const e=Xr();if(!br.JudgeUtil.isHexDigit(e))throw an(kr.Char,Qr());u+=Qr()}return String.fromCodePoint(parseInt(u,16))}const nn={start(){if("eof"===Tr.type)throw an(kr.EOF);on()},beforePropertyName(){switch(Tr.type){case"identifier":case"string":return Mr=Tr.value,void(Lr="afterPropertyName");case"punctuator":return void Dn();case"eof":throw an(kr.EOF)}},afterPropertyName(){if("eof"===Tr.type)throw an(kr.EOF);Lr="beforePropertyValue"},beforePropertyValue(){if("eof"===Tr.type)throw an(kr.EOF);on()},afterPropertyValue(){if("eof"===Tr.type)throw an(kr.EOF);switch(Tr.value){case",":return void(Lr="beforePropertyName");case"}":Dn()}},beforeArrayValue(){if("eof"===Tr.type)throw an(kr.EOF);"punctuator"!==Tr.type||"]"!==Tr.value?on():Dn()},afterArrayValue(){if("eof"===Tr.type)throw an(kr.EOF);switch(Tr.value){case",":return void(Lr="beforeArrayValue");case"]":Dn()}},end(){}};function on(){const u=function(){let u;switch(Tr.type){case"punctuator":switch(Tr.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=Tr.value}return u}();if(Wr&&"object"==typeof u&&(u._line=$r,u._column=Ur),void 0===Hr)Hr=u;else{const e=Gr[Gr.length-1];Array.isArray(e)?Wr&&"object"!=typeof u?e.push({value:u,_line:$r,_column:Ur}):e.push(u):e[Mr]=Wr&&"object"!=typeof u?{value:u,_line:$r,_column:Ur}:u}!function(u){if(u&&"object"==typeof u)Gr.push(u),Lr=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{const u=Gr[Gr.length-1];Lr=u?Array.isArray(u)?"afterArrayValue":"afterPropertyValue":"end"}}(u)}function Dn(){Gr.pop();const u=Gr[Gr.length-1];Lr=u?Array.isArray(u)?"afterArrayValue":"afterPropertyValue":"end"}function cn(u){const e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[u])return e[u];if(u<" "){const e=u.charCodeAt(0).toString(16);return`\\x${`00${e}`.substring(e.length)}`}return u}function an(u,e){let t="";switch(u){case kr.Char:t=void 0===e?`JSON5: invalid end of input at ${$r}:${Ur}`:`JSON5: invalid character '${cn(e)}' at ${$r}:${Ur}`;break;case kr.EOF:t=`JSON5: invalid end of input at ${$r}:${Ur}`;break;case kr.Identifier:Ur-=5,t=`JSON5: invalid identifier character at ${$r}:${Ur}`}const r=new sn(t);return r.lineNumber=$r,r.columnNumber=Ur,r}class sn extends SyntaxError{}var fn=p&&p.__createBinding||(Object.create?function(u,e,t,r){void 0===r&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(u,r,n)}:function(u,e,t,r){void 0===r&&(r=t),u[r]=e[t]}),En=p&&p.__setModuleDefault||(Object.create?function(u,e){Object.defineProperty(u,"default",{enumerable:!0,value:e})}:function(u,e){u.default=e}),ln=p&&p.__importStar||function(u){if(u&&u.__esModule)return u;var e={};if(null!=u)for(var t in u)"default"!==t&&Object.prototype.hasOwnProperty.call(u,t)&&fn(e,u,t);return En(e,u),e};Object.defineProperty(X,"__esModule",{value:!0});var Fn=X.executeInstallHvigor=vn=X.isHvigorInstalled=void 0;const Cn=ln(s.default),An=ln(f.default),dn=m,yn=I,pn=k,hn=Q;let mn,Bn;var vn=X.isHvigorInstalled=function(){return mn=function(){const u=An.resolve(dn.HVIGOR_PROJECT_WRAPPER_HOME,dn.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME);if(!Cn.existsSync(u))throw new Error(`Error: Hvigor config file ${u} does not exist.`);return(0,hn.parseJsonFile)(u)}(),Bn=Cn.existsSync(dn.HVIGOR_PROJECT_DEPENDENCY_PACKAGE_JSON_PATH)?(0,hn.parseJsonFile)(dn.HVIGOR_PROJECT_DEPENDENCY_PACKAGE_JSON_PATH):{dependencies:{}},!(!(0,yn.hasNpmPackInPaths)(dn.HVIGOR_ENGINE_PACKAGE_NAME,[dn.HVIGOR_PROJECT_DEPENDENCIES_HOME])||mn.hvigorVersion!==Bn.dependencies[dn.HVIGOR_ENGINE_PACKAGE_NAME])||(console.log("Hvigor installing..."),!1)};const Sn={cwd:dn.HVIGOR_PROJECT_DEPENDENCIES_HOME,stdio:["inherit","inherit","inherit"]};Fn=X.executeInstallHvigor=function(){const u={dependencies:{}};u.dependencies[dn.HVIGOR_ENGINE_PACKAGE_NAME]=mn.hvigorVersion;try{Cn.mkdirSync(dn.HVIGOR_PROJECT_DEPENDENCIES_HOME,{recursive:!0});const e=An.resolve(dn.HVIGOR_PROJECT_DEPENDENCIES_HOME,dn.DEFAULT_PACKAGE_JSON);Cn.writeFileSync(e,JSON.stringify(u))}catch(u){(0,pn.logErrorAndExit)(u)}!function(){const u=["config","set","store-dir",dn.HVIGOR_PNPM_STORE_PATH];(0,yn.executeCommand)(dn.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,u,Sn)}(),(0,yn.executeCommand)(dn.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,["install"],Sn)};var _n={},On=p&&p.__createBinding||(Object.create?function(u,e,t,r){void 0===r&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(u,r,n)}:function(u,e,t,r){void 0===r&&(r=t),u[r]=e[t]}),wn=p&&p.__setModuleDefault||(Object.create?function(u,e){Object.defineProperty(u,"default",{enumerable:!0,value:e})}:function(u,e){u.default=e}),Pn=p&&p.__importStar||function(u){if(u&&u.__esModule)return u;var e={};if(null!=u)for(var t in u)"default"!==t&&Object.prototype.hasOwnProperty.call(u,t)&&On(e,u,t);return wn(e,u),e};Object.defineProperty(_n,"__esModule",{value:!0});var bn=_n.executeBuild=void 0;const gn=m,Nn=Pn(s.default),Rn=Pn(f.default),In=k;bn=_n.executeBuild=function(){const u=Rn.resolve(gn.HVIGOR_PROJECT_DEPENDENCIES_HOME,"node_modules","@ohos","hvigor","bin","hvigor.js");try{const e=Nn.realpathSync(u);require(e)}catch(e){(0,In.logErrorAndExit)(`Error: ENOENT: no such file ${u},delete ${gn.HVIGOR_PROJECT_DEPENDENCIES_HOME} and retry.`)}},Z()||U(),vn()||Fn(),bn(); \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/hvigorfile.ts b/CommonEventAndNotification/AlarmClock/hvigorfile.ts deleted file mode 100644 index 6478186902c0c1ad7c966a929c7d6b7d8ae7a9f3..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/hvigorfile.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently. -export { appTasks } from '@ohos/hvigor-ohos-plugin'; \ No newline at end of file diff --git a/CommonEventAndNotification/AlarmClock/oh-package.json5 b/CommonEventAndNotification/AlarmClock/oh-package.json5 deleted file mode 100644 index ea156f31623ef6883105fe0ddbc9e58878100c0b..0000000000000000000000000000000000000000 --- a/CommonEventAndNotification/AlarmClock/oh-package.json5 +++ /dev/null @@ -1,11 +0,0 @@ -{ - "license": "ISC", - "devDependencies": { - "@ohos/hypium": "1.0.6" - }, - "name": "AlarmClockETS", - "description": "example description", - "repository": {}, - "version": "1.0.0", - "dependencies": {} -} diff --git a/CommonEventAndNotification/AlarmClock/public_sys-resources/icon-caution.gif b/CommonEventAndNotification/AlarmClock/public_sys-resources/icon-caution.gif deleted file mode 100644 index 81fb2aba954177efa588e675927082b1f6bed41f..0000000000000000000000000000000000000000 Binary files a/CommonEventAndNotification/AlarmClock/public_sys-resources/icon-caution.gif and /dev/null differ diff --git a/CommonEventAndNotification/AlarmClock/public_sys-resources/icon-danger.gif b/CommonEventAndNotification/AlarmClock/public_sys-resources/icon-danger.gif deleted file mode 100644 index 81fb2aba954177efa588e675927082b1f6bed41f..0000000000000000000000000000000000000000 Binary files a/CommonEventAndNotification/AlarmClock/public_sys-resources/icon-danger.gif and /dev/null differ diff --git a/CommonEventAndNotification/AlarmClock/public_sys-resources/icon-note.gif b/CommonEventAndNotification/AlarmClock/public_sys-resources/icon-note.gif deleted file mode 100644 index db3995e34b6644fc11c916ffe69c7cb5512610d8..0000000000000000000000000000000000000000 Binary files a/CommonEventAndNotification/AlarmClock/public_sys-resources/icon-note.gif and /dev/null differ diff --git a/CommonEventAndNotification/AlarmClock/public_sys-resources/icon-notice.gif b/CommonEventAndNotification/AlarmClock/public_sys-resources/icon-notice.gif deleted file mode 100644 index 75397a3efc5c345922fd37f551d7d28675ab6c5f..0000000000000000000000000000000000000000 Binary files a/CommonEventAndNotification/AlarmClock/public_sys-resources/icon-notice.gif and /dev/null differ diff --git a/CommonEventAndNotification/AlarmClock/public_sys-resources/icon-tip.gif b/CommonEventAndNotification/AlarmClock/public_sys-resources/icon-tip.gif deleted file mode 100644 index 110cd67cefa9f6b2800a2b8076a7a0dcc00b783c..0000000000000000000000000000000000000000 Binary files a/CommonEventAndNotification/AlarmClock/public_sys-resources/icon-tip.gif and /dev/null differ diff --git a/CommonEventAndNotification/AlarmClock/public_sys-resources/icon-warning.gif b/CommonEventAndNotification/AlarmClock/public_sys-resources/icon-warning.gif deleted file mode 100644 index 81fb2aba954177efa588e675927082b1f6bed41f..0000000000000000000000000000000000000000 Binary files a/CommonEventAndNotification/AlarmClock/public_sys-resources/icon-warning.gif and /dev/null differ diff --git a/ETSUI/FlowLayoutEts/LICENSE b/ETSUI/FlowLayoutEts/LICENSE deleted file mode 100644 index 80576ef141485b36eea4aebf25af97020bc2de44..0000000000000000000000000000000000000000 --- a/ETSUI/FlowLayoutEts/LICENSE +++ /dev/null @@ -1,78 +0,0 @@ - Copyright (c) 2021 Huawei Device Co., Ltd. All rights reserved. - - 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. - -Apache License, Version 2.0 -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: -1.You must give any other recipients of the Work or Derivative Works a copy of this License; and -2.You must cause any modified files to carry prominent notices stating that You changed the files; and -3.You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and -4.If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. - -You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/ETSUI/FlowLayoutEts/README.md b/ETSUI/FlowLayoutEts/README.md deleted file mode 100644 index dd82a27c7a3fe83fb47dc824ed8604bf7bcf2118..0000000000000000000000000000000000000000 --- a/ETSUI/FlowLayoutEts/README.md +++ /dev/null @@ -1,299 +0,0 @@ -# 1.介绍 - -本文档将介绍如何使用eTS实现流式布局。流式布局的特点是页面元素的宽度按照屏幕分辨率进行适配调整,但整体布局不变。效果图如下: - -![](figures/IMG_20211206_150939.jpg) - -## 应用场景 - -历史搜索记录、热点话题等布局效果的展示。 - -# 2.相关概念 - -TextInput:提供单行文本输入组件。 - -# 3.搭建OpenHarmony环境 - -完成本篇Codelab我们首先要完成开发环境的搭建,本示例以**Hi3516DV300**开发板为例,参照以下步骤进行: - -1. [获取OpenHarmony系统版本](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/get-code/sourcecode-acquire.md#%E8%8E%B7%E5%8F%96%E6%96%B9%E5%BC%8F3%E4%BB%8E%E9%95%9C%E5%83%8F%E7%AB%99%E7%82%B9%E8%8E%B7%E5%8F%96):标准系统解决方案(二进制) - - 以3.0版本为例: - - ![](figures/取版本.png) - -2. 搭建烧录环境 - - 1. [完成DevEco Device Tool的安装](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-ide-env-win.md) - 2. [完成Hi3516开发板的烧录](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-ide-3516-burn.md) -3. 搭建开发环境 - - 1. 开始前请参考[工具准备](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/start-overview.md#%E5%B7%A5%E5%85%B7%E5%87%86%E5%A4%87),完成DevEco Studio的安装和开发环境配置。 - 2. 开发环境配置完成后,请参考[使用工程向导](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/start-with-ets-fa.md#%E5%88%9B%E5%BB%BAets%E5%B7%A5%E7%A8%8B)创建工程(模板选择“Empty Ability”),选择JS或者eTS语言开发。 - 3. 工程创建完成后,选择使用[真机进行调测](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/start-with-ets-fa.md#%E4%BD%BF%E7%94%A8%E7%9C%9F%E6%9C%BA%E8%BF%90%E8%A1%8C%E5%BA%94%E7%94%A8)。 - - -# 4.编写输入框布局 - -1. 在index.ets文件中: - - - 使用@Component新增一个自定义组件,组件名为Search\_Input; - - 在build\(\)中使用Flex作为容器,实现子组件水平排列; - - 使用TextInput组件作为输入框,Button组件作为搜索按钮,内置Text组件,用来显示文本。 - - 代码如下: - - ``` - @Component - struct Search_Input { - build() { - Flex(){ - TextInput() - Button(){ - Text() - } - } - } - } - ``` - -2. 实现TextInput组件的样式及输入功能: - - - 使用@State定义变量historyInput,存储输入框的内容; - - TextInput组件参数中,将变量historyInput赋值给参数text,参数placeholder填写提示内容; - - 设置高度height、圆角borderRadius、背景颜色backgroundColor、提示内容颜色placeholderColor等方法; - - 设置TextInput组件在Flex容器的比重layoutWeight\(8\); - - 设置onChange事件,绑定用户输入的内容到变量historyInput中。 - - 代码如下: - - ``` - @Component - struct Search_Input { - @State historyInput: string = '' - - build() { - Flex(){ - TextInput({ placeholder: '请输入...', text: this.historyInput }) - .type(InputType.Normal) - .placeholderColor(Color.Red) - .placeholderFont({ size: 30, weight: 2}) - .enterKeyType(EnterKeyType.Search) - .caretColor(Color.Green) - .layoutWeight(8) - .height(40) - .borderRadius('20px') - .backgroundColor(Color.White) - .onChange((value: string) => { - this.historyInput = value - }) - } - } - } - ``` - -3. 实现Button组件的样式: - - - 设置Text组件的内容及文字大小fontSize、颜色fontColor; - - 设置Button组件在Flex容器的比重layoutWeight\(2\)。 - - 代码如下: - - ``` - @Component - struct Search_Input { - build() { - Flex({ alignItems: ItemAlign.Center }) { - Button({type: ButtonType.Capsule, stateEffect: false}) { - Text('搜索').fontSize(17).fontColor(Color.Blue) - } - .layoutWeight(2) - .backgroundColor('#00000000') - } - } - } - ``` - -4. 实现容器Flex的布局样式: - - - 设置Flex布局为水平方向ItemAlign.Center; - - 设置Flex布局的高度height、内边距padding、背景颜色backgroundColor。 - - 代码如下: - - ``` - build() { - Flex({ alignItems: ItemAlign.Center }) { - } - .height(60) - .width('100%') - .padding({left: 10}) - .backgroundColor('#FFedf2f5') - } - ``` - -5. 在@Entry修饰的主入口Search\_FlowLayout组件中,引用Search\_Input组件。代码如下: - - ``` - @Entry - @Component - struct Search_FlowLayout { - build() { - Column() { - Search_Input() - } - .height('100%') - .width('100%') - .alignItems(HorizontalAlign.Center) - } - } - ``` - -# 5.编写流式布局 - -1. 在index.ets文件中: - - - 使用@Component新增一个自定义组件,组件名为Flowlayout\_Container; - - 在build\(\)中使用Flex作为容器,设置参数wrap为FlexWrap.Wrap; - - 设置Flex容器的外边距margin和内边距padding; - - 使用@Link定义数组变量historyArr,表示子组件要显示的文本内容。 - - 代码如下: - - ``` - @Component - struct Flowlayout_Container { - @Link historyArr: string[] - - build() { - Scroll() { - Flex({justifyContent: FlexAlign.Start, wrap: FlexWrap.Wrap}) { - - } - .margin({ left: 20, bottom: 100, right: 10 }) - .padding({bottom: 10}) - } - } - } - ``` - -2. 实现流式布局效果: - - - 在Flex容器中,使用ForEach遍历变量historyArr; - - 使用Text组件作为Flex的子组件; - - 设置组件Text的文本内容为$\{item\}; - - 设置组件Text的边框宽度borderWidth、边框颜色borderColor、边框圆角borderRadius; - - 设置组件Text的外边距margin和内边距padding。 - - 代码如下: - - ``` - Flex({justifyContent: FlexAlign.Start, wrap: FlexWrap.Wrap}) { - if (this.historyArr.length > 0) { - ForEach(this.historyArr, - (item: string) => { - Text(`${item}`) - .fontSize(18) - .borderStyle(BorderStyle.Solid) - .borderWidth('1px') - .borderColor('#dddddd') - .borderRadius('90px') - .padding({top: 4, bottom: 4, right: 10, left: 10}) - .margin({top: 10, right: 10}) - .textOverflow({overflow: TextOverflow.Ellipsis}) - .maxLines(2) - }, - (item: string) => item.toString() - ) - } - } - ``` - -3. 在@Entry修饰的主入口Search\_FlowLayout组件中,引用Flowlayout\_Container组件。 - - - @State定义数组变量historyArr,用来存放文本内容。 - - 添加子组件Flowlayout\_Container。 - - 在构造参数中,使用$符号引用@State修饰的变量historyArr,将父组件的变量historyArr与子组件historyArr变量关联起来。 - - 代码如下: - - ``` - @Entry - @Component - struct Search_FlowLayout { - @State historyArr: string[] = ["Text", "Button", "TextField", "Image", "Switch", "Checkbox", "RadioButton", "ProgressBar", "ScrollView"] - - build() { - Column() { - Search_Input() - Flowlayout_Container({historyArr: $historyArr}) - } - .height('100%') - .width('100%') - .alignItems(HorizontalAlign.Center) - } - } - ``` - -# 6.添加数据 - -在本篇Codelab中,我们需要在输入框输入内容,并点击搜索按钮,将输入数据填充到流式布局中。 - -1. 在Search\_Input组件中: - - - 使用@Link定义一个数组变量historyArr; - - 定义Button组件的点击事件onClick; - - 在点击事件中,将变量historyInput的值,通过数组的unshift\(\)方法,存放在数组historyArr中。 - - 代码如下: - - ``` - @Component - struct Search_Input { - @Link historyArr: string[] - - build() { - Flex({ alignItems: ItemAlign.Center }) { - Button({type: ButtonType.Capsule, stateEffect: false}) { - } - .onClick((event: ClickEvent) => { - if (this.historyInput != null && this.historyInput.length > 0) { - this.historyArr.unshift(this.historyInput) - this.historyInput = '' - } - }) - } - } - } - ``` - -2. 在主入口Search\_FlowLayout组件中,使用$符号将父组件的变量historyArr与子组件Search\_Input的historyArr变量关联起来。代码如下: - - ``` - @Entry - @Component - struct Search_FlowLayout { - build() { - Column() { - Search_Input({historyArr: $historyArr}) - Flowlayout_Container({historyArr: $historyArr}) - } - } - } - ``` - -# 7.回顾和总结 - -- 实现ETS流式布局的核心点是设置Flex组件的参数wrap为FlexWrap.Wrap,它会实现自动换行功能。 -- 获取TextInput组件的值,需要使用一个变量存储,然后使用onChange事件获取到文本的变化。 - -- 使用数组的push\(\)、unshift\(\)方法来添加数据,不同的是push\(\)方法是在尾部添加数据,而unshift\(\)方法是在头部添加数据。 - -# 8.恭喜你 - -目前你已经成功完成了Codelab并且学到了: - -- 如何将一个ETS项目部署到OpenHarmony设备上 -- TextInput组件的使用 -- button组件的使用 -- text组件的使用 \ No newline at end of file diff --git a/ETSUI/FlowLayoutEts/build-profile.json5 b/ETSUI/FlowLayoutEts/build-profile.json5 deleted file mode 100644 index 98ef1ec31e090cb9d22f519ae787caa29b2b4fcc..0000000000000000000000000000000000000000 --- a/ETSUI/FlowLayoutEts/build-profile.json5 +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. - */ -{ - "app": { - "signingConfigs": [], - "compileSdkVersion": 8, - "compatibleSdkVersion": 8, - "products": [ - { - "name": "default", - "signingConfig": "default" - }, - ], - }, - "modules": [ - { - "name": "entry", - "srcPath": "./entry", - "targets": [ - { - "name": "default", - "applyToProducts": [ - "default", - ], - }, - ], - }, - ], -} \ No newline at end of file diff --git a/ETSUI/FlowLayoutEts/entry/build-profile.json5 b/ETSUI/FlowLayoutEts/entry/build-profile.json5 deleted file mode 100644 index 62a5100a430b12691a4b79f8c05362c9d5d5f4a1..0000000000000000000000000000000000000000 --- a/ETSUI/FlowLayoutEts/entry/build-profile.json5 +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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. - */ -{ - "apiType": 'faMode', - "buildOption": { - }, - "targets": [ - { - "name": "default", - }, - { - "name": "ohosTest", - } - ] -} \ No newline at end of file diff --git a/ETSUI/FlowLayoutEts/entry/hvigorfile.js b/ETSUI/FlowLayoutEts/entry/hvigorfile.js deleted file mode 100644 index 10bf2171a235d29f7a9c074f18552981b8f7882f..0000000000000000000000000000000000000000 --- a/ETSUI/FlowLayoutEts/entry/hvigorfile.js +++ /dev/null @@ -1,16 +0,0 @@ -/* - * 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. - */ -// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently. -module.exports = require('@ohos/hvigor-ohos-plugin').legacyHapTasks diff --git a/ETSUI/FlowLayoutEts/entry/package.json b/ETSUI/FlowLayoutEts/entry/package.json deleted file mode 100644 index f8964f7a229e8f1de91bcd74a9eac702cca31283..0000000000000000000000000000000000000000 --- a/ETSUI/FlowLayoutEts/entry/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "entry", - "version": "1.0.0", - "ohos": { - "org": "huawei", - "buildTool": "hvigor", - "directoryLevel": "module" - }, - "dependencies": {} -} diff --git a/ETSUI/FlowLayoutEts/entry/src/main/config.json b/ETSUI/FlowLayoutEts/entry/src/main/config.json deleted file mode 100644 index a2e58a89a5678079071e9b94f005b59d51338337..0000000000000000000000000000000000000000 --- a/ETSUI/FlowLayoutEts/entry/src/main/config.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "app": { - "bundleName": "com.example.test66", - "vendor": "huawei", - "version": { - "code": 1000000, - "name": "1.0.0" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.huawei.flowlayoutetsopenh", - "name": ".MyApplication", - "mainAbility": ".MainAbility", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry", - "installationFree": false - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "orientation": "unspecified", - "visible": true, - "srcPath": "MainAbility", - "name": ".MainAbility", - "srcLanguage": "ets", - "icon": "$media:icon", - "description": "$string:description_mainability", - "formsEnabled": false, - "label": "$string:entry_MainAbility", - "type": "page", - "launchType": "standard" - } - ], - "js": [ - { - "mode": { - "syntax": "ets", - "type": "pageAbility" - }, - "pages": [ - "pages/index" - ], - "name": ".MainAbility", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/ETSUI/FlowLayoutEts/entry/src/main/ets/MainAbility/app.ets b/ETSUI/FlowLayoutEts/entry/src/main/ets/MainAbility/app.ets deleted file mode 100644 index b7a0995c8e441cac86e21e06e7c9071664482b1c..0000000000000000000000000000000000000000 --- a/ETSUI/FlowLayoutEts/entry/src/main/ets/MainAbility/app.ets +++ /dev/null @@ -1,8 +0,0 @@ -export default { - onCreate() { - console.info('Application onCreate') - }, - onDestroy() { - console.info('Application onDestroy') - }, -} \ No newline at end of file diff --git a/ETSUI/FlowLayoutEts/entry/src/main/ets/MainAbility/pages/index.ets b/ETSUI/FlowLayoutEts/entry/src/main/ets/MainAbility/pages/index.ets deleted file mode 100644 index 6f5b844c02bfb54088dd514ebcacfe9a83bac2f8..0000000000000000000000000000000000000000 --- a/ETSUI/FlowLayoutEts/entry/src/main/ets/MainAbility/pages/index.ets +++ /dev/null @@ -1,131 +0,0 @@ -/* - * 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. - */ - -@Component -struct Search_Input { - @Link historyArr: string[] - @State private historyInput: string = '' - - build() { - Flex({ alignItems: ItemAlign.Center }) { - // @ts-ignore - TextInput({ placeholder: '请输入...', text: this.historyInput }) - .type(InputType.Normal) - .placeholderColor(Color.Red) - .placeholderFont({ size: 30, weight: 2 }) - .enterKeyType(EnterKeyType.Search) - .caretColor(Color.Green) - .layoutWeight(8) - .height(40) - .borderRadius('20px') - .backgroundColor(Color.White) - .onChange((value: string) => { - this.historyInput = value - }) - - Button({ type: ButtonType.Capsule, stateEffect: false }) { - Text('搜索').fontSize(17).fontColor(Color.Blue) - } - .layoutWeight(2) - .backgroundColor('#00000000') - .onClick((event: ClickEvent) => { - if (this.historyInput != null && this.historyInput.length > 0) { - this.historyArr.unshift(this.historyInput) - this.historyInput = '' - } - }) - } - .height(60) - .width('100%') - .padding({ left: 10 }) - .backgroundColor('#FFedf2f5') - } -} - -@Component -struct Clear_History { - @Link historyArr: string[] - - build() { - Flex({ alignItems: ItemAlign.Center }) { - if (this.historyArr.length > 0) { - Text('历史记录') - .fontSize(14) - .fontColor(Color.Grey) - .layoutWeight(8) - - Text('清空') - .fontSize(14) - .fontColor(Color.Grey) - .layoutWeight(2) - .onClick((event: ClickEvent) => { - this.historyArr.splice(0, this.historyArr.length) - this.historyArr.length = 0 - }) - } - } - .height(40) - .padding({ left: 20, top: 10 }) - } -} - -@Component -struct FlowLayout_Container { - @Link historyArr: string[] - - build() { - Scroll() { - Flex({ justifyContent: FlexAlign.Start, wrap: FlexWrap.Wrap }) { - if (this.historyArr.length > 0) { - ForEach(this.historyArr, - (item: string) => { - Text(`${item}`) - .fontSize(18) - .borderStyle(BorderStyle.Solid) - .borderWidth('1px') - .borderColor('#dddddd') - .borderRadius('90px') - .padding({ top: 4, bottom: 4, right: 10, left: 10 }) - .margin({ top: 10, right: 10 }) - .textOverflow({ overflow: TextOverflow.Ellipsis }) - .maxLines(2) - }, - (item: string) => item.toString() - ) - } - } - .margin({ left: 20, bottom: 100, right: 10 }) - .padding({ bottom: 10 }) - } - } -} - -@Entry -@Component -struct Search_FlowLayout { - @State private historyArr: string[] = ["Text", "Button", "TextField", "Image", "Switch", "Checkbox", "RadioButton", "ProgressBar", "ScrollView"] - - build() { - Column() { - Search_Input({ historyArr: $historyArr }) - Clear_History({ historyArr: $historyArr }) - FlowLayout_Container({ historyArr: $historyArr }) - } - .height('100%') - .width('100%') - .alignItems(HorizontalAlign.Center) - - } -} \ No newline at end of file diff --git a/ETSUI/FlowLayoutEts/entry/src/main/resources/base/element/string.json b/ETSUI/FlowLayoutEts/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 03b8532c53ca563f8ed6b1e21d20ad3f67a68906..0000000000000000000000000000000000000000 --- a/ETSUI/FlowLayoutEts/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "entry_MainAbility", - "value": "entry_MainAbility" - }, - { - "name": "description_mainability", - "value": "ETS_Empty Ability" - } - ] -} \ No newline at end of file diff --git a/ETSUI/FlowLayoutEts/entry/src/main/resources/base/media/icon.png b/ETSUI/FlowLayoutEts/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ETSUI/FlowLayoutEts/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ETSUI/FlowLayoutEts/figures/IMG_20211206_150939.jpg b/ETSUI/FlowLayoutEts/figures/IMG_20211206_150939.jpg deleted file mode 100644 index 4c533215bf9240bbc48a9d8335f8e40ce6b1459a..0000000000000000000000000000000000000000 Binary files a/ETSUI/FlowLayoutEts/figures/IMG_20211206_150939.jpg and /dev/null differ diff --git "a/ETSUI/FlowLayoutEts/figures/\345\217\226\347\211\210\346\234\254.png" "b/ETSUI/FlowLayoutEts/figures/\345\217\226\347\211\210\346\234\254.png" deleted file mode 100644 index 9a4203fdba7d630c4d6cf0b60685f27afd85d28a..0000000000000000000000000000000000000000 Binary files "a/ETSUI/FlowLayoutEts/figures/\345\217\226\347\211\210\346\234\254.png" and /dev/null differ diff --git "a/ETSUI/FlowLayoutEts/figures/\346\210\252\345\233\276.png" "b/ETSUI/FlowLayoutEts/figures/\346\210\252\345\233\276.png" deleted file mode 100644 index 3ce177f4d3e03464a38d31472b80e82775c68874..0000000000000000000000000000000000000000 Binary files "a/ETSUI/FlowLayoutEts/figures/\346\210\252\345\233\276.png" and /dev/null differ diff --git a/ETSUI/FlowLayoutEts/hvigorfile.js b/ETSUI/FlowLayoutEts/hvigorfile.js deleted file mode 100644 index ae70b6f5380f9933e1bceaea54787ce080715807..0000000000000000000000000000000000000000 --- a/ETSUI/FlowLayoutEts/hvigorfile.js +++ /dev/null @@ -1,16 +0,0 @@ -/* - * 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. - */ -// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently. -module.exports = require('@ohos/hvigor-ohos-plugin').legacyAppTasks \ No newline at end of file diff --git a/ETSUI/FlowLayoutEts/package.json b/ETSUI/FlowLayoutEts/package.json deleted file mode 100644 index 7fc345454cba5ac09c5c5b465ddb41a1b19c3998..0000000000000000000000000000000000000000 --- a/ETSUI/FlowLayoutEts/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "example", - "version": "1.0.0", - "ohos": { - "org": "huawei", - "buildTool": "hvigor", - "directoryLevel": "project" - }, - "dependencies": { - "@ohos/hvigor": "1.0.6", - "@ohos/hvigor-ohos-plugin": "1.0.6" - } -} diff --git a/ETSUI/FlowLayoutEts/public_sys-resources/icon-caution.gif b/ETSUI/FlowLayoutEts/public_sys-resources/icon-caution.gif deleted file mode 100644 index 6e90d7cfc2193e39e10bb58c38d01a23f045d571..0000000000000000000000000000000000000000 Binary files a/ETSUI/FlowLayoutEts/public_sys-resources/icon-caution.gif and /dev/null differ diff --git a/ETSUI/FlowLayoutEts/public_sys-resources/icon-danger.gif b/ETSUI/FlowLayoutEts/public_sys-resources/icon-danger.gif deleted file mode 100644 index 6e90d7cfc2193e39e10bb58c38d01a23f045d571..0000000000000000000000000000000000000000 Binary files a/ETSUI/FlowLayoutEts/public_sys-resources/icon-danger.gif and /dev/null differ diff --git a/ETSUI/FlowLayoutEts/public_sys-resources/icon-note.gif b/ETSUI/FlowLayoutEts/public_sys-resources/icon-note.gif deleted file mode 100644 index 6314297e45c1de184204098efd4814d6dc8b1cda..0000000000000000000000000000000000000000 Binary files a/ETSUI/FlowLayoutEts/public_sys-resources/icon-note.gif and /dev/null differ diff --git a/ETSUI/FlowLayoutEts/public_sys-resources/icon-notice.gif b/ETSUI/FlowLayoutEts/public_sys-resources/icon-notice.gif deleted file mode 100644 index 86024f61b691400bea99e5b1f506d9d9aef36e27..0000000000000000000000000000000000000000 Binary files a/ETSUI/FlowLayoutEts/public_sys-resources/icon-notice.gif and /dev/null differ diff --git a/ETSUI/FlowLayoutEts/public_sys-resources/icon-tip.gif b/ETSUI/FlowLayoutEts/public_sys-resources/icon-tip.gif deleted file mode 100644 index 93aa72053b510e456b149f36a0972703ea9999b7..0000000000000000000000000000000000000000 Binary files a/ETSUI/FlowLayoutEts/public_sys-resources/icon-tip.gif and /dev/null differ diff --git a/ETSUI/FlowLayoutEts/public_sys-resources/icon-warning.gif b/ETSUI/FlowLayoutEts/public_sys-resources/icon-warning.gif deleted file mode 100644 index 6e90d7cfc2193e39e10bb58c38d01a23f045d571..0000000000000000000000000000000000000000 Binary files a/ETSUI/FlowLayoutEts/public_sys-resources/icon-warning.gif and /dev/null differ diff --git a/ETSUI/Multi_device/AppScope/app.json5 b/ETSUI/Multi_device/AppScope/app.json5 deleted file mode 100644 index be0ccf7bb9eae1b609ac1ff4e2c692fc6b515496..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/AppScope/app.json5 +++ /dev/null @@ -1,10 +0,0 @@ -{ - "app": { - "bundleName": "com.example.multi_device", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name" - } -} diff --git a/ETSUI/Multi_device/AppScope/resources/base/element/string.json b/ETSUI/Multi_device/AppScope/resources/base/element/string.json deleted file mode 100644 index 1fbd0e114abbf60dc46a0c2e8457293dd94962b2..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "Multi_device" - } - ] -} diff --git a/ETSUI/Multi_device/AppScope/resources/base/media/app_icon.png b/ETSUI/Multi_device/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ETSUI/Multi_device/LICENSE b/ETSUI/Multi_device/LICENSE deleted file mode 100644 index 381eb507bc1eef9b5158e496dedab769e810b657..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/LICENSE +++ /dev/null @@ -1,78 +0,0 @@ - Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. - - 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. - -Apache License, Version 2.0 -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: -1.You must give any other recipients of the Work or Derivative Works a copy of this License; and -2.You must cause any modified files to carry prominent notices stating that You changed the files; and -3.You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and -4.If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. - -You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/ETSUI/Multi_device/README.md b/ETSUI/Multi_device/README.md deleted file mode 100644 index fc5d494f3d2b1afefd6f826283a271de8f101279..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/README.md +++ /dev/null @@ -1,266 +0,0 @@ -# 一次开发多端部署(ArkTS) - -## 介绍 - -随着终端设备类型的不断丰富,用户对于应用UI界面的设计开发有了多样化的诉求,应用需要在多种终端设备上实现操作与美观层面的统一。这要求开发者在应用开发初期就考虑应用在多种终端设备上的运行场景,并据此来设计开发多套代码以适配不同设备,增加了开发成本。ArkTS是OpenHarmony提供的一种声明式UI开发范式,它提供的UI开发能力,旨在简化应用开发场景,使开发者能快速部署应用UI界面,并能适配不同的设备屏幕形态,实现“一次开发,多端部署”的目的。 - -本篇Codelab使用ArkTS实现应用的“一次开发,多端部署”,效果如下图所示: - -![](figures/一多.gif) - -### 相关概念 - -- [List](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/arkui-ts/ts-container-list.md):包含一系列相同宽度的列表项,适合连续、多行呈现同类数据,例如图片和文本。 - -- [Flex](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/arkui-ts/ts-container-flex.md):弹性布局组件。 - -- [Swiper](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/arkui-ts/ts-container-swiper.md):滑动容器,提供切换子组件显示的能力。 - -## 环境搭建 - -### 软件要求 - -- [DevEco Studio](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/start-overview.md#%E5%B7%A5%E5%85%B7%E5%87%86%E5%A4%87)版本:DevEco Studio 3.1 Beta2及以上版本。 -- OpenHarmony SDK版本:API version 9及以上版本。 - -### 硬件要求 - -- 开发板类型:[润和RK3568开发板](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-appendix-rk3568.md)。 -- OpenHarmony系统:3.2 Release及以上版本。 - -### 环境搭建 - -完成本篇Codelab我们首先要完成开发环境的搭建,本示例以**RK3568**开发板为例,参照以下步骤进行: - -1. [获取OpenHarmony系统版本](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/get-code/sourcecode-acquire.md#%E8%8E%B7%E5%8F%96%E6%96%B9%E5%BC%8F3%E4%BB%8E%E9%95%9C%E5%83%8F%E7%AB%99%E7%82%B9%E8%8E%B7%E5%8F%96):标准系统解决方案(二进制)。以3.2 Release版本为例: - - ![](figures/zh-cn_image_0000001405854998.png) - -2. 搭建烧录环境。 - 1. [完成DevEco Device Tool的安装](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-ide-env-win.md) - 2. [完成RK3568开发板的烧录](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-ide-3568-burn.md) - -3. 搭建开发环境。 - 1. 开始前请参考[工具准备](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/start-overview.md#%E5%B7%A5%E5%85%B7%E5%87%86%E5%A4%87),完成DevEco Studio的安装和开发环境配置。 - 2. 开发环境配置完成后,请参考[使用工程向导](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/start-with-ets-stage.md#创建ets工程)创建工程(模板选择“Empty Ability”),选择JS或者eTS语言开发。 - 3. 工程创建完成后,选择使用[真机进行调测](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/start-with-ets-stage.md#使用真机运行应用)。 - -## 代码结构解读 - -本篇Codelab只对核心代码进行讲解,完整代码可以直接从gitee获取。 - -``` -├──entry/src/main/ets // 代码区 -│ ├──common -│ │ ├──bean -│ │ │ └──Item.ets // 资源类接口 -│ │ ├──constants -│ │ │ └──CommonConstants.ets // 公共常量 -│ │ └──utils -│ │ └──BreakpointSystem.ets // 媒体查询类 -│ ├──entryability -│ │ └──EntryAbility.ts // 程序入口类 -│ ├──pages -│ │ └──Home.ets // 应用首页 -│ ├──view -│ │ ├──BottomTabsComponent.ets // 底部页签组件 -│ │ ├──HomeSwiperComponent.ets // Swiper组件 -│ │ ├──HomeTabContent.ets // 首页内容组件 -│ │ └──TopTabsComponent.ets // 顶部标签组件 -│ └──viewmodel -│ ├──BottomTabsModel.ets // 底部页签model -│ ├──HomeListModel.ets // 首页列表model -│ ├──HomeSwiperModel.ets // Swiper组件model -│ └──TopTabsModel.ets // 顶部标签model -└──entry/src/main/resources // 资源文件夹 -``` - -## 组件的拉伸能力 - -本篇Codelab的顶部标签使用了组件的拉伸能力,在设备的横屏形态和竖屏形态下,顶部标签会被等比拉伸,以保证应用在多种屏幕形态下的美观性,效果如下图所示: - -![](figures/2022112251927---副本.png) - -本篇Codelab使用了自定义组件TopTabs来实现该效果,其中margin属性的作用是确定标签之间的间隔距离,layoutWeight属性的作用是在容器尺寸确定时,元素与兄弟节点的主轴布局尺寸会按照设置的权重进行分配,忽略本身的尺寸设置。代码如下: - -```typescript -@Component -export struct TopTabs { - build() { - Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { - Row() { - ForEach(TopTabsList, item => { - if (TopTabsList.indexOf(item) === 0) { - Text(item) - .fontSize($r('app.float.top_font_size_selected')) - .fontWeight(FontWeight.Bold) - } else { - Text(item) - .fontSize($r('app.float.top_font_size')) - .fontWeight(FontWeight.Medium) - .fontColor($r('app.color.top_tabs_font_color')) - .opacity(Const.TOP_FONT_OPACITY) - .margin({ left: Const.TOP_FONT_MARGIN }) // 使用百分比设置左侧距离兄弟节点的距离 - } - }) - } - .height(Const.FULL_SIZE) - .layoutWeight(Const.LAYOUT_WEIGHT) // 此处设置权重为1,则顶部标签会占满全部空间 - } - .width(Const.FULL_SIZE) - .height(Const.TOP_TAB_HEIGHT) - .alignSelf(ItemAlign.Start) - } -} -``` - -## 组件的占比能力 - -本篇Codelab的首页中,除开顶部标签和底部页签,中间部分可以上下滑动,以在不同的设备形态下能够显示全部内容,效果图如下: - -![](figures/2022112251952---副本.png) - -该实现是将中间内容放在List中,并设置属性layoutWeight\(1\),由于顶部标签没有设置权重,所以List权重最高,会占满顶部标签和底部页签之间的全部空间,代码如下: - -```typescript -@Component -export struct HomeTabComponent { - @StorageProp('currentBreakpoint') currentBreakpoint: string = 'md'; - - build() { - Column() { - TopTabs() - .margin({ bottom: $r('app.float.top_margin') }) - // 此处不设置layoutWeight权重 - - List() { - ... // 省略中间内容 - } - .width(Const.FULL_SIZE) - .height(Const.FULL_SIZE) - .listDirection(Axis.Vertical) - .layoutWeight(Const.LAYOUT_WEIGHT) // 此处设置权重为1 - } - .width(Const.FULL_SIZE) - } -} -``` - -## 组件的延伸能力 - -本篇Codelab首页中的各个子栏目,显示的图片数量能够根据容器尺寸进行调整,效果图如下: - -![](figures/2022112252019---副本.png) - -ArkTS中的List组件自带延伸能力,在不同屏幕形态上显示的ListItem数量不同,在不能全部显示时,可以滑动来显示剩余内容,代码如下: - -```typescript -List() { - ForEach(item.Item, (listItem: SwiperItem) => { - ListItem() { - Column() { - ... // 省略中间内容 - } - .alignItems(HorizontalAlign.Start) - } - }) -} -``` - -## 组件的均分能力 - -本篇Codelab的底部页签使用了组件的均分能力,在不同的屏幕形态上都能平均分配宽度,效果图如下: - -![](figures/2022112252019---副本-(2).png) - -实现方法是使用Flex组件的justifyContent参数提供均分布局能力,justifyContent参数信息如下表所示: - -![](figures/屏幕截图-2022-11-01-205138.png) - -FlexAlign参数信息如下表所示: - -![](figures/屏幕截图-2022-11-01-205323.png) - -本篇Codelab使用FlexAlign.SpaceEvenly来实现底部页签的均匀分布,代码如下: - -```typescript -@Component -export struct BottomTabs { - @Link bottomTabIndex: number; - - build() { - Flex({ direction: FlexDirection.Row, justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center }) { - ForEach(BottomTabsList, item => { - Column() { - ... // 省略中间内容 - } - .width(Const.BOTTOM_TAB_WIDTH) - }) - } - .width(Const.FULL_SIZE) - .height(Const.BOTTOM_TAB_HEIGHT) - .backgroundColor($r('app.color.bottom_tabs_background_color')) - } -} -``` - -## 多态组件 - -本篇Codelab在首页顶部使用了Swiper组件,Swiper是一种多态组件,可以在不同的终端设备上有不同的显示方式,效果图如下: - -![](figures/2022112252019---副本-(3).png) - -此处使用Swiper组件的displayCount属性来实现该效果,displayCount属性可以设置Swiper组件的元素显示个数。通过媒体查询接口获取屏幕尺寸的变化,根据变化情况改变Swiper组件的元素显示个数,即可在不同形态的设备上实现不同的显示方式,代码如下: - -```typescript -// BreakpointSystem.ets -import mediaQuery from '@ohos.mediaquery'; -export default class BreakpointSystem { - ... // 省略中间内容 - - // 监听屏幕尺寸的变化 - public register() { - this.smListener = mediaQuery.matchMediaSync('(320vp<=width<520vp)'); - this.smListener.on('change', this.isBreakpointSM); - this.mdListener = mediaQuery.matchMediaSync('(520vp<=width<840vp)'); - this.mdListener.on('change', this.isBreakpointMD); - this.lgListener = mediaQuery.matchMediaSync('(840vp<=width)'); - this.lgListener.on('change', this.isBreakpointLG); - } -} - -// HomeSwiperComponent.ets -@Component -export struct HomeSwiper { - @StorageProp('currentBreakpoint') currentBreakpoint: string = 'md'; - private index: number = 0; - - build() { - Swiper() { - ForEach(SwiperList, item => { - ... // 省略中间内容 - }) - } - .width(Const.FULL_SIZE) - .height(Const.SWIPER_HEIGHT) - .indicator(true) - .indicatorStyle({ color: $r('app.color.swiper_indicator_color'), selectedColor: Color.White }) - .index(this.index) - .autoPlay(true) - .itemSpace(Const.ITEM_SPACE) - .displayCount(this.currentBreakpoint === 'sm' ? - Const.SWIPER_COUNT_1: - (this.currentBreakpoint === 'md') ? Const.SWIPER_COUNT_2: Const.SWIPER_COUNT_3) // 根据屏幕尺寸的变化来确定元素显示个数 - .margin({ bottom: Const.SWIPER_MARGIN }) - } -} -``` - -## 总结 - -您已经完成了本次Codelab的学习,并了解到以下知识点: - -1. 如何使用组件的拉伸、占比、延伸和均分能力进行一次开发多端部署。 -2. 如何使用多态组件Swiper进行一次开发多端部署。 - -![](figures/彩带动效.gif) diff --git a/ETSUI/Multi_device/build-profile.json5 b/ETSUI/Multi_device/build-profile.json5 deleted file mode 100644 index d7b1117cdb34aab2983ac65026d9e8dcc91332d1..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/build-profile.json5 +++ /dev/null @@ -1,27 +0,0 @@ -{ - "app": { - "signingConfigs": [], - "compileSdkVersion": 9, - "compatibleSdkVersion": 9, - "products": [ - { - "name": "default", - "signingConfig": "default", - } - ] - }, - "modules": [ - { - "name": "entry", - "srcPath": "./entry", - "targets": [ - { - "name": "default", - "applyToProducts": [ - "default" - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/ETSUI/Multi_device/entry/build-profile.json5 b/ETSUI/Multi_device/entry/build-profile.json5 deleted file mode 100644 index 3f4f5c258db57852c093dcbaf5c5ad06a1504973..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/entry/build-profile.json5 +++ /dev/null @@ -1,11 +0,0 @@ -{ - "apiType": 'stageMode', - "buildOption": { - }, - "targets": [ - { - "name": "default", - "runtimeOS": "OpenHarmony" - } - ] -} \ No newline at end of file diff --git a/ETSUI/Multi_device/entry/hvigorfile.ts b/ETSUI/Multi_device/entry/hvigorfile.ts deleted file mode 100644 index 80e4ec5b81689f238c34614b167a0b9e9c83e8d9..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/entry/hvigorfile.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently. -export { hapTasks } from '@ohos/hvigor-ohos-plugin'; diff --git a/ETSUI/Multi_device/entry/oh-package.json5 b/ETSUI/Multi_device/entry/oh-package.json5 deleted file mode 100644 index 225946cb11a2c405c8dc81eea89c22f923556638..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/entry/oh-package.json5 +++ /dev/null @@ -1,10 +0,0 @@ -{ - "license": "", - "devDependencies": {}, - "author": "", - "name": "entry", - "description": "Please describe the basic information.", - "main": "", - "version": "1.0.0", - "dependencies": {} -} diff --git a/ETSUI/Multi_device/entry/src/main/ets/common/bean/Item.ets b/ETSUI/Multi_device/entry/src/main/ets/common/bean/Item.ets deleted file mode 100644 index 79518c5f13ee8f315c065dfccce3c256320796a2..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/entry/src/main/ets/common/bean/Item.ets +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2022 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. - */ - -export interface BottomTabsItem { - icon: Resource; - icon_selected: Resource; - text: Resource; -} - -export interface SwiperItem { - title: Resource; - img: Resource; - text: Resource; -} - -export interface ChildListItem { - title: Resource; - Item: Array; -} \ No newline at end of file diff --git a/ETSUI/Multi_device/entry/src/main/ets/common/constants/CommonConstants.ets b/ETSUI/Multi_device/entry/src/main/ets/common/constants/CommonConstants.ets deleted file mode 100644 index 48a6aff81a9f524a8d1330faf409c8842375a267..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/entry/src/main/ets/common/constants/CommonConstants.ets +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2022 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. - */ - -export default class CommonConstants { - static readonly FULL_SIZE = '100%'; - static readonly BOTTOM_IMAGE_SIZE = '40%'; - static readonly BOTTOM_TAB_WIDTH = '25%'; - static readonly BOTTOM_TAB_HEIGHT = '10%'; - static readonly TOP_TAB_HEIGHT = '8%'; - static readonly TOP_FONT_MARGIN = '5%'; - static readonly SWIPER_HEIGHT = '30%'; - static readonly SWIPER_MARGIN = '4%'; - - static readonly TOP_FONT_OPACITY = 0.6; - static readonly SWIPER_FONT_OPACITY = 0.9; - static readonly LAYOUT_WEIGHT = 1; - static readonly SWIPER_COUNT_1 = 1; - static readonly SWIPER_COUNT_2 = 2; - static readonly SWIPER_COUNT_3 = 3; - static readonly BORDER_RADIUS = 10; - static readonly SWIPER_WIDTH = 330; - static readonly SWIPER_SCALE = 0.9; - static readonly ITEM_SPACE = 12; - static readonly PADDING = 15; - static readonly PADDING_SCALE = 0.05; -} \ No newline at end of file diff --git a/ETSUI/Multi_device/entry/src/main/ets/common/utils/BreakpointSystem.ets b/ETSUI/Multi_device/entry/src/main/ets/common/utils/BreakpointSystem.ets deleted file mode 100644 index 9fb81a7805535cea118d568dd23a36f5a8116f1f..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/entry/src/main/ets/common/utils/BreakpointSystem.ets +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2022 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 mediaQuery from '@ohos.mediaquery'; - -export default class BreakpointSystem { - private currentBreakpoint: string = 'md'; - private smListener: mediaQuery.MediaQueryListener; - private mdListener: mediaQuery.MediaQueryListener; - private lgListener: mediaQuery.MediaQueryListener; - - private updateCurrentBreakpoint(breakpoint: string) { - if (this.currentBreakpoint !== breakpoint) { - this.currentBreakpoint = breakpoint; - AppStorage.Set('currentBreakpoint', this.currentBreakpoint); - } - } - - private isBreakpointSM = (mediaQueryResult) => { - if (mediaQueryResult.matches) { - this.updateCurrentBreakpoint('sm'); - } - } - - private isBreakpointMD = (mediaQueryResult) => { - if (mediaQueryResult.matches) { - this.updateCurrentBreakpoint('md'); - } - } - - private isBreakpointLG = (mediaQueryResult) => { - if (mediaQueryResult.matches) { - this.updateCurrentBreakpoint('lg'); - } - } - - public register() { - this.smListener = mediaQuery.matchMediaSync('(320<=width<1500)'); - this.smListener.on('change', this.isBreakpointSM); - this.mdListener = mediaQuery.matchMediaSync('(1500<=width<2600)'); - this.mdListener.on('change', this.isBreakpointMD); - this.lgListener = mediaQuery.matchMediaSync('(2600<=width)'); - this.lgListener.on('change', this.isBreakpointLG); - } - - public unregister() { - this.smListener.off('change', this.isBreakpointSM); - this.mdListener.off('change', this.isBreakpointMD); - this.lgListener.off('change', this.isBreakpointLG); - } -} \ No newline at end of file diff --git a/ETSUI/Multi_device/entry/src/main/ets/entryability/EntryAbility.ts b/ETSUI/Multi_device/entry/src/main/ets/entryability/EntryAbility.ts deleted file mode 100644 index c3c0b9b32d7f29506abf8cd5d2392e9472283f3b..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/entry/src/main/ets/entryability/EntryAbility.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2022 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 hilog from '@ohos.hilog'; -import UIAbility from '@ohos.app.ability.UIAbility' -import Window from '@ohos.window' - -export default class entryAbility extends UIAbility { - onCreate(want, launchParam) { - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); - hilog.info(0x0000, 'testTag', '%{public}s', 'want param:' + JSON.stringify(want) ?? ''); - hilog.info(0x0000, 'testTag', '%{public}s', 'launchParam:' + JSON.stringify(launchParam) ?? ''); - } - - onDestroy() { - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); - } - - onWindowStageCreate(windowStage: Window.WindowStage) { - // Main window is created, set main page for this ability - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); - - /* - windowStage.getMainWindow((err, data) => { - if (err && err.code) { - console.error('getMainWindow error'); - return; - } - data.setSystemBarEnable([]); - })*/ - - windowStage.loadContent('pages/Home', (err, data) => { - if (err.code) { - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.ERROR); - hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); - return; - } - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? ''); - }); - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); - } - - onForeground() { - // Ability has brought to foreground - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground'); - } - - onBackground() { - // Ability has back to background - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); - } -} diff --git a/ETSUI/Multi_device/entry/src/main/ets/pages/Home.ets b/ETSUI/Multi_device/entry/src/main/ets/pages/Home.ets deleted file mode 100644 index aee1e53218075b5168b1ebea1ecac07cfe80801b..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/entry/src/main/ets/pages/Home.ets +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2022 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 BreakpointSystem from '../common/utils/BreakpointSystem'; -import { HomeTabComponent } from '../view/HomeTabContent'; -import { BottomTabs } from '../view/BottomTabsComponent'; -import Const from '../common/constants/CommonConstants'; - -@Entry -@Component -struct HomeComponent { - @State bottomTabIndex: number = 0; - @StorageProp('currentBreakpoint') currentBreakpoint: string = 'md'; - private breakpointSystem: BreakpointSystem = new BreakpointSystem(); - private controller: TabsController = new TabsController(); - - aboutToAppear(){ - this.breakpointSystem.register(); - } - - aboutToDisappear() { - this.breakpointSystem.unregister(); - } - - build() { - Stack({ alignContent: Alignment.BottomStart }) { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.End, justifyContent: FlexAlign.End }) { - Tabs({ barPosition: BarPosition.End, index: 0, controller: this.controller }) { - TabContent() { - HomeTabComponent() - } - .padding({ left: $r('app.float.home_padding') }) - - TabContent() { - } - - TabContent() { - } - - TabContent() { - } - } - .onChange((index: number) => { - this.bottomTabIndex = index; - }) - .width(Const.FULL_SIZE) - .vertical(false) - .barHeight(0) - .scrollable(false) - BottomTabs({ bottomTabIndex: $bottomTabIndex }) - } - .width(Const.FULL_SIZE) - .layoutWeight(Const.LAYOUT_WEIGHT) - .backgroundColor($r('app.color.background_color')) - } - .width(Const.FULL_SIZE).height(Const.FULL_SIZE) - } -} \ No newline at end of file diff --git a/ETSUI/Multi_device/entry/src/main/ets/view/BottomTabsComponent.ets b/ETSUI/Multi_device/entry/src/main/ets/view/BottomTabsComponent.ets deleted file mode 100644 index 7b8b5dc2f8c7efc21c67f5be071baea2f47ad227..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/entry/src/main/ets/view/BottomTabsComponent.ets +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2022 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 { BottomTabsItem } from '../common/bean/Item'; -import { BottomTabsList } from '../viewmodel/BottomTabsModel'; -import Const from '../common/constants/CommonConstants'; - -function getTabImgSrc(item: BottomTabsItem, index: number) { - let imgSrc = item.icon; - if (BottomTabsList.indexOf(item) === index) { - imgSrc = item.icon_selected; - } - return imgSrc; -} - -function getTabTextColor(item: BottomTabsItem, index: number) { - let color = $r('app.color.bottom_tabs_font_color'); - if (BottomTabsList.indexOf(item) === index) { - color = $r('app.color.bottom_tabs_font_color_selected'); - } - return color; -} - -@Component -export struct BottomTabs { - @Link bottomTabIndex: number; - - build() { - Flex({ direction: FlexDirection.Row, justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center }) { - ForEach(BottomTabsList, item => { - Column() { - Image(getTabImgSrc(item, this.bottomTabIndex)) - .width(Const.BOTTOM_IMAGE_SIZE) - .height(Const.BOTTOM_IMAGE_SIZE) - .objectFit(ImageFit.Contain) - .margin({ bottom: $r('app.float.bottom_margin') }) - - Text(item.text) - .fontSize($r('app.float.bottom_font_size')) - .fontColor(getTabTextColor(item, this.bottomTabIndex)) - } - .width(Const.BOTTOM_TAB_WIDTH) - }) - } - .width(Const.FULL_SIZE) - .height(Const.BOTTOM_TAB_HEIGHT) - .backgroundColor($r('app.color.bottom_tabs_background_color')) - } -} \ No newline at end of file diff --git a/ETSUI/Multi_device/entry/src/main/ets/view/HomeSwiperComponent.ets b/ETSUI/Multi_device/entry/src/main/ets/view/HomeSwiperComponent.ets deleted file mode 100644 index be6e59b1738119e7712b3ca06831f9c07f46410e..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/entry/src/main/ets/view/HomeSwiperComponent.ets +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2022 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 { SwiperList } from '../viewmodel/HomeSwiperModel'; -import Const from '../common/constants/CommonConstants'; - -@Component -export struct HomeSwiper { - @StorageProp('currentBreakpoint') currentBreakpoint: string = 'md'; - private index: number = 0; - - build() { - Swiper() { - ForEach(SwiperList, item => { - Stack({ alignContent: Alignment.TopStart }) { - Image(item.img) - .width(Const.FULL_SIZE) - .height(Const.FULL_SIZE) - .borderRadius(Const.BORDER_RADIUS) - .objectFit(ImageFit.Cover) - - Column() { - Text($r('app.string.swiper_title')) - .fontSize($r('app.float.swiper_title_size')) - .fontColor(Color.White) - .opacity(Const.SWIPER_FONT_OPACITY) - .margin({ bottom: $r('app.float.swiper_bottom_margin') }) - - Text(item.title) - .fontSize($r('app.float.swiper_font_size')) - .fontColor(Color.White) - .fontWeight(FontWeight.Bold) - } - .alignItems(HorizontalAlign.Start) - .margin({ left: $r('app.float.swiper_left_margin'), top: $r('app.float.swiper_top_margin') }) - } - .width(Const.FULL_SIZE) - .height(Const.FULL_SIZE) - }) - } - .width(Const.FULL_SIZE) - .height(Const.SWIPER_HEIGHT) - .indicator(true) - .indicatorStyle({ color: $r('app.color.swiper_indicator_color'), selectedColor: Color.White }) - .index(this.index) - .autoPlay(true) - .itemSpace(Const.ITEM_SPACE) - .displayCount(this.currentBreakpoint === 'sm' ? - Const.SWIPER_COUNT_1: - (this.currentBreakpoint === 'md') ? Const.SWIPER_COUNT_2: Const.SWIPER_COUNT_3) - .margin({ bottom: Const.SWIPER_MARGIN }) - } -} \ No newline at end of file diff --git a/ETSUI/Multi_device/entry/src/main/ets/view/HomeTabContent.ets b/ETSUI/Multi_device/entry/src/main/ets/view/HomeTabContent.ets deleted file mode 100644 index 2d2d3c5a2950fea8993868531e500c71305deafe..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/entry/src/main/ets/view/HomeTabContent.ets +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 2022 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 { TopTabs } from '../view/TopTabsComponent'; -import { HomeSwiper } from '../view/HomeSwiperComponent'; -import { SwiperItem } from '../common/bean/Item'; -import { ListResource } from '../viewmodel/HomeListModel'; -import Const from '../common/constants/CommonConstants'; - -@Component -export struct HomeTabComponent { - @StorageProp('currentBreakpoint') currentBreakpoint: string = 'md'; - - build() { - Column() { - TopTabs() - .margin({ bottom: $r('app.float.top_margin') }) - - List() { - ListItem() { - HomeSwiper() - } - - ForEach(ListResource, item => { - ListItem() { - Column() { - Row() { - Column() { - Text(item.title) - .textAlign(TextAlign.Start) - .fontSize($r('app.float.list_title_size')) - } - .layoutWeight(Const.LAYOUT_WEIGHT) - .alignItems(HorizontalAlign.Start) - - Text($r('app.string.more')) - .fontSize($r('app.float.more_font_size')) - .fontColor(Color.Gray) - .margin({ right: $r('app.float.more_margin') }) - - Image($r('app.media.more')) - .width($r('app.float.more_width')) - .height($r('app.float.more_height')) - .objectFit(ImageFit.Contain) - } - .width(Const.FULL_SIZE) - .height($r('app.float.list_height')) - .margin({ bottom: $r('app.float.list_margin') }) - - List() { - ForEach(item.Item, (listItem: SwiperItem) => { - ListItem() { - Column() { - Image(listItem.img) - .width($r('app.float.list_image_width')) - .height(ListResource.indexOf(item) === 1 ? $r('app.float.list_image_height_vertical'): $r('app.float.list_image_height_horizontal')) - .borderRadius($r('app.float.list_image_border_radius')) - .margin({ bottom: $r('app.float.list_image_margin'), right: $r('app.float.list_image_margin') }) - - Text(listItem.title) - .fontSize($r('app.float.listItem_title_size')) - .margin({ bottom: $r('app.float.listItem_margin') }) - - Text(listItem.text) - .fontSize($r('app.float.listItem_text_size')) - .fontColor(Color.Gray) - } - .alignItems(HorizontalAlign.Start) - } - }) - } - .width(Const.FULL_SIZE) - .height(ListResource.indexOf(item) === 1 ? $r('app.float.childList_height_vertical'): $r('app.float.childList_height_horizontal')) - .listDirection(Axis.Horizontal) - } - } - .height(ListResource.indexOf(item) === 1 ? $r('app.float.list_height_vertical'): $r('app.float.list_height_horizontal')) - }) - } - .width(Const.FULL_SIZE) - .height(Const.FULL_SIZE) - .listDirection(Axis.Vertical) - .layoutWeight(Const.LAYOUT_WEIGHT) - } - .width(Const.FULL_SIZE) - } -} \ No newline at end of file diff --git a/ETSUI/Multi_device/entry/src/main/ets/view/TopTabsComponent.ets b/ETSUI/Multi_device/entry/src/main/ets/view/TopTabsComponent.ets deleted file mode 100644 index e0638327f4039f6a4edd2b0e6b9f41408b5f4b43..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/entry/src/main/ets/view/TopTabsComponent.ets +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2022 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 { TopTabsList } from '../viewmodel/TopTabsModel'; -import Const from '../common/constants/CommonConstants'; - -@Component -export struct TopTabs { - build() { - Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { - Row() { - ForEach(TopTabsList, item => { - if (TopTabsList.indexOf(item) === 0) { - Text(item) - .fontSize($r('app.float.top_font_size_selected')) - .fontWeight(FontWeight.Bold) - } else { - Text(item) - .fontSize($r('app.float.top_font_size')) - .fontWeight(FontWeight.Medium) - .fontColor($r('app.color.top_tabs_font_color')) - .opacity(Const.TOP_FONT_OPACITY) - .margin({ left: Const.TOP_FONT_MARGIN }) - } - }) - } - .height(Const.FULL_SIZE) - .layoutWeight(Const.LAYOUT_WEIGHT) - } - .width(Const.FULL_SIZE) - .height(Const.TOP_TAB_HEIGHT) - .alignSelf(ItemAlign.Start) - } -} \ No newline at end of file diff --git a/ETSUI/Multi_device/entry/src/main/ets/viewmodel/BottomTabsModel.ets b/ETSUI/Multi_device/entry/src/main/ets/viewmodel/BottomTabsModel.ets deleted file mode 100644 index c111213c94daafc593bf4f5c432e7259b06bb5e8..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/entry/src/main/ets/viewmodel/BottomTabsModel.ets +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2022 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 { BottomTabsItem } from '../common/bean/Item'; - -export const BottomTabsList: Array = [ - { - icon: $r('app.media.Home'), - icon_selected: $r('app.media.Home_selected'), - text: $r('app.string.home') - }, - { - icon: $r('app.media.Find'), - icon_selected: $r('app.media.Find_selected'), - text: $r('app.string.find') - }, - { - icon: $r('app.media.Drive'), - icon_selected: $r('app.media.Drive_selected'), - text: $r('app.string.drive') - }, - { - icon: $r('app.media.Mine'), - icon_selected: $r('app.media.Mine_selected'), - text: $r('app.string.mine') - } -] diff --git a/ETSUI/Multi_device/entry/src/main/ets/viewmodel/HomeListModel.ets b/ETSUI/Multi_device/entry/src/main/ets/viewmodel/HomeListModel.ets deleted file mode 100644 index 622cd6c3ef0ba5a756437074b4afe761f604050e..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/entry/src/main/ets/viewmodel/HomeListModel.ets +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright (c) 2022 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 { ChildListItem } from '../common/bean/Item'; - -export const List1: ChildListItem = { - title: $r('app.string.list1_title'), - Item: [ - { - title: $r('app.string.list1_1_item'), - img: $r('app.media.1_1'), - text: $r('app.string.list1_1_text') - }, - { - title: $r('app.string.list1_2_item'), - img: $r('app.media.1_2'), - text: $r('app.string.list1_2_text') - }, - { - title: $r('app.string.list1_3_item'), - img: $r('app.media.1_3'), - text: $r('app.string.list1_3_text') - }, - { - title: $r('app.string.list1_4_item'), - img: $r('app.media.1_4'), - text: $r('app.string.list1_4_text') - }, - { - title: $r('app.string.list1_5_item'), - img: $r('app.media.1_5'), - text: $r('app.string.list1_5_text') - }, - { - title: $r('app.string.list1_6_item'), - img: $r('app.media.1_6'), - text: $r('app.string.list1_6_text') - }, - { - title: $r('app.string.list1_7_item'), - img: $r('app.media.1_7'), - text: $r('app.string.list1_7_text') - } - ] -} - -export const List2: ChildListItem = { - title: $r('app.string.list2_title'), - Item: [ - { - title: $r('app.string.list2_1_item'), - img: $r('app.media.2_1'), - text: $r('app.string.list2_1_text') - }, - { - title: $r('app.string.list2_2_item'), - img: $r('app.media.2_2'), - text: $r('app.string.list2_2_text') - }, - { - title: $r('app.string.list2_3_item'), - img: $r('app.media.2_3'), - text: $r('app.string.list2_3_text') - }, - { - title: $r('app.string.list2_4_item'), - img: $r('app.media.2_4'), - text: $r('app.string.list2_4_text') - }, - { - title: $r('app.string.list2_5_item'), - img: $r('app.media.2_5'), - text: $r('app.string.list2_5_text') - }, - { - title: $r('app.string.list2_6_item'), - img: $r('app.media.2_6'), - text: $r('app.string.list2_6_text') - }, - { - title: $r('app.string.list2_7_item'), - img: $r('app.media.2_7'), - text: $r('app.string.list2_7_text') - } - ] -} - -export const List3: ChildListItem = { - title: $r('app.string.list3_title'), - Item: [ - { - title: $r('app.string.list3_1_item'), - img: $r('app.media.3_1'), - text: $r('app.string.list3_1_text') - }, - { - title: $r('app.string.list3_2_item'), - img: $r('app.media.3_2'), - text: $r('app.string.list3_2_text') - }, - { - title: $r('app.string.list3_3_item'), - img: $r('app.media.3_3'), - text: $r('app.string.list3_3_text') - }, - { - title: $r('app.string.list3_4_item'), - img: $r('app.media.3_4'), - text: $r('app.string.list3_4_text') - }, - { - title: $r('app.string.list3_5_item'), - img: $r('app.media.3_5'), - text: $r('app.string.list3_5_text') - }, - { - title: $r('app.string.list3_6_item'), - img: $r('app.media.3_6'), - text: $r('app.string.list3_6_text') - }, - { - title: $r('app.string.list3_7_item'), - img: $r('app.media.3_7'), - text: $r('app.string.list3_7_text') - } - ] -} - -export const ListResource: Array = [ - List1, - List2, - List3 -] \ No newline at end of file diff --git a/ETSUI/Multi_device/entry/src/main/ets/viewmodel/HomeSwiperModel.ets b/ETSUI/Multi_device/entry/src/main/ets/viewmodel/HomeSwiperModel.ets deleted file mode 100644 index c0d298443810126a7d283d1334390e61adfba4dc..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/entry/src/main/ets/viewmodel/HomeSwiperModel.ets +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2022 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 { SwiperItem } from '../common/bean/Item'; - -export const SwiperList: Array = [ - { - title: $r('app.string.swiper_item_1'), - img: $r('app.media.Mountain'), - text: $r('app.string.swiper_text_1') - }, - { - title: $r('app.string.swiper_item_2'), - img: $r('app.media.Street'), - text: $r('app.string.swiper_text_2') - }, - { - title: $r('app.string.swiper_item_3'), - img: $r('app.media.Bridge'), - text: $r('app.string.swiper_text_3') - }, - { - title: $r('app.string.swiper_item_4'), - img: $r('app.media.Dandelion'), - text: $r('app.string.swiper_text_4') - }, - { - title: $r('app.string.swiper_item_5'), - img: $r('app.media.Ferris_wheel'), - text: $r('app.string.swiper_text_5') - } -] - - diff --git a/ETSUI/Multi_device/entry/src/main/ets/viewmodel/TopTabsModel.ets b/ETSUI/Multi_device/entry/src/main/ets/viewmodel/TopTabsModel.ets deleted file mode 100644 index 8f327cb5c6603832fed1e7d12fb0d08cea935fc7..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/entry/src/main/ets/viewmodel/TopTabsModel.ets +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2022 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. - */ - -export const TopTabsList: Array = [ - $r('app.string.all'), - $r('app.string.movies'), - $r('app.string.series'), - $r('app.string.entertainment'), - $r('app.string.live'), - $r('app.string.games') -] \ No newline at end of file diff --git a/ETSUI/Multi_device/entry/src/main/module.json5 b/ETSUI/Multi_device/entry/src/main/module.json5 deleted file mode 100644 index a14a4b9fe8cbab939cf19a3f0630d477cc2f1770..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/entry/src/main/module.json5 +++ /dev/null @@ -1,37 +0,0 @@ -{ - "module": { - "name": "entry", - "type": "entry", - "description": "$string:entry_desc", - "mainElement": "entryAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "abilities": [ - { - "name": "EntryAbility", - "srcEntrance": "./ets/entryability/EntryAbility.ts", - "description": "$string:MainAbility_desc", - "icon": "$media:icon", - "label": "$string:MainAbility_label", - "startWindowIcon": "$media:icon", - "startWindowBackground": "$color:white", - "visible": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ] - } - ] - } -} \ No newline at end of file diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/element/color.json b/ETSUI/Multi_device/entry/src/main/resources/base/element/color.json deleted file mode 100644 index 5b0d407cc391b305a1afb77d4b6056a69d82573a..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/entry/src/main/resources/base/element/color.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "color": [ - { - "name": "white", - "value": "#FFFFFF" - }, - { - "name": "background_color", - "value": "#F1F3F5" - }, - { - "name": "bottom_tabs_font_color", - "value": "#000000" - }, - { - "name": "bottom_tabs_font_color_selected", - "value": "#007DFF" - }, - { - "name": "bottom_tabs_background_color", - "value": "#F1F3F5" - }, - { - "name": "top_tabs_font_color", - "value": "#182431" - }, - { - "name": "swiper_indicator_color", - "value": "#4dFFFFFF" - } - ] -} \ No newline at end of file diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/element/pixel.json b/ETSUI/Multi_device/entry/src/main/resources/base/element/pixel.json deleted file mode 100644 index ee0be32036e80312a8d52fbd724343c67a85aa4d..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/entry/src/main/resources/base/element/pixel.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "float": [ - { - "name": "home_padding", - "value": "12vp" - }, - { - "name": "bottom_font_size", - "value": "10vp" - }, - { - "name": "bottom_margin", - "value": "4vp" - }, - { - "name": "top_font_size", - "value": "18vp" - }, - { - "name": "top_font_size_selected", - "value": "24vp" - }, - { - "name": "top_margin", - "value": "12vp" - }, - { - "name": "swiper_title_size", - "value": "12vp" - }, - { - "name": "swiper_font_size", - "value": "20vp" - }, - { - "name": "swiper_top_margin", - "value": "16vp" - }, - { - "name": "swiper_bottom_margin", - "value": "12vp" - }, - { - "name": "swiper_left_margin", - "value": "24vp" - }, - { - "name": "more_font_size", - "value": "14vp" - }, - { - "name": "more_margin", - "value": "5vp" - }, - { - "name": "more_width", - "value": "6.74vp" - }, - { - "name": "more_height", - "value": "12.81vp" - }, - { - "name": "list_height", - "value": "24vp" - }, - { - "name": "list_margin", - "value": "5vp" - }, - { - "name": "list_title_size", - "value": "16vp" - }, - { - "name": "list_image_width", - "value": "164vp" - }, - { - "name": "list_image_height_horizontal", - "value": "100vp" - }, - { - "name": "list_image_height_vertical", - "value": "269vp" - }, - { - "name": "list_image_border_radius", - "value": "12vp" - }, - { - "name": "list_image_margin", - "value": "8vp" - }, - { - "name": "listItem_title_size", - "value": "14vp" - }, - { - "name": "listItem_margin", - "value": "4vp" - }, - { - "name": "listItem_text_size", - "value": "12vp" - }, - { - "name": "childList_height_vertical", - "value": "319vp" - }, - { - "name": "childList_height_horizontal", - "value": "150vp" - }, - { - "name": "list_height_vertical", - "value": "369vp" - }, - { - "name": "list_height_horizontal", - "value": "200vp" - } - ] -} \ No newline at end of file diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/element/string.json b/ETSUI/Multi_device/entry/src/main/resources/base/element/string.json deleted file mode 100644 index aac8b4764c2b2a55660c9ce90d99581d976f6005..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,365 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "一次开发多端部署" - }, - { - "name": "home", - "value": "首页" - }, - { - "name": "find", - "value": "发现" - }, - { - "name": "drive", - "value": "云盘" - }, - { - "name": "mine", - "value": "我的" - }, - { - "name": "all", - "value": "全部" - }, - { - "name": "movies", - "value": "电影" - }, - { - "name": "series", - "value": "电视剧" - }, - { - "name": "entertainment", - "value": "综艺" - }, - { - "name": "live", - "value": "直播" - }, - { - "name": "games", - "value": "游戏" - }, - { - "name": "swiper_title", - "value": "电影精选" - }, - { - "name": "swiper_item_1", - "value": "大山深处" - }, - { - "name": "swiper_item_2", - "value": "背影" - }, - { - "name": "swiper_item_3", - "value": "废墟之上" - }, - { - "name": "swiper_item_4", - "value": "无根之人" - }, - { - "name": "swiper_item_5", - "value": "摩天轮" - }, - { - "name": "swiper_text_1", - "value": "悠然自得的世外桃源" - }, - { - "name": "swiper_text_2", - "value": "感人的亲情之歌" - }, - { - "name": "swiper_text_3", - "value": "勇闯无人之境" - }, - { - "name": "swiper_text_4", - "value": "悬疑国产力作" - }, - { - "name": "swiper_text_5", - "value": "每个人心中都有一个童话" - }, - { - "name": "more", - "value": "更多" - }, - { - "name": "list1_title", - "value": "最近播放" - }, - { - "name": "list1_1_item", - "value": "背影" - }, - { - "name": "list1_1_text", - "value": "感人的亲情之歌" - }, - { - "name": "list1_2_item", - "value": "心拱门" - }, - { - "name": "list1_2_text", - "value": "浪漫都在其中" - }, - { - "name": "list1_3_item", - "value": "奔腾时代" - }, - { - "name": "list1_3_text", - "value": "一个不甘寂寞的商人" - }, - { - "name": "list1_4_item", - "value": "鲁门的世界" - }, - { - "name": "list1_4_text", - "value": "人生不过是活出自我" - }, - { - "name": "list1_5_item", - "value": "暴风营救" - }, - { - "name": "list1_5_text", - "value": "毁灭=新生" - }, - { - "name": "list1_6_item", - "value": "漫长的契约" - }, - { - "name": "list1_6_text", - "value": "混乱和机遇左右着人生" - }, - { - "name": "list1_7_item", - "value": "春之都" - }, - { - "name": "list1_7_text", - "value": "春风沉醉的晚上" - }, - { - "name": "list2_title", - "value": "为你推荐" - }, - { - "name": "list2_1_item", - "value": "梦旅人" - }, - { - "name": "list2_1_text", - "value": "相互交错的故事" - }, - { - "name": "list2_2_item", - "value": "古韵之味" - }, - { - "name": "list2_2_text", - "value": "全世界都注视着" - }, - { - "name": "list2_3_item", - "value": "南乡" - }, - { - "name": "list2_3_text", - "value": "极简但相当不简单" - }, - { - "name": "list2_4_item", - "value": "奔向世界的尽头" - }, - { - "name": "list2_4_text", - "value": "感人的亲情之歌" - }, - { - "name": "list2_5_item", - "value": "铁塔" - }, - { - "name": "list2_5_text", - "value": "心之所向的自由" - }, - { - "name": "list2_6_item", - "value": "暖暖内含光" - }, - { - "name": "list2_6_text", - "value": "干净又温暖" - }, - { - "name": "list2_7_item", - "value": "爱九弥新" - }, - { - "name": "list2_7_text", - "value": "内心最温暖的地方" - }, - { - "name": "list3_title", - "value": "热门" - }, - { - "name": "list3_1_item", - "value": "凤凰劫" - }, - { - "name": "list3_1_text", - "value": "事在人为,希望永存" - }, - { - "name": "list3_2_item", - "value": "铁塔之上" - }, - { - "name": "list3_2_text", - "value": "勇闯无人之境" - }, - { - "name": "list3_3_item", - "value": "风雨耶鲁路" - }, - { - "name": "list3_3_text", - "value": "混乱和机遇左右着人生" - }, - { - "name": "list3_4_item", - "value": "给朱丽叶的信" - }, - { - "name": "list3_4_text", - "value": "爱情的力量没有被岁月湮灭" - }, - { - "name": "list3_5_item", - "value": "风语者" - }, - { - "name": "list3_5_text", - "value": "感人的亲情之歌" - }, - { - "name": "list3_6_item", - "value": "心灵猎人" - }, - { - "name": "list3_6_text", - "value": "是天才就不会被埋没" - }, - { - "name": "list3_7_item", - "value": "听见天堂" - }, - { - "name": "list3_7_text", - "value": "记录他生活的点点滴滴" - }, - - { - "name": "tips", - "value": "This is a test function and has not been implemented." - }, - { - "name": "tab_strings", - "value": "Tab" - }, - { - "name": "featured", - "value": "featured" - }, - { - "name": "discover", - "value": "discover" - }, - { - "name": "wallpaper", - "value": "wallpaper" - }, - { - "name": "knowledge", - "value": "knowledge" - }, - { - "name": "photo", - "value": "photo" - }, - { - "name": "delete", - "value": "delete" - }, - { - "name": "today_recommend", - "value": "Today Recommends" - }, - { - "name": "featured_recommend", - "value": "Featured Recommends" - }, - { - "name": "september_recommend", - "value": "September Recommends" - }, - { - "name": "august_recommend", - "value": "August Recommends" - }, - { - "name": "notification_settings", - "value": "Notification Settings" - }, - { - "name": "harmony_notification", - "value": "HarmonyOS Notification" - }, - { - "name": "background_reminderAgent", - "value": "HarmonyOS Background ReminderAgent" - }, - { - "name": "reminder_tips", - "value": "After the setting, the system clears the app, restarts the device, and shuts down the device. The notification is triggered normally." - }, - { - "name": "subscribe_succeed", - "value": "Subscribe succeed." - }, - { - "name": "add_reminder", - "value": "Do you want to add to the HarmonyOS background reminder?" - }, - { - "name": "yes", - "value": "Yes" - }, - { - "name": "no", - "value": "No" - } - ] -} \ No newline at end of file diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/1_1.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/1_1.png deleted file mode 100644 index aa1d621ef53f9258fc6d1d93e5a03a6791a3a93e..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/1_1.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/1_2.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/1_2.png deleted file mode 100644 index cd9b923bcecc5a9f5507bb51a0eb494045afdfaf..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/1_2.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/1_3.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/1_3.png deleted file mode 100644 index 62cf33d29a9415c09c6bbe15c6ff9c8766e91d2d..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/1_3.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/1_4.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/1_4.png deleted file mode 100644 index a83430567c6f00454a504da17aae0ddab3f02f7e..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/1_4.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/1_5.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/1_5.png deleted file mode 100644 index aa0ce5928c43cc4b4e9287e3367ddd3c3850b61c..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/1_5.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/1_6.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/1_6.png deleted file mode 100644 index db8f1207cde8ea6b94e18d622ab760f533282925..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/1_6.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/1_7.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/1_7.png deleted file mode 100644 index ca0e13020ae82de9ae96dd1e36b75390e16a502f..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/1_7.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/2_1.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/2_1.png deleted file mode 100644 index 650b51c9875a35e04a8beff3e8ab4343f1da7d44..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/2_1.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/2_2.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/2_2.png deleted file mode 100644 index b674d9c01d7c19454bef9d9d273cfd77964d024e..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/2_2.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/2_3.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/2_3.png deleted file mode 100644 index d3f1b8cb4ea3de24012f253ea3055489f3b3ce9f..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/2_3.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/2_4.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/2_4.png deleted file mode 100644 index 327f6288c4a16269cdf2d605fcaa48b9011d5e0a..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/2_4.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/2_5.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/2_5.png deleted file mode 100644 index 15a116c8c62332fcda3d237fd91f6cc4e9b3440a..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/2_5.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/2_6.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/2_6.png deleted file mode 100644 index f07185faf18773b8d2325cee81cff359d9bd06c1..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/2_6.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/2_7.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/2_7.png deleted file mode 100644 index 7bd3cee312464b79a4c335f90c53779420e79128..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/2_7.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/3_1.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/3_1.png deleted file mode 100644 index 89127eb5ae34f16e163bbffed3e8b726bf5918c8..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/3_1.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/3_2.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/3_2.png deleted file mode 100644 index e39b2847959bad557a6e3e85dd9ea911bfefe9ed..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/3_2.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/3_3.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/3_3.png deleted file mode 100644 index b73212b2193f6e7d8172fc65be9053321d41666f..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/3_3.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/3_4.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/3_4.png deleted file mode 100644 index 98bbf9fd5f6fd2a71f4a8224db12c5f00429f450..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/3_4.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/3_5.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/3_5.png deleted file mode 100644 index 315275cad2c8a5f5bedd7b6b8fb7426b6a058591..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/3_5.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/3_6.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/3_6.png deleted file mode 100644 index 1325d821500bcefbb8a32a5eefaa3516e62738e9..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/3_6.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/3_7.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/3_7.png deleted file mode 100644 index 3e0fbf61e89d42e740a032f3b4d731242eeb25e8..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/3_7.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/Bridge.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/Bridge.png deleted file mode 100644 index 0858e21a5451f67f53cc9ba046b52628891f8af4..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/Bridge.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/Dandelion.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/Dandelion.png deleted file mode 100644 index 92dcdda58d20bca518514ecabb3360879fb8241c..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/Dandelion.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/Drive.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/Drive.png deleted file mode 100644 index 03c8026a8c98fd1038984aec593960c02b470c0f..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/Drive.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/Drive_selected.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/Drive_selected.png deleted file mode 100644 index fe9332a5c96e7923bc8e76a72b5f8deed3a83db2..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/Drive_selected.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/Ferris_wheel.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/Ferris_wheel.png deleted file mode 100644 index b9f0b957e04d8c518baa63ebaa8123e41ccd22e2..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/Ferris_wheel.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/Find.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/Find.png deleted file mode 100644 index 761036911a5edd6a9b2c427b953a2315280a18f4..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/Find.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/Find_selected.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/Find_selected.png deleted file mode 100644 index 65918ebd19fa11659a8c5392b1d5b7b480b51df4..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/Find_selected.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/Home.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/Home.png deleted file mode 100644 index cd1196a0af5ac544564e835ae2f6a851448e58d4..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/Home.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/Home_selected.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/Home_selected.png deleted file mode 100644 index c9161d863749cb9870d2f15abf6d03b96bf26226..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/Home_selected.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/Mine.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/Mine.png deleted file mode 100644 index a816a9e2b58c254f4b871e06d0303b1183db4f62..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/Mine.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/Mine_selected.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/Mine_selected.png deleted file mode 100644 index 9f64cb6130159e91faf072a6f9f839942585c287..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/Mine_selected.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/Mountain.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/Mountain.png deleted file mode 100644 index a60a88c4022b58046b7d0792543d8374759e4230..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/Mountain.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/Street.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/Street.png deleted file mode 100644 index 48ad88b00bd480ce0befda2e08c631fe3b59a1aa..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/Street.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/arrow.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/arrow.png deleted file mode 100644 index 24513e54f3119d8e91d922108086afe8a5f766d3..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/arrow.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/close.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/close.png deleted file mode 100644 index 4c7a6b6a3ade46a7754330a726fa3bd04c29f8e4..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/close.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/close_white.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/close_white.png deleted file mode 100644 index ec0c15ff0305c38df600447e7c2ba3d5da988b83..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/close_white.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/delete.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/delete.png deleted file mode 100644 index 8ad06f881d9e4aec1de46037679378252909548f..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/delete.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/icon.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/more.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/more.png deleted file mode 100644 index 4e361e699556a5b5ccae46dff999498baee96538..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/more.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/search.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/search.png deleted file mode 100644 index 68db577dc6b6e66a7e1784946175b2b5ce5499bd..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/search.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/setting.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/setting.png deleted file mode 100644 index 5dd1d3d9d176380abdbd23afd0fe1e1dc2fe425c..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/setting.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/tab_blue.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/tab_blue.png deleted file mode 100644 index c0882ba31589e41a902a0ed31075f8c55527129c..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/tab_blue.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/media/tab_gray.png b/ETSUI/Multi_device/entry/src/main/resources/base/media/tab_gray.png deleted file mode 100644 index 32b626cf1e7da20c1cf8a45fc60727132ce0df2f..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/entry/src/main/resources/base/media/tab_gray.png and /dev/null differ diff --git a/ETSUI/Multi_device/entry/src/main/resources/base/profile/main_pages.json b/ETSUI/Multi_device/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 4ba14aff5d3509451ee9a5587c45cb934a3c76af..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/Home" - ] -} diff --git "a/ETSUI/Multi_device/figures/2022112251927---\345\211\257\346\234\254.png" "b/ETSUI/Multi_device/figures/2022112251927---\345\211\257\346\234\254.png" deleted file mode 100644 index e3653cb76644d395ae96281ab7efe85d25b14ca9..0000000000000000000000000000000000000000 Binary files "a/ETSUI/Multi_device/figures/2022112251927---\345\211\257\346\234\254.png" and /dev/null differ diff --git "a/ETSUI/Multi_device/figures/2022112251952---\345\211\257\346\234\254.png" "b/ETSUI/Multi_device/figures/2022112251952---\345\211\257\346\234\254.png" deleted file mode 100644 index 654fc377df58372d81bf7de2a82988310c830f13..0000000000000000000000000000000000000000 Binary files "a/ETSUI/Multi_device/figures/2022112251952---\345\211\257\346\234\254.png" and /dev/null differ diff --git "a/ETSUI/Multi_device/figures/2022112252019---\345\211\257\346\234\254-(2).png" "b/ETSUI/Multi_device/figures/2022112252019---\345\211\257\346\234\254-(2).png" deleted file mode 100644 index 50e1c781ff00fd378222ba87dd6915fef51c35ce..0000000000000000000000000000000000000000 Binary files "a/ETSUI/Multi_device/figures/2022112252019---\345\211\257\346\234\254-(2).png" and /dev/null differ diff --git "a/ETSUI/Multi_device/figures/2022112252019---\345\211\257\346\234\254-(3).png" "b/ETSUI/Multi_device/figures/2022112252019---\345\211\257\346\234\254-(3).png" deleted file mode 100644 index c59b1c69f3b48de94f731004fe45919c434ae822..0000000000000000000000000000000000000000 Binary files "a/ETSUI/Multi_device/figures/2022112252019---\345\211\257\346\234\254-(3).png" and /dev/null differ diff --git "a/ETSUI/Multi_device/figures/2022112252019---\345\211\257\346\234\254.png" "b/ETSUI/Multi_device/figures/2022112252019---\345\211\257\346\234\254.png" deleted file mode 100644 index 919000351bb9812e833eaeecd8d7c1f11cc0af68..0000000000000000000000000000000000000000 Binary files "a/ETSUI/Multi_device/figures/2022112252019---\345\211\257\346\234\254.png" and /dev/null differ diff --git a/ETSUI/Multi_device/figures/zh-cn_image_0000001405854998.png b/ETSUI/Multi_device/figures/zh-cn_image_0000001405854998.png deleted file mode 100644 index 7b00b63e899143d879c0dd88290bec64580169ae..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/figures/zh-cn_image_0000001405854998.png and /dev/null differ diff --git "a/ETSUI/Multi_device/figures/\344\270\200\345\244\232.gif" "b/ETSUI/Multi_device/figures/\344\270\200\345\244\232.gif" deleted file mode 100644 index d24410342ce8f59581bb8319014a9cbb0c19f514..0000000000000000000000000000000000000000 Binary files "a/ETSUI/Multi_device/figures/\344\270\200\345\244\232.gif" and /dev/null differ diff --git "a/ETSUI/Multi_device/figures/\345\261\217\345\271\225\346\210\252\345\233\276-2022-11-01-205138.png" "b/ETSUI/Multi_device/figures/\345\261\217\345\271\225\346\210\252\345\233\276-2022-11-01-205138.png" deleted file mode 100644 index 508e03ac8148910b434f8abb59f72da183d3b25b..0000000000000000000000000000000000000000 Binary files "a/ETSUI/Multi_device/figures/\345\261\217\345\271\225\346\210\252\345\233\276-2022-11-01-205138.png" and /dev/null differ diff --git "a/ETSUI/Multi_device/figures/\345\261\217\345\271\225\346\210\252\345\233\276-2022-11-01-205323.png" "b/ETSUI/Multi_device/figures/\345\261\217\345\271\225\346\210\252\345\233\276-2022-11-01-205323.png" deleted file mode 100644 index b5f7c2c6a65bd1cb246764b46f507abd58247177..0000000000000000000000000000000000000000 Binary files "a/ETSUI/Multi_device/figures/\345\261\217\345\271\225\346\210\252\345\233\276-2022-11-01-205323.png" and /dev/null differ diff --git "a/ETSUI/Multi_device/figures/\345\275\251\345\270\246\345\212\250\346\225\210.gif" "b/ETSUI/Multi_device/figures/\345\275\251\345\270\246\345\212\250\346\225\210.gif" deleted file mode 100644 index 0d4a2fc153a9ae074efdb8d8f7579ad73501a98c..0000000000000000000000000000000000000000 Binary files "a/ETSUI/Multi_device/figures/\345\275\251\345\270\246\345\212\250\346\225\210.gif" and /dev/null differ diff --git a/ETSUI/Multi_device/hvigor/hvigor-config.json5 b/ETSUI/Multi_device/hvigor/hvigor-config.json5 deleted file mode 100644 index ff688122467308d3cd299c5b2f36be03fb84f4b0..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/hvigor/hvigor-config.json5 +++ /dev/null @@ -1,6 +0,0 @@ -{ - "hvigorVersion": "2.0.0", - "dependencies": { - "@ohos/hvigor-ohos-plugin": "2.0.0" - } -} diff --git a/ETSUI/Multi_device/hvigor/hvigor-wrapper.js b/ETSUI/Multi_device/hvigor/hvigor-wrapper.js deleted file mode 100644 index ed520df42d9190418c6ade156daa022ec8f43e21..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/hvigor/hvigor-wrapper.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var u=require("fs"),e=require("path"),t=require("os"),r=require("crypto"),n=require("child_process"),i=require("constants"),o=require("stream"),D=require("util"),c=require("assert");function a(u){return u&&"object"==typeof u&&"default"in u?u:{default:u}}var s=a(u),f=a(e),E=a(t),l=a(r),F=a(n),C=a(i),A=a(o),d=a(D),y=a(c),p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},h={},m={},B={},v=p&&p.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(B,"__esModule",{value:!0}),B.isMac=B.isLinux=B.isWindows=void 0;const S=v(E.default),_="Windows_NT",O="Linux",w="Darwin";B.isWindows=function(){return S.default.type()===_},B.isLinux=function(){return S.default.type()===O},B.isMac=function(){return S.default.type()===w};var P={},b=p&&p.__createBinding||(Object.create?function(u,e,t,r){void 0===r&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(u,r,n)}:function(u,e,t,r){void 0===r&&(r=t),u[r]=e[t]}),g=p&&p.__setModuleDefault||(Object.create?function(u,e){Object.defineProperty(u,"default",{enumerable:!0,value:e})}:function(u,e){u.default=e}),N=p&&p.__importStar||function(u){if(u&&u.__esModule)return u;var e={};if(null!=u)for(var t in u)"default"!==t&&Object.prototype.hasOwnProperty.call(u,t)&&b(e,u,t);return g(e,u),e};Object.defineProperty(P,"__esModule",{value:!0}),P.hash=void 0;const R=N(l.default);P.hash=function(u,e="md5"){return R.createHash(e).update(u,"utf-8").digest("hex")},function(u){var e=p&&p.__createBinding||(Object.create?function(u,e,t,r){void 0===r&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(u,r,n)}:function(u,e,t,r){void 0===r&&(r=t),u[r]=e[t]}),t=p&&p.__setModuleDefault||(Object.create?function(u,e){Object.defineProperty(u,"default",{enumerable:!0,value:e})}:function(u,e){u.default=e}),r=p&&p.__importStar||function(u){if(u&&u.__esModule)return u;var r={};if(null!=u)for(var n in u)"default"!==n&&Object.prototype.hasOwnProperty.call(u,n)&&e(r,u,n);return t(r,u),r};Object.defineProperty(u,"__esModule",{value:!0}),u.HVIGOR_PROJECT_DEPENDENCY_PACKAGE_JSON_PATH=u.HVIGOR_PROJECT_DEPENDENCIES_HOME=u.HVIGOR_PROJECT_WRAPPER_HOME=u.HVIGOR_PROJECT_NAME=u.HVIGOR_PROJECT_ROOT_DIR=u.HVIGOR_PROJECT_CACHES_HOME=u.HVIGOR_PNPM_STORE_PATH=u.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=u.HVIGOR_WRAPPER_TOOLS_HOME=u.HVIGOR_USER_HOME=u.DEFAULT_PACKAGE_JSON=u.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME=u.NPM_TOOL=u.PNPM_TOOL=u.HVIGOR_ENGINE_PACKAGE_NAME=void 0;const n=r(f.default),i=r(E.default),o=B,D=P;u.HVIGOR_ENGINE_PACKAGE_NAME="@ohos/hvigor",u.PNPM_TOOL=(0,o.isWindows)()?"pnpm.cmd":"pnpm",u.NPM_TOOL=(0,o.isWindows)()?"npm.cmd":"npm",u.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME="hvigor-config.json5",u.DEFAULT_PACKAGE_JSON="package.json",u.HVIGOR_USER_HOME=n.resolve(i.homedir(),".hvigor"),u.HVIGOR_WRAPPER_TOOLS_HOME=n.resolve(u.HVIGOR_USER_HOME,"wrapper","tools"),u.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=n.resolve(u.HVIGOR_WRAPPER_TOOLS_HOME,"node_modules",".bin",u.PNPM_TOOL),u.HVIGOR_PNPM_STORE_PATH=n.resolve(u.HVIGOR_USER_HOME,"caches"),u.HVIGOR_PROJECT_CACHES_HOME=n.resolve(u.HVIGOR_USER_HOME,"project_caches"),u.HVIGOR_PROJECT_ROOT_DIR=process.cwd(),u.HVIGOR_PROJECT_NAME=n.basename((0,D.hash)(u.HVIGOR_PROJECT_ROOT_DIR)),u.HVIGOR_PROJECT_WRAPPER_HOME=n.resolve(u.HVIGOR_PROJECT_ROOT_DIR,"hvigor"),u.HVIGOR_PROJECT_DEPENDENCIES_HOME=n.resolve(u.HVIGOR_PROJECT_CACHES_HOME,u.HVIGOR_PROJECT_NAME,"workspace"),u.HVIGOR_PROJECT_DEPENDENCY_PACKAGE_JSON_PATH=n.resolve(u.HVIGOR_PROJECT_DEPENDENCIES_HOME,u.DEFAULT_PACKAGE_JSON)}(m);var I={},k={};Object.defineProperty(k,"__esModule",{value:!0}),k.logErrorAndExit=void 0,k.logErrorAndExit=function(u){u instanceof Error?console.error(u.message):console.error(u),process.exit(-1)};var T=p&&p.__createBinding||(Object.create?function(u,e,t,r){void 0===r&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(u,r,n)}:function(u,e,t,r){void 0===r&&(r=t),u[r]=e[t]}),x=p&&p.__setModuleDefault||(Object.create?function(u,e){Object.defineProperty(u,"default",{enumerable:!0,value:e})}:function(u,e){u.default=e}),M=p&&p.__importStar||function(u){if(u&&u.__esModule)return u;var e={};if(null!=u)for(var t in u)"default"!==t&&Object.prototype.hasOwnProperty.call(u,t)&&T(e,u,t);return x(e,u),e};Object.defineProperty(I,"__esModule",{value:!0}),I.executeCommand=I.getNpmPath=I.hasNpmPackInPaths=void 0;const H=F.default,j=M(f.default),J=m,L=k;I.hasNpmPackInPaths=function(u,e){try{return require.resolve(u,{paths:[...e]}),!0}catch(u){return!1}},I.getNpmPath=function(){const u=process.execPath;return j.join(j.dirname(u),J.NPM_TOOL)},I.executeCommand=function(u,e,t){0!==(0,H.spawnSync)(u,e,t).status&&(0,L.logErrorAndExit)(`Error: ${u} execute failed.See above for details.`)};var G=p&&p.__createBinding||(Object.create?function(u,e,t,r){void 0===r&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(u,r,n)}:function(u,e,t,r){void 0===r&&(r=t),u[r]=e[t]}),V=p&&p.__setModuleDefault||(Object.create?function(u,e){Object.defineProperty(u,"default",{enumerable:!0,value:e})}:function(u,e){u.default=e}),$=p&&p.__importStar||function(u){if(u&&u.__esModule)return u;var e={};if(null!=u)for(var t in u)"default"!==t&&Object.prototype.hasOwnProperty.call(u,t)&&G(e,u,t);return V(e,u),e};Object.defineProperty(h,"__esModule",{value:!0});var U=h.executeInstallPnpm=Z=h.isPnpmAvailable=void 0;const W=$(s.default),q=m,K=I,Y=$(f.default),z=k;var Z=h.isPnpmAvailable=function(){return!!W.existsSync(q.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH)&&(0,K.hasNpmPackInPaths)("pnpm",[q.HVIGOR_WRAPPER_TOOLS_HOME])};U=h.executeInstallPnpm=function(){const u=(0,K.getNpmPath)();!function(){const u=Y.resolve(q.HVIGOR_WRAPPER_TOOLS_HOME,q.DEFAULT_PACKAGE_JSON);try{W.existsSync(q.HVIGOR_WRAPPER_TOOLS_HOME)||W.mkdirSync(q.HVIGOR_WRAPPER_TOOLS_HOME,{recursive:!0});const e={dependencies:{}};W.writeFileSync(u,JSON.stringify(e))}catch(e){(0,z.logErrorAndExit)(`Error: EPERM: operation not permitted,create ${u} failed.`)}}(),(0,K.executeCommand)(u,["install","pnpm"],{cwd:q.HVIGOR_WRAPPER_TOOLS_HOME,stdio:["inherit","inherit","inherit"]})};var X={},Q={},uu={},eu={};Object.defineProperty(eu,"__esModule",{value:!0}),eu.Unicode=void 0;class tu{}eu.Unicode=tu,tu.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,tu.ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,tu.ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Object.defineProperty(uu,"__esModule",{value:!0}),uu.JudgeUtil=void 0;const ru=eu;uu.JudgeUtil=class{static isIgnoreChar(u){return"string"==typeof u&&("\t"===u||"\v"===u||"\f"===u||" "===u||" "===u||"\ufeff"===u||"\n"===u||"\r"===u||"\u2028"===u||"\u2029"===u)}static isSpaceSeparator(u){return"string"==typeof u&&ru.Unicode.Space_Separator.test(u)}static isIdStartChar(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||ru.Unicode.ID_Start.test(u))}static isIdContinueChar(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||"‌"===u||"‍"===u||ru.Unicode.ID_Continue.test(u))}static isDigitWithoutZero(u){return/[1-9]/.test(u)}static isDigit(u){return"string"==typeof u&&/[0-9]/.test(u)}static isHexDigit(u){return"string"==typeof u&&/[0-9A-Fa-f]/.test(u)}};var nu={},iu={fromCallback:function(u){return Object.defineProperty((function(...e){if("function"!=typeof e[e.length-1])return new Promise(((t,r)=>{u.call(this,...e,((u,e)=>null!=u?r(u):t(e)))}));u.apply(this,e)}),"name",{value:u.name})},fromPromise:function(u){return Object.defineProperty((function(...e){const t=e[e.length-1];if("function"!=typeof t)return u.apply(this,e);u.apply(this,e.slice(0,-1)).then((u=>t(null,u)),t)}),"name",{value:u.name})}},ou=C.default,Du=process.cwd,cu=null,au=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return cu||(cu=Du.call(process)),cu};try{process.cwd()}catch(u){}if("function"==typeof process.chdir){var su=process.chdir;process.chdir=function(u){cu=null,su.call(process,u)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,su)}var fu=function(u){ou.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(u){u.lchmod=function(e,t,r){u.open(e,ou.O_WRONLY|ou.O_SYMLINK,t,(function(e,n){e?r&&r(e):u.fchmod(n,t,(function(e){u.close(n,(function(u){r&&r(e||u)}))}))}))},u.lchmodSync=function(e,t){var r,n=u.openSync(e,ou.O_WRONLY|ou.O_SYMLINK,t),i=!0;try{r=u.fchmodSync(n,t),i=!1}finally{if(i)try{u.closeSync(n)}catch(u){}else u.closeSync(n)}return r}}(u);u.lutimes||function(u){ou.hasOwnProperty("O_SYMLINK")&&u.futimes?(u.lutimes=function(e,t,r,n){u.open(e,ou.O_SYMLINK,(function(e,i){e?n&&n(e):u.futimes(i,t,r,(function(e){u.close(i,(function(u){n&&n(e||u)}))}))}))},u.lutimesSync=function(e,t,r){var n,i=u.openSync(e,ou.O_SYMLINK),o=!0;try{n=u.futimesSync(i,t,r),o=!1}finally{if(o)try{u.closeSync(i)}catch(u){}else u.closeSync(i)}return n}):u.futimes&&(u.lutimes=function(u,e,t,r){r&&process.nextTick(r)},u.lutimesSync=function(){})}(u);u.chown=r(u.chown),u.fchown=r(u.fchown),u.lchown=r(u.lchown),u.chmod=e(u.chmod),u.fchmod=e(u.fchmod),u.lchmod=e(u.lchmod),u.chownSync=n(u.chownSync),u.fchownSync=n(u.fchownSync),u.lchownSync=n(u.lchownSync),u.chmodSync=t(u.chmodSync),u.fchmodSync=t(u.fchmodSync),u.lchmodSync=t(u.lchmodSync),u.stat=i(u.stat),u.fstat=i(u.fstat),u.lstat=i(u.lstat),u.statSync=o(u.statSync),u.fstatSync=o(u.fstatSync),u.lstatSync=o(u.lstatSync),u.chmod&&!u.lchmod&&(u.lchmod=function(u,e,t){t&&process.nextTick(t)},u.lchmodSync=function(){});u.chown&&!u.lchown&&(u.lchown=function(u,e,t,r){r&&process.nextTick(r)},u.lchownSync=function(){});"win32"===au&&(u.rename="function"!=typeof u.rename?u.rename:function(e){function t(t,r,n){var i=Date.now(),o=0;e(t,r,(function D(c){if(c&&("EACCES"===c.code||"EPERM"===c.code)&&Date.now()-i<6e4)return setTimeout((function(){u.stat(r,(function(u,i){u&&"ENOENT"===u.code?e(t,r,D):n(c)}))}),o),void(o<100&&(o+=10));n&&n(c)}))}return Object.setPrototypeOf&&Object.setPrototypeOf(t,e),t}(u.rename));function e(e){return e?function(t,r,n){return e.call(u,t,r,(function(u){D(u)&&(u=null),n&&n.apply(this,arguments)}))}:e}function t(e){return e?function(t,r){try{return e.call(u,t,r)}catch(u){if(!D(u))throw u}}:e}function r(e){return e?function(t,r,n,i){return e.call(u,t,r,n,(function(u){D(u)&&(u=null),i&&i.apply(this,arguments)}))}:e}function n(e){return e?function(t,r,n){try{return e.call(u,t,r,n)}catch(u){if(!D(u))throw u}}:e}function i(e){return e?function(t,r,n){function i(u,e){e&&(e.uid<0&&(e.uid+=4294967296),e.gid<0&&(e.gid+=4294967296)),n&&n.apply(this,arguments)}return"function"==typeof r&&(n=r,r=null),r?e.call(u,t,r,i):e.call(u,t,i)}:e}function o(e){return e?function(t,r){var n=r?e.call(u,t,r):e.call(u,t);return n&&(n.uid<0&&(n.uid+=4294967296),n.gid<0&&(n.gid+=4294967296)),n}:e}function D(u){return!u||("ENOSYS"===u.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==u.code&&"EPERM"!==u.code))}u.read="function"!=typeof u.read?u.read:function(e){function t(t,r,n,i,o,D){var c;if(D&&"function"==typeof D){var a=0;c=function(s,f,E){if(s&&"EAGAIN"===s.code&&a<10)return a++,e.call(u,t,r,n,i,o,c);D.apply(this,arguments)}}return e.call(u,t,r,n,i,o,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(t,e),t}(u.read),u.readSync="function"!=typeof u.readSync?u.readSync:(c=u.readSync,function(e,t,r,n,i){for(var o=0;;)try{return c.call(u,e,t,r,n,i)}catch(u){if("EAGAIN"===u.code&&o<10){o++;continue}throw u}});var c};var Eu=A.default.Stream,lu=function(u){return{ReadStream:function e(t,r){if(!(this instanceof e))return new e(t,r);Eu.call(this);var n=this;this.path=t,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,r=r||{};for(var i=Object.keys(r),o=0,D=i.length;othis.end)throw new Error("start must be <= end");this.pos=this.start}if(null!==this.fd)return void process.nextTick((function(){n._read()}));u.open(this.path,this.flags,this.mode,(function(u,e){if(u)return n.emit("error",u),void(n.readable=!1);n.fd=e,n.emit("open",e),n._read()}))},WriteStream:function e(t,r){if(!(this instanceof e))return new e(t,r);Eu.call(this),this.path=t,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,r=r||{};for(var n=Object.keys(r),i=0,o=n.length;i= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=u.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}};var Fu=function(u){if(null===u||"object"!=typeof u)return u;if(u instanceof Object)var e={__proto__:Cu(u)};else e=Object.create(null);return Object.getOwnPropertyNames(u).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(u,t))})),e},Cu=Object.getPrototypeOf||function(u){return u.__proto__};var Au,du,yu=s.default,pu=fu,hu=lu,mu=Fu,Bu=d.default;function vu(u,e){Object.defineProperty(u,Au,{get:function(){return e}})}"function"==typeof Symbol&&"function"==typeof Symbol.for?(Au=Symbol.for("graceful-fs.queue"),du=Symbol.for("graceful-fs.previous")):(Au="___graceful-fs.queue",du="___graceful-fs.previous");var Su=function(){};if(Bu.debuglog?Su=Bu.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Su=function(){var u=Bu.format.apply(Bu,arguments);u="GFS4: "+u.split(/\n/).join("\nGFS4: "),console.error(u)}),!yu[Au]){var _u=p[Au]||[];vu(yu,_u),yu.close=function(u){function e(e,t){return u.call(yu,e,(function(u){u||gu(),"function"==typeof t&&t.apply(this,arguments)}))}return Object.defineProperty(e,du,{value:u}),e}(yu.close),yu.closeSync=function(u){function e(e){u.apply(yu,arguments),gu()}return Object.defineProperty(e,du,{value:u}),e}(yu.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",(function(){Su(yu[Au]),y.default.equal(yu[Au].length,0)}))}p[Au]||vu(p,yu[Au]);var Ou,wu=Pu(mu(yu));function Pu(u){pu(u),u.gracefulify=Pu,u.createReadStream=function(e,t){return new u.ReadStream(e,t)},u.createWriteStream=function(e,t){return new u.WriteStream(e,t)};var e=u.readFile;u.readFile=function(u,t,r){"function"==typeof t&&(r=t,t=null);return function u(t,r,n,i){return e(t,r,(function(e){!e||"EMFILE"!==e.code&&"ENFILE"!==e.code?"function"==typeof n&&n.apply(this,arguments):bu([u,[t,r,n],e,i||Date.now(),Date.now()])}))}(u,t,r)};var t=u.writeFile;u.writeFile=function(u,e,r,n){"function"==typeof r&&(n=r,r=null);return function u(e,r,n,i,o){return t(e,r,n,(function(t){!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?"function"==typeof i&&i.apply(this,arguments):bu([u,[e,r,n,i],t,o||Date.now(),Date.now()])}))}(u,e,r,n)};var r=u.appendFile;r&&(u.appendFile=function(u,e,t,n){"function"==typeof t&&(n=t,t=null);return function u(e,t,n,i,o){return r(e,t,n,(function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?"function"==typeof i&&i.apply(this,arguments):bu([u,[e,t,n,i],r,o||Date.now(),Date.now()])}))}(u,e,t,n)});var n=u.copyFile;n&&(u.copyFile=function(u,e,t,r){"function"==typeof t&&(r=t,t=0);return function u(e,t,r,i,o){return n(e,t,r,(function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?"function"==typeof i&&i.apply(this,arguments):bu([u,[e,t,r,i],n,o||Date.now(),Date.now()])}))}(u,e,t,r)});var i=u.readdir;u.readdir=function(u,e,t){"function"==typeof e&&(t=e,e=null);var r=o.test(process.version)?function(u,e,t,r){return i(u,n(u,e,t,r))}:function(u,e,t,r){return i(u,e,n(u,e,t,r))};return r(u,e,t);function n(u,e,t,n){return function(i,o){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?(o&&o.sort&&o.sort(),"function"==typeof t&&t.call(this,i,o)):bu([r,[u,e,t],i,n||Date.now(),Date.now()])}}};var o=/^v[0-5]\./;if("v0.8"===process.version.substr(0,4)){var D=hu(u);E=D.ReadStream,l=D.WriteStream}var c=u.ReadStream;c&&(E.prototype=Object.create(c.prototype),E.prototype.open=function(){var u=this;C(u.path,u.flags,u.mode,(function(e,t){e?(u.autoClose&&u.destroy(),u.emit("error",e)):(u.fd=t,u.emit("open",t),u.read())}))});var a=u.WriteStream;a&&(l.prototype=Object.create(a.prototype),l.prototype.open=function(){var u=this;C(u.path,u.flags,u.mode,(function(e,t){e?(u.destroy(),u.emit("error",e)):(u.fd=t,u.emit("open",t))}))}),Object.defineProperty(u,"ReadStream",{get:function(){return E},set:function(u){E=u},enumerable:!0,configurable:!0}),Object.defineProperty(u,"WriteStream",{get:function(){return l},set:function(u){l=u},enumerable:!0,configurable:!0});var s=E;Object.defineProperty(u,"FileReadStream",{get:function(){return s},set:function(u){s=u},enumerable:!0,configurable:!0});var f=l;function E(u,e){return this instanceof E?(c.apply(this,arguments),this):E.apply(Object.create(E.prototype),arguments)}function l(u,e){return this instanceof l?(a.apply(this,arguments),this):l.apply(Object.create(l.prototype),arguments)}Object.defineProperty(u,"FileWriteStream",{get:function(){return f},set:function(u){f=u},enumerable:!0,configurable:!0});var F=u.open;function C(u,e,t,r){return"function"==typeof t&&(r=t,t=null),function u(e,t,r,n,i){return F(e,t,r,(function(o,D){!o||"EMFILE"!==o.code&&"ENFILE"!==o.code?"function"==typeof n&&n.apply(this,arguments):bu([u,[e,t,r,n],o,i||Date.now(),Date.now()])}))}(u,e,t,r)}return u.open=C,u}function bu(u){Su("ENQUEUE",u[0].name,u[1]),yu[Au].push(u),Nu()}function gu(){for(var u=Date.now(),e=0;e2&&(yu[Au][e][3]=u,yu[Au][e][4]=u);Nu()}function Nu(){if(clearTimeout(Ou),Ou=void 0,0!==yu[Au].length){var u=yu[Au].shift(),e=u[0],t=u[1],r=u[2],n=u[3],i=u[4];if(void 0===n)Su("RETRY",e.name,t),e.apply(null,t);else if(Date.now()-n>=6e4){Su("TIMEOUT",e.name,t);var o=t.pop();"function"==typeof o&&o.call(null,r)}else{var D=Date.now()-i,c=Math.max(i-n,1);D>=Math.min(1.2*c,100)?(Su("RETRY",e.name,t),e.apply(null,t.concat([n]))):yu[Au].push(u)}void 0===Ou&&(Ou=setTimeout(Nu,0))}}process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!yu.__patched&&(wu=Pu(yu),yu.__patched=!0),function(u){const e=iu.fromCallback,t=wu,r=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter((u=>"function"==typeof t[u]));Object.assign(u,t),r.forEach((r=>{u[r]=e(t[r])})),u.exists=function(u,e){return"function"==typeof e?t.exists(u,e):new Promise((e=>t.exists(u,e)))},u.read=function(u,e,r,n,i,o){return"function"==typeof o?t.read(u,e,r,n,i,o):new Promise(((o,D)=>{t.read(u,e,r,n,i,((u,e,t)=>{if(u)return D(u);o({bytesRead:e,buffer:t})}))}))},u.write=function(u,e,...r){return"function"==typeof r[r.length-1]?t.write(u,e,...r):new Promise(((n,i)=>{t.write(u,e,...r,((u,e,t)=>{if(u)return i(u);n({bytesWritten:e,buffer:t})}))}))},"function"==typeof t.writev&&(u.writev=function(u,e,...r){return"function"==typeof r[r.length-1]?t.writev(u,e,...r):new Promise(((n,i)=>{t.writev(u,e,...r,((u,e,t)=>{if(u)return i(u);n({bytesWritten:e,buffers:t})}))}))}),"function"==typeof t.realpath.native?u.realpath.native=e(t.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")}(nu);var Ru={},Iu={};const ku=f.default;Iu.checkPath=function(u){if("win32"===process.platform){if(/[<>:"|?*]/.test(u.replace(ku.parse(u).root,""))){const e=new Error(`Path contains invalid characters: ${u}`);throw e.code="EINVAL",e}}};const Tu=nu,{checkPath:xu}=Iu,Mu=u=>"number"==typeof u?u:{mode:511,...u}.mode;Ru.makeDir=async(u,e)=>(xu(u),Tu.mkdir(u,{mode:Mu(e),recursive:!0})),Ru.makeDirSync=(u,e)=>(xu(u),Tu.mkdirSync(u,{mode:Mu(e),recursive:!0}));const Hu=iu.fromPromise,{makeDir:ju,makeDirSync:Ju}=Ru,Lu=Hu(ju);var Gu={mkdirs:Lu,mkdirsSync:Ju,mkdirp:Lu,mkdirpSync:Ju,ensureDir:Lu,ensureDirSync:Ju};const Vu=iu.fromPromise,$u=nu;var Uu={pathExists:Vu((function(u){return $u.access(u).then((()=>!0)).catch((()=>!1))})),pathExistsSync:$u.existsSync};const Wu=wu;var qu=function(u,e,t,r){Wu.open(u,"r+",((u,n)=>{if(u)return r(u);Wu.futimes(n,e,t,(u=>{Wu.close(n,(e=>{r&&r(u||e)}))}))}))},Ku=function(u,e,t){const r=Wu.openSync(u,"r+");return Wu.futimesSync(r,e,t),Wu.closeSync(r)};const Yu=nu,zu=f.default,Zu=d.default;function Xu(u,e,t){const r=t.dereference?u=>Yu.stat(u,{bigint:!0}):u=>Yu.lstat(u,{bigint:!0});return Promise.all([r(u),r(e).catch((u=>{if("ENOENT"===u.code)return null;throw u}))]).then((([u,e])=>({srcStat:u,destStat:e})))}function Qu(u,e){return e.ino&&e.dev&&e.ino===u.ino&&e.dev===u.dev}function ue(u,e){const t=zu.resolve(u).split(zu.sep).filter((u=>u)),r=zu.resolve(e).split(zu.sep).filter((u=>u));return t.reduce(((u,e,t)=>u&&r[t]===e),!0)}function ee(u,e,t){return`Cannot ${t} '${u}' to a subdirectory of itself, '${e}'.`}var te={checkPaths:function(u,e,t,r,n){Zu.callbackify(Xu)(u,e,r,((r,i)=>{if(r)return n(r);const{srcStat:o,destStat:D}=i;if(D){if(Qu(o,D)){const r=zu.basename(u),i=zu.basename(e);return"move"===t&&r!==i&&r.toLowerCase()===i.toLowerCase()?n(null,{srcStat:o,destStat:D,isChangingCase:!0}):n(new Error("Source and destination must not be the same."))}if(o.isDirectory()&&!D.isDirectory())return n(new Error(`Cannot overwrite non-directory '${e}' with directory '${u}'.`));if(!o.isDirectory()&&D.isDirectory())return n(new Error(`Cannot overwrite directory '${e}' with non-directory '${u}'.`))}return o.isDirectory()&&ue(u,e)?n(new Error(ee(u,e,t))):n(null,{srcStat:o,destStat:D})}))},checkPathsSync:function(u,e,t,r){const{srcStat:n,destStat:i}=function(u,e,t){let r;const n=t.dereference?u=>Yu.statSync(u,{bigint:!0}):u=>Yu.lstatSync(u,{bigint:!0}),i=n(u);try{r=n(e)}catch(u){if("ENOENT"===u.code)return{srcStat:i,destStat:null};throw u}return{srcStat:i,destStat:r}}(u,e,r);if(i){if(Qu(n,i)){const r=zu.basename(u),o=zu.basename(e);if("move"===t&&r!==o&&r.toLowerCase()===o.toLowerCase())return{srcStat:n,destStat:i,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(n.isDirectory()&&!i.isDirectory())throw new Error(`Cannot overwrite non-directory '${e}' with directory '${u}'.`);if(!n.isDirectory()&&i.isDirectory())throw new Error(`Cannot overwrite directory '${e}' with non-directory '${u}'.`)}if(n.isDirectory()&&ue(u,e))throw new Error(ee(u,e,t));return{srcStat:n,destStat:i}},checkParentPaths:function u(e,t,r,n,i){const o=zu.resolve(zu.dirname(e)),D=zu.resolve(zu.dirname(r));if(D===o||D===zu.parse(D).root)return i();Yu.stat(D,{bigint:!0},((o,c)=>o?"ENOENT"===o.code?i():i(o):Qu(t,c)?i(new Error(ee(e,r,n))):u(e,t,D,n,i)))},checkParentPathsSync:function u(e,t,r,n){const i=zu.resolve(zu.dirname(e)),o=zu.resolve(zu.dirname(r));if(o===i||o===zu.parse(o).root)return;let D;try{D=Yu.statSync(o,{bigint:!0})}catch(u){if("ENOENT"===u.code)return;throw u}if(Qu(t,D))throw new Error(ee(e,r,n));return u(e,t,o,n)},isSrcSubdir:ue,areIdentical:Qu};const re=wu,ne=f.default,ie=Gu.mkdirs,oe=Uu.pathExists,De=qu,ce=te;function ae(u,e,t,r,n){const i=ne.dirname(t);oe(i,((o,D)=>o?n(o):D?fe(u,e,t,r,n):void ie(i,(i=>i?n(i):fe(u,e,t,r,n)))))}function se(u,e,t,r,n,i){Promise.resolve(n.filter(t,r)).then((o=>o?u(e,t,r,n,i):i()),(u=>i(u)))}function fe(u,e,t,r,n){(r.dereference?re.stat:re.lstat)(e,((i,o)=>i?n(i):o.isDirectory()?function(u,e,t,r,n,i){return e?Ce(t,r,n,i):function(u,e,t,r,n){re.mkdir(t,(i=>{if(i)return n(i);Ce(e,t,r,(e=>e?n(e):Fe(t,u,n)))}))}(u.mode,t,r,n,i)}(o,u,e,t,r,n):o.isFile()||o.isCharacterDevice()||o.isBlockDevice()?function(u,e,t,r,n,i){return e?function(u,e,t,r,n){if(!r.overwrite)return r.errorOnExist?n(new Error(`'${t}' already exists`)):n();re.unlink(t,(i=>i?n(i):Ee(u,e,t,r,n)))}(u,t,r,n,i):Ee(u,t,r,n,i)}(o,u,e,t,r,n):o.isSymbolicLink()?function(u,e,t,r,n){re.readlink(e,((e,i)=>e?n(e):(r.dereference&&(i=ne.resolve(process.cwd(),i)),u?void re.readlink(t,((e,o)=>e?"EINVAL"===e.code||"UNKNOWN"===e.code?re.symlink(i,t,n):n(e):(r.dereference&&(o=ne.resolve(process.cwd(),o)),ce.isSrcSubdir(i,o)?n(new Error(`Cannot copy '${i}' to a subdirectory of itself, '${o}'.`)):u.isDirectory()&&ce.isSrcSubdir(o,i)?n(new Error(`Cannot overwrite '${o}' with '${i}'.`)):function(u,e,t){re.unlink(e,(r=>r?t(r):re.symlink(u,e,t)))}(i,t,n)))):re.symlink(i,t,n))))}(u,e,t,r,n):o.isSocket()?n(new Error(`Cannot copy a socket file: ${e}`)):o.isFIFO()?n(new Error(`Cannot copy a FIFO pipe: ${e}`)):n(new Error(`Unknown file: ${e}`))))}function Ee(u,e,t,r,n){re.copyFile(e,t,(i=>i?n(i):r.preserveTimestamps?function(u,e,t,r){if(function(u){return 0==(128&u)}(u))return function(u,e,t){return Fe(u,128|e,t)}(t,u,(n=>n?r(n):le(u,e,t,r)));return le(u,e,t,r)}(u.mode,e,t,n):Fe(t,u.mode,n)))}function le(u,e,t,r){!function(u,e,t){re.stat(u,((u,r)=>u?t(u):De(e,r.atime,r.mtime,t)))}(e,t,(e=>e?r(e):Fe(t,u,r)))}function Fe(u,e,t){return re.chmod(u,e,t)}function Ce(u,e,t,r){re.readdir(u,((n,i)=>n?r(n):Ae(i,u,e,t,r)))}function Ae(u,e,t,r,n){const i=u.pop();return i?function(u,e,t,r,n,i){const o=ne.join(t,e),D=ne.join(r,e);ce.checkPaths(o,D,"copy",n,((e,c)=>{if(e)return i(e);const{destStat:a}=c;!function(u,e,t,r,n){r.filter?se(fe,u,e,t,r,n):fe(u,e,t,r,n)}(a,o,D,n,(e=>e?i(e):Ae(u,t,r,n,i)))}))}(u,i,e,t,r,n):n()}var de=function(u,e,t,r){"function"!=typeof t||r?"function"==typeof t&&(t={filter:t}):(r=t,t={}),r=r||function(){},(t=t||{}).clobber=!("clobber"in t)||!!t.clobber,t.overwrite="overwrite"in t?!!t.overwrite:t.clobber,t.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0001"),ce.checkPaths(u,e,"copy",t,((n,i)=>{if(n)return r(n);const{srcStat:o,destStat:D}=i;ce.checkParentPaths(u,o,e,"copy",(n=>n?r(n):t.filter?se(ae,D,u,e,t,r):ae(D,u,e,t,r)))}))};const ye=wu,pe=f.default,he=Gu.mkdirsSync,me=Ku,Be=te;function ve(u,e,t,r){const n=(r.dereference?ye.statSync:ye.lstatSync)(e);if(n.isDirectory())return function(u,e,t,r,n){return e?Oe(t,r,n):function(u,e,t,r){return ye.mkdirSync(t),Oe(e,t,r),_e(t,u)}(u.mode,t,r,n)}(n,u,e,t,r);if(n.isFile()||n.isCharacterDevice()||n.isBlockDevice())return function(u,e,t,r,n){return e?function(u,e,t,r){if(r.overwrite)return ye.unlinkSync(t),Se(u,e,t,r);if(r.errorOnExist)throw new Error(`'${t}' already exists`)}(u,t,r,n):Se(u,t,r,n)}(n,u,e,t,r);if(n.isSymbolicLink())return function(u,e,t,r){let n=ye.readlinkSync(e);r.dereference&&(n=pe.resolve(process.cwd(),n));if(u){let u;try{u=ye.readlinkSync(t)}catch(u){if("EINVAL"===u.code||"UNKNOWN"===u.code)return ye.symlinkSync(n,t);throw u}if(r.dereference&&(u=pe.resolve(process.cwd(),u)),Be.isSrcSubdir(n,u))throw new Error(`Cannot copy '${n}' to a subdirectory of itself, '${u}'.`);if(ye.statSync(t).isDirectory()&&Be.isSrcSubdir(u,n))throw new Error(`Cannot overwrite '${u}' with '${n}'.`);return function(u,e){return ye.unlinkSync(e),ye.symlinkSync(u,e)}(n,t)}return ye.symlinkSync(n,t)}(u,e,t,r);if(n.isSocket())throw new Error(`Cannot copy a socket file: ${e}`);if(n.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${e}`);throw new Error(`Unknown file: ${e}`)}function Se(u,e,t,r){return ye.copyFileSync(e,t),r.preserveTimestamps&&function(u,e,t){(function(u){return 0==(128&u)})(u)&&function(u,e){_e(u,128|e)}(t,u);(function(u,e){const t=ye.statSync(u);me(e,t.atime,t.mtime)})(e,t)}(u.mode,e,t),_e(t,u.mode)}function _e(u,e){return ye.chmodSync(u,e)}function Oe(u,e,t){ye.readdirSync(u).forEach((r=>function(u,e,t,r){const n=pe.join(e,u),i=pe.join(t,u),{destStat:o}=Be.checkPathsSync(n,i,"copy",r);return function(u,e,t,r){if(!r.filter||r.filter(e,t))return ve(u,e,t,r)}(o,n,i,r)}(r,u,e,t)))}var we=function(u,e,t){"function"==typeof t&&(t={filter:t}),(t=t||{}).clobber=!("clobber"in t)||!!t.clobber,t.overwrite="overwrite"in t?!!t.overwrite:t.clobber,t.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0002");const{srcStat:r,destStat:n}=Be.checkPathsSync(u,e,"copy",t);return Be.checkParentPathsSync(u,r,e,"copy"),function(u,e,t,r){if(r.filter&&!r.filter(e,t))return;const n=pe.dirname(t);ye.existsSync(n)||he(n);return ve(u,e,t,r)}(n,u,e,t)};var Pe={copy:(0,iu.fromCallback)(de),copySync:we};const be=wu,ge=f.default,Ne=y.default,Re="win32"===process.platform;function Ie(u){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach((e=>{u[e]=u[e]||be[e],u[e+="Sync"]=u[e]||be[e]})),u.maxBusyTries=u.maxBusyTries||3}function ke(u,e,t){let r=0;"function"==typeof e&&(t=e,e={}),Ne(u,"rimraf: missing path"),Ne.strictEqual(typeof u,"string","rimraf: path should be a string"),Ne.strictEqual(typeof t,"function","rimraf: callback function required"),Ne(e,"rimraf: invalid options argument provided"),Ne.strictEqual(typeof e,"object","rimraf: options should be object"),Ie(e),Te(u,e,(function n(i){if(i){if(("EBUSY"===i.code||"ENOTEMPTY"===i.code||"EPERM"===i.code)&&rTe(u,e,n)),100*r)}"ENOENT"===i.code&&(i=null)}t(i)}))}function Te(u,e,t){Ne(u),Ne(e),Ne("function"==typeof t),e.lstat(u,((r,n)=>r&&"ENOENT"===r.code?t(null):r&&"EPERM"===r.code&&Re?xe(u,e,r,t):n&&n.isDirectory()?He(u,e,r,t):void e.unlink(u,(r=>{if(r){if("ENOENT"===r.code)return t(null);if("EPERM"===r.code)return Re?xe(u,e,r,t):He(u,e,r,t);if("EISDIR"===r.code)return He(u,e,r,t)}return t(r)}))))}function xe(u,e,t,r){Ne(u),Ne(e),Ne("function"==typeof r),e.chmod(u,438,(n=>{n?r("ENOENT"===n.code?null:t):e.stat(u,((n,i)=>{n?r("ENOENT"===n.code?null:t):i.isDirectory()?He(u,e,t,r):e.unlink(u,r)}))}))}function Me(u,e,t){let r;Ne(u),Ne(e);try{e.chmodSync(u,438)}catch(u){if("ENOENT"===u.code)return;throw t}try{r=e.statSync(u)}catch(u){if("ENOENT"===u.code)return;throw t}r.isDirectory()?Je(u,e,t):e.unlinkSync(u)}function He(u,e,t,r){Ne(u),Ne(e),Ne("function"==typeof r),e.rmdir(u,(n=>{!n||"ENOTEMPTY"!==n.code&&"EEXIST"!==n.code&&"EPERM"!==n.code?n&&"ENOTDIR"===n.code?r(t):r(n):function(u,e,t){Ne(u),Ne(e),Ne("function"==typeof t),e.readdir(u,((r,n)=>{if(r)return t(r);let i,o=n.length;if(0===o)return e.rmdir(u,t);n.forEach((r=>{ke(ge.join(u,r),e,(r=>{if(!i)return r?t(i=r):void(0==--o&&e.rmdir(u,t))}))}))}))}(u,e,r)}))}function je(u,e){let t;Ie(e=e||{}),Ne(u,"rimraf: missing path"),Ne.strictEqual(typeof u,"string","rimraf: path should be a string"),Ne(e,"rimraf: missing options"),Ne.strictEqual(typeof e,"object","rimraf: options should be object");try{t=e.lstatSync(u)}catch(t){if("ENOENT"===t.code)return;"EPERM"===t.code&&Re&&Me(u,e,t)}try{t&&t.isDirectory()?Je(u,e,null):e.unlinkSync(u)}catch(t){if("ENOENT"===t.code)return;if("EPERM"===t.code)return Re?Me(u,e,t):Je(u,e,t);if("EISDIR"!==t.code)throw t;Je(u,e,t)}}function Je(u,e,t){Ne(u),Ne(e);try{e.rmdirSync(u)}catch(r){if("ENOTDIR"===r.code)throw t;if("ENOTEMPTY"===r.code||"EEXIST"===r.code||"EPERM"===r.code)!function(u,e){if(Ne(u),Ne(e),e.readdirSync(u).forEach((t=>je(ge.join(u,t),e))),!Re){return e.rmdirSync(u,e)}{const t=Date.now();do{try{return e.rmdirSync(u,e)}catch{}}while(Date.now()-t<500)}}(u,e);else if("ENOENT"!==r.code)throw r}}var Le=ke;ke.sync=je;const Ge=wu,Ve=iu.fromCallback,$e=Le;var Ue={remove:Ve((function(u,e){if(Ge.rm)return Ge.rm(u,{recursive:!0,force:!0},e);$e(u,e)})),removeSync:function(u){if(Ge.rmSync)return Ge.rmSync(u,{recursive:!0,force:!0});$e.sync(u)}};const We=iu.fromPromise,qe=nu,Ke=f.default,Ye=Gu,ze=Ue,Ze=We((async function(u){let e;try{e=await qe.readdir(u)}catch{return Ye.mkdirs(u)}return Promise.all(e.map((e=>ze.remove(Ke.join(u,e)))))}));function Xe(u){let e;try{e=qe.readdirSync(u)}catch{return Ye.mkdirsSync(u)}e.forEach((e=>{e=Ke.join(u,e),ze.removeSync(e)}))}var Qe={emptyDirSync:Xe,emptydirSync:Xe,emptyDir:Ze,emptydir:Ze};const ut=iu.fromCallback,et=f.default,tt=wu,rt=Gu;var nt={createFile:ut((function(u,e){function t(){tt.writeFile(u,"",(u=>{if(u)return e(u);e()}))}tt.stat(u,((r,n)=>{if(!r&&n.isFile())return e();const i=et.dirname(u);tt.stat(i,((u,r)=>{if(u)return"ENOENT"===u.code?rt.mkdirs(i,(u=>{if(u)return e(u);t()})):e(u);r.isDirectory()?t():tt.readdir(i,(u=>{if(u)return e(u)}))}))}))})),createFileSync:function(u){let e;try{e=tt.statSync(u)}catch{}if(e&&e.isFile())return;const t=et.dirname(u);try{tt.statSync(t).isDirectory()||tt.readdirSync(t)}catch(u){if(!u||"ENOENT"!==u.code)throw u;rt.mkdirsSync(t)}tt.writeFileSync(u,"")}};const it=iu.fromCallback,ot=f.default,Dt=wu,ct=Gu,at=Uu.pathExists,{areIdentical:st}=te;var ft={createLink:it((function(u,e,t){function r(u,e){Dt.link(u,e,(u=>{if(u)return t(u);t(null)}))}Dt.lstat(e,((n,i)=>{Dt.lstat(u,((n,o)=>{if(n)return n.message=n.message.replace("lstat","ensureLink"),t(n);if(i&&st(o,i))return t(null);const D=ot.dirname(e);at(D,((n,i)=>n?t(n):i?r(u,e):void ct.mkdirs(D,(n=>{if(n)return t(n);r(u,e)}))))}))}))})),createLinkSync:function(u,e){let t;try{t=Dt.lstatSync(e)}catch{}try{const e=Dt.lstatSync(u);if(t&&st(e,t))return}catch(u){throw u.message=u.message.replace("lstat","ensureLink"),u}const r=ot.dirname(e);return Dt.existsSync(r)||ct.mkdirsSync(r),Dt.linkSync(u,e)}};const Et=f.default,lt=wu,Ft=Uu.pathExists;var Ct={symlinkPaths:function(u,e,t){if(Et.isAbsolute(u))return lt.lstat(u,(e=>e?(e.message=e.message.replace("lstat","ensureSymlink"),t(e)):t(null,{toCwd:u,toDst:u})));{const r=Et.dirname(e),n=Et.join(r,u);return Ft(n,((e,i)=>e?t(e):i?t(null,{toCwd:n,toDst:u}):lt.lstat(u,(e=>e?(e.message=e.message.replace("lstat","ensureSymlink"),t(e)):t(null,{toCwd:u,toDst:Et.relative(r,u)})))))}},symlinkPathsSync:function(u,e){let t;if(Et.isAbsolute(u)){if(t=lt.existsSync(u),!t)throw new Error("absolute srcpath does not exist");return{toCwd:u,toDst:u}}{const r=Et.dirname(e),n=Et.join(r,u);if(t=lt.existsSync(n),t)return{toCwd:n,toDst:u};if(t=lt.existsSync(u),!t)throw new Error("relative srcpath does not exist");return{toCwd:u,toDst:Et.relative(r,u)}}}};const At=wu;var dt={symlinkType:function(u,e,t){if(t="function"==typeof e?e:t,e="function"!=typeof e&&e)return t(null,e);At.lstat(u,((u,r)=>{if(u)return t(null,"file");e=r&&r.isDirectory()?"dir":"file",t(null,e)}))},symlinkTypeSync:function(u,e){let t;if(e)return e;try{t=At.lstatSync(u)}catch{return"file"}return t&&t.isDirectory()?"dir":"file"}};const yt=iu.fromCallback,pt=f.default,ht=nu,mt=Gu.mkdirs,Bt=Gu.mkdirsSync,vt=Ct.symlinkPaths,St=Ct.symlinkPathsSync,_t=dt.symlinkType,Ot=dt.symlinkTypeSync,wt=Uu.pathExists,{areIdentical:Pt}=te;function bt(u,e,t,r){vt(u,e,((n,i)=>{if(n)return r(n);u=i.toDst,_t(i.toCwd,t,((t,n)=>{if(t)return r(t);const i=pt.dirname(e);wt(i,((t,o)=>t?r(t):o?ht.symlink(u,e,n,r):void mt(i,(t=>{if(t)return r(t);ht.symlink(u,e,n,r)}))))}))}))}var gt={createSymlink:yt((function(u,e,t,r){r="function"==typeof t?t:r,t="function"!=typeof t&&t,ht.lstat(e,((n,i)=>{!n&&i.isSymbolicLink()?Promise.all([ht.stat(u),ht.stat(e)]).then((([n,i])=>{if(Pt(n,i))return r(null);bt(u,e,t,r)})):bt(u,e,t,r)}))})),createSymlinkSync:function(u,e,t){let r;try{r=ht.lstatSync(e)}catch{}if(r&&r.isSymbolicLink()){const t=ht.statSync(u),r=ht.statSync(e);if(Pt(t,r))return}const n=St(u,e);u=n.toDst,t=Ot(n.toCwd,t);const i=pt.dirname(e);return ht.existsSync(i)||Bt(i),ht.symlinkSync(u,e,t)}};const{createFile:Nt,createFileSync:Rt}=nt,{createLink:It,createLinkSync:kt}=ft,{createSymlink:Tt,createSymlinkSync:xt}=gt;var Mt={createFile:Nt,createFileSync:Rt,ensureFile:Nt,ensureFileSync:Rt,createLink:It,createLinkSync:kt,ensureLink:It,ensureLinkSync:kt,createSymlink:Tt,createSymlinkSync:xt,ensureSymlink:Tt,ensureSymlinkSync:xt};var Ht={stringify:function(u,{EOL:e="\n",finalEOL:t=!0,replacer:r=null,spaces:n}={}){const i=t?e:"";return JSON.stringify(u,r,n).replace(/\n/g,e)+i},stripBom:function(u){return Buffer.isBuffer(u)&&(u=u.toString("utf8")),u.replace(/^\uFEFF/,"")}};let jt;try{jt=wu}catch(u){jt=s.default}const Jt=iu,{stringify:Lt,stripBom:Gt}=Ht;const Vt=Jt.fromPromise((async function(u,e={}){"string"==typeof e&&(e={encoding:e});const t=e.fs||jt,r=!("throws"in e)||e.throws;let n,i=await Jt.fromCallback(t.readFile)(u,e);i=Gt(i);try{n=JSON.parse(i,e?e.reviver:null)}catch(e){if(r)throw e.message=`${u}: ${e.message}`,e;return null}return n}));const $t=Jt.fromPromise((async function(u,e,t={}){const r=t.fs||jt,n=Lt(e,t);await Jt.fromCallback(r.writeFile)(u,n,t)}));const Ut={readFile:Vt,readFileSync:function(u,e={}){"string"==typeof e&&(e={encoding:e});const t=e.fs||jt,r=!("throws"in e)||e.throws;try{let r=t.readFileSync(u,e);return r=Gt(r),JSON.parse(r,e.reviver)}catch(e){if(r)throw e.message=`${u}: ${e.message}`,e;return null}},writeFile:$t,writeFileSync:function(u,e,t={}){const r=t.fs||jt,n=Lt(e,t);return r.writeFileSync(u,n,t)}};var Wt={readJson:Ut.readFile,readJsonSync:Ut.readFileSync,writeJson:Ut.writeFile,writeJsonSync:Ut.writeFileSync};const qt=iu.fromCallback,Kt=wu,Yt=f.default,zt=Gu,Zt=Uu.pathExists;var Xt={outputFile:qt((function(u,e,t,r){"function"==typeof t&&(r=t,t="utf8");const n=Yt.dirname(u);Zt(n,((i,o)=>i?r(i):o?Kt.writeFile(u,e,t,r):void zt.mkdirs(n,(n=>{if(n)return r(n);Kt.writeFile(u,e,t,r)}))))})),outputFileSync:function(u,...e){const t=Yt.dirname(u);if(Kt.existsSync(t))return Kt.writeFileSync(u,...e);zt.mkdirsSync(t),Kt.writeFileSync(u,...e)}};const{stringify:Qt}=Ht,{outputFile:ur}=Xt;var er=async function(u,e,t={}){const r=Qt(e,t);await ur(u,r,t)};const{stringify:tr}=Ht,{outputFileSync:rr}=Xt;var nr=function(u,e,t){const r=tr(e,t);rr(u,r,t)};const ir=iu.fromPromise,or=Wt;or.outputJson=ir(er),or.outputJsonSync=nr,or.outputJSON=or.outputJson,or.outputJSONSync=or.outputJsonSync,or.writeJSON=or.writeJson,or.writeJSONSync=or.writeJsonSync,or.readJSON=or.readJson,or.readJSONSync=or.readJsonSync;var Dr=or;const cr=wu,ar=f.default,sr=Pe.copy,fr=Ue.remove,Er=Gu.mkdirp,lr=Uu.pathExists,Fr=te;function Cr(u,e,t,r,n){return r?Ar(u,e,t,n):t?fr(e,(r=>r?n(r):Ar(u,e,t,n))):void lr(e,((r,i)=>r?n(r):i?n(new Error("dest already exists.")):Ar(u,e,t,n)))}function Ar(u,e,t,r){cr.rename(u,e,(n=>n?"EXDEV"!==n.code?r(n):function(u,e,t,r){const n={overwrite:t,errorOnExist:!0};sr(u,e,n,(e=>e?r(e):fr(u,r)))}(u,e,t,r):r()))}var dr=function(u,e,t,r){"function"==typeof t&&(r=t,t={});const n=(t=t||{}).overwrite||t.clobber||!1;Fr.checkPaths(u,e,"move",t,((t,i)=>{if(t)return r(t);const{srcStat:o,isChangingCase:D=!1}=i;Fr.checkParentPaths(u,o,e,"move",(t=>t?r(t):function(u){const e=ar.dirname(u);return ar.parse(e).root===e}(e)?Cr(u,e,n,D,r):void Er(ar.dirname(e),(t=>t?r(t):Cr(u,e,n,D,r)))))}))};const yr=wu,pr=f.default,hr=Pe.copySync,mr=Ue.removeSync,Br=Gu.mkdirpSync,vr=te;function Sr(u,e,t){try{yr.renameSync(u,e)}catch(r){if("EXDEV"!==r.code)throw r;return function(u,e,t){const r={overwrite:t,errorOnExist:!0};return hr(u,e,r),mr(u)}(u,e,t)}}var _r=function(u,e,t){const r=(t=t||{}).overwrite||t.clobber||!1,{srcStat:n,isChangingCase:i=!1}=vr.checkPathsSync(u,e,"move",t);return vr.checkParentPathsSync(u,n,e,"move"),function(u){const e=pr.dirname(u);return pr.parse(e).root===e}(e)||Br(pr.dirname(e)),function(u,e,t,r){if(r)return Sr(u,e,t);if(t)return mr(e),Sr(u,e,t);if(yr.existsSync(e))throw new Error("dest already exists.");return Sr(u,e,t)}(u,e,r,i)};var Or={move:(0,iu.fromCallback)(dr),moveSync:_r},wr={...nu,...Pe,...Qe,...Mt,...Dr,...Gu,...Or,...Xt,...Uu,...Ue},Pr=p&&p.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Q,"__esModule",{value:!0}),Q.parseJsonText=Q.parseJsonFile=void 0;const br=uu,gr=Pr(wr),Nr=Pr(f.default),Rr=Pr(E.default),Ir=k;var kr;!function(u){u[u.Char=0]="Char",u[u.EOF=1]="EOF",u[u.Identifier=2]="Identifier"}(kr||(kr={}));let Tr,xr,Mr,Hr,jr,Jr,Lr="start",Gr=[],Vr=0,$r=1,Ur=0,Wr=!1,qr="default",Kr="'",Yr=1;function zr(u,e=!1){xr=String(u),Lr="start",Gr=[],Vr=0,$r=1,Ur=0,Hr=void 0,Wr=e;do{Tr=Zr(),nn[Lr]()}while("eof"!==Tr.type);return Hr}function Zr(){for(qr="default",jr="",Kr="'",Yr=1;;){Jr=Xr();const u=un[qr]();if(u)return u}}function Xr(){if(xr[Vr])return String.fromCodePoint(xr.codePointAt(Vr))}function Qr(){const u=Xr();return"\n"===u?($r++,Ur=0):u?Ur+=u.length:Ur++,u&&(Vr+=u.length),u}Q.parseJsonFile=function(u,e=!1,t="utf-8"){const r=gr.default.readFileSync(Nr.default.resolve(u),{encoding:t});try{return zr(r,e)}catch(e){if(e instanceof SyntaxError){const t=e.message.split("at");2===t.length&&(0,Ir.logErrorAndExit)(`${t[0].trim()}${Rr.default.EOL}\t at ${u}:${t[1].trim()}`)}(0,Ir.logErrorAndExit)(`${u} is not in valid JSON/JSON5 format.`)}},Q.parseJsonText=zr;const un={default(){switch(Jr){case"/":return Qr(),void(qr="comment");case void 0:return Qr(),en("eof")}if(!br.JudgeUtil.isIgnoreChar(Jr)&&!br.JudgeUtil.isSpaceSeparator(Jr))return un[Lr]();Qr()},start(){qr="value"},beforePropertyName(){switch(Jr){case"$":case"_":return jr=Qr(),void(qr="identifierName");case"\\":return Qr(),void(qr="identifierNameStartEscape");case"}":return en("punctuator",Qr());case'"':case"'":return Kr=Jr,Qr(),void(qr="string")}if(br.JudgeUtil.isIdStartChar(Jr))return jr+=Qr(),void(qr="identifierName");throw an(kr.Char,Qr())},afterPropertyName(){if(":"===Jr)return en("punctuator",Qr());throw an(kr.Char,Qr())},beforePropertyValue(){qr="value"},afterPropertyValue(){switch(Jr){case",":case"}":return en("punctuator",Qr())}throw an(kr.Char,Qr())},beforeArrayValue(){if("]"===Jr)return en("punctuator",Qr());qr="value"},afterArrayValue(){switch(Jr){case",":case"]":return en("punctuator",Qr())}throw an(kr.Char,Qr())},end(){throw an(kr.Char,Qr())},comment(){switch(Jr){case"*":return Qr(),void(qr="multiLineComment");case"/":return Qr(),void(qr="singleLineComment")}throw an(kr.Char,Qr())},multiLineComment(){switch(Jr){case"*":return Qr(),void(qr="multiLineCommentAsterisk");case void 0:throw an(kr.Char,Qr())}Qr()},multiLineCommentAsterisk(){switch(Jr){case"*":return void Qr();case"/":return Qr(),void(qr="default");case void 0:throw an(kr.Char,Qr())}Qr(),qr="multiLineComment"},singleLineComment(){switch(Jr){case"\n":case"\r":case"\u2028":case"\u2029":return Qr(),void(qr="default");case void 0:return Qr(),en("eof")}Qr()},value(){switch(Jr){case"{":case"[":return en("punctuator",Qr());case"n":return Qr(),tn("ull"),en("null",null);case"t":return Qr(),tn("rue"),en("boolean",!0);case"f":return Qr(),tn("alse"),en("boolean",!1);case"-":case"+":return"-"===Qr()&&(Yr=-1),void(qr="numerical");case".":case"0":case"I":case"N":return void(qr="numerical");case'"':case"'":return Kr=Jr,Qr(),jr="",void(qr="string")}if(void 0===Jr||!br.JudgeUtil.isDigitWithoutZero(Jr))throw an(kr.Char,Qr());qr="numerical"},numerical(){switch(Jr){case".":return jr=Qr(),void(qr="decimalPointLeading");case"0":return jr=Qr(),void(qr="zero");case"I":return Qr(),tn("nfinity"),en("numeric",Yr*(1/0));case"N":return Qr(),tn("aN"),en("numeric",NaN)}if(void 0!==Jr&&br.JudgeUtil.isDigitWithoutZero(Jr))return jr=Qr(),void(qr="decimalInteger");throw an(kr.Char,Qr())},zero(){switch(Jr){case".":case"e":case"E":return void(qr="decimal");case"x":case"X":return jr+=Qr(),void(qr="hexadecimal")}return en("numeric",0)},decimalInteger(){switch(Jr){case".":case"e":case"E":return void(qr="decimal")}if(!br.JudgeUtil.isDigit(Jr))return en("numeric",Yr*Number(jr));jr+=Qr()},decimal(){switch(Jr){case".":jr+=Qr(),qr="decimalFraction";break;case"e":case"E":jr+=Qr(),qr="decimalExponent"}},decimalPointLeading(){if(br.JudgeUtil.isDigit(Jr))return jr+=Qr(),void(qr="decimalFraction");throw an(kr.Char,Qr())},decimalFraction(){switch(Jr){case"e":case"E":return jr+=Qr(),void(qr="decimalExponent")}if(!br.JudgeUtil.isDigit(Jr))return en("numeric",Yr*Number(jr));jr+=Qr()},decimalExponent(){switch(Jr){case"+":case"-":return jr+=Qr(),void(qr="decimalExponentSign")}if(br.JudgeUtil.isDigit(Jr))return jr+=Qr(),void(qr="decimalExponentInteger");throw an(kr.Char,Qr())},decimalExponentSign(){if(br.JudgeUtil.isDigit(Jr))return jr+=Qr(),void(qr="decimalExponentInteger");throw an(kr.Char,Qr())},decimalExponentInteger(){if(!br.JudgeUtil.isDigit(Jr))return en("numeric",Yr*Number(jr));jr+=Qr()},hexadecimal(){if(br.JudgeUtil.isHexDigit(Jr))return jr+=Qr(),void(qr="hexadecimalInteger");throw an(kr.Char,Qr())},hexadecimalInteger(){if(!br.JudgeUtil.isHexDigit(Jr))return en("numeric",Yr*Number(jr));jr+=Qr()},identifierNameStartEscape(){if("u"!==Jr)throw an(kr.Char,Qr());Qr();const u=rn();switch(u){case"$":case"_":break;default:if(!br.JudgeUtil.isIdStartChar(u))throw an(kr.Identifier)}jr+=u,qr="identifierName"},identifierName(){switch(Jr){case"$":case"_":case"‌":case"‍":return void(jr+=Qr());case"\\":return Qr(),void(qr="identifierNameEscape")}if(!br.JudgeUtil.isIdContinueChar(Jr))return en("identifier",jr);jr+=Qr()},identifierNameEscape(){if("u"!==Jr)throw an(kr.Char,Qr());Qr();const u=rn();switch(u){case"$":case"_":case"‌":case"‍":break;default:if(!br.JudgeUtil.isIdContinueChar(u))throw an(kr.Identifier)}jr+=u,qr="identifierName"},string(){switch(Jr){case"\\":return Qr(),void(jr+=function(){const u=Xr(),e=function(){switch(Xr()){case"b":return Qr(),"\b";case"f":return Qr(),"\f";case"n":return Qr(),"\n";case"r":return Qr(),"\r";case"t":return Qr(),"\t";case"v":return Qr(),"\v"}return}();if(e)return e;switch(u){case"0":if(Qr(),br.JudgeUtil.isDigit(Xr()))throw an(kr.Char,Qr());return"\0";case"x":return Qr(),function(){let u="",e=Xr();if(!br.JudgeUtil.isHexDigit(e))throw an(kr.Char,Qr());if(u+=Qr(),e=Xr(),!br.JudgeUtil.isHexDigit(e))throw an(kr.Char,Qr());return u+=Qr(),String.fromCodePoint(parseInt(u,16))}();case"u":return Qr(),rn();case"\n":case"\u2028":case"\u2029":return Qr(),"";case"\r":return Qr(),"\n"===Xr()&&Qr(),""}if(void 0===u||br.JudgeUtil.isDigitWithoutZero(u))throw an(kr.Char,Qr());return Qr()}());case'"':case"'":if(Jr===Kr){const u=en("string",jr);return Qr(),u}return void(jr+=Qr());case"\n":case"\r":case void 0:throw an(kr.Char,Qr());case"\u2028":case"\u2029":!function(u){(0,Ir.logErrorAndExit)(`JSON5: '${cn(u)}' in strings is not valid ECMAScript; consider escaping.`)}(Jr)}jr+=Qr()}};function en(u,e){return{type:u,value:e,line:$r,column:Ur}}function tn(u){for(const e of u){if(Xr()!==e)throw an(kr.Char,Qr());Qr()}}function rn(){let u="",e=4;for(;e-- >0;){const e=Xr();if(!br.JudgeUtil.isHexDigit(e))throw an(kr.Char,Qr());u+=Qr()}return String.fromCodePoint(parseInt(u,16))}const nn={start(){if("eof"===Tr.type)throw an(kr.EOF);on()},beforePropertyName(){switch(Tr.type){case"identifier":case"string":return Mr=Tr.value,void(Lr="afterPropertyName");case"punctuator":return void Dn();case"eof":throw an(kr.EOF)}},afterPropertyName(){if("eof"===Tr.type)throw an(kr.EOF);Lr="beforePropertyValue"},beforePropertyValue(){if("eof"===Tr.type)throw an(kr.EOF);on()},afterPropertyValue(){if("eof"===Tr.type)throw an(kr.EOF);switch(Tr.value){case",":return void(Lr="beforePropertyName");case"}":Dn()}},beforeArrayValue(){if("eof"===Tr.type)throw an(kr.EOF);"punctuator"!==Tr.type||"]"!==Tr.value?on():Dn()},afterArrayValue(){if("eof"===Tr.type)throw an(kr.EOF);switch(Tr.value){case",":return void(Lr="beforeArrayValue");case"]":Dn()}},end(){}};function on(){const u=function(){let u;switch(Tr.type){case"punctuator":switch(Tr.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=Tr.value}return u}();if(Wr&&"object"==typeof u&&(u._line=$r,u._column=Ur),void 0===Hr)Hr=u;else{const e=Gr[Gr.length-1];Array.isArray(e)?Wr&&"object"!=typeof u?e.push({value:u,_line:$r,_column:Ur}):e.push(u):e[Mr]=Wr&&"object"!=typeof u?{value:u,_line:$r,_column:Ur}:u}!function(u){if(u&&"object"==typeof u)Gr.push(u),Lr=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{const u=Gr[Gr.length-1];Lr=u?Array.isArray(u)?"afterArrayValue":"afterPropertyValue":"end"}}(u)}function Dn(){Gr.pop();const u=Gr[Gr.length-1];Lr=u?Array.isArray(u)?"afterArrayValue":"afterPropertyValue":"end"}function cn(u){const e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[u])return e[u];if(u<" "){const e=u.charCodeAt(0).toString(16);return`\\x${`00${e}`.substring(e.length)}`}return u}function an(u,e){let t="";switch(u){case kr.Char:t=void 0===e?`JSON5: invalid end of input at ${$r}:${Ur}`:`JSON5: invalid character '${cn(e)}' at ${$r}:${Ur}`;break;case kr.EOF:t=`JSON5: invalid end of input at ${$r}:${Ur}`;break;case kr.Identifier:Ur-=5,t=`JSON5: invalid identifier character at ${$r}:${Ur}`}const r=new sn(t);return r.lineNumber=$r,r.columnNumber=Ur,r}class sn extends SyntaxError{}var fn=p&&p.__createBinding||(Object.create?function(u,e,t,r){void 0===r&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(u,r,n)}:function(u,e,t,r){void 0===r&&(r=t),u[r]=e[t]}),En=p&&p.__setModuleDefault||(Object.create?function(u,e){Object.defineProperty(u,"default",{enumerable:!0,value:e})}:function(u,e){u.default=e}),ln=p&&p.__importStar||function(u){if(u&&u.__esModule)return u;var e={};if(null!=u)for(var t in u)"default"!==t&&Object.prototype.hasOwnProperty.call(u,t)&&fn(e,u,t);return En(e,u),e};Object.defineProperty(X,"__esModule",{value:!0});var Fn=X.executeInstallHvigor=vn=X.isHvigorInstalled=void 0;const Cn=ln(s.default),An=ln(f.default),dn=m,yn=I,pn=k,hn=Q;let mn,Bn;var vn=X.isHvigorInstalled=function(){return mn=function(){const u=An.resolve(dn.HVIGOR_PROJECT_WRAPPER_HOME,dn.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME);if(!Cn.existsSync(u))throw new Error(`Error: Hvigor config file ${u} does not exist.`);return(0,hn.parseJsonFile)(u)}(),Bn=Cn.existsSync(dn.HVIGOR_PROJECT_DEPENDENCY_PACKAGE_JSON_PATH)?(0,hn.parseJsonFile)(dn.HVIGOR_PROJECT_DEPENDENCY_PACKAGE_JSON_PATH):{dependencies:{}},!(!(0,yn.hasNpmPackInPaths)(dn.HVIGOR_ENGINE_PACKAGE_NAME,[dn.HVIGOR_PROJECT_DEPENDENCIES_HOME])||mn.hvigorVersion!==Bn.dependencies[dn.HVIGOR_ENGINE_PACKAGE_NAME])||(console.log("Hvigor installing..."),!1)};const Sn={cwd:dn.HVIGOR_PROJECT_DEPENDENCIES_HOME,stdio:["inherit","inherit","inherit"]};Fn=X.executeInstallHvigor=function(){const u={dependencies:{}};u.dependencies[dn.HVIGOR_ENGINE_PACKAGE_NAME]=mn.hvigorVersion;try{Cn.mkdirSync(dn.HVIGOR_PROJECT_DEPENDENCIES_HOME,{recursive:!0});const e=An.resolve(dn.HVIGOR_PROJECT_DEPENDENCIES_HOME,dn.DEFAULT_PACKAGE_JSON);Cn.writeFileSync(e,JSON.stringify(u))}catch(u){(0,pn.logErrorAndExit)(u)}!function(){const u=["config","set","store-dir",dn.HVIGOR_PNPM_STORE_PATH];(0,yn.executeCommand)(dn.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,u,Sn)}(),(0,yn.executeCommand)(dn.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,["install"],Sn)};var _n={},On=p&&p.__createBinding||(Object.create?function(u,e,t,r){void 0===r&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(u,r,n)}:function(u,e,t,r){void 0===r&&(r=t),u[r]=e[t]}),wn=p&&p.__setModuleDefault||(Object.create?function(u,e){Object.defineProperty(u,"default",{enumerable:!0,value:e})}:function(u,e){u.default=e}),Pn=p&&p.__importStar||function(u){if(u&&u.__esModule)return u;var e={};if(null!=u)for(var t in u)"default"!==t&&Object.prototype.hasOwnProperty.call(u,t)&&On(e,u,t);return wn(e,u),e};Object.defineProperty(_n,"__esModule",{value:!0});var bn=_n.executeBuild=void 0;const gn=m,Nn=Pn(s.default),Rn=Pn(f.default),In=k;bn=_n.executeBuild=function(){const u=Rn.resolve(gn.HVIGOR_PROJECT_DEPENDENCIES_HOME,"node_modules","@ohos","hvigor","bin","hvigor.js");try{const e=Nn.realpathSync(u);require(e)}catch(e){(0,In.logErrorAndExit)(`Error: ENOENT: no such file ${u},delete ${gn.HVIGOR_PROJECT_DEPENDENCIES_HOME} and retry.`)}},Z()||U(),vn()||Fn(),bn(); \ No newline at end of file diff --git a/ETSUI/Multi_device/hvigorfile.ts b/ETSUI/Multi_device/hvigorfile.ts deleted file mode 100644 index 6478186902c0c1ad7c966a929c7d6b7d8ae7a9f3..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/hvigorfile.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently. -export { appTasks } from '@ohos/hvigor-ohos-plugin'; \ No newline at end of file diff --git a/ETSUI/Multi_device/oh-package.json5 b/ETSUI/Multi_device/oh-package.json5 deleted file mode 100644 index b100324b14ce97e34a7cc4e555ce4b6509f255c0..0000000000000000000000000000000000000000 --- a/ETSUI/Multi_device/oh-package.json5 +++ /dev/null @@ -1,12 +0,0 @@ -{ - "license": "", - "devDependencies": { - "@ohos/hypium": "1.0.6" - }, - "author": "", - "name": "multi_device", - "description": "Please describe the basic information.", - "main": "", - "version": "1.0.0", - "dependencies": {} -} diff --git a/ETSUI/Multi_device/public_sys-resources/icon-caution.gif b/ETSUI/Multi_device/public_sys-resources/icon-caution.gif deleted file mode 100644 index 81fb2aba954177efa588e675927082b1f6bed41f..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/public_sys-resources/icon-caution.gif and /dev/null differ diff --git a/ETSUI/Multi_device/public_sys-resources/icon-danger.gif b/ETSUI/Multi_device/public_sys-resources/icon-danger.gif deleted file mode 100644 index 81fb2aba954177efa588e675927082b1f6bed41f..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/public_sys-resources/icon-danger.gif and /dev/null differ diff --git a/ETSUI/Multi_device/public_sys-resources/icon-note.gif b/ETSUI/Multi_device/public_sys-resources/icon-note.gif deleted file mode 100644 index db3995e34b6644fc11c916ffe69c7cb5512610d8..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/public_sys-resources/icon-note.gif and /dev/null differ diff --git a/ETSUI/Multi_device/public_sys-resources/icon-notice.gif b/ETSUI/Multi_device/public_sys-resources/icon-notice.gif deleted file mode 100644 index 75397a3efc5c345922fd37f551d7d28675ab6c5f..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/public_sys-resources/icon-notice.gif and /dev/null differ diff --git a/ETSUI/Multi_device/public_sys-resources/icon-tip.gif b/ETSUI/Multi_device/public_sys-resources/icon-tip.gif deleted file mode 100644 index 110cd67cefa9f6b2800a2b8076a7a0dcc00b783c..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/public_sys-resources/icon-tip.gif and /dev/null differ diff --git a/ETSUI/Multi_device/public_sys-resources/icon-warning.gif b/ETSUI/Multi_device/public_sys-resources/icon-warning.gif deleted file mode 100644 index 81fb2aba954177efa588e675927082b1f6bed41f..0000000000000000000000000000000000000000 Binary files a/ETSUI/Multi_device/public_sys-resources/icon-warning.gif and /dev/null differ diff --git a/ETSUI/PixelUnitsDemo/AppScope/app.json5 b/ETSUI/PixelUnitsDemo/AppScope/app.json5 deleted file mode 100644 index daef6c25b4693e92265d6434a2a32a2f65a7a18e..0000000000000000000000000000000000000000 --- a/ETSUI/PixelUnitsDemo/AppScope/app.json5 +++ /dev/null @@ -1,11 +0,0 @@ -{ - "app": { - "bundleName": "com.example.pixel_units_demo", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true - } -} diff --git a/ETSUI/PixelUnitsDemo/AppScope/resources/base/element/string.json b/ETSUI/PixelUnitsDemo/AppScope/resources/base/element/string.json deleted file mode 100644 index bb73c443db6c2e36ead279f89095fe0eb9fa1943..0000000000000000000000000000000000000000 --- a/ETSUI/PixelUnitsDemo/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "PixelUnitsDemo" - } - ] -} diff --git a/ETSUI/PixelUnitsDemo/AppScope/resources/base/media/app_icon.png b/ETSUI/PixelUnitsDemo/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ETSUI/PixelUnitsDemo/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ETSUI/PixelUnitsDemo/LICENSE b/ETSUI/PixelUnitsDemo/LICENSE deleted file mode 100644 index 80576ef141485b36eea4aebf25af97020bc2de44..0000000000000000000000000000000000000000 --- a/ETSUI/PixelUnitsDemo/LICENSE +++ /dev/null @@ -1,78 +0,0 @@ - Copyright (c) 2021 Huawei Device Co., Ltd. All rights reserved. - - 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. - -Apache License, Version 2.0 -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: -1.You must give any other recipients of the Work or Derivative Works a copy of this License; and -2.You must cause any modified files to carry prominent notices stating that You changed the files; and -3.You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and -4.If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. - -You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/ETSUI/PixelUnitsDemo/README.md b/ETSUI/PixelUnitsDemo/README.md deleted file mode 100644 index 3430b03b95e423e3388fb8d31a64b1e76af375b6..0000000000000000000000000000000000000000 --- a/ETSUI/PixelUnitsDemo/README.md +++ /dev/null @@ -1,215 +0,0 @@ -# 介绍 - -本篇Codelab展示了像素单位与像素转换的使用方式,实现效果如下: - -![](figures/像素转换gif.gif) - -# 相关概念 - -px:屏幕上真实的物理像素单位。 - -vp:屏幕密度相关像素,像素密度为160dpi的设备上1vp=1px。1vp对应的物理屏幕像素=(屏幕像素密度/160)px。 - -像素密度的计算可参考下图: - -![](figures/像素密度计算公式.png) - -fp:字体像素,随系统字体大小变化。 - -lpx:视窗逻辑像素单位,lpx单位为实际屏幕宽度与逻辑宽度的比值,逻辑宽度可通过designWidth来配置。 - -我们为window设置不同的designWidth,可以看到在同一屏幕下展示长度是有差异的,如下图: - -![](figures/designWidth720.png) - -在了解像素的相关概念后,我们接下来开始搭建开发环境,并使用不同的像素单位来设置控件的长度、字体的大小,同时借助像素单位转换API对不同的像素单位进行转换。 - -# 搭建OpenHarmony环境 - -完成本篇Codelab我们首先要完成开发环境的搭建,本示例以**RK3568**开发板为例,参照以下步骤进行: - -1. [获取OpenHarmony系统版本](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/get-code/sourcecode-acquire.md#%E8%8E%B7%E5%8F%96%E6%96%B9%E5%BC%8F3%E4%BB%8E%E9%95%9C%E5%83%8F%E7%AB%99%E7%82%B9%E8%8E%B7%E5%8F%96):标准系统解决方案(二进制)。 - - 以3.1版本为例: - - ![](figures/zh-cn_image_0000001264659110.png) - -2. 搭建烧录环境。 - 1. [完成DevEco Device Tool的安装](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-ide-env-win.md) - 2. [完成RK3568开发板的烧录](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-ide-3568-burn.md) - -3. 搭建开发环境。 - 1. 开始前请参考[工具准备](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/start-overview.md#%E5%B7%A5%E5%85%B7%E5%87%86%E5%A4%87),完成DevEco Studio的安装和开发环境配置。 - 2. 开发环境配置完成后,请参考[使用工程向导](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/start-with-ets-stage.md#%E5%88%9B%E5%BB%BAets%E5%B7%A5%E7%A8%8B)创建工程(模板选择“Empty Ability”),选择JS或者eTS语言开发。 - 3. 工程创建完成后,选择使用[真机进行调测](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/start-with-ets-stage.md#%E4%BD%BF%E7%94%A8%E7%9C%9F%E6%9C%BA%E8%BF%90%E8%A1%8C%E5%BA%94%E7%94%A8)。 -# 代码结构解读 - -本篇Codelab只对核心代码进行讲解,接下来我们来讲解整个工程的代码结构: - -![](figures/代码结构导读.png) - -``` -├─AppScope # app全局目录 -│ └─resources -│ └─base -│ ├─element -│ └─media -└─entry # entry目录 - └─src - └─main - ├─ets # ets代码 - │ └─AppConfig # 业务代码配置目录。 - │ └── app_font_config.ets #页面字体配置文件 - │ ├─Application - │ ├─MainAbility - │ └─pages - │ └── index.ets #首页 - │ └── pixelConversionPage.ets #像素转换页面 - │ └── pixelUnitsPage.ets #像素单位介绍页面 - └─resources # 资源目录 - └─base - ├─element - ├─media - └─profile -``` -# 为控件指定不同的像素单位 - -单位介绍页面,介绍了系统像素单位的概念,并在代码中为Text组件设置不同的像素单位: - -1.设置Text组件的宽度为200px: - -``` -Text("200px") - .width(200 + 'px') - .height(25) - .backgroundColor(this.blueTitleColor) -... -``` - -2.设置Text组件的宽度为200vp: - -``` -Text("200vp") - .width(200 + 'vp') - .height(25) - .backgroundColor(this.blueTitleColor) -... -``` - -如果使用vp作为像素单位,在为组件设置具体的宽度或高度时,可以不加vp(系统默认单位为vp)。 - -``` -Text("200vp") - .width(200) - .height(25) - .backgroundColor(this.blueTitleColor) -... -``` - -3.设置Text组件的宽度为24fp: - -``` -Text("这是一段为24fp的文字") - .fontSize(24 + 'fp') - .backgroundColor(this.blueTitleColor) -... -``` - -4.使用lpx像素单位: - -``` -Text("200lpx") - .width(200 + 'lpx') - .height(25) -... -``` - -![](figures/screen_capture.png) - -# 使用像素转换 - -在像素转换页面,通过使用像素转换API,实现不同像素单位之间的转换: - -1.vp与px之间的转换 - -vp转换为px: - -``` -... -private vp_px_width: number= 260 -... -Text() - .width(vp2px(this.vp_px_width)) - .height(25) - .backgroundColor(this.redColor) -... -``` - -px转换为vp: - -``` -Text() - .width(px2vp(this.vp_px_width) + 'vp') - .height(25) -... -``` - -2.fp与px之间的转换 - -fp转换为px: - -``` -... -private fp_px_width: number= 180 -... -Text() - .width(fp2px(this.fp_px_width)) - .height(25) -... -``` - -px转换为fp: - -``` -Text() - .width(px2fp(this.fp_px_width)) - .height(25) -... -``` - -3.lpx与px之间的转换 - -lpx转换为px: - -``` -... -private lpx_px_width: number= 200 -... -Text() - .width(lpx2px(this.lpx_px_width)) - .height(25) -... -``` - -px转换为lpx: - -``` -Text() - .width(px2lpx(this.lpx_px_width)) - .height(25) - .backgroundColor(this.blueColor) -... -``` - -![](figures/conversion.png) - -# 恭喜您 - -本篇Codelab介绍像素单位的基本知识与像素单位转换API的使用,通过像素转换案例,向开发者讲解了如何使用像素单位设置组件的大小、字体像素fp的使用以及不同像素单位之间的转换。 - -通过本Codelab的学习,您已经学会了: - -- 不同像素单位的使用 -- 像素单位转换相关API的使用 - - diff --git a/ETSUI/PixelUnitsDemo/build-profile.json5 b/ETSUI/PixelUnitsDemo/build-profile.json5 deleted file mode 100644 index d7b1117cdb34aab2983ac65026d9e8dcc91332d1..0000000000000000000000000000000000000000 --- a/ETSUI/PixelUnitsDemo/build-profile.json5 +++ /dev/null @@ -1,27 +0,0 @@ -{ - "app": { - "signingConfigs": [], - "compileSdkVersion": 9, - "compatibleSdkVersion": 9, - "products": [ - { - "name": "default", - "signingConfig": "default", - } - ] - }, - "modules": [ - { - "name": "entry", - "srcPath": "./entry", - "targets": [ - { - "name": "default", - "applyToProducts": [ - "default" - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/ETSUI/PixelUnitsDemo/entry/build-profile.json5 b/ETSUI/PixelUnitsDemo/entry/build-profile.json5 deleted file mode 100644 index 7dc37bb919dada5132609c409200db266559004f..0000000000000000000000000000000000000000 --- a/ETSUI/PixelUnitsDemo/entry/build-profile.json5 +++ /dev/null @@ -1,13 +0,0 @@ -{ - "apiType": 'stageMode', - "buildOption": { - }, - "targets": [ - { - "name": "default", - }, - { - "name": "ohosTest", - } - ] -} \ No newline at end of file diff --git a/ETSUI/PixelUnitsDemo/entry/hvigorfile.js b/ETSUI/PixelUnitsDemo/entry/hvigorfile.js deleted file mode 100644 index d7720ee6a7aad5c617d1fd2f6fc8c87067bfa32c..0000000000000000000000000000000000000000 --- a/ETSUI/PixelUnitsDemo/entry/hvigorfile.js +++ /dev/null @@ -1,2 +0,0 @@ -// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently. -module.exports = require('@ohos/hvigor-ohos-plugin').hapTasks diff --git a/ETSUI/PixelUnitsDemo/entry/package.json b/ETSUI/PixelUnitsDemo/entry/package.json deleted file mode 100644 index 992c771b9e6be8904ce4204f075df58a9b0902cc..0000000000000000000000000000000000000000 --- a/ETSUI/PixelUnitsDemo/entry/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "license":"ISC", - "devDependencies":{}, - "name":"entry", - "ohos":{ - "org":"huawei", - "directoryLevel":"module", - "buildTool":"hvigor" - }, - "description":"example description", - "repository":{}, - "version":"1.0.0", - "dependencies":{} -} \ No newline at end of file diff --git a/ETSUI/PixelUnitsDemo/entry/src/main/ets/AppConfig/app_font_config.ets b/ETSUI/PixelUnitsDemo/entry/src/main/ets/AppConfig/app_font_config.ets deleted file mode 100644 index bf4d24c816496961f09f6cace3dd15de6cc143e9..0000000000000000000000000000000000000000 --- a/ETSUI/PixelUnitsDemo/entry/src/main/ets/AppConfig/app_font_config.ets +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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. - */ -enum FontSize { - SMALLER = 18, - SMALL = 24, - MIDDLE = 28, - LARGE = 32, - LARGER = 35, -} - -export enum AppFontSize { - /** - * Indicates that the fontSize of the app button. - */ - BUTTON = FontSize.SMALL, - BUTTON_LARGE = FontSize.LARGE, - /** - * Indicates that the fontSize of the app title. - */ - TITLE = FontSize.LARGER, - SUBTITLE = FontSize.LARGE, - /** - * Indicates that the fontSize of the app normal text. - */ - TEXT = FontSize.SMALL, - TEXT_BIG = FontSize.MIDDLE, - TEXT_SMALL = FontSize.SMALLER -} \ No newline at end of file diff --git a/ETSUI/PixelUnitsDemo/entry/src/main/ets/Application/AbilityStage.ts b/ETSUI/PixelUnitsDemo/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 1c9fcaafa50d6605b274c4a54a4b6225bc9bc1d0..0000000000000000000000000000000000000000 --- a/ETSUI/PixelUnitsDemo/entry/src/main/ets/Application/AbilityStage.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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 AbilityStage from "@ohos.application.AbilityStage" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("[Demo] MyAbilityStage onCreate") - } -} \ No newline at end of file diff --git a/ETSUI/PixelUnitsDemo/entry/src/main/ets/MainAbility/MainAbility.ts b/ETSUI/PixelUnitsDemo/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index f870382553ec44243fad1ac3a9b36fb22acb9d33..0000000000000000000000000000000000000000 --- a/ETSUI/PixelUnitsDemo/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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 Ability from '@ohos.application.Ability' - -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - console.log("[Demo] MainAbility onCreate") - globalThis.abilityWant = want; - } - - onDestroy() { - console.log("[Demo] MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("[Demo] MainAbility onWindowStageCreate") - - windowStage.setUIContent(this.context, "pages/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("[Demo] MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("[Demo] MainAbility onForeground") - } - - onBackground() { - // Ability has back to background - console.log("[Demo] MainAbility onBackground") - } -}; diff --git a/ETSUI/PixelUnitsDemo/entry/src/main/ets/pages/index.ets b/ETSUI/PixelUnitsDemo/entry/src/main/ets/pages/index.ets deleted file mode 100644 index dd07a7aa114a8048411a6e5999df7f66752b8296..0000000000000000000000000000000000000000 --- a/ETSUI/PixelUnitsDemo/entry/src/main/ets/pages/index.ets +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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 router from '@ohos.router' -@Entry -@Component -struct Index { - @State message: string = 'Hello World!' - TAG= 'PixelUnitsDemo' - - build() { - - Row() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceEvenly }) { - TextButton({ content: '像素介绍', onclick: () => { - router.push({url: "pages/pixelUnitsPage",}) - }}) - TextButton({ content: '像素转换', onclick: () => { - router.push({url: "pages/pixelConversionPage"}) - } }) - } - .width('100%') - } - .height('100%') - } -} -@Component -struct TextButton { - @Prop content: string - onclick: (onclick?: ClickEvent) => void - - build() { - Button(this.content, { type: ButtonType.Normal, stateEffect: false }) - .borderRadius(9).fontSize(40).padding(50).onClick(this.onclick) - } -} \ No newline at end of file diff --git a/ETSUI/PixelUnitsDemo/entry/src/main/ets/pages/pixelConversionPage.ets b/ETSUI/PixelUnitsDemo/entry/src/main/ets/pages/pixelConversionPage.ets deleted file mode 100644 index ddff4b407be4f956274453f702552383e5a9ed0b..0000000000000000000000000000000000000000 --- a/ETSUI/PixelUnitsDemo/entry/src/main/ets/pages/pixelConversionPage.ets +++ /dev/null @@ -1,253 +0,0 @@ -/* - * 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 router from '@ohos.router' -import { AppFontSize } from '../AppConfig/app_font_config' - -@Entry -@Component -struct PixelConversionPage { - @State message: string = 'Hello World' - private blueItemColor: string= "#f1faff" - private blueColor: string= "#2788d9" - private redColor: string= "#DE1a33" - private yellowColor: number= 0xF9CF93 - private vp_px_width: number= 260 - private fp_px_width: number= 180 - private lpx_px_width: number= 200 - private Tag: string= 'Pixel_conversion_page' - - build() { - Stack({ alignContent: Alignment.Bottom }) { - Scroll() { - Column() { - - Text('像素转换') - .fontSize(AppFontSize.TITLE) - .fontWeight(FontWeight.Bold) - .textAlign(TextAlign.Center) - .align(Alignment.Top) - .width("60%") - .margin({ top: 40, bottom: 20 }) - - - List({ space: 20, initialIndex: 0 }) { - ListItem() { - Column() { - //vp转换为px - Text('vp > px:') - .fontSize(AppFontSize.SUBTITLE) - .fontColor(this.blueColor) - .align(Alignment.Start) - .width("100%") - .fontWeight(FontWeight.Bold) - .margin({ bottom: 5, left: 10 }) - Column() { - Text('vp2px(' + this.vp_px_width + ')') - .height(25) - .fontColor(this.blueColor) - .fontSize(AppFontSize.TEXT_SMALL) - .textAlign(TextAlign.Center) - - }.margin(10) - - - Column() { - Text() - .width(vp2px(this.vp_px_width)) - .height(25) - .backgroundColor(this.redColor) - .fontSize(AppFontSize.TEXT_SMALL) - .textAlign(TextAlign.Start) - .fontColor(Color.White) - }.margin(10) - - //px转换为vp - Text('px > vp:') - .fontSize(AppFontSize.SUBTITLE) - .fontColor(this.blueColor) - .align(Alignment.Start) - .width("100%") - .fontWeight(FontWeight.Bold) - .margin({ bottom: 5, left: 10 }) - Column() { - Text('px2vp(' + this.vp_px_width + ')') - .height(25) - .fontColor(this.blueColor) - .fontSize(AppFontSize.TEXT_SMALL) - .textAlign(TextAlign.Center) - }.margin(10) - - Column() { - Text() - .width(px2vp(this.vp_px_width) + 'vp') - .height(25) - .backgroundColor(this.redColor) - .fontSize(AppFontSize.TEXT_SMALL) - .textAlign(TextAlign.Start) - .fontColor(Color.White) - }.margin(10) - }.alignItems(HorizontalAlign.Start) - - }.padding({ top: 30, bottom: 30, left: 10 }) - .backgroundColor(this.blueItemColor) - .borderRadius(10) - - ListItem() { - //fp转换为px - Column() { - Text('fp > px:') - .fontSize(AppFontSize.SUBTITLE) - .fontColor(this.blueColor) - .align(Alignment.Start) - .width("100%") - .fontWeight(FontWeight.Bold) - .margin({ bottom: 5, left: 10 }) - Column() { - Text('fp2px(' + this.fp_px_width + ')') - .height(25) - .fontColor(this.blueColor) - .fontSize(AppFontSize.TEXT_SMALL) - .textAlign(TextAlign.Center) - - }.margin(10) - - Column() { - Text() - .width(fp2px(this.fp_px_width)) - .height(25) - .backgroundColor(this.yellowColor) - .fontSize(AppFontSize.TEXT_SMALL) - .textAlign(TextAlign.Start) - .fontColor(Color.White) - }.margin(10) - //px转换为fp - Text('px > fp:') - .fontSize(AppFontSize.SUBTITLE) - .fontColor(this.blueColor) - .align(Alignment.Start) - .width("100%") - .margin({ bottom: 5, left: 10 }) - .fontWeight(FontWeight.Bold) - Column() { - Text('px2fp(' + this.fp_px_width + ')') - .height(25) - .fontColor(this.blueColor) - .fontSize(AppFontSize.TEXT_SMALL) - .textAlign(TextAlign.Center) - }.margin(10) - - Column() { - Text() - .width(px2fp(this.fp_px_width)) - .height(25) - .backgroundColor(this.yellowColor) - .fontSize(AppFontSize.TEXT_SMALL) - .textAlign(TextAlign.Start) - .fontColor(Color.White) - }.margin(10) - }.alignItems(HorizontalAlign.Start) - - }.padding({ top: 30, bottom: 30, left: 10 }) - .backgroundColor(this.blueItemColor) - .borderRadius(10) - - ListItem() { - Column() { - //lpx转换为px - Text('lpx > px:') - .fontSize(AppFontSize.SUBTITLE) - .fontColor(this.blueColor) - .align(Alignment.Start) - .width("100%") - .fontWeight(FontWeight.Bold) - .margin({ bottom: 5, left: 10 }) - Column() { - Text('lpx2px(' + this.lpx_px_width + ')') - .height(25) - .fontColor(this.blueColor) - .fontSize(AppFontSize.TEXT_SMALL) - .textAlign(TextAlign.Center) - }.margin(10) - - Column() { - Text() - .width(lpx2px(this.lpx_px_width)) - .height(25) - .backgroundColor(this.blueColor) - .fontSize(AppFontSize.TEXT_SMALL) - .textAlign(TextAlign.Start) - .fontColor(Color.White) - }.margin(10) - //px转换为lpx - Text('px > lpx:') - .fontSize(AppFontSize.SUBTITLE) - .fontColor(this.blueColor) - .align(Alignment.Start) - .width("100%") - .fontWeight(FontWeight.Bold) - .padding({ left: 10, right: 10 }) - Column() { - Text('px2lpx(' + this.lpx_px_width + ')') - .height(25) - .fontColor(this.blueColor) - .fontSize(AppFontSize.TEXT_SMALL) - }.margin(10) - - Column() { - Text() - .width(px2lpx(this.lpx_px_width)) - .height(25) - .backgroundColor(this.blueColor) - .fontSize(AppFontSize.TEXT_SMALL) - .textAlign(TextAlign.Start) - .fontColor(Color.White) - }.margin(10) - - Text('lpx与px之间的转换,需要根据实际情况设置designWidth') - .width("100%") - .fontSize(AppFontSize.TEXT_SMALL) - .textAlign(TextAlign.Start) - .fontColor(Color.Red) - .margin({ bottom: 5, left: 10 }) - }.alignItems(HorizontalAlign.Start) - }.padding({ top: 30, bottom: 30, left: 10 }) - .backgroundColor(this.blueItemColor) - .borderRadius(10) - } - .borderRadius(10) - .padding({ top: 20, bottom: 120, left: 15, right: 15 }) - - - }.height("100%") - }.margin({ bottom: 80 }) - - Column() { - Text('< 返回主页') - .fontSize(AppFontSize.BUTTON_LARGE) - .fontWeight(FontWeight.Bold) - .fontColor(Color.White) - .padding({ top: 8, bottom: 8 }) - } - .width('100%') - .height(60) - .backgroundColor(this.blueColor) - .align(Alignment.Center) - .onClick(() => { - console.log(this.Tag + "click the button to back home") - router.back() - }) - } - } -} diff --git a/ETSUI/PixelUnitsDemo/entry/src/main/ets/pages/pixelUnitsPage.ets b/ETSUI/PixelUnitsDemo/entry/src/main/ets/pages/pixelUnitsPage.ets deleted file mode 100644 index 5d8d83f9a854ebb665f272b2af53dd27cb0ab318..0000000000000000000000000000000000000000 --- a/ETSUI/PixelUnitsDemo/entry/src/main/ets/pages/pixelUnitsPage.ets +++ /dev/null @@ -1,250 +0,0 @@ -/* - * 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 router from '@ohos.router'; -import { AppFontSize } from '../AppConfig/app_font_config' - -@Entry -@Component -struct PixelUnitsPage { - @State message: string = 'Hello World' - private blueItemColor: string= "#f1faff" - private blueTitleColor: string= "#2788d9" - private Tag: string= "Ark_pixel_page" - - build() { - Stack({ alignContent: Alignment.Bottom }) { - Scroll() { - Column() { - Text('像素介绍') - .fontSize(AppFontSize.TITLE) - .fontWeight(FontWeight.Bold) - .textAlign(TextAlign.Center) - .align(Alignment.Top) - .width("60%") - .margin({ top: 40, bottom: 0 }) - List({ space: 20, initialIndex: 0 }) { - ListItem() { - Column() { - Text('px') - .fontSize(AppFontSize.SUBTITLE) - .fontColor(this.blueTitleColor) - .align(Alignment.Start) - .width("100%") - .fontWeight(FontWeight.Bold) - Text('屏幕物理像素单位。') - .width('100%') - .lineHeight(35) - .fontSize(AppFontSize.TEXT) - .textAlign(TextAlign.Start) - .borderRadius(10) - Column() { - Text("200px") - .width(200 + 'px') - .height(25) - .backgroundColor(this.blueTitleColor) - .fontSize(AppFontSize.TEXT_SMALL) - .textAlign(TextAlign.Start) - .fontColor(Color.White) - .borderRadius(4) - .padding({ left: 5 }) - } - .align(Alignment.Start) - .width('100%') - .alignItems(HorizontalAlign.Start) - .margin({ top: 20 }) - - - }.align(Alignment.Start) - - - }.editable(true) - .padding(20) - .backgroundColor(this.blueItemColor) - .borderRadius(10) - - ListItem() { - Column() { - Text('vp') - .fontSize(AppFontSize.SUBTITLE) - .fontColor(this.blueTitleColor) - .align(Alignment.Start) - .width("100%") - .fontWeight(FontWeight.Bold) - Text('屏幕密度相关像素,根据屏幕像素密度转换为屏幕物理像素。') - .width('100%') - .lineHeight(35) - .fontSize(AppFontSize.TEXT) - .textAlign(TextAlign.Start) - .borderRadius(10) - Text('像素密度为160dpi的设备上1vp=1px,1vp对应的物理屏幕像素=(屏幕像素密度/160)px') - .width('100%') - .lineHeight(35) - .fontSize(AppFontSize.TEXT_SMALL) - .textAlign(TextAlign.Start) - .borderRadius(10) - .fontColor("#5f5f5f") - Column() { - Text("200vp") - .width(200 + 'vp') - .height(25) - .backgroundColor(this.blueTitleColor) - .fontSize(AppFontSize.TEXT_SMALL) - .textAlign(TextAlign.Start) - .fontColor(Color.White) - .borderRadius(4) - .padding({ left: 5 }) - } - .align(Alignment.Start) - .width('100%') - .alignItems(HorizontalAlign.Start) - .margin({ top: 20 }) - - }.align(Alignment.Start) - - }.editable(true) - .padding(20) - .backgroundColor(this.blueItemColor) - .borderRadius(10) - - ListItem() { - Column() { - Text('fp') - .fontSize(AppFontSize.SUBTITLE) - .fontColor(this.blueTitleColor) - .align(Alignment.Start) - .width("100%") - .fontWeight(FontWeight.Bold) - Text('字体像素,与vp类似,随系统字体大小设置变化。') - .width('100%') - .lineHeight(35) - .fontSize(AppFontSize.TEXT) - .textAlign(TextAlign.Start) - .borderRadius(10) - Text('默认情况下与vp相同,即1vp=1fp,如果用户手动调整了系统字体,scale为缩放比例,设置后的字体大小(单位fp) = 设置前的字体大小 * scale') - .width('100%') - .lineHeight(35) - .fontSize(AppFontSize.TEXT_SMALL) - .textAlign(TextAlign.Start) - .borderRadius(10) - .fontColor("#5f5f5f") - Column() { - Text("这是一段为14fp的文字") - .height(25) - .backgroundColor(this.blueTitleColor) - .fontSize(14 + 'fp') - .textAlign(TextAlign.Start) - .fontColor(Color.White) - .borderRadius(4) - .padding({ left: 5 }) - .borderRadius(4) - .padding({ left: 5, right: 10 }) - } - .align(Alignment.Start) - .width('100%') - .alignItems(HorizontalAlign.Start) - .margin({ top: 20 }) - - Column() { - Text("这是一段为24fp的文字") - .fontSize(24 + 'fp') - .backgroundColor(this.blueTitleColor) - .textAlign(TextAlign.Start) - .fontColor(Color.White) - .borderRadius(4) - .padding({ left: 5, right: 10, top: 5, bottom: 5 }) - } - .align(Alignment.Start) - .width('100%') - .alignItems(HorizontalAlign.Start) - .margin({ top: 20 }) - - }.align(Alignment.Start) - - }.editable(true) - .padding(20) - .backgroundColor(this.blueItemColor) - .borderRadius(10) - - ListItem() { - Column() { - Text('lpx') - .fontSize(AppFontSize.SUBTITLE) - .fontColor(this.blueTitleColor) - .align(Alignment.Start) - .width("100%") - .fontWeight(FontWeight.Bold) - Text('视窗逻辑像素单位,lpx单位为实际屏幕宽度与逻辑宽度(通过designWidth配置)的比值。') - .width('100%') - .lineHeight(35) - .fontSize(AppFontSize.TEXT) - .textAlign(TextAlign.Start) - .borderRadius(10) - - Column() { - Text("200lpx") - .width(200 + 'lpx') - .height(25) - .backgroundColor(this.blueTitleColor) - .fontSize(AppFontSize.TEXT_SMALL) - .textAlign(TextAlign.Start) - .fontColor(Color.White) - .borderRadius(4) - .padding({ left: 5 }) - } - .align(Alignment.Start) - .width('100%') - .alignItems(HorizontalAlign.Start) - .margin({ top: 20 }) - - Image($r('app.media.designWidth720')) - .border({ width: 1 }) - .borderStyle(BorderStyle.Dashed) - .margin({ top: 10 }) - - Image($r('app.media.designWidth1440')) - .border({ width: 1 }) - .borderStyle(BorderStyle.Dashed) - .margin({ top: 10 }) - - }.align(Alignment.Start) - - }.editable(true) - .padding(20) - .backgroundColor(this.blueItemColor) - .borderRadius(10) - } - .padding(15).margin({ top: 20, bottom: 160 }) - - - }.height("100%") - } - - Column() { - Text('< 返回主页') - .fontSize(AppFontSize.BUTTON) - .fontWeight(FontWeight.Bold) - .fontColor(Color.White) - } - .width('100%') - .padding({ right: 10, left: 10, top: 20, bottom: 20 }) - .backgroundColor(this.blueTitleColor) - .align(Alignment.Center) - .onClick(() => { - console.log(this.Tag + "click the button to back home") - router.back() - }) - } - } -} \ No newline at end of file diff --git a/ETSUI/PixelUnitsDemo/entry/src/main/module.json5 b/ETSUI/PixelUnitsDemo/entry/src/main/module.json5 deleted file mode 100644 index 035cdc75464278063f3d80f9fc859ac37d6b8b61..0000000000000000000000000000000000000000 --- a/ETSUI/PixelUnitsDemo/entry/src/main/module.json5 +++ /dev/null @@ -1,37 +0,0 @@ -{ - "module": { - "name": "entry", - "type": "entry", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:entry_desc", - "mainElement": "MainAbility", - "deviceTypes": [ - "phone", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "uiSyntax": "ets", - "abilities": [ - { - "name": "MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:MainAbility_desc", - "icon": "$media:icon", - "label": "$string:MainAbility_label", - "visible": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ] - } - ] - } -} \ No newline at end of file diff --git a/ETSUI/PixelUnitsDemo/entry/src/main/resources/base/element/string.json b/ETSUI/PixelUnitsDemo/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 490210a3908f47722dc942d49dacc98b97669a5f..0000000000000000000000000000000000000000 --- a/ETSUI/PixelUnitsDemo/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - } - ] -} \ No newline at end of file diff --git a/ETSUI/PixelUnitsDemo/entry/src/main/resources/base/media/designWidth1440.PNG b/ETSUI/PixelUnitsDemo/entry/src/main/resources/base/media/designWidth1440.PNG deleted file mode 100644 index c6eb548d54ac0e3be796d09bf95efd1c28d5ae02..0000000000000000000000000000000000000000 Binary files a/ETSUI/PixelUnitsDemo/entry/src/main/resources/base/media/designWidth1440.PNG and /dev/null differ diff --git a/ETSUI/PixelUnitsDemo/entry/src/main/resources/base/media/designWidth720.PNG b/ETSUI/PixelUnitsDemo/entry/src/main/resources/base/media/designWidth720.PNG deleted file mode 100644 index 1dca77390a23b58371dd09080b29f7389d31bb51..0000000000000000000000000000000000000000 Binary files a/ETSUI/PixelUnitsDemo/entry/src/main/resources/base/media/designWidth720.PNG and /dev/null differ diff --git a/ETSUI/PixelUnitsDemo/entry/src/main/resources/base/media/icon.png b/ETSUI/PixelUnitsDemo/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ETSUI/PixelUnitsDemo/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ETSUI/PixelUnitsDemo/entry/src/main/resources/base/profile/main_pages.json b/ETSUI/PixelUnitsDemo/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 361915433f3d4f19b27a0e206c6742ba7f1ccd34..0000000000000000000000000000000000000000 --- a/ETSUI/PixelUnitsDemo/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "src": [ - "pages/index", - "pages/pixelConversionPage", - "pages/pixelUnitsPage" - ], - "window": { - "designWidth": 720, - "autoDesignWidth": false - } -} \ No newline at end of file diff --git a/ETSUI/PixelUnitsDemo/figures/conversion.png b/ETSUI/PixelUnitsDemo/figures/conversion.png deleted file mode 100644 index d0c5135e70e67f539c81f25779bb2873f1366e22..0000000000000000000000000000000000000000 Binary files a/ETSUI/PixelUnitsDemo/figures/conversion.png and /dev/null differ diff --git a/ETSUI/PixelUnitsDemo/figures/designWidth720.png b/ETSUI/PixelUnitsDemo/figures/designWidth720.png deleted file mode 100644 index 0ed972d1bc561309ff5b8877c0cb6f46d674b427..0000000000000000000000000000000000000000 Binary files a/ETSUI/PixelUnitsDemo/figures/designWidth720.png and /dev/null differ diff --git a/ETSUI/PixelUnitsDemo/figures/screen_capture.png b/ETSUI/PixelUnitsDemo/figures/screen_capture.png deleted file mode 100644 index bd6459f877abb16c93501581a4e6026e6cf08b46..0000000000000000000000000000000000000000 Binary files a/ETSUI/PixelUnitsDemo/figures/screen_capture.png and /dev/null differ diff --git a/ETSUI/PixelUnitsDemo/figures/zh-cn_image_0000001264659110.png b/ETSUI/PixelUnitsDemo/figures/zh-cn_image_0000001264659110.png deleted file mode 100644 index 9d752ff5311af2816bf898cb2c18ef33bf085726..0000000000000000000000000000000000000000 Binary files a/ETSUI/PixelUnitsDemo/figures/zh-cn_image_0000001264659110.png and /dev/null differ diff --git "a/ETSUI/PixelUnitsDemo/figures/\344\273\243\347\240\201\347\273\223\346\236\204\345\257\274\350\257\273.png" "b/ETSUI/PixelUnitsDemo/figures/\344\273\243\347\240\201\347\273\223\346\236\204\345\257\274\350\257\273.png" deleted file mode 100644 index 296ca63e9e537ef598fad163881b693692aaf4e0..0000000000000000000000000000000000000000 Binary files "a/ETSUI/PixelUnitsDemo/figures/\344\273\243\347\240\201\347\273\223\346\236\204\345\257\274\350\257\273.png" and /dev/null differ diff --git "a/ETSUI/PixelUnitsDemo/figures/\345\203\217\347\264\240\345\257\206\345\272\246\350\256\241\347\256\227\345\205\254\345\274\217.png" "b/ETSUI/PixelUnitsDemo/figures/\345\203\217\347\264\240\345\257\206\345\272\246\350\256\241\347\256\227\345\205\254\345\274\217.png" deleted file mode 100644 index a110561e10973e61fe9c32fe3999de0d045a32b5..0000000000000000000000000000000000000000 Binary files "a/ETSUI/PixelUnitsDemo/figures/\345\203\217\347\264\240\345\257\206\345\272\246\350\256\241\347\256\227\345\205\254\345\274\217.png" and /dev/null differ diff --git "a/ETSUI/PixelUnitsDemo/figures/\345\203\217\347\264\240\350\275\254\346\215\242gif.gif" "b/ETSUI/PixelUnitsDemo/figures/\345\203\217\347\264\240\350\275\254\346\215\242gif.gif" deleted file mode 100644 index c41aa5f0bf3ec5e4dfe68864c3b3170fb10e5c9d..0000000000000000000000000000000000000000 Binary files "a/ETSUI/PixelUnitsDemo/figures/\345\203\217\347\264\240\350\275\254\346\215\242gif.gif" and /dev/null differ diff --git a/ETSUI/PixelUnitsDemo/hvigorfile.js b/ETSUI/PixelUnitsDemo/hvigorfile.js deleted file mode 100644 index 5f2735e3deeaf655828407544bbed9365c258278..0000000000000000000000000000000000000000 --- a/ETSUI/PixelUnitsDemo/hvigorfile.js +++ /dev/null @@ -1,2 +0,0 @@ -// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently. -module.exports = require('@ohos/hvigor-ohos-plugin').appTasks \ No newline at end of file diff --git a/ETSUI/PixelUnitsDemo/package.json b/ETSUI/PixelUnitsDemo/package.json deleted file mode 100644 index 5e0eea375fbe32b5fe6fc9337202a133c2d5a1d3..0000000000000000000000000000000000000000 --- a/ETSUI/PixelUnitsDemo/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "license":"ISC", - "devDependencies":{}, - "name":"pixel_units_demo", - "ohos":{ - "org":"huawei", - "directoryLevel":"project", - "buildTool":"hvigor" - }, - "description":"example description", - "repository":{}, - "version":"1.0.0", - "dependencies":{ - "@ohos/hvigor-ohos-plugin":"1.0.6", - "hypium":"^1.0.0", - "@ohos/hvigor":"1.0.6" - } -} \ No newline at end of file diff --git a/ETSUI/PixelUnitsDemo/public_sys-resources/icon-caution.gif b/ETSUI/PixelUnitsDemo/public_sys-resources/icon-caution.gif deleted file mode 100644 index 6e90d7cfc2193e39e10bb58c38d01a23f045d571..0000000000000000000000000000000000000000 Binary files a/ETSUI/PixelUnitsDemo/public_sys-resources/icon-caution.gif and /dev/null differ diff --git a/ETSUI/PixelUnitsDemo/public_sys-resources/icon-danger.gif b/ETSUI/PixelUnitsDemo/public_sys-resources/icon-danger.gif deleted file mode 100644 index 6e90d7cfc2193e39e10bb58c38d01a23f045d571..0000000000000000000000000000000000000000 Binary files a/ETSUI/PixelUnitsDemo/public_sys-resources/icon-danger.gif and /dev/null differ diff --git a/ETSUI/PixelUnitsDemo/public_sys-resources/icon-note.gif b/ETSUI/PixelUnitsDemo/public_sys-resources/icon-note.gif deleted file mode 100644 index 6314297e45c1de184204098efd4814d6dc8b1cda..0000000000000000000000000000000000000000 Binary files a/ETSUI/PixelUnitsDemo/public_sys-resources/icon-note.gif and /dev/null differ diff --git a/ETSUI/PixelUnitsDemo/public_sys-resources/icon-notice.gif b/ETSUI/PixelUnitsDemo/public_sys-resources/icon-notice.gif deleted file mode 100644 index 86024f61b691400bea99e5b1f506d9d9aef36e27..0000000000000000000000000000000000000000 Binary files a/ETSUI/PixelUnitsDemo/public_sys-resources/icon-notice.gif and /dev/null differ diff --git a/ETSUI/PixelUnitsDemo/public_sys-resources/icon-tip.gif b/ETSUI/PixelUnitsDemo/public_sys-resources/icon-tip.gif deleted file mode 100644 index 93aa72053b510e456b149f36a0972703ea9999b7..0000000000000000000000000000000000000000 Binary files a/ETSUI/PixelUnitsDemo/public_sys-resources/icon-tip.gif and /dev/null differ diff --git a/ETSUI/PixelUnitsDemo/public_sys-resources/icon-warning.gif b/ETSUI/PixelUnitsDemo/public_sys-resources/icon-warning.gif deleted file mode 100644 index 6e90d7cfc2193e39e10bb58c38d01a23f045d571..0000000000000000000000000000000000000000 Binary files a/ETSUI/PixelUnitsDemo/public_sys-resources/icon-warning.gif and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/LICENSE b/ETSUI/SimpleGalleryEts/LICENSE deleted file mode 100644 index 80576ef141485b36eea4aebf25af97020bc2de44..0000000000000000000000000000000000000000 --- a/ETSUI/SimpleGalleryEts/LICENSE +++ /dev/null @@ -1,78 +0,0 @@ - Copyright (c) 2021 Huawei Device Co., Ltd. All rights reserved. - - 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. - -Apache License, Version 2.0 -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: -1.You must give any other recipients of the Work or Derivative Works a copy of this License; and -2.You must cause any modified files to carry prominent notices stating that You changed the files; and -3.You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and -4.If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. - -You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/ETSUI/SimpleGalleryEts/README.md b/ETSUI/SimpleGalleryEts/README.md deleted file mode 100644 index 07c78efb436f392d56156935ce82b8a5cc2d9f7a..0000000000000000000000000000000000000000 --- a/ETSUI/SimpleGalleryEts/README.md +++ /dev/null @@ -1,460 +0,0 @@ -# 极简声明式UI范式 -# 介绍 - -- [应用场景](#section225718574575) - -## 应用场景 - -声明式UI开发框架,采用更接近自然语义的编程方式,让开发者可以直观地描述UI界面,不必关心框架如何实现UI绘制和渲染,从而实现极简高效的开发。从组件、动效和状态管理三个维度来提供UI能力,还提供了多端部署和系统能力接口,真正实现多端代码共享和系统能力的极简调用。 - -本篇Codelab使用极简声明式UI范式开发完成如下功能: - -- 组合系统组件为自定义组件,完成顶部标签栏、推荐栏。 -- 使用共享元素转场动画、显示动画完成大图浏览界面。 -- 使用状态数据管理完成组件之间的数据传递。 - -为了让您快速了解本篇Codelab所实现的功能,我们先对极简声明式UI范式开发进行展示,效果如下: - -![](figures/VID_20211222_162936-00_00_00-00_00_30-1.gif) - -# 相关概念 - -# 搭建OpenHarmony环境 - -完成本篇Codelab我们首先要完成开发环境的搭建,本示例以**Hi3516DV300**开发板为例,参照以下步骤进行: - -1. [获取OpenHarmony系统版本](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/get-code/sourcecode-acquire.md#%E8%8E%B7%E5%8F%96%E6%96%B9%E5%BC%8F3%E4%BB%8E%E9%95%9C%E5%83%8F%E7%AB%99%E7%82%B9%E8%8E%B7%E5%8F%96):标准系统解决方案(二进制) - - 以3.0版本为例: - - ![](figures/取版本.png) - -2. 搭建烧录环境 - - 1. [完成DevEco Device Tool的安装](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-ide-env-win.md) - 2. [完成Hi3516开发板的烧录](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-ide-3516-burn.md) -3. 搭建开发环境 - 1. 开始前请参考[工具准备](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/start-overview.md#%E5%B7%A5%E5%85%B7%E5%87%86%E5%A4%87),完成DevEco Studio的安装和开发环境配置。 - 2. 开发环境配置完成后,请参考[使用工程向导](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/start-with-ets-fa.md#%E5%88%9B%E5%BB%BAets%E5%B7%A5%E7%A8%8B)创建工程(模板选择“Empty Ability”),选择JS或者eTS语言开发。 - 3. 工程创建完成后,选择使用[真机进行调测](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/start-with-ets-fa.md#%E4%BD%BF%E7%94%A8%E7%9C%9F%E6%9C%BA%E8%BF%90%E8%A1%8C%E5%BA%94%E7%94%A8)。 - -# 代码结构解读 - -本篇Codelab只对核心代码进行讲解,以下介绍整个工程的代码结构。 - -![](figures/036C0734-B95E-4D50-98E1-BEEC33160D0E.png) - -- common:自定义组件。 - - bottomTabs.ets:底部页签容器。 - - homeListItem.ets:首页推荐列表项。 - - homeTabContent.ets:首页页签内容。 - - topTabs.ets:顶部标签。 - -- model:数据结构和数据初始化。 - - homeListDataModel.ets:今日推荐、精选推荐、X月推荐数据。 - -- pages:页面。 - - home.ets:首页。 - - image.ets:图片预览界面。 - -- resources:项目资源存放路径,包括图片资源和国际化字符串等。 -- config.json:应用的配置文件。 - -# 页面布局与搭建 - -- Tabs组件 - -- 推荐List布局 - -- 大图浏览界面布局 - -- 页面跳转和数据传递 - -# Tabs组件 - -在这一小节中,我们实现首页底部页签和顶部标签的布局。首先我们使用Flex组件,在Flex组件中使用Tabs组件。 - -1. 在common中创建文件bottomTabs.ets,自定义底部页签容器BottomTabs。使用ForEach语句,显示四个相同的页签,每个页签使用Column组件,使用justifyContent: FlexAlign.SpaceEvenly来使页签均分布局。 - - ![](figures/zh-cn_image_0000001237578411.png) - - ``` - import prompt from '@system.prompt' - - @Component - export struct BottomTabs { - private tabSrc: number[] = [0, 1, 2, 3] - @Link bottomTabIndex: number - - build() { - Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceEvenly }) { // FlexAlign.SpaceEvenly实现均分布局 - ForEach(this.tabSrc, item => { // 通过ForEach语句添加四个页签 - Column() { - Image(getTabSrc(this.bottomTabIndex, item)) - .objectFit(ImageFit.Contain) - ...... - } - }) - } - .width('100%') - .height('8%') - } - } - ``` - -2. Tabs组件中TabContent中的内容使用自定义组件完成,新建homeTabContent.ets文件,实现HomeTabComponent 组件。 - - ![](figures/zh-cn_image_0000001237778483.png) - - ``` - import { TopTabs } from '../common/topTabs' - - @Component - export struct HomeTabComponent { - private recommends: Resource[] = [$r('app.string.today_recommend'), - $r('app.string.featured_recommend'), - $r('app.string.september_recommend'), - $r('app.string.august_recommend')] - @Link showSettings: boolean - - build() { - Column() { - TopTabs({ showSettings: $showSettings }) // 自定义组件顶部标签 - ...... // 页面内容,此处省略 - } - } - } - ``` - -3. 首页中引用自定义组件显示。 - - ``` - import { HomeTabComponent } from '../common/homeTabContent' // import导入自定义组件 - - @Entry - @Component - struct HomeComponent { - build() { - Stack({ alignContent: Alignment.BottomStart }) { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.End, justifyContent: FlexAlign.End }) { - Tabs({ barPosition: BarPosition.End, controller: this.controller }) { - TabContent() { - HomeTabComponent({ showSettings: $showSettings }) // TabContent的内容使用自定义组件HomeTabComponent - } - .padding({ left: 15, right: 15 }) - } - .vertical(false) - .barHeight(0) // 本篇Codelab中使用了自定义的底部页签,不使用Tabs的TabBar,所以BarHeight为0 - .width('100%') - .scrollable(false) - } - BottomTabs({ controller: this.controller, bottomTabIndex: $bottomTabIndex }) // 底部页签容器组件 - } - .width('100%') - .height('100%') - } - } - ``` - -# 推荐List布局 - -首先,在首页中有今日推荐、精选推荐等推荐栏,在HomeTabComponent组件中,推荐栏放在List中作为List的ListItem组件显示。推荐列表使用ForEach语句,LisItem中使用自定义组件HomeListItem,在HomeListItem组件中会判断是否是今日推荐来获取不同的数据。 - -![](figures/zh-cn_image_0000001192938616.png) - -``` -import {TopTabs} from '../common/topTabs' -import {HomeListItem} from '../common/homeListItem' - -@Component -export struct HomeTabComponent { - private recommends: Resource[] = [$r('app.string.today_recommend'), $r('app.string.featured_recommend'), - $r('app.string.september_recommend'), $r('app.string.august_recommend')] - - build() { - Column() { - TopTabs() - List() { - ForEach(this.recommends, item => { - ListItem() { - HomeListItem({ titleIndex: this.recommends.indexOf(item) }) - } - }, item => this.recommends.indexOf(item).toString()) - } - .listDirection(Axis.Vertical) - .width('100%') - .layoutWeight(1) - } - } -} -``` - -然后,今日推荐、精选推荐等作为ListItem,使用自定义组件HomeListItem作为子组件,下面介绍自定义组件HomeListItem: - -1. 在common中创建homeListItem.ets作为自定义组件。 - - ![](figures/zh-cn_image_0000001237898779.png) - -2. HomeListItem中包括上面的title和下面图片列表两部分,使用ForEach语句显示图片列表。 - - ``` - @Component - export struct HomeListItem { - private recommends: Resource[] = [$r('app.string.today_recommend'), - $r('app.string.featured_recommend'), - $r('app.string.september_recommend'), - $r('app.string.august_recommend')] - private listItems: ImageData[] = initializeImageData() - private titleIndex: number = 0 - private imageWidth: string = '120' - private ratio: number = 1 - - build() { - Column() { - Row() { - Text(this.recommends[this.titleIndex]) // // 这里this.recommends[this.titleIndex]是推荐的title - .textAlign(TextAlign.Start) - .fontSize(16) - .fontWeight(FontWeight.Bold) - .layoutWeight(1) - .borderColor(Color.Blue) - } - .width('100%') - - List({ initialIndex: 0 }) { // 图片列表 - ForEach(this.listItems, item => { - ListItem() { - Image(item.smallImg) - .width(this.imageWidth) - .aspectRatio(this.ratio) - .borderRadius(10) - .margin({ right: 15 }) - } - }) - } - .listDirection(Axis.Horizontal) - .margin({ top: '2%', bottom: '2%' }) - } - } - } - ``` - - ![](figures/IMG_20211222_162835.jpg) - -# 大图浏览界面布局 - -点击首页推荐栏中的图片,可以进入大图浏览界面,现在来实现大图界面的布局。 - -1. 首先在pages文件夹中,单击右键,然后新建eTS Page,命名为 image.ets。 - - ![](figures/zh-cn_image_0000001237738855.png) - -2. 大图浏览界面从界面上分为顶部titleBar,底部toolBar,中间图片铺满屏幕。由于图片需要左右滑动切换,此处使用Swiper组件,Swiper中子组件使用Image。 - - ``` - import { ImageData, initializeImageData, initializeTodayData } from '../model/HomeListDataModel' - - @Entry - @Component - struct ImageComponent{ - private imageSrc: ImageData[] = initializeImageData() - private imageIndex: number = router.getParams().index - private title: string = '' - @State imageMargin: number = 56 - @State visibility: Visibility = Visibility.Visible - - build() { - Flex({ direction: FlexDirection.Column,alignItems: ItemAlign.End, justifyContent: FlexAlign.End }) { - Row() { - ...... // titleBar部分 - } - .width('100%') - .height(this.imageMargin) - .backgroundColor('#F1F3F5') - .visibility(this.visibility) - Swiper(){ // 中间大图显示,使用Swiper组件 - ForEach(this.imageSrc, item => { - Image(item.bigImg) // Image作为Swiper的子组件,显示图片 - .height('100%') - .width('100%') - .objectFit(ImageFit.Contain) - },item => item.toString()) - } - } - .width('100%') - .height('100%') - Column() { - ...... // 底部工具栏部分 - } - .width('100%') - } - .width('100%') - .height('100%') - } - } - ``` - -# 页面跳转和数据传递 - -本篇Codelab中,页面跳转即首页推荐栏中的图片跳转到大图界面和大图界面点击返回图标回到首页,数据传递包括父组件向子组件传递参数,双向传递以及页面之间数据传递。 - -- 页面跳转及页面间数据传递。 - - 点击首页推荐栏中的图片跳转到大图界面,在homeListItem.ets中的图片列表中给Image添加点击事件,通过页面路由router完成页面跳转和参数传递。 - - ``` - List({ initialIndex: 0 }) { - ForEach(this.listItems, item => { - ListItem() { - Image(item.smallImg) - .onClick(() => { - let shareIdStr = this.titleIndex + item.id - console.info('Item onClick' + shareIdStr) - router.push({ // 通过页面路由router完成页面跳转 - uri: 'pages/image', - params: { isToday: this.isToday, shareId: shareIdStr, index: item.id } // 参数传递 - }) - }) - } - }) - } - .listDirection(Axis.Horizontal) - .margin({ top: '2%', bottom: '2%' }) - ``` - - 大图界面使用router.getParams\(\)获取参数,实现返回图片的onClick事件,执行router.back\(\)来返回首页。 - - ``` - import router from '@system.router' - @Entry - @Component - struct Index { - // 获取参数 - private imageIndex: number = router.getParams().index - private shareId: string = router.getParams().shareId - private isToday: boolean = router.getParams().isToday - - build() { - Flex({ direction: FlexDirection.Column,alignItems: ItemAlign.End, justifyContent: FlexAlign.End }) { - Row() { - Image('/common/arrow.png') - .width('10%') - .height('80%') - .objectFit(ImageFit.Contain) - .margin({ left: 10 }) - .onClick(() => { - router.back() // 通过router.back()返回 - }) - } - } - .width('100%') - .height('100%') - } - } - ``` - -- 组件之间的数据传递。 - - - 父组件向子组件传递参数。 - - 自定义组件作为子组件,父组件引用时直接传递参数,子组件中定义参数即可。 - - ``` - //在homeTabContent.ets中引用自定义组件时直接传参数 - ForEach(this.recommends, item => { - ListItem() { - HomeListItem({ titleIndex: this.recommends.indexOf(item) }) - } - }, item => this.recommends.indexOf(item).toString()) - ``` - - ``` - //在homeListItem.ets中定义的子组件中定义参数 - @Component - export struct HomeListItem{ - private titleIndex: number = 0 - ...... - } - ``` - - - 父组件和子组件之间双向传递。 - - 父组件和子组件之间的双向传递使用状态数据管理,状态数据管理作为声明式UI的特色,通过功能不同的装饰器给开发者提供了清晰的页面更新渲染的流程和管道。状态管理包括UI组件状态和应用程序状态,两者协作可以使开发者完整地架构整个应用的数据更新和UI渲染。本篇Codelab中首页中的bottomTabIndex代表当前Tabs在第几页。双向传递父组件使用@State修饰的变量,子组件使用@Link修饰,且父组件需要使用$引用。 - - ``` - @Entry - @Component - struct HomeComponent { - @State bottomTabIndex: number = 0 // 父组件需要时@State修饰 - build() { - Stack({ alignContent: Alignment.BottomStart }) { - ...... - BottomTabs({ controller: this.controller, bottomTabIndex: $bottomTabIndex }) // 使用$引用传递数据 - }.width('100%').height('100%') - } - } - ``` - - ``` - @Component - export struct BottomTabs { - private tabSrc: number[] = [0, 1, 2, 3] - private backgroundColor: string = '#F1F3F5' - private controller: TabsController = new TabsController() - @Link bottomTabIndex: number // 子组件中使用@Link修饰 - ...... - } - ``` - - - -# 动画 - -- 添加共享元素转场动画。 - - 共享元素转场支持页面内的转场,如Row组件中的元素转场至List组件中;也支持页面间的转场,如当前页面的图片转场至下一页面中,只需要调用动画接口sharedTransition实现,使用非常简单。此处使用共享元素转场动画完成点击小图进入大图浏览界面和大图浏览界面返回的动画。两个页面的组件配置为同一个id,则转场过程中会进行共享元素转场,配置为空字符串时不会有共享元素转场效果。使用sharedTransition属性方法添加共享元素转场动画。 - - ``` - // 在首页的HomeListItem.ets中的图片ListItem中添加共享元素转场动画 - List({ initialIndex: 0 }) { - ForEach(this.listItems, item => { - ListItem() { - Image(item.smallImg) - .width(this.imageWidth) - .aspectRatio(this.ratio) - .borderRadius(10) - .margin({ right: 15 }) - .sharedTransition(this.titleIndex + item.id, { duration: 500, curve: Curve.Linear }) - } - }) - } - .listDirection(Axis.Horizontal) - .margin({ top: '2%', bottom: '2%' }) - ``` - - ``` - // 在image.ets加共享元素转场动画 - Swiper(){ - ForEach(this.imageSrc, item => { - Image(item.bigImg) - .height('100%') - .width('100%') - },item => item.toString()) - } - .width('100%') - .aspectRatio(this.ratio) - .scale({ x: this.scale, y: this.scale }) - .index(this.imageIndex) - .indicator(false) - .loop(false) - .sharedTransition(this.shareId, { duration: 500, curve: Curve.Linear }) - ``` - -# 恭喜您 - -目前你已经成功完成了Codelab并且学到了: - -- 如何通过极简声明式UI范式使用常用组件,包括Text、Image、 List、listItem、Tabs等。 -- 如何通过极简声明式UI范式完成自定义弹窗。 -- 如何通过极简声明式UI范式完成页面跳转及数据传递。 -- 如何通过极简声明式UI范式完成动画添加。 diff --git a/ETSUI/SimpleGalleryEts/build-profile.json5 b/ETSUI/SimpleGalleryEts/build-profile.json5 deleted file mode 100644 index 98ef1ec31e090cb9d22f519ae787caa29b2b4fcc..0000000000000000000000000000000000000000 --- a/ETSUI/SimpleGalleryEts/build-profile.json5 +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. - */ -{ - "app": { - "signingConfigs": [], - "compileSdkVersion": 8, - "compatibleSdkVersion": 8, - "products": [ - { - "name": "default", - "signingConfig": "default" - }, - ], - }, - "modules": [ - { - "name": "entry", - "srcPath": "./entry", - "targets": [ - { - "name": "default", - "applyToProducts": [ - "default", - ], - }, - ], - }, - ], -} \ No newline at end of file diff --git a/ETSUI/SimpleGalleryEts/entry/build-profile.json5 b/ETSUI/SimpleGalleryEts/entry/build-profile.json5 deleted file mode 100644 index 62a5100a430b12691a4b79f8c05362c9d5d5f4a1..0000000000000000000000000000000000000000 --- a/ETSUI/SimpleGalleryEts/entry/build-profile.json5 +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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. - */ -{ - "apiType": 'faMode', - "buildOption": { - }, - "targets": [ - { - "name": "default", - }, - { - "name": "ohosTest", - } - ] -} \ No newline at end of file diff --git a/ETSUI/SimpleGalleryEts/entry/hvigorfile.js b/ETSUI/SimpleGalleryEts/entry/hvigorfile.js deleted file mode 100644 index 10bf2171a235d29f7a9c074f18552981b8f7882f..0000000000000000000000000000000000000000 --- a/ETSUI/SimpleGalleryEts/entry/hvigorfile.js +++ /dev/null @@ -1,16 +0,0 @@ -/* - * 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. - */ -// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently. -module.exports = require('@ohos/hvigor-ohos-plugin').legacyHapTasks diff --git a/ETSUI/SimpleGalleryEts/entry/package.json b/ETSUI/SimpleGalleryEts/entry/package.json deleted file mode 100644 index f8964f7a229e8f1de91bcd74a9eac702cca31283..0000000000000000000000000000000000000000 --- a/ETSUI/SimpleGalleryEts/entry/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "entry", - "version": "1.0.0", - "ohos": { - "org": "huawei", - "buildTool": "hvigor", - "directoryLevel": "module" - }, - "dependencies": {} -} diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/config.json b/ETSUI/SimpleGalleryEts/entry/src/main/config.json deleted file mode 100644 index da880f071d5e997a413bc38b2f2468ea059cdb0a..0000000000000000000000000000000000000000 --- a/ETSUI/SimpleGalleryEts/entry/src/main/config.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "app": { - "bundleName": "com.example.simplegalleryetsopenh", - "vendor": "example", - "version": { - "code": 1000000, - "name": "1.0.0" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.example.simplegalleryetsopenh", - "name": ".MyApplication", - "mainAbility": ".MainAbility", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry", - "installationFree": false - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "orientation": "unspecified", - "visible": true, - "srcPath": "MainAbility", - "name": ".MainAbility", - "srcLanguage": "ets", - "icon": "$media:icon", - "description": "$string:mainability_description", - "formsEnabled": false, - "label": "$string:entry_MainAbility", - "type": "page", - "launchType": "standard" - } - ], - "js": [ - { - "mode": { - "syntax": "ets", - "type": "pageAbility" - }, - "pages": [ - "pages/home", - "pages/image" - ], - "name": ".MainAbility", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/ets/MainAbility/app.ets b/ETSUI/SimpleGalleryEts/entry/src/main/ets/MainAbility/app.ets deleted file mode 100644 index b7a0995c8e441cac86e21e06e7c9071664482b1c..0000000000000000000000000000000000000000 --- a/ETSUI/SimpleGalleryEts/entry/src/main/ets/MainAbility/app.ets +++ /dev/null @@ -1,8 +0,0 @@ -export default { - onCreate() { - console.info('Application onCreate') - }, - onDestroy() { - console.info('Application onDestroy') - }, -} \ No newline at end of file diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/ets/MainAbility/common/bottomTabs.ets b/ETSUI/SimpleGalleryEts/entry/src/main/ets/MainAbility/common/bottomTabs.ets deleted file mode 100644 index 704d3003e158a9192e64ec28f833e6de045825ab..0000000000000000000000000000000000000000 --- a/ETSUI/SimpleGalleryEts/entry/src/main/ets/MainAbility/common/bottomTabs.ets +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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 prompt from '@system.prompt' - -function getTabSrc(tabIndex: number, index: number) { - let imgSrc = $r('app.media.tab_gray') - if (tabIndex === index) { - imgSrc = $r('app.media.tab_blue') - } - return imgSrc -} - -function getTabTextColor(tabIndex: number, index: number) { - let color = '#000000' - if (tabIndex === index) { - color = '#0A59F7' - } - return color -} - -@Component -export struct BottomTabs { - private tabSrc: number[] = [0, 1, 2, 3] - private backgroundColor: string = '#F1F3F5' - private controller: TabsController = new TabsController() - private tips: string = '这是测试功能,暂时未实现' - @Link bottomTabIndex: number - - build() { - Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceEvenly }) { - ForEach(this.tabSrc, item => { - Column() { - Image(getTabSrc(this.bottomTabIndex, item)) - .objectFit(ImageFit.Contain) - .width('60%').height('60%') - Text($r('app.string.tab_strings')) - .fontSize(14) - .fontColor(getTabTextColor(this.bottomTabIndex, item)) - } - .onClick(() => { - if (item === this.bottomTabIndex) { - this.controller.changeIndex(this.bottomTabIndex) - } else { - prompt.showToast({ - message: this.tips - }) - } - }) - }, item => item.toString()) - } - .width('100%').height('8%') - .backgroundColor(this.backgroundColor) - } -} \ No newline at end of file diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/ets/MainAbility/common/homeListItem.ets b/ETSUI/SimpleGalleryEts/entry/src/main/ets/MainAbility/common/homeListItem.ets deleted file mode 100644 index 167eba58f3fe127a6b0bed098687978def37c5fd..0000000000000000000000000000000000000000 --- a/ETSUI/SimpleGalleryEts/entry/src/main/ets/MainAbility/common/homeListItem.ets +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 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 router from '@system.router' -import { ImageData, initializeImageData, initializeTodayData } from '../model/homeListDataModel' - -@Component -export struct HomeListItem { - private recommends: Resource[] = [$r('app.string.today_recommend'), $r('app.string.featured_recommend'), - $r('app.string.september_recommend'), $r('app.string.august_recommend')] - private listItems: ImageData[] = initializeImageData() - private isToday: boolean = true - private titleIndex: number = 0 - private imageWidth: string = '120' - private ratio: number = 1 - - aboutToAppear() { - if (this.titleIndex === 0) { - this.listItems = initializeTodayData() - this.isToday = true - this.imageWidth = '92' - this.ratio = 1 - } else { - this.listItems = initializeImageData() - this.isToday = false - this.imageWidth = '145' - this.ratio = 0.65 - } - } - - build() { - Column() { - Row() { - Text(this.recommends[this.titleIndex]) - .textAlign(TextAlign.Start) - .fontSize(16) - .fontWeight(FontWeight.Bold) - .layoutWeight(1) - .borderColor(Color.Blue) - Text($r('app.string.more')) - .fontSize(16) - .fontColor(Color.Gray) - Image($r('app.media.more')) - .width('10').height('5%') - .alignSelf(ItemAlign.End) - .objectFit(ImageFit.Contain) - } - .width('100%') - - List({ initialIndex: 0 }) { - ForEach(this.listItems, item => { - ListItem() { - Image(item.smallImg) - .width(this.imageWidth) - .aspectRatio(this.ratio) - .borderRadius(10) - .margin({ right: 15 }) - .sharedTransition(this.titleIndex + item.id, { duration: 500, curve: Curve.Linear }) - .onClick(() => { - let shareIdStr = this.titleIndex + item.id - console.info('Item onClick' + shareIdStr) - router.push({ - uri: 'pages/image', - params: { isToday: this.isToday, shareId: shareIdStr, index: item.id, ratio: this.ratio } - }) - }) - } - }, item => item.name) - } - .listDirection(Axis.Horizontal) - .margin({ top: '2%', bottom: '2%' }) - } - } -} \ No newline at end of file diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/ets/MainAbility/common/homeTabContent.ets b/ETSUI/SimpleGalleryEts/entry/src/main/ets/MainAbility/common/homeTabContent.ets deleted file mode 100644 index 41c9fb2df892fdc64df87ef42b8b77edb8682dfb..0000000000000000000000000000000000000000 --- a/ETSUI/SimpleGalleryEts/entry/src/main/ets/MainAbility/common/homeTabContent.ets +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 { TopTabs } from '../common/topTabs' -import { HomeListItem } from '../common/homeListItem' - -@Component -export struct HomeTabComponent { - private recommends: Resource[] = [$r('app.string.today_recommend'), $r('app.string.featured_recommend'), - $r('app.string.september_recommend'), $r('app.string.august_recommend')] - - - build() { - Column() { - TopTabs() - List() { - ForEach(this.recommends, item => { - ListItem() { - HomeListItem({ titleIndex: this.recommends.indexOf(item) }) - } - }, item => this.recommends.indexOf(item).toString()) - } - .listDirection(Axis.Vertical) - .width('100%') - .layoutWeight(1) - } - } -} \ No newline at end of file diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/ets/MainAbility/common/topTabs.ets b/ETSUI/SimpleGalleryEts/entry/src/main/ets/MainAbility/common/topTabs.ets deleted file mode 100644 index b33eabf177dcb6672acbd0c950d91115f50a6a98..0000000000000000000000000000000000000000 --- a/ETSUI/SimpleGalleryEts/entry/src/main/ets/MainAbility/common/topTabs.ets +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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 prompt from '@system.prompt' - -@Component -export struct TopTabs { - private tabs: Resource[] = [$r('app.string.featured'), $r('app.string.discover'), $r('app.string.wallpaper'), - $r('app.string.knowledge'), $r('app.string.photo')] - - private tips: string = '这是测试功能,暂时未实现' - - - build() { - Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { - Row() { - ForEach(this.tabs, item => { - if (this.tabs.indexOf(item) == 0) { - Text(item) - .fontSize(18) - .fontWeight(FontWeight.Bold) - } else { - Text(item) - .fontSize(17) - .fontWeight(FontWeight.Medium) - .margin({ left: '5%' }) - } - }, item => this.tabs.indexOf(item).toString()) - } - .layoutWeight(1) - .height('100%') - - Image($r('app.media.search')) - .width('7%').height('80%') - .constraintSize({ maxWidth: 25 }) - .objectFit(ImageFit.Contain) - .onClick(() => { - prompt.showToast({ - message: this.tips - }) - }) - } - .height('8%').width('100%') - .alignSelf(ItemAlign.Start) - } -} \ No newline at end of file diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/ets/MainAbility/model/homeListDataModel.ets b/ETSUI/SimpleGalleryEts/entry/src/main/ets/MainAbility/model/homeListDataModel.ets deleted file mode 100644 index af19e5bdea039756f43677cc9b2e25ca64d7f139..0000000000000000000000000000000000000000 --- a/ETSUI/SimpleGalleryEts/entry/src/main/ets/MainAbility/model/homeListDataModel.ets +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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. - */ - -export class ImageData { - id: string - smallImg: Resource - bigImg: Resource - name: string - - constructor(id: string, smallImg: Resource, bigImg: Resource, name: string) { - this.id = id - this.smallImg = smallImg - this.bigImg = bigImg - this.name = name - } -} - -export function initializeImageData(): Array { - let imageDataArray: Array = [ - { "id": "0", "smallImg": $r('app.media.recommend1'), "bigImg": $r('app.media.recommend1'), "name": '推荐1' }, - { "id": "1", "smallImg": $r('app.media.recommend2'), "bigImg": $r('app.media.recommend2'), "name": '推荐2' }, - { "id": "2", "smallImg": $r('app.media.recommend3'), "bigImg": $r('app.media.recommend3'), "name": '推荐3' }, - { "id": "3", "smallImg": $r('app.media.recommend4'), "bigImg": $r('app.media.recommend4'), "name": '推荐4' }, - { "id": "4", "smallImg": $r('app.media.recommend5'), "bigImg": $r('app.media.recommend5'), "name": '推荐5' }, - { "id": "5", "smallImg": $r('app.media.recommend6'), "bigImg": $r('app.media.recommend6'), "name": '推荐6' }, - { "id": "6", "smallImg": $r('app.media.recommend7'), "bigImg": $r('app.media.recommend7'), "name": '推荐7' }, - ] - return imageDataArray -} - -export function initializeTodayData(): Array { - let todyDataArray: Array = [ - { "id": "0", "smallImg": $r('app.media.today1'), "bigImg": $r('app.media.today1'), "name": '今日推荐1' }, - { "id": "1", "smallImg": $r('app.media.today2'), "bigImg": $r('app.media.today2'), "name": '今日推荐2' }, - { "id": "2", "smallImg": $r('app.media.today3'), "bigImg": $r('app.media.today3'), "name": '今日推荐3' }, - { "id": "3", "smallImg": $r('app.media.today4'), "bigImg": $r('app.media.today4'), "name": '今日推荐4' }, - { "id": "4", "smallImg": $r('app.media.today5'), "bigImg": $r('app.media.today5'), "name": '今日推荐5' }, - { "id": "5", "smallImg": $r('app.media.today6'), "bigImg": $r('app.media.today6'), "name": '今日推荐6' }, - { "id": "6", "smallImg": $r('app.media.today7'), "bigImg": $r('app.media.today7'), "name": '今日推荐7' }, - { "id": "7", "smallImg": $r('app.media.today8'), "bigImg": $r('app.media.today8'), "name": '今日推荐8' }, - { "id": "8", "smallImg": $r('app.media.today9'), "bigImg": $r('app.media.today9'), "name": '今日推荐9' }, - { "id": "9", "smallImg": $r('app.media.today10'), "bigImg": $r('app.media.today10'), "name": '今日推荐10' }, - { "id": "10", "smallImg": $r('app.media.today11'), "bigImg": $r('app.media.today11'), "name": '今日推荐11' } - ] - return todyDataArray -} \ No newline at end of file diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/ets/MainAbility/pages/home.ets b/ETSUI/SimpleGalleryEts/entry/src/main/ets/MainAbility/pages/home.ets deleted file mode 100644 index 96cdcdec7327daee5a3e3b60f79ecca7aa38a1c5..0000000000000000000000000000000000000000 --- a/ETSUI/SimpleGalleryEts/entry/src/main/ets/MainAbility/pages/home.ets +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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 {HomeTabComponent} from '../common/homeTabContent' -import {BottomTabs} from '../common/bottomTabs' - -@Entry -@Component -struct HomeComponent { - private controller: TabsController = new TabsController() - private backgroundColor: string = '#F1F3F5' - @State bottomTabIndex: number = 0 - - build() { - Stack({ alignContent: Alignment.BottomStart }) { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.End, justifyContent: FlexAlign.End }) { - Tabs({ barPosition: BarPosition.End, index: 0, controller: this.controller }) { - TabContent() { - HomeTabComponent() - }.padding({ left: 15, right: 15 }) - - TabContent() { - } - - TabContent() { - } - - TabContent() { - } - } - .onChange((index: number) => { - this.bottomTabIndex = index - }) - .vertical(false) - .barHeight(0) - .width('100%') - .scrollable(false) - - BottomTabs({ controller: this.controller, bottomTabIndex: $bottomTabIndex }) - } - .width('100%') - .layoutWeight(1) - .backgroundColor(this.backgroundColor) - } - .width('100%').height('100%') - } -} diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/ets/MainAbility/pages/image.ets b/ETSUI/SimpleGalleryEts/entry/src/main/ets/MainAbility/pages/image.ets deleted file mode 100644 index 5ecff4249bb2b4a111938e3fc7bf5b3c66d69bbf..0000000000000000000000000000000000000000 --- a/ETSUI/SimpleGalleryEts/entry/src/main/ets/MainAbility/pages/image.ets +++ /dev/null @@ -1,146 +0,0 @@ -// @ts-nocheck -/* - * 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 router from '@system.router' -import {ImageData, initializeImageData, initializeTodayData} from '../model/homeListDataModel' - -@Entry -@Component -struct ImageComponent { - private imageSrc: ImageData[] = initializeImageData() - private imageIndex: number = router.getParams().index - private shareId: string = router.getParams().shareId - private isToday: boolean = router.getParams().isToday - @State ratio: number = router.getParams().ratio - @State title: string = '' - @State imageMargin: number = 56 - @State visibility: Visibility = Visibility.Visible - @State scale: number = 1 - - aboutToAppear() { - if (this.isToday) { - this.imageSrc = initializeTodayData() - } else { - this.imageSrc = initializeImageData() - } - if(this.imageIndex < this.imageSrc.length) { - this.title = this.imageSrc[this.imageIndex].name - } - - setTimeout(()=>{ - this.ratio = 0 - },500) - } - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.End, justifyContent: FlexAlign.End }) { - Row() { - Image($r('app.media.arrow')) - .width('8%').height('50%') - .objectFit(ImageFit.Contain) - .margin({ left: 10 }) - .onClick(() => { - router.back() - }) - Text(this.title) - .fontSize(20) - .fontColor(Color.Black) - .margin({ left: 10 }) - } - .width('100%').height(this.imageMargin) - .backgroundColor('#F1F3F5') - .visibility(this.visibility) - - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - Swiper() { - ForEach(this.imageSrc, item => { - Image(item.bigImg) - .height('100%').width('100%') - .objectFit(ImageFit.Contain) - .onClick(() => { - console.info('Image Click') - this.scale = 1 - if (this.visibility == Visibility.Hidden) { - this.imageMargin = 56 - this.visibility = Visibility.Visible - } else { - this.imageMargin = 0 - this.visibility = Visibility.Hidden - } - }) - .gesture( - GestureGroup(GestureMode.Parallel, - PinchGesture() - .onActionStart(() => { - console.log('pinch start') - }) - .onActionUpdate((event: GestureEvent) => { - if (this.visibility == Visibility.Hidden && event.scale <= 2.0) { - this.scale = event.scale - } - }) - .onActionEnd(() => { - if (this.scale < 1.0) { - animateTo({ duration: 500, curve: Curve.Ease }, () => { - this.scale = 1.0 - }) - } - }) - , TapGesture({ count: 2, fingers: 1 }) - .onAction(() => { - if (this.visibility == Visibility.Hidden) { - animateTo({ duration: 500, curve: Curve.Ease }, () => { - this.scale = this.scale < 2.0 ? 2.0 : 1.0 - }) - } - }) - ) - ) - }, item => item.name) - } - .width('100%').height('100%') - .aspectRatio(this.ratio) - .scale({ x: this.scale, y: this.scale }) - .index(this.imageIndex) - .indicator(false) - .loop(false) - .sharedTransition(this.shareId, { duration: 500, curve: Curve.Linear }) - .onChange((index: number) => { - this.scale = 1.0 - this.imageIndex = index - if(this.imageIndex < this.imageSrc.length) { - this.title = this.imageSrc[this.imageIndex].name - } - }) - }.width('100%').height('100%') - - Column() { - Image($r('app.media.delete')) - .objectFit(ImageFit.Contain) - .width(25).height(25) - .margin({ top: 5 }) - Text($r('app.string.delete')) - .fontSize(14) - .fontColor(Color.Black) - .textAlign(TextAlign.Start) - } - .width('100%').height(this.imageMargin) - .backgroundColor('#F1F3F5') - .visibility(this.visibility) - } - .width('100%').height('100%') - } -} \ No newline at end of file diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/element/string.json b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 80d28f0c16810e0bce680a69448d8fe5d64801c0..0000000000000000000000000000000000000000 --- a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "string": [ - { - "name": "entry_MainAbility", - "value": "SimpleGallery" - }, - { - "name": "mainability_description", - "value": "Simple_Gallery_Ability" - }, - { - "name": "tips", - "value": "This is a test function and has not been implemented." - }, - { - "name": "tab_strings", - "value": "Tab" - }, - { - "name": "featured", - "value": "featured" - }, - { - "name": "discover", - "value": "discover" - }, - { - "name": "wallpaper", - "value": "wallpaper" - }, - { - "name": "knowledge", - "value": "knowledge" - }, - { - "name": "photo", - "value": "photo" - }, - { - "name": "more", - "value": "more" - }, - { - "name": "delete", - "value": "delete" - }, - { - "name": "today_recommend", - "value": "Today Recommends" - }, - { - "name": "featured_recommend", - "value": "Featured Recommends" - }, - { - "name": "september_recommend", - "value": "September Recommends" - }, - { - "name": "august_recommend", - "value": "August Recommends" - }, - { - "name": "notification_settings", - "value": "Notification Settings" - }, - { - "name": "harmony_notification", - "value": "HarmonyOS Notification" - }, - { - "name": "background_reminderAgent", - "value": "HarmonyOS Background ReminderAgent" - }, - { - "name": "reminder_tips", - "value": "After the setting, the system clears the app, restarts the device, and shuts down the device. The notification is triggered normally." - }, - { - "name": "subscribe_succeed", - "value": "Subscribe succeed." - }, - { - "name": "add_reminder", - "value": "Do you want to add to the HarmonyOS background reminder?" - }, - { - "name": "yes", - "value": "Yes" - }, - { - "name": "no", - "value": "No" - } - ] -} \ No newline at end of file diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/arrow.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/arrow.png deleted file mode 100644 index 24513e54f3119d8e91d922108086afe8a5f766d3..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/arrow.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/close.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/close.png deleted file mode 100644 index 4c7a6b6a3ade46a7754330a726fa3bd04c29f8e4..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/close.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/close_white.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/close_white.png deleted file mode 100644 index ec0c15ff0305c38df600447e7c2ba3d5da988b83..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/close_white.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/delete.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/delete.png deleted file mode 100644 index 8ad06f881d9e4aec1de46037679378252909548f..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/delete.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/icon.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/jxdt1.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/jxdt1.png deleted file mode 100644 index 408057b38163cdc5d9dc360014717e2dcc744cff..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/jxdt1.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/jxdt2.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/jxdt2.png deleted file mode 100644 index e136d552c3ea57088ea911d122a876819741234f..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/jxdt2.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/jxdt3.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/jxdt3.png deleted file mode 100644 index 34690f9986b41c3f1b479d8472ffd512fcb6a927..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/jxdt3.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/jxdt4.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/jxdt4.png deleted file mode 100644 index edfa1afc4b5fd4a7e96e057f3b6a1b7c1f936966..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/jxdt4.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/more.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/more.png deleted file mode 100644 index 4e361e699556a5b5ccae46dff999498baee96538..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/more.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/recommend1.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/recommend1.png deleted file mode 100644 index ebb003623e4ab60b180f54b12ced7520f62bc723..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/recommend1.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/recommend2.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/recommend2.png deleted file mode 100644 index 97f16b5fe63bd560c53988a0f6a07b8c6708e010..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/recommend2.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/recommend3.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/recommend3.png deleted file mode 100644 index cd31df038600918012be012f520f4a0b2af47022..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/recommend3.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/recommend4.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/recommend4.png deleted file mode 100644 index 00cc73f4cc0331b59682045f4137d8f168aec8f5..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/recommend4.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/recommend5.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/recommend5.png deleted file mode 100644 index a0fcc49852e8d6e6e9daad638884a41d94e0f3dc..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/recommend5.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/recommend6.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/recommend6.png deleted file mode 100644 index 0ca15c77deb161b1881eef9a0806ffdc45e8b7d2..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/recommend6.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/recommend7.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/recommend7.png deleted file mode 100644 index c880ab0c9c4e009512fc521730159e5bef27d840..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/recommend7.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/search.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/search.png deleted file mode 100644 index 68db577dc6b6e66a7e1784946175b2b5ce5499bd..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/search.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/setting.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/setting.png deleted file mode 100644 index 5dd1d3d9d176380abdbd23afd0fe1e1dc2fe425c..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/setting.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/tab_blue.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/tab_blue.png deleted file mode 100644 index c0882ba31589e41a902a0ed31075f8c55527129c..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/tab_blue.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/tab_gray.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/tab_gray.png deleted file mode 100644 index 32b626cf1e7da20c1cf8a45fc60727132ce0df2f..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/tab_gray.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today1.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today1.png deleted file mode 100644 index 0ac6a72df85e065a8370ad408190109efa7865eb..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today1.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today10.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today10.png deleted file mode 100644 index 0c63fee7fcbdce1f06eed0a11d49e83b68384a7d..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today10.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today11.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today11.png deleted file mode 100644 index 75839f1e6626cd3623b204aa01029a6677be5589..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today11.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today2.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today2.png deleted file mode 100644 index f4657834613751d940341607854a3fb9dc7c19b2..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today2.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today3.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today3.png deleted file mode 100644 index 50c2c40f5db6d726ac9a739ce4cc5894f7f3b7a4..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today3.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today4.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today4.png deleted file mode 100644 index 363167853b7e47c81a929c2eff02dfe310488bfd..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today4.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today5.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today5.png deleted file mode 100644 index 3b214b21626640fa4cf61fd3ec5796153d0e2e4d..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today5.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today6.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today6.png deleted file mode 100644 index 48d48a42818b15ac3b8233ddb96c6146a8ed765d..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today6.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today7.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today7.png deleted file mode 100644 index 759cbae649902badb8c8764769aa754ae407fd01..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today7.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today8.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today8.png deleted file mode 100644 index f082b0bfb20e6f7ca780609c5d6419b177bfe77c..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today8.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today9.png b/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today9.png deleted file mode 100644 index f8d68d02c5fa6aa7c1f0c44a74d3791dd332bce4..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/entry/src/main/resources/base/media/today9.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/en/element/string.json b/ETSUI/SimpleGalleryEts/entry/src/main/resources/en/element/string.json deleted file mode 100644 index 5857634212ce578c929519e20004371910423915..0000000000000000000000000000000000000000 --- a/ETSUI/SimpleGalleryEts/entry/src/main/resources/en/element/string.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "string": [ - { - "name": "entry_MainAbility", - "value": "SimpleGallery" - }, - { - "name": "mainability_description", - "value": "ETS_Empty Feature Ability" - }, - { - "name": "tips", - "value": "This is a test function and has not been implemented." - }, - { - "name": "tab_strings", - "value": "Tab" - }, - { - "name": "featured", - "value": "featured" - }, - { - "name": "discover", - "value": "discover" - }, - { - "name": "wallpaper", - "value": "wallpaper" - }, - { - "name": "knowledge", - "value": "knowledge" - }, - { - "name": "photo", - "value": "photo" - }, - { - "name": "more", - "value": "more" - }, - { - "name": "delete", - "value": "delete" - }, - { - "name": "today_recommend", - "value": "Today Recommends" - }, - { - "name": "featured_recommend", - "value": "Featured Recommends" - }, - { - "name": "september_recommend", - "value": "September Recommends" - }, - { - "name": "august_recommend", - "value": "August Recommends" - }, - { - "name": "notification_settings", - "value": "Notification Settings" - }, - { - "name": "harmony_notification", - "value": "HarmonyOS Notification" - }, - { - "name": "background_reminderAgent", - "value": "HarmonyOS Background ReminderAgent" - }, - { - "name": "reminder_tips", - "value": "After the setting, the system clears the app, restarts the device, and shuts down the device. The notification is triggered normally." - }, - { - "name": "subscribe_succeed", - "value": "Subscribe succeed." - }, - { - "name": "add_reminder", - "value": "Do you want to add to the HarmonyOS background reminder?" - }, - { - "name": "yes", - "value": "Yes" - }, - { - "name": "no", - "value": "No" - } - ] -} \ No newline at end of file diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/rawfile/string.json b/ETSUI/SimpleGalleryEts/entry/src/main/resources/rawfile/string.json deleted file mode 100644 index 0951821113958ff9f2fe8ea115edf3eb808035e7..0000000000000000000000000000000000000000 --- a/ETSUI/SimpleGalleryEts/entry/src/main/resources/rawfile/string.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "strings": { - "test_tips": "这是测试功能,暂时还未实现." - } -} \ No newline at end of file diff --git a/ETSUI/SimpleGalleryEts/entry/src/main/resources/zh/element/string.json b/ETSUI/SimpleGalleryEts/entry/src/main/resources/zh/element/string.json deleted file mode 100644 index 042ddea66a52b629892b63e5e2b7bfd00948dd05..0000000000000000000000000000000000000000 --- a/ETSUI/SimpleGalleryEts/entry/src/main/resources/zh/element/string.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "string": [ - { - "name": "entry_MainAbility", - "value": "简单图库" - }, - { - "name": "mainability_description", - "value": "简单图库能力" - }, - { - "name": "tab_strings", - "value": "页签" - }, - { - "name": "tips", - "value": "这是测试功能,暂时还未实现." - }, - { - "name": "featured", - "value": "精选" - }, - { - "name": "discover", - "value": "发现" - }, - { - "name": "wallpaper", - "value": "壁纸" - }, - { - "name": "knowledge", - "value": "知识" - }, - { - "name": "photo", - "value": "摄影" - }, - { - "name": "more", - "value": "更多" - }, - { - "name": "delete", - "value": "删除" - }, - { - "name": "today_recommend", - "value": "今日推荐" - }, - { - "name": "featured_recommend", - "value": "精选推荐" - }, - { - "name": "september_recommend", - "value": "9月推荐" - }, - { - "name": "august_recommend", - "value": "8月推荐" - }, - { - "name": "notification_settings", - "value": "通知设置" - }, - { - "name": "harmony_notification", - "value": "鸿蒙系统提醒" - }, - { - "name": "background_reminderAgent", - "value": "HarmonyOS后台代理提醒" - }, - { - "name": "reminder_tips", - "value": "设置后,清除应用、重启设备、设备关机,提醒正常触发" - }, - { - "name": "subscribe_succeed", - "value": "预定成功。" - }, - { - "name": "add_reminder", - "value": "是否添加到HarmonyOS后台代理提醒?" - }, - { - "name": "yes", - "value": "是" - }, - { - "name": "no", - "value": "否" - } - ] -} \ No newline at end of file diff --git a/ETSUI/SimpleGalleryEts/figures/036C0734-B95E-4D50-98E1-BEEC33160D0E.png b/ETSUI/SimpleGalleryEts/figures/036C0734-B95E-4D50-98E1-BEEC33160D0E.png deleted file mode 100644 index 092e5bd3c895389454ca2d8203ccf5a5a4d832e4..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/figures/036C0734-B95E-4D50-98E1-BEEC33160D0E.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/figures/IMG_20211222_162835.jpg b/ETSUI/SimpleGalleryEts/figures/IMG_20211222_162835.jpg deleted file mode 100644 index b6b98a85a7dffbdf59c438fbb91b3cc92ec2d7c4..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/figures/IMG_20211222_162835.jpg and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/figures/VID_20211222_162936-00_00_00-00_00_30-1.gif b/ETSUI/SimpleGalleryEts/figures/VID_20211222_162936-00_00_00-00_00_30-1.gif deleted file mode 100644 index d771e7630f4617e2c8581d796d3f0622d904d1f8..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/figures/VID_20211222_162936-00_00_00-00_00_30-1.gif and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/figures/zh-cn_image_0000001192938616.png b/ETSUI/SimpleGalleryEts/figures/zh-cn_image_0000001192938616.png deleted file mode 100644 index dc1666d07a37e19d231e3ecffabd51ab1784653d..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/figures/zh-cn_image_0000001192938616.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/figures/zh-cn_image_0000001237578411.png b/ETSUI/SimpleGalleryEts/figures/zh-cn_image_0000001237578411.png deleted file mode 100644 index 312229e1f156e70f852b21cfd3dd9c686181ea72..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/figures/zh-cn_image_0000001237578411.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/figures/zh-cn_image_0000001237738855.png b/ETSUI/SimpleGalleryEts/figures/zh-cn_image_0000001237738855.png deleted file mode 100644 index f07a7a04741b2c7478602aa2614946ba8a290fcc..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/figures/zh-cn_image_0000001237738855.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/figures/zh-cn_image_0000001237778483.png b/ETSUI/SimpleGalleryEts/figures/zh-cn_image_0000001237778483.png deleted file mode 100644 index dc1666d07a37e19d231e3ecffabd51ab1784653d..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/figures/zh-cn_image_0000001237778483.png and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/figures/zh-cn_image_0000001237898779.png b/ETSUI/SimpleGalleryEts/figures/zh-cn_image_0000001237898779.png deleted file mode 100644 index e26c0032eaddb055a214782ad5e070c8befea9bf..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/figures/zh-cn_image_0000001237898779.png and /dev/null differ diff --git "a/ETSUI/SimpleGalleryEts/figures/\345\217\226\347\211\210\346\234\254.png" "b/ETSUI/SimpleGalleryEts/figures/\345\217\226\347\211\210\346\234\254.png" deleted file mode 100644 index 9a4203fdba7d630c4d6cf0b60685f27afd85d28a..0000000000000000000000000000000000000000 Binary files "a/ETSUI/SimpleGalleryEts/figures/\345\217\226\347\211\210\346\234\254.png" and /dev/null differ diff --git "a/ETSUI/SimpleGalleryEts/figures/\346\210\252\345\233\276.png" "b/ETSUI/SimpleGalleryEts/figures/\346\210\252\345\233\276.png" deleted file mode 100644 index 3ce177f4d3e03464a38d31472b80e82775c68874..0000000000000000000000000000000000000000 Binary files "a/ETSUI/SimpleGalleryEts/figures/\346\210\252\345\233\276.png" and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/hvigorfile.js b/ETSUI/SimpleGalleryEts/hvigorfile.js deleted file mode 100644 index ae70b6f5380f9933e1bceaea54787ce080715807..0000000000000000000000000000000000000000 --- a/ETSUI/SimpleGalleryEts/hvigorfile.js +++ /dev/null @@ -1,16 +0,0 @@ -/* - * 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. - */ -// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently. -module.exports = require('@ohos/hvigor-ohos-plugin').legacyAppTasks \ No newline at end of file diff --git a/ETSUI/SimpleGalleryEts/package.json b/ETSUI/SimpleGalleryEts/package.json deleted file mode 100644 index 7fc345454cba5ac09c5c5b465ddb41a1b19c3998..0000000000000000000000000000000000000000 --- a/ETSUI/SimpleGalleryEts/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "example", - "version": "1.0.0", - "ohos": { - "org": "huawei", - "buildTool": "hvigor", - "directoryLevel": "project" - }, - "dependencies": { - "@ohos/hvigor": "1.0.6", - "@ohos/hvigor-ohos-plugin": "1.0.6" - } -} diff --git a/ETSUI/SimpleGalleryEts/public_sys-resources/icon-caution.gif b/ETSUI/SimpleGalleryEts/public_sys-resources/icon-caution.gif deleted file mode 100644 index 6e90d7cfc2193e39e10bb58c38d01a23f045d571..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/public_sys-resources/icon-caution.gif and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/public_sys-resources/icon-danger.gif b/ETSUI/SimpleGalleryEts/public_sys-resources/icon-danger.gif deleted file mode 100644 index 6e90d7cfc2193e39e10bb58c38d01a23f045d571..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/public_sys-resources/icon-danger.gif and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/public_sys-resources/icon-note.gif b/ETSUI/SimpleGalleryEts/public_sys-resources/icon-note.gif deleted file mode 100644 index 6314297e45c1de184204098efd4814d6dc8b1cda..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/public_sys-resources/icon-note.gif and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/public_sys-resources/icon-notice.gif b/ETSUI/SimpleGalleryEts/public_sys-resources/icon-notice.gif deleted file mode 100644 index 86024f61b691400bea99e5b1f506d9d9aef36e27..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/public_sys-resources/icon-notice.gif and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/public_sys-resources/icon-tip.gif b/ETSUI/SimpleGalleryEts/public_sys-resources/icon-tip.gif deleted file mode 100644 index 93aa72053b510e456b149f36a0972703ea9999b7..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/public_sys-resources/icon-tip.gif and /dev/null differ diff --git a/ETSUI/SimpleGalleryEts/public_sys-resources/icon-warning.gif b/ETSUI/SimpleGalleryEts/public_sys-resources/icon-warning.gif deleted file mode 100644 index 6e90d7cfc2193e39e10bb58c38d01a23f045d571..0000000000000000000000000000000000000000 Binary files a/ETSUI/SimpleGalleryEts/public_sys-resources/icon-warning.gif and /dev/null differ diff --git a/README.md b/README.md index c8df77f35643cb170e4a3b44a5b8b297113631ae..7d839ee7287cdf5ade98c4241f5f1b1fac7b6c34 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# OpenHarmony Codelabs +# OpenHarmony Codelabs -## 概要简介 +## 概要简介 为帮助开发者快速熟悉OpenHarmony的能力以及相关的应用开发流程,我们提供了一系列的基于趣味场景的应用示例,即Codelabs,开发者可以根据我们的文档一步步的学习和完成简单项目的开发。 -## 目录 +## 目录 - 优秀案例 - [健康生活应用(ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/ExcellentCase/Healthy_life)(API 9+) @@ -14,7 +14,6 @@ - [UIAbility内页面间的跳转(ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/Ability/PagesRouter)(API 9+) - [为应用添加运行时权限(ArkTS)(Full SDK)](https://gitee.com/openharmony/codelabs/tree/master/Ability/AccessPermission)(API 9+) - UI(ArkTS) - - [一次开发多端部署(ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/ETSUI/Multi_device)(API 9+) - [ArkTS基础知识(ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/ETSUI/RankingDemo)(API 9+) - [动效示例(ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/ETSUI/Animation)(API 9+) - [转场动画的使用(ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/ETSUI/TransitionAnimation)(API 9+) @@ -26,10 +25,7 @@ - [Web组件抽奖案例(ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/ETSUI/WebComponent)(API 9+) - [List组件的使用之商品列表(ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/ETSUI/List)(API 9+) - [List组件的使用之设置项(ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/ETSUI/List_HDC)(API 9+) - - [像素转换(ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/ETSUI/PixelUnitsDemo)(API 9+) - - [极简声明式UI范式(ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/ETSUI/SimpleGalleryEts)(API 8+) - [购物应用(ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/ETSUI/ShoppingEts)(API 8+) - - [流式布局(ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/ETSUI/FlowLayoutEts)(API 8+) - [弹窗(ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/ETSUI/CustomDialogEts)(API 8+) - UI(JS) - [image、image-animator(JS)](https://gitee.com/openharmony/codelabs/tree/master/JSUI/ClickableJsDemo)(API 8+) @@ -78,18 +74,17 @@ - [Native Component(ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/NativeAPI/XComponent)(API 9+) - 三方库 - [库的调用(ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/ThirdPartyComponents/ThirdPartyLibrary)(API 9+) - - [VCard(ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/ThirdPartyComponents/VCardDemo)(API 9+) - 效率提升套件 - [常用组件和容器低代码开发示例(ArkTS)](https://gitee.com/openharmony/codelabs/tree/master/EfficiencyEnhancementKit/SuperVisualSample)(API 9+) - 图形图像 - [手势截屏(ArkTS)(Full SDK)](https://gitee.com/openharmony/codelabs/tree/master/GraphicImage/GestureScreenshot)(API 9+) -## 使用说明 +## 使用说明 1. 将独立的应用示例工程导入DevEco Studio进行编译构建及运行调试。 2. 部分应用示例中含有多个模块,开发者可以选择对单个模块进行编译构建,生成一个HAP应用安装包,也可以对整个工程进行编译构建,生成多个HAP应用安装包。 3. 安装运行后,即可在设备上查看应用示例运行效果,以及进行相关调试。 -## 约束与限制 +## 约束与限制 安装应用示例之前,请先查看"README_zh.md"文件来确认应用示例是否为stage模型,若为Stage模型需要查看entry/src/main路径下的module.json5文件中的"deviceType"字段来确认该应用支持的设备类型;否则为FA模型,查看entry/src/main路径下的config.json文件中的"deviceType"字段来确认该应用示例支持的设备类型,两种模型都可尝试通过修改该字段使其可以在相应类型的设备上运行。 \ No newline at end of file diff --git a/ThirdPartyComponents/VCardDemo/AppScope/app.json5 b/ThirdPartyComponents/VCardDemo/AppScope/app.json5 deleted file mode 100644 index 07cb4fadd6fd6ca1c7d3a3105fbc38d7a691fdb3..0000000000000000000000000000000000000000 --- a/ThirdPartyComponents/VCardDemo/AppScope/app.json5 +++ /dev/null @@ -1,11 +0,0 @@ -{ - "app": { - "bundleName": "com.example.vcarddemo", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true - } -} diff --git a/ThirdPartyComponents/VCardDemo/AppScope/resources/base/element/string.json b/ThirdPartyComponents/VCardDemo/AppScope/resources/base/element/string.json deleted file mode 100644 index c16219ac920eb5cb4476d832780856ca335ebc50..0000000000000000000000000000000000000000 --- a/ThirdPartyComponents/VCardDemo/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "VCardDemo" - } - ] -} diff --git a/ThirdPartyComponents/VCardDemo/AppScope/resources/base/media/app_icon.png b/ThirdPartyComponents/VCardDemo/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ThirdPartyComponents/VCardDemo/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ThirdPartyComponents/VCardDemo/LICENSE b/ThirdPartyComponents/VCardDemo/LICENSE deleted file mode 100644 index 0026ac745ded8efb160b6f955d5b73af043e86c3..0000000000000000000000000000000000000000 --- a/ThirdPartyComponents/VCardDemo/LICENSE +++ /dev/null @@ -1,78 +0,0 @@ - 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. - -Apache License, Version 2.0 -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: -1.You must give any other recipients of the Work or Derivative Works a copy of this License; and -2.You must cause any modified files to carry prominent notices stating that You changed the files; and -3.You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and -4.If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. - -You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/ThirdPartyComponents/VCardDemo/README.md b/ThirdPartyComponents/VCardDemo/README.md deleted file mode 100644 index 96a872e455e0d15afff59205dfef9302a1b50eb8..0000000000000000000000000000000000000000 --- a/ThirdPartyComponents/VCardDemo/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# 介绍 - -我们备份手机联系人时,会导出到SD卡,在SD卡中生成一个vcf文件,用于保存联系人姓名,手机号码。vCard 规范容许公开交换个人数据交换 (Personal Data Interchange PDI)信息,在传统纸质商业名片可找到这些信息。规范定义电子名片(或叫vCard)的格式。实现VCard进行联系人备份需要引用第三方库、下面介绍VCard使用。 - -# 源码 - -[三方库源码](https://gitee.com/openharmony-tpc/VCard) - -要想读懂源码,需要具备以下技能。 - -- [熟悉基于TS扩展的声明式开发](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/arkui-ts/Readme-CN.md) -- 熟悉ES6 - -# 搭建OpenHarmony环境 - -完成本篇Codelab我们首先要完成开发环境的搭建,本示例以**Hi3516DV300**开发板为例,参照以下步骤进行: - -1. [获取OpenHarmony系统版本](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/get-code/sourcecode-acquire.md#%E8%8E%B7%E5%8F%96%E6%96%B9%E5%BC%8F3%E4%BB%8E%E9%95%9C%E5%83%8F%E7%AB%99%E7%82%B9%E8%8E%B7%E5%8F%96):标准系统解决方案(二进制)。 - - 以3.0版本为例: - - ![](figures/取版本.png) - -2. 搭建烧录环境。 - - 1. [完成DevEco Device Tool的安装](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-ide-env-win.md) - 2. [完成Hi3516开发板的烧录](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-ide-3516-burn.md) -3. 搭建开发环境。 - - 1. 开始前请参考[工具准备](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/start-overview.md#%E5%B7%A5%E5%85%B7%E5%87%86%E5%A4%87),完成DevEco Studio的安装和开发环境配置。 - 2. 开发环境配置完成后,请参考[使用工程向导](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/start-with-ets-fa.md#%E5%88%9B%E5%BB%BAets%E5%B7%A5%E7%A8%8B)创建工程(模板选择“Empty Ability”),选择JS或者eTS语言开发。 - 3. 工程创建完成后,选择使用[真机进行调测](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/start-with-ets-fa.md#%E4%BD%BF%E7%94%A8%E7%9C%9F%E6%9C%BA%E8%BF%90%E8%A1%8C%E5%BA%94%E7%94%A8)。 - -# 具体用法 - -1. 导入类 - - ``` - import router from "@system.router"; - import {contact} from "@ohos/vcard"; - import {VCardBuilder} from "@ohos/vcard"; - import {VCardConfig} from "@ohos/vcard"; - ``` - -2. Vcard三方库可添加个人信息,比如姓名、手机、邮箱、备注等等。根据个人信息生成电子名片,在此介绍添加姓名,添加其他信息可参考[源码](https://gitee.com/openharmony-tpc/VCard)。 - - ``` - let myCard= new contact.Contact() - let nickName = new contact.NickName; - nickName.nickName="昵称小张" - myCard.nickName = nickName - let builder = new VCardBuilder(VCardConfig.VCARD_TYPE_V21_GENERIC,"UTF-8"); - builder.appendNickNames(myCard) - let result = builder.toString() - ``` - -3. 生成结果。 - - ``` - BEGIN:VCARD VERSION:2.1 X-ANDROID-CUSTOM;CHARSET=UTF-8; - ENCODING=QUOTED-PRINTABLE:vnd.android.cursor.item/nickname; - =e6=98=b5=e7=a7=b0=e5=b0=8f=e5=bc=a0;;;;;;;;;;;;;; END:VCAR - ``` - -# 恭喜您 - -通过本篇Codelab,您可以学到: - -OpenHarmony三方库使用。 \ No newline at end of file diff --git a/ThirdPartyComponents/VCardDemo/build-profile.json5 b/ThirdPartyComponents/VCardDemo/build-profile.json5 deleted file mode 100644 index d7b1117cdb34aab2983ac65026d9e8dcc91332d1..0000000000000000000000000000000000000000 --- a/ThirdPartyComponents/VCardDemo/build-profile.json5 +++ /dev/null @@ -1,27 +0,0 @@ -{ - "app": { - "signingConfigs": [], - "compileSdkVersion": 9, - "compatibleSdkVersion": 9, - "products": [ - { - "name": "default", - "signingConfig": "default", - } - ] - }, - "modules": [ - { - "name": "entry", - "srcPath": "./entry", - "targets": [ - { - "name": "default", - "applyToProducts": [ - "default" - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/ThirdPartyComponents/VCardDemo/entry/build-profile.json5 b/ThirdPartyComponents/VCardDemo/entry/build-profile.json5 deleted file mode 100644 index befa10141dfc5999e35f60a36a9f948e664732b1..0000000000000000000000000000000000000000 --- a/ThirdPartyComponents/VCardDemo/entry/build-profile.json5 +++ /dev/null @@ -1,10 +0,0 @@ -{ - "apiType": 'stageMode', - "buildOption": { - }, - "targets": [ - { - "name": "default" - } - ] -} \ No newline at end of file diff --git a/ThirdPartyComponents/VCardDemo/entry/hvigorfile.ts b/ThirdPartyComponents/VCardDemo/entry/hvigorfile.ts deleted file mode 100644 index 80e4ec5b81689f238c34614b167a0b9e9c83e8d9..0000000000000000000000000000000000000000 --- a/ThirdPartyComponents/VCardDemo/entry/hvigorfile.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently. -export { hapTasks } from '@ohos/hvigor-ohos-plugin'; diff --git a/ThirdPartyComponents/VCardDemo/entry/package.json b/ThirdPartyComponents/VCardDemo/entry/package.json deleted file mode 100644 index 1d609b2f5fbd3f5df826e32cd9bf71bb93f94a23..0000000000000000000000000000000000000000 --- a/ThirdPartyComponents/VCardDemo/entry/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "license": "ISC", - "devDependencies": {}, - "name": "entry", - "ohos": { - "org": "huawei", - "directoryLevel": "module", - "buildTool": "hvigor" - }, - "description": "example description", - "repository": {}, - "version": "1.0.0", - "dependencies": { - "@ohos/vcard": "^2.1.0" - } -} diff --git a/ThirdPartyComponents/VCardDemo/entry/src/main/ets/entryability/EntryAbility.ts b/ThirdPartyComponents/VCardDemo/entry/src/main/ets/entryability/EntryAbility.ts deleted file mode 100644 index a548a4a610b5dd2da5ff1fa5173e9d21ccb88d97..0000000000000000000000000000000000000000 --- a/ThirdPartyComponents/VCardDemo/entry/src/main/ets/entryability/EntryAbility.ts +++ /dev/null @@ -1,51 +0,0 @@ -import hilog from '@ohos.hilog'; -import Ability from '@ohos.application.Ability' -import Window from '@ohos.window' - -export default class EntryAbility extends Ability { - onCreate(want, launchParam) { - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); - hilog.info(0x0000, 'testTag', '%{public}s', 'want param:' + JSON.stringify(want) ?? ''); - hilog.info(0x0000, 'testTag', '%{public}s', 'launchParam:' + JSON.stringify(launchParam) ?? ''); - } - - onDestroy() { - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); - } - - onWindowStageCreate(windowStage: Window.WindowStage) { - // Main window is created, set main page for this ability - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); - - windowStage.loadContent('pages/Index', (err, data) => { - if (err.code) { - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.ERROR); - hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); - return; - } - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? ''); - }); - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); - } - - onForeground() { - // Ability has brought to foreground - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground'); - } - - onBackground() { - // Ability has back to background - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); - } -} diff --git a/ThirdPartyComponents/VCardDemo/entry/src/main/ets/pages/Index.ets b/ThirdPartyComponents/VCardDemo/entry/src/main/ets/pages/Index.ets deleted file mode 100644 index 23afce9f01aa70505c5f0a8dd0cec005ed1aed5a..0000000000000000000000000000000000000000 --- a/ThirdPartyComponents/VCardDemo/entry/src/main/ets/pages/Index.ets +++ /dev/null @@ -1,360 +0,0 @@ -/* - * 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 router from "@system.router"; -import {contact} from "@ohos/vcard"; -import {VCardBuilder} from "@ohos/vcard"; -import {VCardConfig} from "@ohos/vcard"; - -@Entry -@Component -struct FlexExample { - private scroller: Scroller = new Scroller() // 滚动 - @State name: string= "zhangsan"// router.getParams() == null ? "姓名" - @State OrganizationName: string= "chengmai" - @State phonename: string= "13537292684"// 电话号码 - @State emails : string= "qq.q@qq.com"// 电子邮件 - @State note : string= "程序员苦逼"// 备注 - @State PostalAddreSSA : string= "wuhan"// 地址 - @State website : string= "baidu"// 网站 - @State EventA: string="20000000" // 生日 - @State index: string= '手机'// 手机下拉框 - @State index1: string= '私人'// 邮箱下拉框 - @State index2: string= '住宅'// 住宅下拉框 - @State fd: number = 0 - - build() { - Column({space:5}) { - Scroll(this.scroller) { - Column({ space: 5 }) { - Stack() { - Text('编辑联系人') - .fontSize(30) - .fontWeight(FontWeight.Bold) - .align(Alignment.Center) - Stack({ alignContent: Alignment.End }) { - Button("保存",{ type: ButtonType.Normal, stateEffect: true }) - .borderRadius(12) - .backgroundColor(0x317aff) - .fontSize(30) - .margin({right:12}) - .onClick(() => - { - console.info('onClick start') - // 姓名模块 - let name = new contact.Name() - let contactall = new contact.Contact() - contactall.name = name - contactall.name.fullName = this.name // 将名字存入name类中fullname - - // 单位 - let Organization = new contact.Organization() - contactall.organization = Organization - contactall.organization.name = this.OrganizationName - - // 手机模块12 - let phoneNumber = new contact.PhoneNumber() - phoneNumber.labelName = this.index - phoneNumber.labelId = parseInt(this.index) - phoneNumber.phoneNumber = this.phonename - contactall.phoneNumbers = [phoneNumber] // 只能传一个,不能更改或者添加 - - // 邮件模块 - let Email = new contact.Email() - Email.labelName = this.index1 - Email.labelId = parseInt(this.index1) - Email.email = this.emails - contactall.emails = [Email] - - // 备注 - let note = new contact.Note() - contactall.note = note - contactall.note.noteContent = this.note - - // 住宅地址 - let PostalAddreSS = new contact.PostalAddress() - PostalAddreSS.labelId = parseInt(this.index2) - PostalAddreSS.region = this.PostalAddreSSA - contactall.postalAddresses = [PostalAddreSS] - - // 网站 - let website = new contact.Website() - contactall.websites = [website] - contactall.websites[0].website = this.website - - // 生日 - let event = new contact.Event() - event.eventDate = this.EventA - contactall.events = [event] - - let vcardBuilder = new VCardBuilder(VCardConfig.VCARD_TYPE_V21_GENERIC,"UTF-8") - vcardBuilder.appendNameProperties(contactall) - vcardBuilder.appendOrganizations(contactall) - vcardBuilder.appendPhones(contactall,null) - vcardBuilder.appendEmails(contactall) - vcardBuilder.appendNotes(contactall) - vcardBuilder.appendPostals(contactall) - vcardBuilder.appendWebsites(contactall) - vcardBuilder.appendEvents(contactall) - router.push({ - uri:"pages/There", - params: { - cvs: vcardBuilder.toString() - } - }) - }) - }.width('100%') - } - .height(50) - .width('100%') - // 姓名填写 - Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) { //1 - Image($r('app.media.ic_public_contacts')) // 图片 - .objectFit(ImageFit.Contain) - .height(30) - .width(30) - .margin({top:5}) - TextInput({ placeholder:"输入姓名", text: this.name }) - .placeholderFont({size: "14fp",weight: "100"}) - .height(45) - .width("100%") - .backgroundColor(Color.White) - .onChange((name) => { - this.name = name - }) - } - .height(60) - .width('90%') - .padding({left:10}) - .backgroundColor(Color.White) - .borderStyle(BorderStyle.Dashed) - .borderWidth(0) - .borderColor(Color.Red) - .borderRadius(15) - - // 单位 - Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) { - Image($r('app.media.ic_edit_company')) - .objectFit(ImageFit.Contain) - .height(30) - .width(30) - .margin({ top: 5 }) - - TextInput({ placeholder:"公司", text: this.OrganizationName }) - .placeholderFont({size: "14fp",weight: "100"}) - .height(45) - .width("100%") - .onChange((OrganizationName) => { - this.OrganizationName = OrganizationName - }) - } - .height(60) - .width('90%') - .padding({left:10}) - .backgroundColor(Color.White) - .borderStyle(BorderStyle.Dashed) - .borderWidth(0) - .borderColor(Color.Red) - .borderRadius(15) - - // 手机 - Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }){ - Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center}) { - Image($r('app.media.ic_public_phone')) - .objectFit(ImageFit.Contain) - .height(30) - .width(30) - .margin({ top: 5 }) - Text(this.index) - .width(80) - .height(20) - .fontSize(16) - .margin({left:5}) - } - .width('45%') - - // 下拉菜单 - TextInput({ placeholder:"电话号码", text: this.phonename }) - .placeholderFont({size: "14fp",weight: "40"}) - .width('55%') - .type(InputType.Number) - .onChange((value) => { - this.phonename = value - }) - } .height(60) - .width('90%') - .padding({left:10}) - .backgroundColor(Color.White) - .borderStyle(BorderStyle.Dashed) - .borderWidth(0) - .borderColor(Color.Red) - .borderRadius(15) - // 電子郵件 - Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }){ - Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center}){ - Image($r('app.media.ic_public_email')) - .objectFit(ImageFit.Contain) - .height(30) - .width(30) - .margin({ top: 5 }) - Text(this.index1) - .width(80) - .height(40) - .fontSize(16) - .margin({left:5}) - } - .width('45%') - // 下拉菜单 - TextInput({ placeholder:"电子邮件", text: this.emails }) - .placeholderFont({size: "14fp",weight: "40"}) - .width('55%') - .type(InputType.Email) - .onChange((value) => { - this.emails = value - }) - } .height(60) - .width('90%') - .padding({left:10}) - .backgroundColor(Color.White) - .borderStyle(BorderStyle.Dashed) - .borderWidth(0) - .borderColor(Color.Red) - .borderRadius(15) - // 备注 - Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }){ - Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center}){ - Image($r('app.media.ic_public_drawer')) - .objectFit(ImageFit.Contain) - .height(30) - .width(30) - .margin({ top: 5 }) - Text("备注") - .width(80) - .height(40) - .fontSize(16) - .margin({left:5}) - }.width('45%') - TextInput({ placeholder:"备注", text: this.note }) - .placeholderFont({size: "14fp",weight: "40"}) - .width('55%') - .onChange((value) => { - this.note = value - }) - } .height(60) - .width('90%') - .padding({left:10}) - .backgroundColor(Color.White) - .borderStyle(BorderStyle.Dashed) - .borderWidth(0) - .borderColor(Color.Red) - .borderRadius(15) - - // 住宅 - Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }){ - Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center}){ - Image($r('app.media.ic_public_phone')) - .objectFit(ImageFit.Contain) - .height(30) - .width(30) - .margin({ top: 5 }) - Text(this.index2) - .width(80) - .height(40) - .fontSize(16) - .margin({left:5}) - } - .width('45%') - // 下拉菜单 - TextInput({ placeholder:"地址", text: this.PostalAddreSSA }) - .placeholderFont({size: "14fp",weight: "40"}) - .width('55%') - .onChange((value) => { - this.PostalAddreSSA = value - }) - } .height(60) - .width('90%') - .padding({left:10}) - .backgroundColor(Color.White) - .borderStyle(BorderStyle.Dashed) - .borderWidth(0) - .borderColor(Color.Red) - .borderRadius(15) - - // 网址 - Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }){ - Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center}) { - Image($r('app.media.ic_public_worldclock')) - .objectFit(ImageFit.Contain) - .height(30) - .width(30) - .margin({ top: 5 }) - Text('网站') - .width(80) - .height(40) - .fontSize(16) - .margin({left:5}) - }.width('45%') - // 下拉菜单 - TextInput({ placeholder:"网站", text: this.website }) - .placeholderFont({size: "14fp",weight: "40"}) - .width('55%') - .onChange((value) => { - this.website = value - }) - } .height(60) - .width('90%') - .padding({left:10}) - .backgroundColor(Color.White) - .borderStyle(BorderStyle.Dashed) - .borderWidth(0) - .borderColor(Color.Red) - .borderRadius(15) - - // 生日 - Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }){ - Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center}){ - Image($r('app.media.ic_Edit_Birthday')) - .objectFit(ImageFit.Contain) - .height(30) - .width(30) - .margin({ top: 5 }) - Text('生日') - .width(80) - .height(40) - .fontSize(16) - .margin({left:5}) - } - .width('45%') - // 下拉菜单 - TextInput({ placeholder:"日期", text: this.EventA }) - .placeholderFont({size: "14fp",weight: "40"}) - .width("55%") - .type(InputType.Number) - .onChange((value) => { - this.EventA = value - }) - } .height(60) - .width('90%') - .padding({left:10}) - .backgroundColor(Color.White) - .borderStyle(BorderStyle.Dashed) - .borderWidth(0) - .borderColor(Color.Red) - .borderRadius(15) - }.width('100%').margin({ top: 5 }) - } - }.width('100%').backgroundColor('#FFf1f3f5').height('100%') - } -} \ No newline at end of file diff --git a/ThirdPartyComponents/VCardDemo/entry/src/main/ets/pages/There.ets b/ThirdPartyComponents/VCardDemo/entry/src/main/ets/pages/There.ets deleted file mode 100644 index 602bf536ce80acf7e1cc508243c2097790c89932..0000000000000000000000000000000000000000 --- a/ThirdPartyComponents/VCardDemo/entry/src/main/ets/pages/There.ets +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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. - */ - -// @ts-nocheck -import router from '@system.router'; - -@Entry -@Component -struct There { - - @State readText: string= (router.getParams()==null?"default":router.getParams().cvs) - - build() { - Column() { - Text($r('app.string.title')) - .width('100%') - .backgroundColor('#0D9FFB') - .fontColor(Color.White) - .fontSize(20) - .padding({ left: 15 }) - - Text(this.readText) - .width('100%') - .backgroundColor('#DFDFDF') - .fontSize(20) - .margin({ top: 20 ,bottom:9}) - .textAlign(TextAlign.Start) - .padding(10) - } - .width('100%').height('100%') - .padding(15) - } -} \ No newline at end of file diff --git a/ThirdPartyComponents/VCardDemo/entry/src/main/module.json5 b/ThirdPartyComponents/VCardDemo/entry/src/main/module.json5 deleted file mode 100644 index 0e288c05b41ef026b9f802f6c848bd5301ebc785..0000000000000000000000000000000000000000 --- a/ThirdPartyComponents/VCardDemo/entry/src/main/module.json5 +++ /dev/null @@ -1,37 +0,0 @@ -{ - "module": { - "name": "entry", - "type": "entry", - "description": "$string:module_desc", - "mainElement": "EntryAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "abilities": [ - { - "name": "EntryAbility", - "srcEntrance": "./ets/entryability/EntryAbility.ts", - "description": "$string:EntryAbility_desc", - "icon": "$media:icon", - "label": "$string:EntryAbility_label", - "startWindowIcon": "$media:icon", - "startWindowBackground": "$color:start_window_background", - "visible": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ] - } - ] - } -} \ No newline at end of file diff --git a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/element/color.json b/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/element/color.json deleted file mode 100644 index 3c712962da3c2751c2b9ddb53559afcbd2b54a02..0000000000000000000000000000000000000000 --- a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/element/color.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "color": [ - { - "name": "start_window_background", - "value": "#FFFFFF" - } - ] -} \ No newline at end of file diff --git a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/element/string.json b/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/element/string.json deleted file mode 100644 index cecde70b4d809382125a106b70049087fb76a350..0000000000000000000000000000000000000000 --- a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "string": [ - { - "name": "module_desc", - "value": "module description" - }, - { - "name": "EntryAbility_desc", - "value": "description" - }, - { - "name": "EntryAbility_label", - "value": "VCardDemo" - }, - { - "name": "title", - "value": "生成结果" - } - ] -} \ No newline at end of file diff --git a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/ic_Edit_Birthday.png b/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/ic_Edit_Birthday.png deleted file mode 100644 index 40b3d88ab41b1d99b6b539d6203c773d5df5167c..0000000000000000000000000000000000000000 Binary files a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/ic_Edit_Birthday.png and /dev/null differ diff --git a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/ic_edit_company.png b/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/ic_edit_company.png deleted file mode 100644 index 54af4068f2a88736e7d72984815d06857b1f1583..0000000000000000000000000000000000000000 Binary files a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/ic_edit_company.png and /dev/null differ diff --git a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/ic_public_contacts.png b/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/ic_public_contacts.png deleted file mode 100644 index 633de82c8465d9789cab2e8f528a1d33007e0c57..0000000000000000000000000000000000000000 Binary files a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/ic_public_contacts.png and /dev/null differ diff --git a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/ic_public_drawer.png b/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/ic_public_drawer.png deleted file mode 100644 index 11b6c84f7d7379c739d0c305ac55d854fc0955e1..0000000000000000000000000000000000000000 Binary files a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/ic_public_drawer.png and /dev/null differ diff --git a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/ic_public_email.png b/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/ic_public_email.png deleted file mode 100644 index b00ac24958b4d4570c3d24fb55f022db1c06f57c..0000000000000000000000000000000000000000 Binary files a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/ic_public_email.png and /dev/null differ diff --git a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/ic_public_home.png b/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/ic_public_home.png deleted file mode 100644 index 0ae6585d9f6317a3f1bdf447978397856d00af5e..0000000000000000000000000000000000000000 Binary files a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/ic_public_home.png and /dev/null differ diff --git a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/ic_public_phone.png b/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/ic_public_phone.png deleted file mode 100644 index 232c879be43532179b7acb5e768005d1a5566b10..0000000000000000000000000000000000000000 Binary files a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/ic_public_phone.png and /dev/null differ diff --git a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/ic_public_spinner.png b/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/ic_public_spinner.png deleted file mode 100644 index 776cf3494ccdc00d06343d89a5bfe7f9bd069c69..0000000000000000000000000000000000000000 Binary files a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/ic_public_spinner.png and /dev/null differ diff --git a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/ic_public_worldclock.png b/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/ic_public_worldclock.png deleted file mode 100644 index 04499cf4f14e0b2d681fcbbb383b592ba4a04669..0000000000000000000000000000000000000000 Binary files a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/ic_public_worldclock.png and /dev/null differ diff --git a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/icon.png b/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/profile/main_pages.json b/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 2273fee0c771e87408b556a950b354e5ed5d0d4e..0000000000000000000000000000000000000000 --- a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "src": [ - "pages/Index", - "pages/There" - ] -} diff --git a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/en_US/element/string.json b/ThirdPartyComponents/VCardDemo/entry/src/main/resources/en_US/element/string.json deleted file mode 100644 index 41eeff6c9af4182079014ac82b1c3630549c852e..0000000000000000000000000000000000000000 --- a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/en_US/element/string.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "string": [ - { - "name": "module_desc", - "value": "module description" - }, - { - "name": "EntryAbility_desc", - "value": "description" - }, - { - "name": "EntryAbility_label", - "value": "VCardDemo" - }, - { - "name": "title", - "value": "result" - } - ] -} \ No newline at end of file diff --git a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/zh_CN/element/string.json b/ThirdPartyComponents/VCardDemo/entry/src/main/resources/zh_CN/element/string.json deleted file mode 100644 index ff7a377ce9206d7e0c56ae21fd7c9230aa15b786..0000000000000000000000000000000000000000 --- a/ThirdPartyComponents/VCardDemo/entry/src/main/resources/zh_CN/element/string.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "string": [ - { - "name": "module_desc", - "value": "模块描述" - }, - { - "name": "EntryAbility_desc", - "value": "description" - }, - { - "name": "EntryAbility_label", - "value": "VCardDemo" - }, - { - "name": "title", - "value": "生成结果" - } - ] -} \ No newline at end of file diff --git "a/ThirdPartyComponents/VCardDemo/figures/\345\217\226\347\211\210\346\234\254.png" "b/ThirdPartyComponents/VCardDemo/figures/\345\217\226\347\211\210\346\234\254.png" deleted file mode 100644 index 9a4203fdba7d630c4d6cf0b60685f27afd85d28a..0000000000000000000000000000000000000000 Binary files "a/ThirdPartyComponents/VCardDemo/figures/\345\217\226\347\211\210\346\234\254.png" and /dev/null differ diff --git "a/ThirdPartyComponents/VCardDemo/figures/\346\210\252\345\233\276.png" "b/ThirdPartyComponents/VCardDemo/figures/\346\210\252\345\233\276.png" deleted file mode 100644 index 3ce177f4d3e03464a38d31472b80e82775c68874..0000000000000000000000000000000000000000 Binary files "a/ThirdPartyComponents/VCardDemo/figures/\346\210\252\345\233\276.png" and /dev/null differ diff --git a/ThirdPartyComponents/VCardDemo/hvigorfile.ts b/ThirdPartyComponents/VCardDemo/hvigorfile.ts deleted file mode 100644 index 6478186902c0c1ad7c966a929c7d6b7d8ae7a9f3..0000000000000000000000000000000000000000 --- a/ThirdPartyComponents/VCardDemo/hvigorfile.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently. -export { appTasks } from '@ohos/hvigor-ohos-plugin'; \ No newline at end of file diff --git a/ThirdPartyComponents/VCardDemo/package.json b/ThirdPartyComponents/VCardDemo/package.json deleted file mode 100644 index 6c17b048f37dd7b30b2f3546571ba6f84332389c..0000000000000000000000000000000000000000 --- a/ThirdPartyComponents/VCardDemo/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "license":"ISC", - "devDependencies":{}, - "name":"vcarddemo", - "ohos":{ - "org":"huawei", - "directoryLevel":"project", - "buildTool":"hvigor" - }, - "description":"example description", - "repository":{}, - "version":"1.0.0", - "dependencies":{ - "@ohos/hypium":"1.0.3", - "@ohos/hvigor-ohos-plugin":"1.3.1", - "@ohos/hvigor":"1.3.1" - } -} \ No newline at end of file diff --git a/ThirdPartyComponents/VCardDemo/public_sys-resources/icon-caution.gif b/ThirdPartyComponents/VCardDemo/public_sys-resources/icon-caution.gif deleted file mode 100644 index 6e90d7cfc2193e39e10bb58c38d01a23f045d571..0000000000000000000000000000000000000000 Binary files a/ThirdPartyComponents/VCardDemo/public_sys-resources/icon-caution.gif and /dev/null differ diff --git a/ThirdPartyComponents/VCardDemo/public_sys-resources/icon-danger.gif b/ThirdPartyComponents/VCardDemo/public_sys-resources/icon-danger.gif deleted file mode 100644 index 6e90d7cfc2193e39e10bb58c38d01a23f045d571..0000000000000000000000000000000000000000 Binary files a/ThirdPartyComponents/VCardDemo/public_sys-resources/icon-danger.gif and /dev/null differ diff --git a/ThirdPartyComponents/VCardDemo/public_sys-resources/icon-note.gif b/ThirdPartyComponents/VCardDemo/public_sys-resources/icon-note.gif deleted file mode 100644 index 6314297e45c1de184204098efd4814d6dc8b1cda..0000000000000000000000000000000000000000 Binary files a/ThirdPartyComponents/VCardDemo/public_sys-resources/icon-note.gif and /dev/null differ diff --git a/ThirdPartyComponents/VCardDemo/public_sys-resources/icon-notice.gif b/ThirdPartyComponents/VCardDemo/public_sys-resources/icon-notice.gif deleted file mode 100644 index 86024f61b691400bea99e5b1f506d9d9aef36e27..0000000000000000000000000000000000000000 Binary files a/ThirdPartyComponents/VCardDemo/public_sys-resources/icon-notice.gif and /dev/null differ diff --git a/ThirdPartyComponents/VCardDemo/public_sys-resources/icon-tip.gif b/ThirdPartyComponents/VCardDemo/public_sys-resources/icon-tip.gif deleted file mode 100644 index 93aa72053b510e456b149f36a0972703ea9999b7..0000000000000000000000000000000000000000 Binary files a/ThirdPartyComponents/VCardDemo/public_sys-resources/icon-tip.gif and /dev/null differ diff --git a/ThirdPartyComponents/VCardDemo/public_sys-resources/icon-warning.gif b/ThirdPartyComponents/VCardDemo/public_sys-resources/icon-warning.gif deleted file mode 100644 index 6e90d7cfc2193e39e10bb58c38d01a23f045d571..0000000000000000000000000000000000000000 Binary files a/ThirdPartyComponents/VCardDemo/public_sys-resources/icon-warning.gif and /dev/null differ