diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/.gitignore b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..dc4e6353bf3caf74c5953d0bec81c72a3635bf33 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/.gitignore @@ -0,0 +1,9 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +.cxx +/.clangd +/.clang-format +/.clang-tidy \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/AppScope/app.json5 b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/AppScope/app.json5 new file mode 100644 index 0000000000000000000000000000000000000000..5449efa99e569d6ad3b62e3ac3c5add963e0dd19 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/AppScope/app.json5 @@ -0,0 +1,11 @@ +{ + "app": { + "bundleName": "com.example.healthydiet", + "vendor": "example", + "versionCode": 1000000, + "versionName": "1.0.0", + "icon": "$media:app_icon", + "label": "$string:app_name", + "distributedNotificationEnabled": true + } +} diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/AppScope/resources/base/element/string.json b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/AppScope/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..46dad4fb9fda7531a8aa26aeed8e7383c4ad4be3 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/AppScope/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "app_name", + "value": "HealthyDiet" + } + ] +} diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/AppScope/resources/base/media/app_icon.png b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/AppScope/resources/base/media/app_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/AppScope/resources/base/media/app_icon.png differ diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/build-profile.json5 b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..d7b1117cdb34aab2983ac65026d9e8dcc91332d1 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/build-profile.json5 @@ -0,0 +1,27 @@ +{ + "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/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/.gitignore b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..5a6ba80fa3d9498a23ae8ae7d9518f8743fa8a96 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/.gitignore @@ -0,0 +1,4 @@ +/node_modules +/.preview +/build +/.cxx \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/build-profile.json5 b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..20c75049f2d45e57d267899b6547c79fb6aa84c1 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/build-profile.json5 @@ -0,0 +1,14 @@ +{ + "apiType": 'stageMode', + "buildOption": { + }, + "targets": [ + { + "name": "default", + "runtimeOS": "HarmonyOS" + }, + { + "name": "ohosTest", + } + ] +} \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/hvigorfile.ts b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..80e4ec5b81689f238c34614b167a0b9e9c83e8d9 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/hvigorfile.ts @@ -0,0 +1,2 @@ +// 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/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/package-lock.json b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/package-lock.json new file mode 100644 index 0000000000000000000000000000000000000000..15bc7145be1490029883067847743ea7134cf545 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/package-lock.json @@ -0,0 +1,5 @@ +{ + "name": "entry", + "version": "1.0.0", + "lockfileVersion": 1 +} diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/package.json b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/package.json new file mode 100644 index 0000000000000000000000000000000000000000..c4e988f30f2ec9e3430a4d0c8f05e89fabbc2659 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/package.json @@ -0,0 +1,13 @@ +{ + "name": "entry", + "version": "1.0.0", + "ohos": { + "org": "huawei", + "buildTool": "hvigor", + "directoryLevel": "module" + }, + "description": "example description", + "repository": {}, + "license": "ISC", + "dependencies": {} +} diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/common/BreakPointSystem.ets b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/common/BreakPointSystem.ets new file mode 100644 index 0000000000000000000000000000000000000000..9ccffa9dd942c67af55e8d101c4896e07ec2977c --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/common/BreakPointSystem.ets @@ -0,0 +1,80 @@ +import mediaQuery from '@ohos.mediaquery' + +declare interface BreakPointTypeOption { + xs?: T + sm?: T + md?: T + lg?: T + xl?: T + xxl?: T +} + +export class BreakPointType { + options: BreakPointTypeOption + + constructor(option: BreakPointTypeOption) { + this.options = option + } + + getValue(currentBreakPoint: string) { + if (currentBreakPoint === 'xs') { + return this.options.xs + } else if (currentBreakPoint === 'sm') { + return this.options.sm + } else if (currentBreakPoint === 'md') { + return this.options.md + } else if (currentBreakPoint === 'lg') { + return this.options.lg + } else if (currentBreakPoint === 'xl') { + return this.options.xl + } else if (currentBreakPoint === 'xxl') { + return this.options.xxl + } else { + return undefined + } + } +} + +type Breakpoint = { + name: string + size: number + mediaQueryListener?: mediaQuery.MediaQueryListener +} + +export class BreakpointSystem { + private currentBreakpoint: string = 'md' + private breakpoints: Breakpoint[] = [{ name: 'xs', size: 0 }, { name: 'sm', size: 320 }, + { name: 'md', size: 520 }, { name: 'lg', size: 840 }] + + private updateCurrentBreakpoint(breakpoint: string) { + if (this.currentBreakpoint !== breakpoint) { + this.currentBreakpoint = breakpoint + AppStorage.Set('currentBreakpoint', this.currentBreakpoint) + console.log('on current breakpoint: ' + this.currentBreakpoint) + } + } + + public register() { + this.breakpoints.forEach((breakpoint: Breakpoint, index) => { + let condition + if (index === this.breakpoints.length - 1) { + condition = "(" + breakpoint.size + "vp<=width" + ")" + } else { + condition = "(" + breakpoint.size + "vp<=width<" + this.breakpoints[index + 1].size + "vp)" + } + console.log(condition) + breakpoint.mediaQueryListener = mediaQuery.matchMediaSync(condition) + breakpoint.mediaQueryListener.on('change', (mediaQueryResult) => { + if (mediaQueryResult.matches) { + this.updateCurrentBreakpoint(breakpoint.name) + } + }) + }) + } + + public unregister() { + this.breakpoints.forEach((breakpoint: Breakpoint) => { + breakpoint.mediaQueryListener.off('change') + }) + } +} \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/common/constants/CommonConstants.ets b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/common/constants/CommonConstants.ets new file mode 100644 index 0000000000000000000000000000000000000000..b97fd731e15968ded954596db1d5c304a6dd4dbf --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/common/constants/CommonConstants.ets @@ -0,0 +1,14 @@ +export default class CommonConstants { + static readonly ALPHABET_INDEXER_VALUE: string[] = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']; + static readonly FOOD_CATEGORY_LIST: string[] = ['全部', '水果', '蔬菜', '海鲜', '甜点', '坚果'] + static readonly BOTTOM_BAR_HEIGHT: number = 60; + static readonly FOOD_GRID: { + ITEM_HEIGHT: number, + ITEM_COLUMNS_GAP: number, + ITEM_ROWS_GAP: number + } = { + ITEM_HEIGHT: 150, + ITEM_COLUMNS_GAP: 0, + ITEM_ROWS_GAP: 8 + } +} \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/common/mock/MockData.ets b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/common/mock/MockData.ets new file mode 100644 index 0000000000000000000000000000000000000000..ee4b453174364359f1ab5db986c1e60210d7efce --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/common/mock/MockData.ets @@ -0,0 +1,233 @@ +import { MealTime } from '../../models/DietRecord'; +import { DietRecord } from '../../models/DietRecord'; +import { FoodCategoryId } from '../../models/Food'; +import { FoodCategory } from '../../models/Food'; +import { Food } from '../../models/Food'; + +export let mockFood: Food[] = [ + { + id: 0, + name: { en: 'Avocado', cn: '牛油果' }, + img: $r('app.media.avocado'), + category: new FoodCategory(FoodCategoryId.Fruit), + nutrition: { + main: { + calories: 160, + protein: 2, + fat: 14.7, + carbohydrate: 8.5, + fiber: 6.7 + } + } + }, + { + id: 1, + name: { en: 'Blueberry', cn: '蓝莓' }, + img: $r('app.media.blueberry'), + category: new FoodCategory(FoodCategoryId.Fruit), + nutrition: { + main: { + calories: 57, + protein: 0.74, + fat: 0.33, + carbohydrate: 14.5, + fiber: 2.4 + } + } + }, + { + id: 2, + name: { en: 'Crab', cn: '螃蟹' }, + img: $r('app.media.crab'), + category: new FoodCategory(FoodCategoryId.Seafood), + nutrition: { + main: { + calories: 95, + protein: 13.8, + fat: 2.3, + carbohydrate: 4.7, + fiber: 0.0 + } + } + }, + { + id: 3, + name: { en: 'Cucumber', cn: '黄瓜' }, + img: $r('app.media.cucumber'), + category: new FoodCategory(FoodCategoryId.Vegetable), + nutrition: { + main: { + calories: 15, + protein: 0.7, + fat: 0.1, + carbohydrate: 3.6, + fiber: 0.5 + } + } + }, + { + id: 4, + name: { en: 'Icecream', cn: '冰淇淋' }, + img: $r('app.media.icecream'), + category: new FoodCategory(FoodCategoryId.Dessert), + nutrition: { + main: { + calories: 127, + protein: 2.4, + fat: 5.3, + carbohydrate: 17.3, + fiber: 0.7 + } + } + }, + { + id: 5, + name: { en: 'Kiwi', cn: '猕猴桃' }, + img: $r('app.media.kiwi'), + category: new FoodCategory(FoodCategoryId.Fruit), + nutrition: { + main: { + calories: 61, + protein: 1.1, + fat: 0.5, + carbohydrate: 14.7, + fiber: 3.0 + } + } + }, + { + id: 6, + name: { en: 'Mushroom', cn: '蘑菇' }, + img: $r('app.media.mushroom'), + category: new FoodCategory(FoodCategoryId.Fruit), + nutrition: { + main: { + calories: 24, + protein: 2.7, + fat: 0.1, + carbohydrate: 4.1, + fiber: 2.1 + } + } + }, + { + id: 7, + name: { en: 'Onion', cn: '洋葱' }, + img: $r('app.media.onion'), + category: new FoodCategory(FoodCategoryId.Vegetable), + nutrition: { + main: { + calories: 40, + protein: 1.1, + fat: 0.1, + carbohydrate: 9.3, + fiber: 1.7 + } + } + }, + { + id: 8, + name: { en: 'Pitaya', cn: '火龙果' }, + img: $r('app.media.pitaya'), + category: new FoodCategory(FoodCategoryId.Fruit), + nutrition: { + main: { + calories: 62, + protein: 0.9, + fat: 0.0, + carbohydrate: 14.2, + fiber: 1.8 + } + } + }, + { + id: 9, + name: { en: 'Strawberry', cn: '草莓' }, + img: $r('app.media.strawberry'), + category: new FoodCategory(FoodCategoryId.Fruit), + nutrition: { + main: { + calories: 32, + protein: 1.0, + fat: 0.2, + carbohydrate: 7.1, + fiber: 1.1 + } + } + }, + { + id: 10, + name: { en: 'Tomato', cn: '西红柿' }, + img: $r('app.media.tomato'), + category: new FoodCategory(FoodCategoryId.Vegetable), + nutrition: { + main: { + calories: 20, + protein: 0.9, + fat: 0.2, + carbohydrate: 4.0, + fiber: 0.5 + } + } + }, + { + id: 11, + name: { en: 'Walnut', cn: '核桃' }, + img: $r('app.media.walnut'), + category: new FoodCategory(FoodCategoryId.Nut), + nutrition: { + main: { + calories: 646, + protein: 14.9, + fat: 58.8, + carbohydrate: 19.1, + fiber: 9.5 + } + } + } +] + +export let mockDietRecord: DietRecord[] = [ + { + id: 0, + foodId: 0, + weight: 150, + time: new MealTime(0), + }, + { + id: 1, + foodId: 2, + weight: 50, + time: new MealTime(0), + }, + { + id: 2, + foodId: 7, + weight: 500, + time: new MealTime(1), + }, + { + id: 3, + foodId: 5, + weight: 500, + time: new MealTime(1), + }, + { + id: 4, + foodId: 4, + weight: 400, + time: new MealTime(1), + }, + { + id: 5, + foodId: 10, + weight: 300, + time: new MealTime(2), + }, + { + id: 6, + foodId: 3, + weight: 100, + time: new MealTime(3), + } +] \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/common/utils/DataUtil.ets b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/common/utils/DataUtil.ets new file mode 100644 index 0000000000000000000000000000000000000000..3d216e59462d4250deb37ee7474df8b5956b8c4d --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/common/utils/DataUtil.ets @@ -0,0 +1,15 @@ +import { mockFood } from '../mock/MockData'; +import { Food } from '../../models/Food'; + +export class DataUtil { + static getFoodById(id: number): Food { + let result: Food; + mockFood.forEach(element => { + if (element.id == id) { + result = element; + return; + } + }); + return result; + } +} \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/common/utils/StringUtil.ets b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/common/utils/StringUtil.ets new file mode 100644 index 0000000000000000000000000000000000000000..34aac01f67d88efeaab69dffd28f909a27618eea --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/common/utils/StringUtil.ets @@ -0,0 +1,9 @@ +import { pinyin } from 'pinyin-pro'; + +export default class StringUtil { + static getFirstLetter(str: string) { + return pinyin(str, { + pattern: 'first', toneType: 'none', type: 'array' + })[0]; + } +} \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/entryability/EntryAbility.ts b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/entryability/EntryAbility.ts new file mode 100644 index 0000000000000000000000000000000000000000..a548a4a610b5dd2da5ff1fa5173e9d21ccb88d97 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/entryability/EntryAbility.ts @@ -0,0 +1,51 @@ +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/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/models/DietRecord.ets b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/models/DietRecord.ets new file mode 100644 index 0000000000000000000000000000000000000000..9753cc79132bf3389e572c07f3514c0bae07a2d6 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/models/DietRecord.ets @@ -0,0 +1,88 @@ + +class DietRecord { + id: number; + foodId: number; + weight: number; + time: MealTime; + + constructor(id: number, foodId: number, weight: number, time: MealTime) { + this.id = id; + this.foodId = foodId; + this.weight = weight; + this.time = time; + } +} + +enum MealTimeId { + Breakfast = 0, + Lunch, + Dinner, + Snack +} + +class MealTime { + id: MealTimeId + name: string + + constructor(id: MealTimeId) { + this.id = id; + switch (id) { + case MealTimeId.Breakfast: + this.name = '早餐'; + break; + case MealTimeId.Lunch: + this.name = '午餐'; + break; + case MealTimeId.Dinner: + this.name = '晚餐'; + break; + case MealTimeId.Snack: + this.name = '零食'; + break; + default: + this.name = undefined; + break; + } + } +} + +@Observed +class OneMealStatisticsInfo { + time: MealTime; + foods: Array = []; + totalCalories: number = 0; + totalProtein: number = 0; + totalFat: number = 0; + totalCarbohydrate: number = 0; + totalFiber: number = 0; + + constructor(time: MealTime) { + this.time = time; + } +} + +class MealFoodInfo { + recordId: number; + name: string; + img: Resource; + calories: number; + protein: number; + fat: number; + carbohydrate: number; + fiber: number; + weight: number; + + constructor(recordId: number, name: string, img: Resource, calories: number, protein: number, fat: number, carbohydrate: number, fiber: number, weight: number) { + this.recordId = recordId; + this.name = name; + this.img = img; + this.calories = calories; + this.protein = protein; + this.fat = fat; + this.carbohydrate = carbohydrate; + this.fiber = fiber; + this.weight = weight; + } +} + +export { DietRecord, MealTimeId, MealTime, OneMealStatisticsInfo, MealFoodInfo } \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/models/Food.ets b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/models/Food.ets new file mode 100644 index 0000000000000000000000000000000000000000..02d0663cb64dec5796b19dcb087dc438f1295314 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/models/Food.ets @@ -0,0 +1,61 @@ +import { Nutrition } from './Nutrition'; + +class Food { + id: number; + name: { + en: string, + cn: string + }; + img: Resource; + category: FoodCategory; + nutrition: Nutrition; + + constructor(name: { + en: string, + cn: string + }, img: Resource, category: FoodCategory, nutrition: Nutrition) { + this.name = name; + this.img = img; + this.category = category; + this.nutrition = nutrition; + } +} + +enum FoodCategoryId { + Fruit = 0, + Vegetable, + Seafood, + Dessert, + Nut +} + +class FoodCategory { + id: FoodCategoryId; + name: string + + constructor(id: FoodCategoryId) { + this.id = id; + switch (id) { + case FoodCategoryId.Fruit: + this.name = '水果'; + break; + case FoodCategoryId.Vegetable: + this.name = '蔬菜'; + break; + case FoodCategoryId.Seafood: + this.name = '海鲜'; + break; + case FoodCategoryId.Dessert: + this.name = '甜点'; + break; + case FoodCategoryId.Nut: + this.name = '坚果'; + break; + default: + this.name = undefined; + break; + } + } +} + +export { Food, FoodCategory, FoodCategoryId, Nutrition } \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/models/Nutrition.ets b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/models/Nutrition.ets new file mode 100644 index 0000000000000000000000000000000000000000..fde11eb5deb2d8177f1bfa449411f474863f7898 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/models/Nutrition.ets @@ -0,0 +1,28 @@ +class Nutrition { + main: MainNutrition + //vitamin: VitaminGroup + //fattyAcid: FattyAcid + //mineral: MineralGroup + + constructor(main: MainNutrition) { + this.main = main; + } +} + +class MainNutrition { + calories: number; + protein: number; + fat: number; + carbohydrate: number; + fiber: number; + + constructor(calories: number, protein: number, fat: number, carbohydrate: number) { + this.calories = calories; + this.protein = protein; + this.fat = fat; + this.carbohydrate = carbohydrate; + } + +} + +export { Nutrition, MainNutrition } \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/pages/FoodDetail.ets b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/pages/FoodDetail.ets new file mode 100644 index 0000000000000000000000000000000000000000..59860bdb910dae1521f1f36c497360db5acdee76 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/pages/FoodDetail.ets @@ -0,0 +1,310 @@ +import { MealTime } from '../models/DietRecord'; +import { DietRecord } from '../models/DietRecord'; +import { MainNutrition } from '../models/Nutrition'; +import { Nutrition } from '../models/Food'; +import { ImageButton } from '../views/public/ImageButton'; +import FoodViewModel from '../viewmodels/FoodViewModel'; +import router from '@ohos.router'; +import { Food } from '../models/Food'; + +@Entry +@Component +struct FoodDetail { + food: Food = router.getParams()['foodInfo'] + controller: CustomDialogController = new CustomDialogController({ + builder: AddRecordDialog({ + foodInfo: { id: this.food.id, name: this.food.name.cn, calories: this.food.nutrition.main.calories } + }), + alignment: DialogAlignment.Bottom, + autoCancel: true, + offset: { dx: 0, dy: -20 } + }) + @State private windowHeight: number = 0; + + build() { + Column() { + Row({ space: 8 }) { + ImageButton({ img: $r('app.media.back'), clickEvent: () => { + router.back(); + } }) + Text('食物详情').fontSize(18) + }.height(40).width('100%').padding({ left: 10, top: 5 }) + + FoodImageDisplay({ + foodImg: this.food.img, + foodName: this.food.name.cn, + foodId: this.food.id, + windowHeight: this.windowHeight + }) + + Swiper() { + ContentTable({ main: this.food.nutrition.main }) + CaloriesTable({ foodInfo: this.food }) + NutritionTable({ value: this.food.nutrition }) + } + .autoPlay(false) + .indicatorStyle({ selectedColor: $r('app.color.theme_color_green') }) + .padding(10) + .margin({ top: 10 }) + .height('40%') + + Button('添加记录') + .backgroundColor($r('app.color.theme_color_green')) + .fontColor(Color.White) + .width('80%') + .margin({ top: 10 }) + .onClick(() => { + this.controller.open(); + }) + }.height('100%') + .backgroundColor($r('app.color.page_background_color')) + .onAreaChange((oldValue, newValue) => { + this.windowHeight = typeof newValue.height === 'number' ? newValue.height : this.windowHeight; + }) + } +} + +@CustomDialog +struct AddRecordDialog { + controller: CustomDialogController + foodInfo: { + id: number, + name: string, + calories: number + } + private weightArray: string[] = ['25', '50', '75', '100', '125', '150', '175', '200', '225', '250', '275', '300'] + private mealTimeArray: string[] = ['早餐', '午餐', '晚餐', '零食'] + private weightSel: number = Number(this.weightArray[0]); + private timeSel: number = 0; + + build() { + Column() { + Row({ space: 10 }) { + Column({ space: 5 }) { + Text(this.foodInfo.name).fontSize(24) + Text(`${this.foodInfo.calories}kcal`).fontSize(16).fontColor(Color.Grey) + }.layoutWeight(1) + + TextPicker({ range: this.weightArray }).layoutWeight(1).height(150) + .onChange((value) => { + this.weightSel = Number(value); + }) + TextPicker({ range: this.mealTimeArray }).layoutWeight(1).height(150) + .onChange((value, index) => { + this.timeSel = index; + }) + }.width('100%').margin(10) + + Button('完成') + .backgroundColor($r('app.color.theme_color_green')) + .fontColor(Color.White) + .width('80%') + .onClick(() => { + let dietRecords = AppStorage.Get>("dietRecords"); + if (dietRecords == undefined) { + dietRecords = new Array(); + } + let newRecord = new DietRecord(dietRecords.length, this.foodInfo.id, this.weightSel, new MealTime(this.timeSel)); + dietRecords.push(newRecord); + AppStorage.SetOrCreate>("dietRecords", dietRecords); + this.controller.close(); + }) + + }.width('100%').padding(20).justifyContent(FlexAlign.Center) + } +} + +@Component +struct FoodImageDisplay { + foodId: number + foodImg: Resource + foodName: string + @State private imageHeight: number = 357 + @Prop windowHeight: number + @State animationReverse: boolean = false + + build() { + Stack({ alignContent: Alignment.BottomStart }) { + Image(this.foodImg).height(this.imageHeight).objectFit(ImageFit.Contain) + .animation({ duration: 500 }) + .onClick(() => { + this.animationReverse = !this.animationReverse; + if (this.animationReverse) { + this.imageHeight = this.windowHeight; + } else { + this.imageHeight = 357; + } + }) + Text(this.foodName).fontSize(24).fontWeight(600).margin({ left: 20 }) + }.width('100%') + } +} + +@Component +struct ContentTable { + main: MainNutrition + + @Builder IngredientItem(title: string, subTitle: string, color: string | Resource, value: number, unit: string) { + Row() { + Text(title).fontWeight(600).fontSize(16).textAlign(TextAlign.Start).width('30%') + Row() { + Circle({ width: 8, height: 8 }).fill(color) + Text(subTitle).fontSize(16).margin({ left: 8 }) + Blank() + Text(`${value} ${unit}`).fontSize(16) + } + .width('70%') + .layoutWeight(2) + }.margin(8) + } + + build() { + Column() { + Text('单位: 100g').alignSelf(ItemAlign.End).fontColor(Color.Grey).margin({ right: 10, bottom: 5 }) + this.IngredientItem('热量', '卡路里', $r('app.color.food_attr_color_calories'), this.main.calories, '千卡') + Row() { + }.height(20) + + this.IngredientItem('营养', '蛋白质', $r('app.color.food_attr_color_protein'), this.main.protein, '克') + this.IngredientItem(null, '脂肪', $r('app.color.food_attr_color_fat'), this.main.fat, '克') + this.IngredientItem(null, '碳水', $r('app.color.food_attr_color_carbohydrate'), this.main.carbohydrate, '克') + this.IngredientItem(null, '粗纤维', $r('app.color.food_attr_color_fiber'), this.main.fiber, '克') + } + .width('100%') + .height('100%') + .cardStyleInSwiper() + } +} + +@Component +struct CardTitle { + name: string; + unit: string = '100g'; + + build() { + Row() { + Text(this.name).fontSize(24).fontWeight(500) + Blank() + Text(`单位: 每${this.unit}`).fontColor(Color.Grey) + }.width('100%') + } +} + +@Component +struct CaloriesTable { + foodInfo: Food + private value: number //calories + private avg: number + + aboutToAppear() { + let foods = new FoodViewModel().getAllFood(); + this.value = this.foodInfo.nutrition.main.calories; + this.avg = FoodViewModel.getAvgCalByCategory(this.foodInfo.category.id, foods); + } + + build() { + Column({ space: 30 }) { + CardTitle({ name: '热量' }) + + Row() { + Text(`${this.value}`) + .fontSize(48) + .fontWeight(450) + .textAlign(TextAlign.End) + .fontColor($r('app.color.theme_color_green')) + Text('kcal').fontSize(18).alignSelf(ItemAlign.End).margin({ left: 10 }) + }.width('100%').justifyContent(FlexAlign.Center) + + Column({ space: 15 }) { + Text(this.value >= this.avg ? '热量较高' : '热量适中').fontSize(14) + Progress({ value: this.value, total: this.avg * 2, type: ProgressType.Linear }) + .style({ strokeWidth: 24 }) + .color($r('app.color.theme_color_green')) + .padding({ left: 10, right: 10 }) + Row() { + Text(`热量多于45%的`).fontSize(14).fontColor(Color.Gray) + Text(this.foodInfo.category.name).fontSize(14).fontColor(Color.Gray) + } + }.width('100%') + } + .alignItems(HorizontalAlign.Center) + .width('100%') + .cardStyleInSwiper() + } +} + +@Component +struct NutritionTable { + value: Nutrition + private nutritionItems: { + name: string, + value: number, + total: number, + unit: string + }[] = undefined; + + aboutToAppear() { + this.nutritionItems = FoodViewModel.getNutritionItems(this.value) + } + + getColor(value: number) { + if (value > 60) { + return '#EE584C' + } + else if (value > 25) { + return '#FD9A42' + } else { + return '#73CD57' + } + } + + @Builder NutritionItemBuilder(item: { + name: string, + value: number, + total: number, + unit: string + }) { + Column({ space: 10 }) { + Stack() { + Progress({ value: item.value, total: item.total, type: ProgressType.Ring }) + .style({ strokeWidth: 14 }) + .color(this.getColor( + parseInt((item.value / item.total * 100).toFixed(1)) + )) + Text(`${((item.value / item.total) * 100).toFixed(1)}%`).fontSize(18) + } + + Column() { + Text(item.name).fontSize(16) + Text(item.value + item.unit).fontSize(16) + } + }.width(100) + } + + build() { + Column({ space: 30 }) { + CardTitle({ name: '营养' }) + List({ space: 20 }) { + ForEach(this.nutritionItems, item => { + ListItem() { + this.NutritionItemBuilder(item) + } + }) + } + .listDirection(Axis.Horizontal) + .width('100%') + .height('70%') + .padding({ left: 20, right: 20 }) + } + .alignItems(HorizontalAlign.Center) + .width('100%') + .cardStyleInSwiper() + } +} + +@Extend(Column) function cardStyleInSwiper () { + .padding({ left: 12, right: 12, top: 15, bottom: 40 }) + .backgroundColor(Color.White) + .clip(new Rect({ width: '100%', height: '100%', radius: 12 })) +} + diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/pages/Main.ets b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/pages/Main.ets new file mode 100644 index 0000000000000000000000000000000000000000..7a64455c10275c27e2cd92c6fa8a978fb50273f8 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/pages/Main.ets @@ -0,0 +1,13 @@ +import MainTabs from '../views/MainTabs'; + +@Entry +@Component +struct Main { + + build() { + Stack() { + MainTabs() + }.width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/pages/Splash.ets b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/pages/Splash.ets new file mode 100644 index 0000000000000000000000000000000000000000..83f741f8327e00cb58f167435343670bc80bfded --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/pages/Splash.ets @@ -0,0 +1,67 @@ +import router from '@ohos.router'; +@Entry +@Component +struct Splash { + private pathCommands1: string = 'M319.5 128.1 c103.5 0 187.5 84 187.5 187.5 v15 a172.5 172.5 0 0 3 -172.5 172.5 H198 a36 36 0 0 3 -13.8 -1 207 207 0 0 0 87 -372 h48.3 z'; + private pathCommands2: string = 'M270.6 128.1 h48.6 c51.6 0 98.4 21 132.3 54.6 a411 411 0 0 3 -45.6 123 c-25.2 45.6 -56.4 84 -87.6 110.4 a206.1 206.1 0 0 0 -47.7 -288 z'; + + onPageShow() { + setTimeout(()=>{ + router.replace({url: "pages/Main"}) + }, 1000) + } + + pageTransition() { + PageTransitionExit({ duration: 600, curve: Curve.Ease }).slide(SlideEffect.Left) + } + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Shape() { + Path() + .commands('M162 128.7 a222 222 0 0 1 100.8 374.4 H198 a36 36 0 0 3 -36 -36') + .fill(Color.White) + + Path() + .commands(this.pathCommands1) + .fill('none') + .linearGradient( + { + angle: 30, + colors: [["#C4FFA0", 0], ["#ffffff", 1]] + }) + .clip(new Path().commands(this.pathCommands1)) + + Path() + .commands(this.pathCommands2) + .fill('none') + .linearGradient( + { + angle: 50, + colors: [['#8CC36A', 0.1], ["#B3EB90", 0.4], ["#ffffff", 0.7]] + }) + .clip(new Path().commands(this.pathCommands2)) + } + .height('630px') + .width('630px') + + Text($r('app.string.healthy_diet')) + .fontSize(26) + .fontColor(Color.White) + .margin({ top: 300 }) + + Text($r('app.string.healthy_diet_slogan')) + .fontSize(17) + .fontColor(Color.White) + .margin({ top: 4 }) + } + .width('100%') + .height('100%') + .linearGradient( + { + angle: 180, + colors: [['#BDE895', 0.1], ["#95DE7F", 0.6], ["#7AB967", 1]] + }) + } +} + diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/viewmodels/DietRecordViewModel.ets b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/viewmodels/DietRecordViewModel.ets new file mode 100644 index 0000000000000000000000000000000000000000..549544f46533dc8faf860451f8c2597399b0035e --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/viewmodels/DietRecordViewModel.ets @@ -0,0 +1,118 @@ +import { DataUtil } from '../common/utils/DataUtil'; +import { MealFoodInfo } from '../models/DietRecord'; +import { OneMealStatisticsInfo } from '../models/DietRecord'; +import { DietRecord } from '../models/DietRecord'; +import { mockDietRecord } from '../common/mock/MockData'; + +export default class DietRecordViewModel { + getMockDietRecords(): DietRecord[] { + return mockDietRecord; + } + + getDietRecords(): DietRecord[] { + return AppStorage.Get>("dietRecords"); + } + /* + getDietRecordsByMealTime(mealTimeId: number, data: DietRecord[]): DietRecord[] { + let result = new Array(); + data.forEach(element => { + if (element.time.id == mealTimeId) { + result.push(element); + } + }) + return result; + } + + hasRecordAtMealTime(mealTimeId: number): boolean { + let has: boolean = false; + this.getMockDietRecords().forEach(element => { + if (element.time.id == mealTimeId) { + has = true; + return; + } + }) + return has; + } + + getDietRecordById(id: number) { + let result: DietRecord; + mockDietRecord.forEach((element) => { + if (element.id == id) { + result = element; + return; + } + }) + return result; + }*/ + + getStatistics(): Array { + let mealMap = new Map(); + this.getDietRecords().forEach(record => { + let mealStatisticsInfo: OneMealStatisticsInfo = mealMap.get(record.time.id); + if (mealStatisticsInfo === undefined) { + mealStatisticsInfo = new OneMealStatisticsInfo(record.time); + } + let food = DataUtil.getFoodById(record.foodId); + let calories = food.nutrition.main.calories * record.weight / 100; + let protein = food.nutrition.main.protein * record.weight / 100; + let fat = food.nutrition.main.fat * record.weight / 100; + let carbohydrate = food.nutrition.main.carbohydrate * record.weight / 100; + let fiber = food.nutrition.main.fiber * record.weight / 100; + mealStatisticsInfo.foods.push( + new MealFoodInfo(record.id, food.name.cn, food.img, calories, protein, fat, carbohydrate, fiber, record.weight) + ); + mealStatisticsInfo.totalCalories += calories; + mealStatisticsInfo.totalProtein += protein; + mealStatisticsInfo.totalFat += fat; + mealStatisticsInfo.totalCarbohydrate += carbohydrate; + mealStatisticsInfo.totalFiber += fiber; + mealMap.set(record.time.id, mealStatisticsInfo); + }); + return Array.from(mealMap.values()); + } + + /* getStatisticsMock(): Array { + let mealMap = new Map(); + this.getMockDietRecords().forEach(record => { + let mealStatisticsInfo: OneMealStatisticsInfo = mealMap.get(record.time.id); + if (mealStatisticsInfo === undefined) { + mealStatisticsInfo = new OneMealStatisticsInfo(record.time); + } + let food = DataUtil.getFoodById(record.foodId); + let calories = food.nutrition.main.calories * record.weight / 100; + let protein = food.nutrition.main.protein * record.weight / 100; + let fat = food.nutrition.main.fat * record.weight / 100; + let carbohydrate = food.nutrition.main.carbohydrate * record.weight / 100; + let fiber = food.nutrition.main.fiber * record.weight / 100; + mealStatisticsInfo.foods.push( + new MealFoodInfo(record.id, food.name.cn, food.img, calories, protein, fat, carbohydrate, fiber, record.weight) + ); + mealStatisticsInfo.totalCalories += Math.round(calories); + mealStatisticsInfo.totalProtein += Math.round(protein); + mealStatisticsInfo.totalFat += Math.round(fat); + mealStatisticsInfo.totalCarbohydrate += Math.round(carbohydrate); + mealStatisticsInfo.totalFiber += Math.round(fiber); + mealMap.set(record.time.id, mealStatisticsInfo); + }); + return Array.from(mealMap.values()); + }*/ + + deleteDietRecord(recordId: number) { + let records = this.getDietRecords(); + let newData = records.filter((record) => { + return record.id != recordId; + }); + console.info(`old->${JSON.stringify(records)}`) + console.info(`new->${JSON.stringify(newData)}`) + AppStorage.SetOrCreate>("dietRecords", newData); + } + + updateDietWeight(recordId: number, newWeight: number) { + let records = this.getDietRecords(); + let index = records.findIndex((record) => { + return record.id == recordId; + }); + records[index].weight = newWeight; + AppStorage.SetOrCreate>("dietRecords", records); + } +} \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/viewmodels/FoodViewModel.ets b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/viewmodels/FoodViewModel.ets new file mode 100644 index 0000000000000000000000000000000000000000..4d6e3b553d63d675e5f397039b645d04eddb43a7 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/viewmodels/FoodViewModel.ets @@ -0,0 +1,111 @@ +import { FoodCategoryId } from '../models/Food'; +import { Nutrition } from '../models/Food'; +import StringUtil from '../common/utils/StringUtil'; +import { mockFood } from '../common/mock/MockData'; +import { Food } from '../models/Food'; + +export default class FoodViewModel { + getAllFood(): Array { + let data = new Array(); + mockFood.forEach(item => { + data.push(item); + }) + return data; + } + + searchFoods(key: string): Array { + if (key == '') return this.getAllFood(); + let result = new Array(); + this.getAllFood().forEach((food) => { + if (food.name.cn.includes(key) || food.name.en.toLowerCase().includes(key.toLowerCase())) { + result.push(food); + } + }) + return result; + } + + getFoodById(id: number): Food { + let result: Food; + mockFood.forEach(element => { + if (element.id == id) { + result = element; + return; + } + }); + return result; + } + + static getFoodByCategory(categoryId: FoodCategoryId, data: Food[]) { + return categoryId == -1 ? + data : + data.filter((value) => { + return value.category.id == categoryId; + }) + } + + static getAllFoodByAsc(data: Food[]) { + return data.sort((f1, f2) => { + return StringUtil.getFirstLetter(f1.name.cn) < StringUtil.getFirstLetter(f2.name.cn) ? + -1 : + 1; + }) + } + + static getAllFoodByDesc(data: Food[]) { + return data.sort((f1, f2) => { + return StringUtil.getFirstLetter(f1.name.cn) > StringUtil.getFirstLetter(f2.name.cn) ? + -1 : + 1; + }) + } + + static getNutritionItems(value: Nutrition) { + let main = value.main; + let total = main.protein + main.fat + main.carbohydrate + main.fiber; + return [ + { + name: '蛋白质', + value: value.main.protein, + total: total, + unit: 'g', + }, + { + name: '脂肪', + value: value.main.fat, + total: total, + unit: 'g' + }, + { + name: '碳水', + value: value.main.carbohydrate, + total: total, + unit: 'g' + }, + { + name: '粗纤维', + value: value.main.fiber, + total: total, + unit: 'g' + } + ] + } + + static getColorByCalories(value: number, average: number) { + if (value < average) { + return $r('app.color.low_calorie'); + } else { + return $r('app.color.high_calorie'); + } + } + + static getAvgCalByCategory(categoryId: FoodCategoryId, data: Food[]) { + let foods = this.getFoodByCategory(categoryId, data); + let count = 0, total = 0; + foods.forEach(item => { + total += item.nutrition.main.calories; + count++; + }) + return Math.round(total / count); + } +} + diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/views/Home.ets b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/views/Home.ets new file mode 100644 index 0000000000000000000000000000000000000000..a727efbd32314ccce67e6eaa1539a2fcd55ee941 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/views/Home.ets @@ -0,0 +1,249 @@ +import { BreakPointType } from '../common/BreakPointSystem'; +import router from '@ohos.router'; +import { ImageButton } from './public/ImageButton'; +import CommonConstants from '../common/constants/CommonConstants'; +import FoodViewModel from '../viewmodels/FoodViewModel'; +import { Food } from '../models/Food'; + +const viewModel: FoodViewModel = new FoodViewModel() + +@Component +export struct Home { + @State isListView: boolean = true + @Provide("foodData") foodData: Food[] = FoodViewModel.getAllFoodByAsc(viewModel.getAllFood()) + @Provide("searchChange") @Watch("onSearchChange") listenSearchChange: number = 0; + @Provide("searchKey") searchKey: string = ''; + @StorageProp('currentBreakpoint') currentBreakpoint: string = 'md' + + onSearchChange() { + this.foodData = viewModel.searchFoods(this.searchKey); + } + + build() { + Column() { + TopBar({ isListView: $isListView }) + FoodCategoryTabs({ isListView: this.isListView }) + }.width('100%') + .height('100%') + .padding(5) + .backgroundColor($r('app.color.page_background_color')) + } +} + +@Component +struct TopBar { + @Link isListView: boolean + @State showSearch: boolean = false; + @Consume("searchKey") searchKey: string; + @Consume("searchChange") listenSearchChange: number; + + build() { + Row() { + if (this.showSearch) { + TextInput({ placeholder: '输入食品名称', text: this.searchKey }) + .layoutWeight(1) + .margin({ left: 10 }) + .animation({ duration: 500 }) + .transition({ type: TransitionType.Insert, translate: { x: -200, y: 0 }, opacity: 0 }) + .onChange((value) => { + this.searchKey = value; + this.listenSearchChange++; + }) + } + Blank() + ImageButton({ img: $r('app.media.ic_public_search'), clickEvent: () => { + animateTo({ duration: 100 }, () => { + this.showSearch = !this.showSearch + if(!this.showSearch) { + this.searchKey = ''; + this.listenSearchChange++; + } + }) + } }) + .margin({ left: 10 }) + ImageButton({ img: $r('app.media.ic_public_switch'), clickEvent: () => { + this.isListView = !this.isListView + } }) + .margin({ left: 5 }) + } + .width('100%') + .height(60) + } +} + +@Component +struct FoodCategoryTabs { + @Consume("foodData") foodData: Food[] + @Prop isListView: boolean + @State currentIndex: number = 0 + @State selectedAlphabetIndex: number = 0 + + @Builder tabBarBuilder(txt: string, index: number) { + Stack() { + Text(txt) + .fontSize(this.currentIndex == index ? 20 : 14) + .fontWeight(this.currentIndex == index ? 500 : 400) + .textAlign(TextAlign.Center) + .height('100%') + } + } + + build() { + Row() { + Tabs() { + ForEach(CommonConstants.FOOD_CATEGORY_LIST, (item, index) => { + TabContent() { + FoodDisplay({ + data: FoodViewModel.getFoodByCategory(index - 1, this.foodData), + isListView: this.isListView + }) + }.tabBar(this.tabBarBuilder(item, index)) + .margin({ top: 10 }) + }) + } + .barHeight(40) + .barMode(BarMode.Scrollable) + .onChange(index => { + this.currentIndex = index + }) + .width(this.isListView ? '93%' : '100%') + + if (this.isListView) { + AlphabetIndexer({ arrayValue: CommonConstants.ALPHABET_INDEXER_VALUE, selected: this.selectedAlphabetIndex }) + .selectedColor(Color.White) + .selectedBackgroundColor($r('app.color.theme_color_green')) + .popupColor($r('app.color.theme_color_green')) + .onSelect(index => { + this.selectedAlphabetIndex = index; + }) + } + + }.height('100%') + .width('100%') + } +} + +@Component +struct FoodDisplay { + @State data: Food[] = [] + @State currentIndex: number = 0 + @Prop isListView: boolean + onIndexChange: (index: number) => void + + build() { + Row() { + if (this.isListView) { + FoodList({ data: $data }) + } else { + FoodGrid({ data: $data }) + } + }.width('100%') + .height('95%') + } +} + +@Component +struct FoodList { + @Link data: Food[] + + onItemClick(item: Food) { + router.push({ url: "pages/FoodDetail", params: { foodInfo: item } }) + } + + @Builder ListItemBuilder(item: Food) { + Row({ space: 20 }) { + Image(item.img) + .width(60) + .aspectRatio(1) + .objectFit(ImageFit.Contain) + .borderRadius(8) + Text(item.name.cn).fontSize(14) + Blank() + Text(`${item.nutrition.main.calories} 千卡`).fontSize(14).fontColor(0x99000000).margin({ right: 5 }) + } + .borderRadius(10) + .backgroundColor(Color.White) + .width('100%') + .padding({ left: 10 }) + + } + + build() { + List() { + ForEach(this.data, item => { + ListItem() { + this.ListItemBuilder(item) + }.onClick(() => { + this.onItemClick(item); + }) + .margin({ left: 10, right: 10, top: 5, bottom: 5 }) + }) + } + .height('100%').width('100%') + } +} + +@Component +struct FoodGrid { + @Link data: Food[]; + private rowsTemplate: string; + private gridHeight: number; + @StorageProp('currentBreakpoint') currentBreakpoint: string = 'md' + + onItemClick(item: Food) { + router.push({ url: "pages/FoodDetail", params: { foodInfo: item } }) + } + + aboutToAppear() { + let rows = Math.round(this.data.length / 2); + this.rowsTemplate = '1fr '.repeat(rows); + this.gridHeight = (CommonConstants.FOOD_GRID.ITEM_HEIGHT + + CommonConstants.FOOD_GRID.ITEM_ROWS_GAP) * rows; + } + + @Builder GridItemBuilder(item: Food) { + Column() { + Image(item.img).height('80%').aspectRatio(1).objectFit(ImageFit.Contain) + Row() { + Text(item.name.cn).fontSize(14).margin({ left: 10 }) + Blank() + Text(`${item.nutrition.main.calories} 千卡`).fontSize(14).fontColor(0x99000000).margin({ right: 10 }) + }.width('100%') + .height('20%') + .backgroundColor($r('app.color.foreground_invert_color')) + } + .margin(10) + .height(CommonConstants.FOOD_GRID.ITEM_HEIGHT) + .clip(new Rect({ width: '100%', height: '100%', radius: 8 })) + .backgroundColor(Color.White) + .sharedTransition(item.id.toString(), { + duration: 1000 + }) + } + + build() { + Stack({ alignContent: Alignment.Top }) { + Scroll() { + Grid() { + ForEach(this.data, item => { + GridItem() { + this.GridItemBuilder(item) + }.onClick(() => { + this.onItemClick(item) + }) + }) + } + .columnsTemplate(new BreakPointType({ + sm: '1fr 1fr', + md: '1fr 1fr 1fr', + lg: '1fr 1fr 1fr 1fr' + }).getValue(this.currentBreakpoint)) + .rowsTemplate(this.rowsTemplate) + .columnsGap(CommonConstants.FOOD_GRID.ITEM_COLUMNS_GAP) + .rowsGap(CommonConstants.FOOD_GRID.ITEM_ROWS_GAP) + .height(this.gridHeight) + }.scrollBar(BarState.Auto).edgeEffect(EdgeEffect.Spring) + }.height('100%').width('100%') + } +} + diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/views/MainTabs.ets b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/views/MainTabs.ets new file mode 100644 index 0000000000000000000000000000000000000000..6f4596fb188562346caf5bb3a9a666df94475551 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/views/MainTabs.ets @@ -0,0 +1,77 @@ +import { BreakPointType } from '../common/BreakPointSystem'; +import { BreakpointSystem } from '../common/BreakPointSystem'; +import { Home } from './Home'; +import { Record } from './Record'; + +@Component +export default struct MainTabs { + @State currentIndex: number = 0 + @StorageProp('currentBreakpoint') currentBreakpoint: string = 'md' + private breakpointSystem: BreakpointSystem = new BreakpointSystem() + + @Builder TabBarBuilder(txt: string | Resource, img: Resource, index: number) { + Flex({ + direction: new BreakPointType({ + sm: FlexDirection.Column, + md: FlexDirection.Row, + lg: FlexDirection.Column + }).getValue(this.currentBreakpoint), + justifyContent: FlexAlign.Center, + alignItems: ItemAlign.Center + }) { + Image(img) + .height(24) + .width(24) + .fillColor(this.getTabBarColor(index)) + Text(txt) + .margin(new BreakPointType({ + sm: { top: 4 }, + md: { left: 8 }, + lg: { top: 4 } + }).getValue(this.currentBreakpoint)) + .fontSize(11) + .fontColor(this.getTabBarColor(index)) + } + .width('100%') + .height('100%') + } + + aboutToAppear() { + this.breakpointSystem.register() + } + + aboutToDisappear() { + this.breakpointSystem.unregister() + } + + getTabBarColor(index: number) { + return this.currentIndex == index ? + $r('app.color.theme_color_green') : + $r('app.color.theme_color_grey') + } + + build() { + Tabs({ barPosition: new BreakPointType({ + sm: BarPosition.End, + md: BarPosition.End, + lg: BarPosition.Start + }).getValue(this.currentBreakpoint) }) { + TabContent() { + Home() + }.tabBar(this.TabBarBuilder('主页', $r('app.media.ic_bottom_home'), 0)) + + TabContent() { + Record() + }.tabBar(this.TabBarBuilder('记录', $r('app.media.ic_bottom_record'), 1)) + } + .scrollable(false) + .vertical(new BreakPointType({ sm: false, md: false, lg: true }).getValue(this.currentBreakpoint)) + .barWidth(new BreakPointType({ sm: '100%', md: '100%', lg: '56vp' }).getValue(this.currentBreakpoint)) + .barHeight(new BreakPointType({ sm: '56vp', md: '56vp', lg: '60%' }).getValue(this.currentBreakpoint)) + .onChange(index => { + this.currentIndex = index + }) + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/views/Record.ets b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/views/Record.ets new file mode 100644 index 0000000000000000000000000000000000000000..650e955062c780a8166d9831f30d9ad42c74804c --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/views/Record.ets @@ -0,0 +1,391 @@ +import { BreakPointType } from '../common/BreakPointSystem'; +import { CustomCounter } from './public/CustomCounter'; +import { MealFoodInfo } from '../models/DietRecord'; +import { OneMealStatisticsInfo } from '../models/DietRecord'; +import { DietRecord } from '../models/DietRecord'; +import DietRecordViewModel from '../viewmodels/DietRecordViewModel'; + +const recordViewModel = new DietRecordViewModel(); + +@Extend(Column) function recordCardStyle () { + .margin(10) + .padding(10) + .backgroundColor(Color.White) + .clip(new Rect({ width: '100%', height: '100%', radius: 10 })) +} + +@Component +struct NoRecord { + build() { + Stack() { + Column({ space: 10 }) { + Image($r('app.media.norecord')) + .width('30%') + .aspectRatio(1) + Text('没有记录').fontSize(18).fontColor(Color.Grey) + } + } + .width('100%') + .height('100%') + } +} + +@Component +struct MealFoodItem { + @State private isShown: boolean = true; + @Consume("dataChange") notifyDataChange: number; + private foodInfo: MealFoodInfo; + @State private translateX: number = 0; + private itemHeight: number; + private panTranslateX: number = 70 + + build() { + if (this.isShown) { + Row() { + Row() { + Row({ space: 5 }) { + Image(this.foodInfo.img).width(this.itemHeight).objectFit(ImageFit.Contain) + Column() { + Text(this.foodInfo.name).fontSize(16) + Text(`${this.foodInfo.calories} kcal`).fontColor(Color.Grey) + }.height(this.itemHeight).justifyContent(FlexAlign.Center).alignItems(HorizontalAlign.Start) + } + + Blank() + CustomCounter({ value: this.foodInfo.weight + 'g', onDec: () => { + let newValue = Math.max(this.foodInfo.weight - 25, 0); + recordViewModel.updateDietWeight(this.foodInfo.recordId, newValue); + this.notifyDataChange++; + }, onInc: () => { + let newValue = Math.min(this.foodInfo.weight + 25, 300); + recordViewModel.updateDietWeight(this.foodInfo.recordId, newValue); + this.notifyDataChange++; + } }) + }.width('100%') + + Button() { + Image($r('app.media.ic_public_delete')) + .backgroundColor('#E84026') + .borderRadius(20) + .objectFit(ImageFit.ScaleDown) + }.width(30).aspectRatio(1).margin({ left: 20 }) + .onClick(() => { + animateTo({ duration: 300 }, () => { + this.isShown = false + recordViewModel.deleteDietRecord(this.foodInfo.recordId); + this.notifyDataChange++; + }) + }) + + } + .height(this.itemHeight) + .animation({ duration: 500 }) + .transition({ type: TransitionType.Delete, translate: { x: -350, y: 0 }, opacity: 0 }) + .translate({ x: this.translateX }) + .gesture(PanGesture() + .onActionUpdate((event => { + let offset = event.offsetX; + let panLeft = offset < 0; + /* + * 向左滑动:若滑动距离小于最大距离,则更新组件平移距离,否则让平移距离等于最大距离 + * 向右滑动:若当前组件发生平移(向左),则设置组件平移距离为0,否则不更新 + * */ + if (panLeft) { + this.translateX = -offset < this.panTranslateX ? offset : -this.panTranslateX; + } else { + if (this.translateX != 0) this.translateX = 0; + } + })) + .onActionEnd((event) => { + if (this.translateX < -20) { + this.translateX = -this.panTranslateX + } + }) + ) + } + } +} + +@Component +struct OneMealCard { + @ObjectLink mealInfo: OneMealStatisticsInfo + private itemHeight = 50; + @State isFolded: boolean = false; + + build() { + Column({ space: 20 }) { + Row() { + Text(this.mealInfo.time.name).fontSize(20).fontWeight(500).margin({ left: 10 }) + Blank() + Image($r('app.media.ic_public_list_remove')).height(25).aspectRatio(1) + .onClick(() => { + animateTo({ duration: 500 }, () => { + this.isFolded = !this.isFolded + }) + }) + }.width('100%') + + if (!this.isFolded) { + List({ space: 10 }) { + ForEach(this.mealInfo.foods, (element: MealFoodInfo) => { + ListItem() { + MealFoodItem({ foodInfo: element, itemHeight: this.itemHeight }) + } + }) + + }.width('100%') //.height((this.itemHeight + 10) * this.mealInfo.foods.length) + .transition({type: TransitionType.All, translate: {x: 0, y: 200}, opacity: 0}) + .animation({duration: 500}) + } + }.alignItems(HorizontalAlign.Start) + .recordCardStyle() + } +} + +@Component +struct MealCards { + @Consume("dietStatistics") dietStatistics: OneMealStatisticsInfo[]; + + build() { + Column() { + ForEach(this.dietStatistics, (element) => { + OneMealCard({ mealInfo: element }) + }) + } + } +} + +class HistogramLegend { + public color: string | Resource + public value: Resource | string + + constructor(color: string | Resource, value: Resource | string) { + this.color = color + this.value = value + } +} + +function GetColor(value: number): Resource { + if (value > 1000) { + return $r("app.color.theme_color_orange") + } else { + return $r("app.color.theme_color_green") + } +} + +@Component +struct HeatHistogram { + private legend: HistogramLegend[] = [ + new HistogramLegend('#FD9A42', '高热量'), + new HistogramLegend('#73CD57', '中低热量') + ]; + private histogramParam: { + height: number; //柱形图总高度 + marginTop: number; //柱形图顶部边距 + cylinderTextSpace: number; //柱形与每一餐的文字之间的距离 + } = { height: 150, marginTop: 20, cylinderTextSpace: 10 } + private layerNum: number = 5; + @State private mealTimeNameTextHeight: number = 10; //每一餐文字组件的高度 + + @Builder content(item: OneMealStatisticsInfo) { + Column() { + Rect({ + width: 14, + height: Math.min(item.totalCalories / 1000 * this.histogramParam.height, this.histogramParam.height) + 7, + radius: 14 + }) + .fill(GetColor(item.totalCalories)) + .margin({ bottom: -7 }) + .padding({ top: 7 }) + } + .clip(true) + } + + @Builder legendComponent(item: HistogramLegend) { + Row({ space: 20 }) { + Circle({ width: 10, height: 10 }).fill(item.color) + Text(item.value).fontSize(14) + }.margin({ left: 20, right: 20 }) + } + + build() { + Histogram({ + title: '热量', + legend: this.legend, + content: this.content, + legendComponent: this.legendComponent + }) + } +} + +@Component +struct NutritionHistogram { + private legend: HistogramLegend[] = [ + new HistogramLegend($r('app.color.food_attr_color_protein'), $r('app.string.nutrition_protein')), + new HistogramLegend($r('app.color.food_attr_color_fat'), $r('app.string.nutrition_fat')), + new HistogramLegend($r('app.color.food_attr_color_carbohydrate'), $r('app.string.nutrition_carbohydrate')), + new HistogramLegend($r('app.color.food_attr_color_fiber'), $r('app.string.nutrition_fiber')) + ] + private histogramParam: { + height: number; //柱形图总高度 + marginTop: number; //柱形图顶部边距 + cylinderTextSpace: number; //柱形与每一餐的文字之间的距离 + } = { height: 150, marginTop: 20, cylinderTextSpace: 10 } + private layerNum: number = 5; + @State private mealTimeNameTextHeight: number = 10; //每一餐文字组件的高度 + + @Builder content(item: OneMealStatisticsInfo) { + Column() { + if (item.totalProtein > 0) { + Rect({ width: 14, height: item.totalProtein + 14, radius: 7 }) + .fill($r('app.color.food_attr_color_protein')) + .margin({ bottom: -14 }) + } + if (item.totalFat > 0) { + Rect({ width: 14, height: item.totalFat + 14, radius: 7 }).fill($r('app.color.food_attr_color_fat')) + .margin({ bottom: -14 }) + } + if (item.totalCarbohydrate > 0) { + Rect({ width: 14, height: item.totalCarbohydrate + 14, radius: 7 }) + .fill($r('app.color.food_attr_color_carbohydrate')) + .margin({ bottom: -14 }) + } + if (item.totalFiber > 0) { + Rect({ width: 14, height: item.totalFiber + 7, radius: 7 }) + .fill($r('app.color.food_attr_color_fiber')) + .margin({ bottom: -7 }) + } + }.clip(true) + } + + @Builder legendComponent(item: HistogramLegend) { + Row({ space: 5 }) { + Row() { + Circle({ width: 10, height: 10 }).fill(item.color) + }.size({ width: 15, height: 15 }) + + Column({ space: 5 }) { + Text(item.value).fontSize(14).height(15) + Text('50g').fontSize(14).fontColor(Color.Grey) + }.alignItems(HorizontalAlign.Start) + }.alignItems(VerticalAlign.Top).margin({ left: 15, right: 15 }) + } + + build() { + Histogram({ + title: '营养', + legend: this.legend, + content: this.content, + legendComponent: this.legendComponent + }) + } +} + +@Component +struct Histogram { + @Consume("dietStatistics") dietStatistics: OneMealStatisticsInfo[]; + private histogramParam: { + height: number; //柱形图总高度 + marginTop: number; //柱形图顶部边距 + cylinderTextSpace: number; //柱形与每一餐的文字之间的距离 + } = { height: 150, marginTop: 20, cylinderTextSpace: 10 } + private layerNum: number = 5; + @State private mealTimeNameTextHeight: number = 10; //每一餐文字组件的高度 + private title: string | Resource; + private legend: HistogramLegend[]; + @BuilderParam content: any; + @BuilderParam legendComponent: any; + + build() { + Column({ space: 20 }) { + Text(this.title).fontSize(24).margin({ top: 10, left: 10 }) + Stack({ alignContent: Alignment.Bottom }) { + //分割线 + Column() { + ForEach(new Array(this.layerNum + 1), (item, index) => { + Divider().strokeWidth(1).color('#D8D8D8') + }) + } + .margin({ + top: this.histogramParam.marginTop, + left: this.histogramParam.marginTop, + right: this.histogramParam.marginTop + }) + .height('100%') + .justifyContent(FlexAlign.SpaceBetween) + //柱形 + Flex({ + direction: FlexDirection.Row, + justifyContent: FlexAlign.SpaceEvenly, + alignItems: ItemAlign.Start, + }) { + ForEach(this.dietStatistics, (element: OneMealStatisticsInfo) => { + Column() { + this.content(element) + Text(element.time.name) + .fontSize(14) + .fontColor(Color.Grey) + .margin({ top: this.histogramParam.cylinderTextSpace }) + .onAreaChange((oldValue, newValue) => { + this.mealTimeNameTextHeight = typeof newValue.height === 'number' ? Math.ceil(newValue.height) : 10 + }) + }.justifyContent(FlexAlign.End).height('100%') + }) + } + .height(this.histogramParam.height + this.histogramParam.marginTop + this.histogramParam.cylinderTextSpace + this.mealTimeNameTextHeight) + .width('100%') + }.height(this.histogramParam.height) + //图例 + Row() { + ForEach(this.legend, (element) => { + this.legendComponent(element) + }) + }.width('100%').justifyContent(FlexAlign.Center).margin({ top: 50 }) + + } + .width('100%') + .justifyContent(FlexAlign.Start) + .alignItems(HorizontalAlign.Start) + .backgroundColor(Color.White) + .padding({ bottom: 60 }) + } +} + +@Entry +@Component +export struct Record { + @StorageLink("dietRecords") @Watch("onDataChange") dietRecords: DietRecord[] = []; + @Provide("dietStatistics") dietStatistics: OneMealStatisticsInfo[] = recordViewModel.getStatistics(); + @Provide("dataChange") @Watch("onDataChange") listenDataChange: number = 0; + @StorageProp('currentBreakpoint') currentBreakpoint: string = 'sm' + + onDataChange() { + this.dietStatistics = recordViewModel.getStatistics(); + } + + build() { + + Scroll() { + if (this.dietRecords.length > 0) { + Column() { + Swiper() { + HeatHistogram() + NutritionHistogram() + }.autoPlay(false) + .indicator(new BreakPointType({ sm: true, md: false, lg: false }).getValue(this.currentBreakpoint)) + .displayCount(new BreakPointType({ sm: 1, md: 2, lg: 2 }).getValue(this.currentBreakpoint)) + .indicatorStyle({color: $r('app.color.theme_color_green')}) + + MealCards() + }.justifyContent(FlexAlign.Start) + .width('100%') + } else { + NoRecord() + } + } + .height('100%') + .width('100%') + .scrollBar(BarState.Off) + .backgroundColor($r('app.color.page_background_color')) + } +} \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/views/public/CustomCounter.ets b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/views/public/CustomCounter.ets new file mode 100644 index 0000000000000000000000000000000000000000..030b90af78e6e9e801da54ba4b457fe61368058f --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/views/public/CustomCounter.ets @@ -0,0 +1,68 @@ + +@Component +struct DecIcon { + private click: () => void = undefined + + build() { + Stack() { + Line() + .startPoint([0, 0]) + .endPoint([12, 0]) + .stroke(Color.White) + .strokeWidth(2) + .strokeLineCap(LineCapStyle.Round) + } + .borderRadius(10) + .backgroundColor('#35BD6A') + .width(20) + .height(20) + .opacity(0.4) + .onClick(() => { + this.click() + }) + } +} + +@Component +struct IncIcon { + private readonly click: () => void = undefined + + build() { + Stack() { + Line() + .startPoint([0, 0]) + .endPoint([0, 12]) + .stroke(Color.White) + .strokeWidth(2) + .strokeLineCap(LineCapStyle.Round) + Line() + .startPoint([0, 0]) + .endPoint([12, 0]) + .stroke(Color.White) + .strokeWidth(2) + .strokeLineCap(LineCapStyle.Round) + } + .borderRadius(10) + .backgroundColor('#35BD6A') + .width(20) + .height(20) + .onClick(() => { + this.click() + }) + } +} + +@Component +export struct CustomCounter { + @Prop value: string + private onDec: () => void = undefined + private onInc: () => void = undefined + + build() { + Row() { + DecIcon({ click: this.onDec }) + Text(this.value).margin({ left: 11, right: 11 }) + IncIcon({ click: this.onInc }) + } + } +} \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/views/public/ImageButton.ets b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/views/public/ImageButton.ets new file mode 100644 index 0000000000000000000000000000000000000000..8781e54ecaf6e255acb8ac7dff28ad8c0e125e83 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/ets/views/public/ImageButton.ets @@ -0,0 +1,18 @@ +@Component +export struct ImageButton { + img: Resource + clickEvent: () => void + private buttonSize: number = 45 + + build() { + Button({ type: ButtonType.Normal }) { + Image(this.img).width(this.buttonSize-10) + .aspectRatio(1).objectFit(ImageFit.Contain).padding(5) + } + .width(this.buttonSize) + .aspectRatio(1) + .backgroundColor(Color.Transparent) + .borderRadius(8) + .onClick(this.clickEvent) + } +} \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/module.json5 b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/module.json5 new file mode 100644 index 0000000000000000000000000000000000000000..e4e8a81b24f3e1beea6abf6dbf97bc56bc7a6080 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/module.json5 @@ -0,0 +1,36 @@ +{ + "module": { + "name": "entry", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "EntryAbility", + "deviceTypes": [ + "phone" + ], + "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/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/element/color.json b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/element/color.json new file mode 100644 index 0000000000000000000000000000000000000000..333eb497e6a775bcb4d8b3338172f50cf2f47593 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/element/color.json @@ -0,0 +1,72 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#FFFFFF" + }, + { + "name": "high_calorie", + "value": "#EE584C" + }, + { + "name": "low_calorie", + "value": "#73CD57" + }, + { + "name": "medium_calories", + "value": "#FFFFC733" + }, + { + "name": "theme_color_orange", + "value": "#FD9A42" + }, + { + "name": "theme_color_green", + "value": "#73CD57" + }, + { + "name": "theme_color_grey", + "value": "#999999" + }, + { + "name": "tab_bar_select_color", + "value": "#73CD57" + }, + { + "name": "tab_bar_normal_color", + "value": "#999999" + }, + { + "name": "foreground_invert_color", + "value": "#E5E5E5" + }, + { + "name": "page_background_color", + "value": "#F1F3F5" + }, + { + "name": "food_attr_color_calories", + "value": "#F54040" + } + , + { + "name": "food_attr_color_protein", + "value": "#FFECECEC" + } + , + { + "name": "food_attr_color_fat", + "value": "#FFF6D73F" + } + , + { + "name": "food_attr_color_carbohydrate", + "value": "#FF49AAFF" + } + , + { + "name": "food_attr_color_fiber", + "value": "#FFFF9100" + } + ] +} \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/element/string.json b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..2eb57c17f51800fcc1fb8c4721026c3491a68582 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/element/string.json @@ -0,0 +1,108 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "label" + }, + { + "name": "healthy_diet", + "value": "Healthy Diet" + }, + { + "name": "healthy_diet_slogan", + "value": "Health life comes from a balanced diet" + }, + { + "name": "food_name_avocado", + "value": "牛油果" + }, + { + "name": "food_name_blueberry", + "value": "蓝莓" + }, + { + "name": "food_name_crab", + "value": "螃蟹" + }, + { + "name": "food_name_cucumber", + "value": "黄瓜" + }, + { + "name": "food_name_icecream", + "value": "冰淇淋" + }, + { + "name": "food_name_kiwi", + "value": "猕猴桃" + }, + { + "name": "food_name_mushroom", + "value": "蘑菇" + }, + { + "name": "food_name_onion", + "value": "洋葱" + }, + { + "name": "food_name_pitaya", + "value": "火龙果" + }, + { + "name": "food_name_strawberry", + "value": "草莓" + }, + { + "name": "food_name_tomato", + "value": "西红柿" + }, + { + "name": "food_name_walnut", + "value": "核桃" + }, + { + "name": "food_category_fruit", + "value": "水果" + }, + { + "name": "food_category_vegetable", + "value": "蔬菜" + }, + { + "name": "food_category_seafood", + "value": "海鲜" + }, + { + "name": "food_category_dessert", + "value": "甜点" + }, + { + "name": "food_category_nut", + "value": "坚果" + }, + { + "name": "nutrition_protein", + "value": "蛋白质" + }, + { + "name": "nutrition_fat", + "value": "脂肪" + }, + { + "name": "nutrition_carbohydrate", + "value": "碳水" + }, + { + "name": "nutrition_fiber", + "value": "粗纤维" + } + ] +} \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/avocado.png b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/avocado.png new file mode 100644 index 0000000000000000000000000000000000000000..a2848b10707f0f4f1c6a661826d822e678b3cceb Binary files /dev/null and b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/avocado.png differ diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/back.png b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/back.png new file mode 100644 index 0000000000000000000000000000000000000000..2b0806c99ba80ca8bd23cf65f0b8eebf01dcb460 Binary files /dev/null and b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/back.png differ diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/blueberry.png b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/blueberry.png new file mode 100644 index 0000000000000000000000000000000000000000..a07421e575d4d41e718ace47c16aaba8ac0755ac Binary files /dev/null and b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/blueberry.png differ diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/crab.png b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/crab.png new file mode 100644 index 0000000000000000000000000000000000000000..b71a627013711964e4d5d3b271e9311a2b525f65 Binary files /dev/null and b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/crab.png differ diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/cucumber.png b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/cucumber.png new file mode 100644 index 0000000000000000000000000000000000000000..6dd74778e8d76e29a269fdd0155084292504ef61 Binary files /dev/null and b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/cucumber.png differ diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/ic_bottom_home.svg b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/ic_bottom_home.svg new file mode 100644 index 0000000000000000000000000000000000000000..c74324a979a1b8ab7237ca210338a679d91db169 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/ic_bottom_home.svg @@ -0,0 +1 @@ + Public/ic_public_home_filled \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/ic_bottom_record.svg b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/ic_bottom_record.svg new file mode 100644 index 0000000000000000000000000000000000000000..b3041818d9f2c6b1d9a830d71c41b78e44e3a8b3 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/ic_bottom_record.svg @@ -0,0 +1 @@ + Public/ic_public_notes_filled \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/ic_public_back.svg b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/ic_public_back.svg new file mode 100644 index 0000000000000000000000000000000000000000..454d0aa4b65c47c8281eb78cbc6b9e4b3c9ee454 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/ic_public_back.svg @@ -0,0 +1,13 @@ + + + Public/ic_public_back + + + + + + + + + + \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/ic_public_delete.svg b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/ic_public_delete.svg new file mode 100644 index 0000000000000000000000000000000000000000..5e69d92bec10119023e8d891648ecce85d6507be --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/ic_public_delete.svg @@ -0,0 +1,31 @@ + + + Public/ic_public_delete + + + + + + + + + + \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/ic_public_drawer.svg b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/ic_public_drawer.svg new file mode 100644 index 0000000000000000000000000000000000000000..81eb37b8d50ab3b45d3e64bcb90f335ac73ab323 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/ic_public_drawer.svg @@ -0,0 +1,13 @@ + + + Public/ic_public_drawer + + + + + + + + + + \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/ic_public_list_add_light.svg b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/ic_public_list_add_light.svg new file mode 100644 index 0000000000000000000000000000000000000000..ee4f7b0a2cda07235fcaf917395f0972cae1cd75 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/ic_public_list_add_light.svg @@ -0,0 +1,10 @@ + + + + Public/ic_public_list_add_light + Created with Sketch. + + + + + \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/ic_public_list_remove.svg b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/ic_public_list_remove.svg new file mode 100644 index 0000000000000000000000000000000000000000..b745981d611c9815424b764dd0d9e1bb7312d786 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/ic_public_list_remove.svg @@ -0,0 +1,10 @@ + + + + Public/ic_public_list_remove + Created with Sketch. + + + + + \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/ic_public_search.svg b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/ic_public_search.svg new file mode 100644 index 0000000000000000000000000000000000000000..19f696581e659e49e686c842426f07fe6bebf307 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/ic_public_search.svg @@ -0,0 +1,13 @@ + + + Public/ic_public_search + + + + + + + + + + \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/ic_public_switch.svg b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/ic_public_switch.svg new file mode 100644 index 0000000000000000000000000000000000000000..06d4421eefb001f440aec560f32331cb0a76df07 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/ic_public_switch.svg @@ -0,0 +1,13 @@ + + + Public/ic_public_rotate + + + + + + + + + + \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/icecream.png b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/icecream.png new file mode 100644 index 0000000000000000000000000000000000000000..13a867424f48674c3e95590ec9887d38cd00fbfd Binary files /dev/null and b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/icecream.png differ diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/icon.png b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/icon.png differ diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/kiwi.png b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/kiwi.png new file mode 100644 index 0000000000000000000000000000000000000000..f22fb4328a9850ddd526d165964096c1bb9778a7 Binary files /dev/null and b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/kiwi.png differ diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/logo.png b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..826c9813215ecaef36f1900b9ad37c93598181c2 Binary files /dev/null and b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/logo.png differ diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/mushroom.png b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/mushroom.png new file mode 100644 index 0000000000000000000000000000000000000000..3e984ee10df7a0ff4dae4558f17f2c6c7b89075f Binary files /dev/null and b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/mushroom.png differ diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/norecord.png b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/norecord.png new file mode 100644 index 0000000000000000000000000000000000000000..724b2e1a37f43c954e599e64d34e61e3826b8e5e Binary files /dev/null and b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/norecord.png differ diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/onion.png b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/onion.png new file mode 100644 index 0000000000000000000000000000000000000000..9c1c5a81c2ff9717df20fcec6a7a8e128b41f1ee Binary files /dev/null and b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/onion.png differ diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/pitaya.png b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/pitaya.png new file mode 100644 index 0000000000000000000000000000000000000000..2770b34deb402ab0639e861fb83e4c8a5865bf59 Binary files /dev/null and b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/pitaya.png differ diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/strawberry.png b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/strawberry.png new file mode 100644 index 0000000000000000000000000000000000000000..a8d239456cdac76fa31e919768151ed6e74cae44 Binary files /dev/null and b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/strawberry.png differ diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/tomato.png b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/tomato.png new file mode 100644 index 0000000000000000000000000000000000000000..93ad983d4862485684c34cfcf1632569a13ae5a1 Binary files /dev/null and b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/tomato.png differ diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/walnut.png b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/walnut.png new file mode 100644 index 0000000000000000000000000000000000000000..8187a4209586dae8522fb494386cc9d64aba95df Binary files /dev/null and b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/media/walnut.png differ diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/profile/main_pages.json b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/profile/main_pages.json new file mode 100644 index 0000000000000000000000000000000000000000..be18d45a11d0541933111a068e20912e5844a40f --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/base/profile/main_pages.json @@ -0,0 +1,7 @@ +{ + "src": [ + "pages/Splash", + "pages/Main", + "pages/FoodDetail" + ] +} \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/en_US/element/string.json b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/en_US/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..335e02ff5fd09d61304a1fff95e26c64e2669098 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/en_US/element/string.json @@ -0,0 +1,108 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "label" + }, + { + "name": "food_name_avocado", + "value": "Avocado" + }, + { + "name": "food_name_blueberry", + "value": "Blueberry" + }, + { + "name": "food_name_crab", + "value": "Crab" + }, + { + "name": "food_name_cucumber", + "value": "Cucumber" + }, + { + "name": "food_name_icecream", + "value": "Icecream" + }, + { + "name": "food_name_kiwi", + "value": "Kiwi" + }, + { + "name": "food_name_mushroom", + "value": "Mushroom" + }, + { + "name": "food_name_onion", + "value": "Onion" + }, + { + "name": "food_name_pitaya", + "value": "Pitaya" + }, + { + "name": "food_name_strawberry", + "value": "Strawberry" + }, + { + "name": "food_name_tomato", + "value": "Tomato" + }, + { + "name": "food_name_walnut", + "value": "Walnut" + }, + { + "name": "food_category_fruit", + "value": "Fruit" + }, + { + "name": "food_category_vegetable", + "value": "Vegetable" + }, + { + "name": "food_category_seafood", + "value": "Seafood" + }, + { + "name": "food_category_dessert", + "value": "Dessert" + }, + { + "name": "food_category_nut", + "value": "Nut" + }, + { + "name": "nutrition_protein", + "value": "Protein" + }, + { + "name": "nutrition_fat", + "value": "Fat" + }, + { + "name": "nutrition_carbohydrate", + "value": "Carbohydrate" + }, + { + "name": "nutrition_fiber", + "value": "Fiber" + }, + { + "name": "healthy_diet", + "value": "Healthy Diet" + }, + { + "name": "healthy_diet_slogan", + "value": "Health life comes from a balanced diet" + } + ] +} \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/zh_CN/element/string.json b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/zh_CN/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..326d353b1aa627b69ee2b9326ce3b63f062e0470 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/main/resources/zh_CN/element/string.json @@ -0,0 +1,108 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "模块描述" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "label" + }, + { + "name": "food_name_avocado", + "value": "牛油果" + }, + { + "name": "food_name_blueberry", + "value": "蓝莓" + }, + { + "name": "food_name_crab", + "value": "螃蟹" + }, + { + "name": "food_name_cucumber", + "value": "黄瓜" + }, + { + "name": "food_name_icecream", + "value": "冰淇淋" + }, + { + "name": "food_name_kiwi", + "value": "猕猴桃" + }, + { + "name": "food_name_mushroom", + "value": "蘑菇" + }, + { + "name": "food_name_onion", + "value": "洋葱" + }, + { + "name": "food_name_pitaya", + "value": "火龙果" + }, + { + "name": "food_name_strawberry", + "value": "草莓" + }, + { + "name": "food_name_tomato", + "value": "西红柿" + }, + { + "name": "food_name_walnut", + "value": "核桃" + }, + { + "name": "food_category_fruit", + "value": "水果" + }, + { + "name": "food_category_vegetable", + "value": "蔬菜" + }, + { + "name": "food_category_seafood", + "value": "海鲜" + }, + { + "name": "food_category_dessert", + "value": "甜点" + }, + { + "name": "food_category_nut", + "value": "坚果" + }, + { + "name": "nutrition_protein", + "value": "蛋白质" + }, + { + "name": "nutrition_fat", + "value": "脂肪" + }, + { + "name": "nutrition_fiber", + "value": "粗纤维" + }, + { + "name": "nutrition_carbohydrate", + "value": "碳水" + }, + { + "name": "healthy_diet", + "value": "健康饮食" + }, + { + "name": "healthy_diet_slogan", + "value": "健康的生活来源于均衡的饮食" + } + ] +} \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/ets/test/Ability.test.ets b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/ets/test/Ability.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..460fe8c8c124c821c5451615acc8949f619dbc3f --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/ets/test/Ability.test.ets @@ -0,0 +1,36 @@ +import hilog from '@ohos.hilog'; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' + +export default function abilityTest() { + describe('ActsAbilityTest', function () { + // Defines a test suite. Two parameters are supported: test suite name and test suite function. + beforeAll(function () { + // Presets an action, which is performed only once before all test cases of the test suite start. + // This API supports only one parameter: preset action function. + }) + beforeEach(function () { + // Presets an action, which is performed before each unit test case starts. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: preset action function. + }) + afterEach(function () { + // Presets a clear action, which is performed after each unit test case ends. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: clear action function. + }) + afterAll(function () { + // Presets a clear action, which is performed after all test cases of the test suite end. + // This API supports only one parameter: clear action function. + }) + it('assertContain',0, function () { + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'it begin'); + let a = 'abc' + let b = 'b' + // Defines a variety of assertion methods, which are used to declare expected boolean conditions. + expect(a).assertContain(b) + expect(a).assertEqual(a) + }) + }) +} \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/ets/test/List.test.ets b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/ets/test/List.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..d766fe249dfc3ada636f27e64d9b64451ce32c93 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/ets/test/List.test.ets @@ -0,0 +1,5 @@ +import abilityTest from './Ability.test' + +export default function testsuite() { + abilityTest() +} \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/ets/testability/TestAbility.ets b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/ets/testability/TestAbility.ets new file mode 100644 index 0000000000000000000000000000000000000000..84765c417cbff3b90c08d4c9accb2ea581ba2df1 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/ets/testability/TestAbility.ets @@ -0,0 +1,57 @@ +import hilog from '@ohos.hilog'; +import Ability from '@ohos.application.Ability' +import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' +import { Hypium } from '@ohos/hypium' +import testsuite from '../test/List.test' +import Window from '@ohos.window' + +export default class TestAbility extends Ability { + onCreate(want, launchParam) { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onCreate'); + hilog.info(0x0000, 'testTag', '%{public}s', 'want param:' + JSON.stringify(want) ?? ''); + hilog.info(0x0000, 'testTag', '%{public}s', 'launchParam:'+ JSON.stringify(launchParam) ?? ''); + var abilityDelegator: any + abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() + var abilityDelegatorArguments: any + abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!'); + Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) + } + + onDestroy() { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy'); + } + + onWindowStageCreate(windowStage: Window.WindowStage) { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate'); + windowStage.loadContent('testability/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() { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageDestroy'); + } + + onForeground() { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onForeground'); + } + + onBackground() { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onBackground'); + } +} \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/ets/testability/pages/Index.ets b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/ets/testability/pages/Index.ets new file mode 100644 index 0000000000000000000000000000000000000000..954dfe0e29874c9ef11a5ace1673f79e27999864 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/ets/testability/pages/Index.ets @@ -0,0 +1,35 @@ +import hilog from '@ohos.hilog'; + +@Entry +@Component +struct Index { + aboutToAppear() { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear'); + } + @State message: string = 'Hello World' + build() { + Row() { + Column() { + Text(this.message) + .fontSize(50) + .fontWeight(FontWeight.Bold) + Button() { + Text('next page') + .fontSize(20) + .fontWeight(FontWeight.Bold) + }.type(ButtonType.Capsule) + .margin({ + top: 20 + }) + .backgroundColor('#0D9FFB') + .width('35%') + .height('5%') + .onClick(()=>{ + }) + } + .width('100%') + } + .height('100%') + } + } \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts new file mode 100644 index 0000000000000000000000000000000000000000..94579b9c1535bc11ee56ee53b48fc90a9977e33a --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts @@ -0,0 +1,71 @@ +import hilog from '@ohos.hilog'; +import TestRunner from '@ohos.application.testRunner' +import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' + +var abilityDelegator = undefined +var abilityDelegatorArguments = undefined + +function translateParamsToString(parameters) { + const keySet = new Set([ + '-s class', '-s notClass', '-s suite', '-s it', + '-s level', '-s testType', '-s size', '-s timeout', + '-s dryRun' + ]) + let targetParams = ''; + for (const key in parameters) { + if (keySet.has(key)) { + targetParams = `${targetParams} ${key} ${parameters[key]}` + } + } + return targetParams.trim() +} + +async function onAbilityCreateCallback() { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback'); +} + +async function addAbilityMonitorCallback(err: any) { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', 'addAbilityMonitorCallback : %{public}s', JSON.stringify(err) ?? ''); +} + +export default class OpenHarmonyTestRunner implements TestRunner { + constructor() { + } + + onPrepare() { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner OnPrepare '); + } + + async onRun() { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run'); + abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() + abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() + var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility' + let lMonitor = { + abilityName: testAbilityName, + onAbilityCreate: onAbilityCreateCallback, + }; + abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) + var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName + cmd += ' '+translateParamsToString(abilityDelegatorArguments.parameters) + var debug = abilityDelegatorArguments.parameters['-D'] + if (debug == 'true') + { + cmd += ' -D' + } + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd); + abilityDelegator.executeShellCommand(cmd, + (err: any, d: any) => { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? ''); + hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? ''); + hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? ''); + }) + hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); + } +} \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/module.json5 b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/module.json5 new file mode 100644 index 0000000000000000000000000000000000000000..46d95d62f1d98834e61853653bc2369cbe5907de --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/module.json5 @@ -0,0 +1,36 @@ +{ + "module": { + "name": "entry_test", + "type": "feature", + "description": "$string:module_test_desc", + "mainElement": "TestAbility", + "deviceTypes": [ + "phone" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:test_pages", + "abilities": [ + { + "name": "TestAbility", + "srcEntrance": "./ets/testability/TestAbility.ets", + "description": "$string:TestAbility_desc", + "icon": "$media:icon", + "label": "$string:TestAbility_label", + "visible": true, + "startWindowIcon": "$media:icon", + "startWindowBackground": "$color:start_window_background", + "skills": [ + { + "actions": [ + "action.system.home" + ], + "entities": [ + "entity.system.home" + ] + } + ] + } + ] + } +} diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/resources/base/element/color.json b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/resources/base/element/color.json new file mode 100644 index 0000000000000000000000000000000000000000..3c712962da3c2751c2b9ddb53559afcbd2b54a02 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/resources/base/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#FFFFFF" + } + ] +} \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/resources/base/element/string.json b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..65d8fa5a7cf54aa3943dcd0214f58d1771bc1f6c --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/resources/base/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "module_test_desc", + "value": "test ability description" + }, + { + "name": "TestAbility_desc", + "value": "the test ability" + }, + { + "name": "TestAbility_label", + "value": "test label" + } + ] +} \ No newline at end of file diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/resources/base/media/icon.png b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/resources/base/media/icon.png differ diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/resources/base/profile/test_pages.json b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/resources/base/profile/test_pages.json new file mode 100644 index 0000000000000000000000000000000000000000..b7e7343cacb32ce982a45e76daad86e435e054fe --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/entry/src/ohosTest/resources/base/profile/test_pages.json @@ -0,0 +1,5 @@ +{ + "src": [ + "testability/pages/Index" + ] +} diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/hvigorfile.ts b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..6478186902c0c1ad7c966a929c7d6b7d8ae7a9f3 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/hvigorfile.ts @@ -0,0 +1,2 @@ +// 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/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/package-lock.json b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/package-lock.json new file mode 100644 index 0000000000000000000000000000000000000000..410ca991add63a11703acc03d11214bb8a6e5540 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/package-lock.json @@ -0,0 +1,1103 @@ +{ + "name": "healthydiet", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@ohos/hos-sdkmanager-common": { + "version": "2.0.7", + "resolved": "https://repo.harmonyos.com/npm/@ohos/hos-sdkmanager-common/-/@ohos/hos-sdkmanager-common-2.0.7.tgz", + "integrity": "sha512-1dbZlFPImIatThlZWds8sCe6VMKMWCNqOGhoRoEa8FJACKwlUrTybOjCi+MgR5X+vahQDLtDTvMJoZnfMMig6Q==", + "requires": { + "@ohos/sdkmanager-common": "^2.1.5" + } + }, + "@ohos/hvigor": { + "version": "1.3.1", + "resolved": "https://repo.harmonyos.com/npm/@ohos/hvigor/-/@ohos/hvigor-1.3.1.tgz", + "integrity": "sha512-YxIrzzKOPUrXgAe8isUG5q8CTRsP4TIF4Y4KrCeF+uLhMT2FMsd6LYkVj2X9Ib3+siZA+klIUv1Y+kKXMQ55tg==", + "requires": { + "@ohos/hvigor-base": "1.3.1", + "fs-extra": "10.0.1", + "interpret": "1.4.0", + "liftoff": "4.0.0", + "mute-stdout": "1.0.0", + "pretty-hrtime": "1.0.0", + "typescript": "4.7.4", + "v8flags": "3.2.0", + "yargs": "17.5.1" + } + }, + "@ohos/hvigor-base": { + "version": "1.3.1", + "resolved": "https://repo.harmonyos.com/npm/@ohos/hvigor-base/-/@ohos/hvigor-base-1.3.1.tgz", + "integrity": "sha512-0NBF9DGtrdG5YmEXPOgXokgd/ukIF7EDUqYSwYY0utwUJ08A1ukR+V+dcywrczu2erb80NCWbMyCeZOtrGNPMQ==", + "requires": { + "fs-extra": "10.0.1", + "iconv-lite": "0.6.3", + "json5": "2.2.0", + "lodash": "4.17.21", + "log4js": "6.4.1", + "once": "1.4.0", + "pretty-hrtime": "1.0.0" + } + }, + "@ohos/hvigor-ohos-plugin": { + "version": "1.3.1", + "resolved": "https://repo.harmonyos.com/npm/@ohos/hvigor-ohos-plugin/-/@ohos/hvigor-ohos-plugin-1.3.1.tgz", + "integrity": "sha512-K6Nk2tXNMTJlNf1Ad6nV3+DIQ7iFhBibrelUfHHWqDVlfFUWMxUtpk1Nvs/5RgKIu6O+BJRWJURDgm7mUooAWA==", + "requires": { + "@ohos/hos-sdkmanager-common": "2.0.7", + "@ohos/hvigor-base": "1.3.1", + "@ohos/sdkmanager-common": "2.1.5", + "adm-zip": "0.5.9", + "ajv": "8.10.0", + "deasync": "0.1.28", + "execa": "5.1.1", + "fast-xml-parser": "4.0.3", + "fs-extra": "10.0.1", + "glob": "7.2.0", + "iconv-lite": "0.6.3", + "json5": "2.2.0", + "lodash": "4.17.21", + "pretty-hrtime": "1.0.3", + "resolve-package-path": "4.0.3" + }, + "dependencies": { + "pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha512-66hKPCr+72mlfiSjlEB1+45IjXSqvVAIy6mocupoww4tBFE9R9IhwwUGoI4G++Tc9Aq+2rxOt0RFU6gPcrte0A==" + } + } + }, + "@ohos/hypium": { + "version": "1.0.3", + "resolved": "https://repo.harmonyos.com/npm/@ohos/hypium/-/@ohos/hypium-1.0.3.tgz", + "integrity": "sha512-QKh8ngJk1ySbAiKpSTLP5EJIbT8Oja1zV3zwgLD7U9+KX7w2gjNIk3qoP+d13CwpEfaSR3Lxt3exlQLwWSFx3g==" + }, + "@ohos/sdkmanager-common": { + "version": "2.1.5", + "resolved": "https://repo.harmonyos.com/npm/@ohos/sdkmanager-common/-/@ohos/sdkmanager-common-2.1.5.tgz", + "integrity": "sha512-Ka6DncGdEkZ5A9/8aR0oea/PL6yZtPudXTalAX+oXCLIGUxUu400TBcETFZ4fsIePbxmWyOSQW5T1VqUYYIdOg==", + "requires": { + "axios": "0.24.0", + "jszip": "^3.7.0" + } + }, + "adm-zip": { + "version": "0.5.9", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.9.tgz", + "integrity": "sha512-s+3fXLkeeLjZ2kLjCBwQufpI5fuN+kIGBxu6530nVQZGVol0d7Y/M88/xw9HGGUcJjKf8LutN3VPRUBq6N7Ajg==" + }, + "ajv": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.10.0.tgz", + "integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==", + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==" + }, + "array-slice": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==" + }, + "axios": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz", + "integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==", + "requires": { + "follow-redirects": "^1.14.4" + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "requires": { + "fill-range": "^7.0.1" + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "dependencies": { + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "date-format": { + "version": "4.0.14", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", + "integrity": "sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==" + }, + "deasync": { + "version": "0.1.28", + "resolved": "https://registry.npmjs.org/deasync/-/deasync-0.1.28.tgz", + "integrity": "sha512-QqLF6inIDwiATrfROIyQtwOQxjZuek13WRYZ7donU5wJPLoP67MnYxA6QtqdvdBy2mMqv5m3UefBVdJjvevOYg==", + "requires": { + "bindings": "^1.5.0", + "node-addon-api": "^1.7.1" + } + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "requires": { + "ms": "2.1.2" + } + }, + "detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==" + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" + }, + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-xml-parser": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.0.3.tgz", + "integrity": "sha512-xhQbg3a/EYNHwK0cxIG1nZmVkHX/0tWihamn5pU4Mhd9KEVE2ga8ZJiqEUgB2sApElvAATOdMTLjgqIpvYDUkQ==", + "requires": { + "strnum": "^1.0.5" + } + }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "findup-sync": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-5.0.0.tgz", + "integrity": "sha512-MzwXju70AuyflbgeOhzvQWAvvQdo1XL0A9bVvlXsYcFEBM87WR4OakL4OfZq+QRmr+duJubio+UtNQCPsVESzQ==", + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^4.0.3", + "micromatch": "^4.0.4", + "resolve-dir": "^1.0.1" + } + }, + "fined": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-2.0.0.tgz", + "integrity": "sha512-OFRzsL6ZMHz5s0JrsEr+TpdGNCtrVtnuG3x1yzGNiQHT0yaDnXAj8V/lWcpJVrnoDpcwXcASxAZYbuXda2Y82A==", + "requires": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^5.0.0", + "object.defaults": "^1.1.0", + "object.pick": "^1.3.0", + "parse-filepath": "^1.0.2" + } + }, + "flagged-respawn": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-2.0.0.tgz", + "integrity": "sha512-Gq/a6YCi8zexmGHMuJwahTGzXlAZAOsbCVKduWXC6TlLCjjFRlExMJc4GC2NYPYZ0r/brw9P7CpRgQmlPVeOoA==" + }, + "flatted": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==" + }, + "follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==" + }, + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==", + "requires": { + "for-in": "^1.0.1" + } + }, + "fs-extra": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz", + "integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==" + }, + "glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + }, + "graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "requires": { + "parse-passwd": "^1.0.0" + } + }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==" + }, + "iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + }, + "immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" + }, + "is-absolute": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "requires": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + } + }, + "is-core-module": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "requires": { + "has": "^1.0.3" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==" + }, + "is-relative": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "requires": { + "is-unc-path": "^1.0.0" + } + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==" + }, + "is-unc-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "requires": { + "unc-path-regex": "^0.1.2" + } + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==" + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "requires": { + "minimist": "^1.2.5" + } + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "jszip": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", + "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", + "requires": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "setimmediate": "^1.0.5" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" + }, + "lie": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "requires": { + "immediate": "~3.0.5" + } + }, + "liftoff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-4.0.0.tgz", + "integrity": "sha512-rMGwYF8q7g2XhG2ulBmmJgWv25qBsqRbDn5gH0+wnuyeFt7QBJlHJmtg5qEdn4pN6WVAUMgXnIxytMFRX9c1aA==", + "requires": { + "extend": "^3.0.2", + "findup-sync": "^5.0.0", + "fined": "^2.0.0", + "flagged-respawn": "^2.0.0", + "is-plain-object": "^5.0.0", + "object.map": "^1.0.1", + "rechoir": "^0.8.0", + "resolve": "^1.20.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "log4js": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.4.1.tgz", + "integrity": "sha512-iUiYnXqAmNKiIZ1XSAitQ4TmNs8CdZYTAWINARF3LjnsLN8tY5m0vRwd6uuWj/yNY0YHxeZodnbmxKFUOM2rMg==", + "requires": { + "date-format": "^4.0.3", + "debug": "^4.3.3", + "flatted": "^3.2.4", + "rfdc": "^1.3.0", + "streamroller": "^3.0.2" + } + }, + "make-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "requires": { + "kind-of": "^6.0.2" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==" + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==" + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "mute-stdout": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.0.tgz", + "integrity": "sha512-MaSQenn0f9oxIjtCufclpV00MuYTiHaXPbdcfPIM+quMqoa8cXywjHHx4LhhIAZlXqPWMdcUpYviajfmHtHRJw==" + }, + "node-addon-api": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz", + "integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg==" + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "requires": { + "path-key": "^3.0.0" + } + }, + "object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA==", + "requires": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "object.map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w==", + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", + "requires": { + "isobject": "^3.0.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" + }, + "parse-filepath": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==", + "requires": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + } + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==", + "requires": { + "path-root-regex": "^0.1.0" + } + }, + "path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==" + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" + }, + "pinyin-pro": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/pinyin-pro/-/pinyin-pro-3.11.0.tgz", + "integrity": "sha512-l2JDFyEIMdTIyff3OkuoSIJCpYTwrxrR2KuMyGMjdNEcHGcEVSKIEb7mvKEKOhJaZLp2FB++Jax+MD0BWafbhg==" + }, + "pretty-hrtime": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.0.tgz", + "integrity": "sha512-CU2l5CYUAptUYq/671ajexQfXuxJFwwg0n243Kdkx8bTjeenedsWgu8TGHPm03vLfNtk3aTXgySKPp3Usykudw==" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rechoir": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", + "requires": { + "resolve": "^1.20.0" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==" + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" + }, + "resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "requires": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + }, + "resolve-package-path": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/resolve-package-path/-/resolve-package-path-4.0.3.tgz", + "integrity": "sha512-SRpNAPW4kewOaNUt8VPqhJ0UMxawMwzJD8V7m1cJfdSTK9ieZwS6K7Dabsm4bmLFM96Z5Y/UznrpG5kt1im8yA==", + "requires": { + "path-root": "^0.1.1" + } + }, + "rfdc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==" + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + }, + "signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + }, + "streamroller": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.3.tgz", + "integrity": "sha512-CphIJyFx2SALGHeINanjFRKQ4l7x2c+rXYJ4BMq0gd+ZK0gi4VT8b+eHe2wi58x4UayBAKx4xtHpXT/ea1cz8w==", + "requires": { + "date-format": "^4.0.14", + "debug": "^4.3.4", + "fs-extra": "^8.1.0" + }, + "dependencies": { + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + } + } + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==" + }, + "strnum": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", + "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==" + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "requires": { + "is-number": "^7.0.0" + } + }, + "typescript": { + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", + "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==" + }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==" + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "requires": { + "punycode": "^2.1.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "v8flags": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", + "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "requires": { + "isexe": "^2.0.0" + } + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" + }, + "yargs": { + "version": "17.5.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", + "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.0.0" + } + }, + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==" + } + } +} diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/package.json b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/package.json new file mode 100644 index 0000000000000000000000000000000000000000..64f11b04f6156d7a40999ccca85e0aff89c7d161 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/HealthyDiet/package.json @@ -0,0 +1,18 @@ +{ + "name": "healthydiet", + "version": "1.0.0", + "ohos": { + "org": "huawei", + "buildTool": "hvigor", + "directoryLevel": "project" + }, + "description": "example description", + "repository": {}, + "license": "ISC", + "dependencies": { + "@ohos/hvigor": "1.3.1", + "@ohos/hvigor-ohos-plugin": "1.3.1", + "@ohos/hypium": "1.0.3", + "pinyin-pro": "^3.11.0" + } +} diff --git a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/README.md b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/README.md new file mode 100644 index 0000000000000000000000000000000000000000..80d9cd774eb3d363cf4b1c32395e3197136fc7d0 --- /dev/null +++ b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/README.md @@ -0,0 +1,32 @@ +# ArkUI入门训练营-健康饮食应用 + +### 项目简介 + +由于本人时间不太充裕,目前这个应用是参考示例项目和视频课程完成的。在已完成界面设计和功能上与示例项目基本一致, 仅在某些细节上有所差异,有部分效果和功能未实现,可以说没有什么创新的功能吧。 + +### 功能介绍 + +- 打开应用后首先进入启动页面,等待片刻后即进入主页面。 +- 主页可选择以列表视图或网格视图查看所有食物,也可以分类查看食物。 + - 可点击上方搜索按钮,在搜索框中输入食物名称(中文或英文均可)后,下方列表随之刷新,显示搜索的结果。 + - 点击列表项或网格项可以跳转到食物详情页面。 +- 食物详情页包含食物图片展示,添加食物记录,以及食物信息展示的功能。 + - 点击食物图片,可放大图片,再次点击可缩小。 + - 食物信息卡片包含热量与各营养成分的数值展示,以及进度条形式的图形化展示。 +- 记录页面展示已添加的食物记录信息,包括每一餐的食物卡片,热量和营养的统计图表。 + - 每一餐的食物卡片列出一餐的食物记录,可以对每一项的重量进行增加、减少,也可以通过向左滑动将记录删除,还可以将一餐中的所有记录项折叠,每一个操作都会即时地刷新页面数据。 + - 热量和营养的统计图表将一天中每一餐的数据进行统计,以柱状图的形式直观地展现出来。 + +### 活动总结 +通过本次训练营的学习,我掌握了ArkTS的大部分语法知识,各种装饰器的使用,以及各种API组件的基本用法,同时还积累了不少自定义组件的经验。 +当然,这次训练营涵盖的知识非常丰富、广泛,一时间无法全部理解,比如形状、路径的绘制,组件和页面动画的设计与实现,还有实现一次开发、多端部署的自适应布局、栅格系统,这些知识我还需要继续学习和研究。 +### 预览效果 +|主页-列表视图|主页-网格视图| +|---|---| +|![](./img/主页-列表视图.gif)|![](./img/主页-网格视图.gif)| +|主页-搜索食物|主页-分类查看| +|![](./img/主页-搜索食物.gif)|![](./img/主页-分类查看.gif)| +|食物详情|食物详情-添加记录| +|![](./img/食物详情-营养卡片.gif)|![](./img/食物详情-添加记录.gif)| +|记录-热量图表与可折叠卡片|记录-营养图表| +|![](./img/记录-可折叠卡片.gif)|![](./img/记录-图表展示.gif)| \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/img/\344\270\273\351\241\265-\345\210\206\347\261\273\346\237\245\347\234\213.gif" "b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/img/\344\270\273\351\241\265-\345\210\206\347\261\273\346\237\245\347\234\213.gif" new file mode 100644 index 0000000000000000000000000000000000000000..0a09751c6a42611ca88172f4848468fa8d599ef5 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/img/\344\270\273\351\241\265-\345\210\206\347\261\273\346\237\245\347\234\213.gif" differ diff --git "a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/img/\344\270\273\351\241\265-\345\210\227\350\241\250\350\247\206\345\233\276.gif" "b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/img/\344\270\273\351\241\265-\345\210\227\350\241\250\350\247\206\345\233\276.gif" new file mode 100644 index 0000000000000000000000000000000000000000..96480720d1ccc8818a01668a52f5d26abff9bfe8 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/img/\344\270\273\351\241\265-\345\210\227\350\241\250\350\247\206\345\233\276.gif" differ diff --git "a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/img/\344\270\273\351\241\265-\346\220\234\347\264\242\351\243\237\347\211\251.gif" "b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/img/\344\270\273\351\241\265-\346\220\234\347\264\242\351\243\237\347\211\251.gif" new file mode 100644 index 0000000000000000000000000000000000000000..facad5711f1b30c4f057704169b604e776f657ed Binary files /dev/null and "b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/img/\344\270\273\351\241\265-\346\220\234\347\264\242\351\243\237\347\211\251.gif" differ diff --git "a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/img/\344\270\273\351\241\265-\347\275\221\346\240\274\350\247\206\345\233\276.gif" "b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/img/\344\270\273\351\241\265-\347\275\221\346\240\274\350\247\206\345\233\276.gif" new file mode 100644 index 0000000000000000000000000000000000000000..fd139aa5c340f2107060687e1012ad1afed95ce9 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/img/\344\270\273\351\241\265-\347\275\221\346\240\274\350\247\206\345\233\276.gif" differ diff --git "a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/img/\350\256\260\345\275\225-\345\217\257\346\212\230\345\217\240\345\215\241\347\211\207.gif" "b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/img/\350\256\260\345\275\225-\345\217\257\346\212\230\345\217\240\345\215\241\347\211\207.gif" new file mode 100644 index 0000000000000000000000000000000000000000..e66588a6a682d890f07df0ffba7514e20771a368 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/img/\350\256\260\345\275\225-\345\217\257\346\212\230\345\217\240\345\215\241\347\211\207.gif" differ diff --git "a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/img/\350\256\260\345\275\225-\345\233\276\350\241\250\345\261\225\347\244\272.gif" "b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/img/\350\256\260\345\275\225-\345\233\276\350\241\250\345\261\225\347\244\272.gif" new file mode 100644 index 0000000000000000000000000000000000000000..58783380d7aa6ec490381dfa4d33605f68896d9f Binary files /dev/null and "b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/img/\350\256\260\345\275\225-\345\233\276\350\241\250\345\261\225\347\244\272.gif" differ diff --git "a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/img/\351\243\237\347\211\251\350\257\246\346\203\205-\346\267\273\345\212\240\350\256\260\345\275\225.gif" "b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/img/\351\243\237\347\211\251\350\257\246\346\203\205-\346\267\273\345\212\240\350\256\260\345\275\225.gif" new file mode 100644 index 0000000000000000000000000000000000000000..ec17414e2193653487c4c86e89ae5f9a0d0e16e6 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/img/\351\243\237\347\211\251\350\257\246\346\203\205-\346\267\273\345\212\240\350\256\260\345\275\225.gif" differ diff --git "a/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/img/\351\243\237\347\211\251\350\257\246\346\203\205-\350\220\245\345\205\273\345\215\241\347\211\207.gif" "b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/img/\351\243\237\347\211\251\350\257\246\346\203\205-\350\220\245\345\205\273\345\215\241\347\211\207.gif" new file mode 100644 index 0000000000000000000000000000000000000000..bd84977d24ed5a88dd1a0aa6f4125048c70f57cf Binary files /dev/null and "b/2022_ArkUI_Bootcamp/19865644384+HealthyDietDemo/img/\351\243\237\347\211\251\350\257\246\346\203\205-\350\220\245\345\205\273\345\215\241\347\211\207.gif" differ