diff --git a/examples/Picker/TextPickerDialog_columnWidths/.gitignore b/examples/Picker/TextPickerDialog_columnWidths/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..d2ff20141ceed86d87c0ea5d99481973005bab2b --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/.gitignore @@ -0,0 +1,12 @@ +/node_modules +/oh_modules +/local.properties +/.idea +**/build +/.hvigor +.cxx +/.clangd +/.clang-format +/.clang-tidy +**/.test +/.appanalyzer \ No newline at end of file diff --git a/examples/Picker/TextPickerDialog_columnWidths/AppScope/app.json5 b/examples/Picker/TextPickerDialog_columnWidths/AppScope/app.json5 new file mode 100644 index 0000000000000000000000000000000000000000..7fcb893787932ebddc1dff9df9d5b72d9afbb63b --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/AppScope/app.json5 @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{ + "app": { + "bundleName": "com.example.textpickerdialog_columnwidths", + "vendor": "example", + "versionCode": 1000000, + "versionName": "1.0.0", + "icon": "$media:layered_image", + "label": "$string:app_name" + } +} diff --git a/examples/Picker/TextPickerDialog_columnWidths/AppScope/resources/base/element/string.json b/examples/Picker/TextPickerDialog_columnWidths/AppScope/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..1602c8450bb059caeb3a8d2feffa9207f964679b --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/AppScope/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "app_name", + "value": "TextPickerDialog_columnWidths" + } + ] +} diff --git a/examples/Picker/TextPickerDialog_columnWidths/AppScope/resources/base/media/background.png b/examples/Picker/TextPickerDialog_columnWidths/AppScope/resources/base/media/background.png new file mode 100644 index 0000000000000000000000000000000000000000..923f2b3f27e915d6871871deea0420eb45ce102f Binary files /dev/null and b/examples/Picker/TextPickerDialog_columnWidths/AppScope/resources/base/media/background.png differ diff --git a/examples/Picker/TextPickerDialog_columnWidths/AppScope/resources/base/media/foreground.png b/examples/Picker/TextPickerDialog_columnWidths/AppScope/resources/base/media/foreground.png new file mode 100644 index 0000000000000000000000000000000000000000..eb9427585b36d14b12477435b6419d1f07b3e0bb Binary files /dev/null and b/examples/Picker/TextPickerDialog_columnWidths/AppScope/resources/base/media/foreground.png differ diff --git a/examples/Picker/TextPickerDialog_columnWidths/AppScope/resources/base/media/layered_image.json b/examples/Picker/TextPickerDialog_columnWidths/AppScope/resources/base/media/layered_image.json new file mode 100644 index 0000000000000000000000000000000000000000..fb49920440fb4d246c82f9ada275e26123a2136a --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/AppScope/resources/base/media/layered_image.json @@ -0,0 +1,7 @@ +{ + "layered-image": + { + "background" : "$media:background", + "foreground" : "$media:foreground" + } +} \ No newline at end of file diff --git a/examples/Picker/TextPickerDialog_columnWidths/build-profile.json5 b/examples/Picker/TextPickerDialog_columnWidths/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..10b45c8977f1aae356b356a91ddc3d404e0724cc --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/build-profile.json5 @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{ + "app": { + "signingConfigs": [ + { + "name": "default", + "type": "HarmonyOS", + "material": { + "certpath": "C:\\Users\\hxx\\.ohos\\config\\default_TextPickerDialog_columnWidths_iO4-r3HIzQxI46XxDspJTOjvfcUYc0MrKbCPq0SFYpk=.cer", + "keyAlias": "debugKey", + "keyPassword": "0000001AF1A69BC68BDD77B805E950F47B67B0A1A08AA6B86B350617369C2FFEF83AFB3E611F6B5033BC", + "profile": "C:\\Users\\hxx\\.ohos\\config\\default_TextPickerDialog_columnWidths_iO4-r3HIzQxI46XxDspJTOjvfcUYc0MrKbCPq0SFYpk=.p7b", + "signAlg": "SHA256withECDSA", + "storeFile": "C:\\Users\\hxx\\.ohos\\config\\default_TextPickerDialog_columnWidths_iO4-r3HIzQxI46XxDspJTOjvfcUYc0MrKbCPq0SFYpk=.p12", + "storePassword": "0000001A7255070E0462A1D45890C4F3DD569613F48F49259AE83827D931AD057ED082B49F8F1073E245" + } + } + ], + "products": [ + { + "name": "default", + "signingConfig": "default", + "targetSdkVersion": "5.1.1(19)", + "compatibleSdkVersion": "5.1.1(19)", + "runtimeOS": "HarmonyOS", + "buildOption": { + "strictMode": { + "caseSensitiveCheck": true, + "useNormalizedOHMUrl": true + } + } + } + ], + "buildModeSet": [ + { + "name": "debug", + }, + { + "name": "release" + } + ] + }, + "modules": [ + { + "name": "entry", + "srcPath": "./entry", + "targets": [ + { + "name": "default", + "applyToProducts": [ + "default" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/examples/Picker/TextPickerDialog_columnWidths/code-linter.json5 b/examples/Picker/TextPickerDialog_columnWidths/code-linter.json5 new file mode 100644 index 0000000000000000000000000000000000000000..5c4682f8164874ec7e9cb8f99ff8b3228ffbc126 --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/code-linter.json5 @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{ + "files": [ + "**/*.ets" + ], + "ignore": [ + "**/src/ohosTest/**/*", + "**/src/test/**/*", + "**/src/mock/**/*", + "**/node_modules/**/*", + "**/oh_modules/**/*", + "**/build/**/*", + "**/.preview/**/*" + ], + "ruleSet": [ + "plugin:@performance/recommended", + "plugin:@typescript-eslint/recommended" + ], + "rules": { + "@security/no-unsafe-aes": "error", + "@security/no-unsafe-hash": "error", + "@security/no-unsafe-mac": "warn", + "@security/no-unsafe-dh": "error", + "@security/no-unsafe-dsa": "error", + "@security/no-unsafe-ecdsa": "error", + "@security/no-unsafe-rsa-encrypt": "error", + "@security/no-unsafe-rsa-sign": "error", + "@security/no-unsafe-rsa-key": "error", + "@security/no-unsafe-dsa-key": "error", + "@security/no-unsafe-dh-key": "error", + "@security/no-unsafe-3des": "error" + } +} \ No newline at end of file diff --git a/examples/Picker/TextPickerDialog_columnWidths/entry/.gitignore b/examples/Picker/TextPickerDialog_columnWidths/entry/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..e2713a2779c5a3e0eb879efe6115455592caeea5 --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/entry/.gitignore @@ -0,0 +1,6 @@ +/node_modules +/oh_modules +/.preview +/build +/.cxx +/.test \ No newline at end of file diff --git a/examples/Picker/TextPickerDialog_columnWidths/entry/build-profile.json5 b/examples/Picker/TextPickerDialog_columnWidths/entry/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..982dbb524bd63408e05cfbed7204dd87a31dd681 --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/entry/build-profile.json5 @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{ + "apiType": "stageMode", + "buildOption": { + }, + "buildOptionSet": [ + { + "name": "release", + "arkOptions": { + "obfuscation": { + "ruleOptions": { + "enable": false, + "files": [ + "./obfuscation-rules.txt" + ] + } + } + } + }, + ], + "targets": [ + { + "name": "default" + }, + { + "name": "ohosTest", + } + ] +} \ No newline at end of file diff --git a/examples/Picker/TextPickerDialog_columnWidths/entry/hvigorfile.ts b/examples/Picker/TextPickerDialog_columnWidths/entry/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..f8b117a17af3b2d7cb87a7680e29e2bb8ccd5b46 --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/entry/hvigorfile.ts @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { hapTasks } from '@ohos/hvigor-ohos-plugin'; + +export default { + system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins: [] /* Custom plugin to extend the functionality of Hvigor. */ +} \ No newline at end of file diff --git a/examples/Picker/TextPickerDialog_columnWidths/entry/obfuscation-rules.txt b/examples/Picker/TextPickerDialog_columnWidths/entry/obfuscation-rules.txt new file mode 100644 index 0000000000000000000000000000000000000000..272efb6ca3f240859091bbbfc7c5802d52793b0b --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/entry/obfuscation-rules.txt @@ -0,0 +1,23 @@ +# Define project specific obfuscation rules here. +# You can include the obfuscation configuration files in the current module's build-profile.json5. +# +# For more details, see +# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5 + +# Obfuscation options: +# -disable-obfuscation: disable all obfuscations +# -enable-property-obfuscation: obfuscate the property names +# -enable-toplevel-obfuscation: obfuscate the names in the global scope +# -compact: remove unnecessary blank spaces and all line feeds +# -remove-log: remove all console.* statements +# -print-namecache: print the name cache that contains the mapping from the old names to new names +# -apply-namecache: reuse the given cache file + +# Keep options: +# -keep-property-name: specifies property names that you want to keep +# -keep-global-name: specifies names that you want to keep in the global scope + +-enable-property-obfuscation +-enable-toplevel-obfuscation +-enable-filename-obfuscation +-enable-export-obfuscation \ No newline at end of file diff --git a/examples/Picker/TextPickerDialog_columnWidths/entry/oh-package.json5 b/examples/Picker/TextPickerDialog_columnWidths/entry/oh-package.json5 new file mode 100644 index 0000000000000000000000000000000000000000..10cda399b0aec3099b257299a57d284393e4e55a --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/entry/oh-package.json5 @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{ + "name": "entry", + "version": "1.0.0", + "description": "Please describe the basic information.", + "main": "", + "author": "", + "license": "", + "dependencies": {} +} + diff --git a/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/ets/entryability/EntryAbility.ets b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/ets/entryability/EntryAbility.ets new file mode 100644 index 0000000000000000000000000000000000000000..508880af8c33aa838016d1cd4b2c68be2f447540 --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/ets/entryability/EntryAbility.ets @@ -0,0 +1,44 @@ +import { AbilityConstant, ConfigurationConstant, UIAbility, Want } from '@kit.AbilityKit'; +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { window } from '@kit.ArkUI'; + +const DOMAIN = 0x0000; + +export default class EntryAbility extends UIAbility { + onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { + this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_NOT_SET); + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onCreate'); + } + + onDestroy(): void { + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onDestroy'); + } + + onWindowStageCreate(windowStage: window.WindowStage): void { + // Main window is created, set main page for this ability + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); + + windowStage.loadContent('pages/Index', (err) => { + if (err.code) { + hilog.error(DOMAIN, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err)); + return; + } + hilog.info(DOMAIN, 'testTag', 'Succeeded in loading the content.'); + }); + } + + onWindowStageDestroy(): void { + // Main window is destroyed, release UI related resources + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); + } + + onForeground(): void { + // Ability has brought to foreground + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onForeground'); + } + + onBackground(): void { + // Ability has back to background + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onBackground'); + } +} \ No newline at end of file diff --git a/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets new file mode 100644 index 0000000000000000000000000000000000000000..8e4de99282050bad799ac892eb85ac5449364a51 --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets @@ -0,0 +1,16 @@ +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { BackupExtensionAbility, BundleVersion } from '@kit.CoreFileKit'; + +const DOMAIN = 0x0000; + +export default class EntryBackupAbility extends BackupExtensionAbility { + async onBackup() { + hilog.info(DOMAIN, 'testTag', 'onBackup ok'); + await Promise.resolve(); + } + + async onRestore(bundleVersion: BundleVersion) { + hilog.info(DOMAIN, 'testTag', 'onRestore ok %{public}s', JSON.stringify(bundleVersion)); + await Promise.resolve(); + } +} \ No newline at end of file diff --git a/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/ets/pages/Index.ets b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/ets/pages/Index.ets new file mode 100644 index 0000000000000000000000000000000000000000..d8681a968fc1b8d73430f2334912858da7987ac1 --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/ets/pages/Index.ets @@ -0,0 +1,290 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { CalleeCallback, ConfigurationConstant } from '@kit.AbilityKit'; +import { Callback } from '@ohos.base'; +import { LengthMetrics } from '@kit.ArkUI'; + +interface pickerCategories { + id?: string, + text: string, + value?: T +} + +interface pickerData { + id: string, + range: string[] | string[][] | Resource | TextPickerRangeContent[] | TextCascadePickerRangeContent[] +} + +@Entry +@Component +struct Index { + @State currentDialog: string = ''; + + private apples: string[] = ['apple1', 'apple2', 'apple3', 'apple4']; + private oranges: string[] = ['orange1', 'orange2', 'orange3', 'orange4']; + private peaches: string[] = ['peach1', 'peach2', 'peach3', 'peach4']; + private multiFruits: string[][] = [this.apples, this.oranges, this.peaches]; + + private resRange: Resource = $r('app.strarray.example_name_1'); + private contentRange: TextPickerRangeContent[] = [ + { + icon: $r('app.media.svg1'), + text: $r('app.string.heilongjiang') + }, + { + icon: $r('sys.media.ohos_ic_public_phone'), + text: $r('app.string.jilin') + }, + { + icon: $r('sys.media.ohos_ic_public_more'), + text: $r('app.string.liaoning') + }, + { + icon: $r('app.media.3_C'), + text: $r('app.string.shenhe') + } + ]; + + private cascade: TextCascadePickerRangeContent[] = [ + { + text: $r('app.string.liaoning'), + children: [ + { + text: $r('app.string.shenyang'), + children: [ + { + text: $r('app.string.shenhe') + }, + { + text: $r('app.string.heping') + }, + { + text: $r('app.string.hunnan') + } + ] + }, + { + text: $r('app.string.dalian'), + children: [ + { + text: $r('app.string.zhongshan') + }, + { + text: $r('app.string.jinzhou') + }, + { + text: $r('app.string.changhai') + } + ] + } + ] + }, + { + text: $r('app.string.jilin'), + children: [ + { + text: $r('app.string.changchun'), + children: [ + { + text: $r('app.string.nanguan') + }, + { + text: $r('app.string.kuancheng') + }, + { + text: $r('app.string.chaoyang') + } + ] + }, + { + text: $r('app.string.siping'), + children: [ + { + text: $r('app.string.tiexi') + }, + { + text: $r('app.string.tiedong') + }, + { + text: $r('app.string.lishu') + } + ] + } + ] + }, + { + text: $r('app.string.heilongjiang'), + children: [ + { + text: $r('app.string.haerbing'), + children: [ + { + text: $r('app.string.daoli'), + }, + { + text: $r('app.string.daowai'), + }, + { + text: $r('app.string.nangang'), + } + ] + }, + { + text: $r('app.string.mudan'), + children: [ + { + text: $r('app.string.dongan') + }, + { + text: $r('app.string.xian') + }, + { + text: $r('app.string.aimin') + } + ] + } + ] + } + ]; + + allData: pickerData[] = [ + {id: '单列', range: this.resRange}, + {id: '单列图文', range: this.contentRange}, + {id: '多列不联动', range: this.multiFruits}, + {id: '多列联动', range: this.cascade}, + {id: '单例超长', range: ['这是一个超级超级超级超级超级超级无敌长的文本']} + ]; + @State dataIndex: number = -1; + + @State columnWidthsValues: pickerCategories[] = [ + { + text: 'undefined', + value: undefined + }, + { + text: '[]', + value: [] + }, + { + text: '60(170)vp', + value: [LengthMetrics.resource($r('app.string.100vpDark200'))] + }, + { + text: '60%', + value: [LengthMetrics.percent(60)] + }, + { + text: '100%', + value: [LengthMetrics.percent(100)] + }, + { + text: '100-100-200(200-120-220)vp', + value: [LengthMetrics.resource($r('app.string.100vpDark200')), + LengthMetrics.resource($r('app.string.100vpDark120')), + LengthMetrics.resource($r('app.string.200vpDark220'))] + }, + { + text: '20-40-20(25-45-25)%', + value: [LengthMetrics.resource($r('app.string.20PercentDark25')), + LengthMetrics.resource($r('app.string.40PercentDark45')), + LengthMetrics.resource($r('app.string.20PercentDark25'))] + }, + { + text: '100vp-20%-20%(120vp-25%-25%)', + value: [LengthMetrics.resource($r('app.string.100vpDark120')), + LengthMetrics.resource($r('app.string.20PercentDark25')), + LengthMetrics.resource($r('app.string.20PercentDark25'))] + }, + { + text: '100vp-99999vp', + value: [LengthMetrics.vp(100), LengthMetrics.resource($r('app.string.99999vp'))] + }, + { + text: '20%-20%-60%', + value: [LengthMetrics.percent(20), LengthMetrics.percent(20), LengthMetrics.percent(60)] + }, + { + text: '60%-20%-20%', + value: [LengthMetrics.percent(60), LengthMetrics.percent(20), LengthMetrics.percent(20)] + } + ]; + @State columnWidths?: LengthMetrics[] = undefined; + @State columnWidthsStr: string = ''; + + @Builder + clickComponent(id?: string, text?: string, click?: Callback) { + Column() { + Button(text).fontSize(12) + } + .id(id) + .onClick(click) + } + + build() { + Column({space: 5}) { + Text('TextPickerDialog columnWidths') + + Scroll() { + Column({space: 5}) { + Row({space: 5}) { + this.clickComponent(undefined, '深色', (event: ClickEvent) => { + let context = this.getUIContext().getHostContext()?.getApplicationContext() + context?.setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_DARK) + }) + this.clickComponent(undefined, '浅色', (event: ClickEvent) => { + let context = this.getUIContext().getHostContext()?.getApplicationContext() + context?.setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_LIGHT) + }) + }.width('100%') + + Text('选择一个TextPickerDialog: ' + this.currentDialog).width('100%') + Flex({wrap: FlexWrap.Wrap, alignContent: FlexAlign.Center, space: {main: LengthMetrics.vp(5)}}) { + ForEach(this.allData, (item: pickerData, index: number) => { + this.clickComponent(item.id, item.id, (event: ClickEvent) => { + this.dataIndex = index; + this.currentDialog = this.allData[index].id; + }) + }) + }.width('100%') + + Text('columnWidths: ' + this.columnWidthsStr).width('100%') + Flex({wrap: FlexWrap.Wrap, alignContent: FlexAlign.Center, space: {main: LengthMetrics.vp(5)}}) { + ForEach(this.columnWidthsValues, (item: pickerCategories, index: number) => { + this.clickComponent(item.text, item.text, (event: ClickEvent) => { + this.columnWidths = item.value; + this.columnWidthsStr = item.text; + }) + }) + }.width('100%') + + }.width('100%') + }.constraintSize({maxHeight: '500vp'}) + + Stack() { + ForEach(this.allData, (item: pickerData, index: number) => { + Button('TextPickerDialog') + .onClick(() => { + this.getUIContext().showTextPickerDialog({ + range: item.range, + columnWidths: this.columnWidths, + }) + }) + .visibility(this.dataIndex == index ? Visibility.Visible : Visibility.Hidden) + }) + } + }.width('100%') + } +} diff --git a/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/module.json5 b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/module.json5 new file mode 100644 index 0000000000000000000000000000000000000000..53024e8f020cc0824592631ba6924108c8028f0f --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/module.json5 @@ -0,0 +1,50 @@ +{ + "module": { + "name": "entry", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "EntryAbility", + "deviceTypes": [ + "phone" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:main_pages", + "abilities": [ + { + "name": "EntryAbility", + "srcEntry": "./ets/entryability/EntryAbility.ets", + "description": "$string:EntryAbility_desc", + "icon": "$media:layered_image", + "label": "$string:EntryAbility_label", + "startWindowIcon": "$media:startIcon", + "startWindowBackground": "$color:start_window_background", + "exported": true, + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "ohos.want.action.home" + ] + } + ] + } + ], + "extensionAbilities": [ + { + "name": "EntryBackupAbility", + "srcEntry": "./ets/entrybackupability/EntryBackupAbility.ets", + "type": "backup", + "exported": false, + "metadata": [ + { + "name": "ohos.extension.backup", + "resource": "$profile:backup_config" + } + ], + } + ] + } +} \ No newline at end of file diff --git a/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/base/element/color.json b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/base/element/color.json new file mode 100644 index 0000000000000000000000000000000000000000..3c712962da3c2751c2b9ddb53559afcbd2b54a02 --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/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/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/base/element/float.json b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/base/element/float.json new file mode 100644 index 0000000000000000000000000000000000000000..33ea22304f9b1485b5f22d811023701b5d4e35b6 --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/base/element/float.json @@ -0,0 +1,8 @@ +{ + "float": [ + { + "name": "page_text_font_size", + "value": "50fp" + } + ] +} diff --git a/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/base/element/strarray.json b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/base/element/strarray.json new file mode 100644 index 0000000000000000000000000000000000000000..8813a6670c67b387f5a559b2fa936558ab13c101 --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/base/element/strarray.json @@ -0,0 +1,22 @@ +{ + "strarray": [ + { + "name": "example_name_1", + "value": [ + { + "value": "string_value_1" + }, + { + "value": "string_value_2" + }, + { + "value": "string_value_3" + }, + { + "value": "string_value_4" + } + ], + "comment": "This is a comment for the first object" + } + ] +} \ No newline at end of file diff --git a/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/base/element/string.json b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..e6f862e859e6f2047c95f697e175d3f8d164fe02 --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/base/element/string.json @@ -0,0 +1,148 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "label" + }, + { + "name": "liaoning", + "value": "浅辽宁省" + }, + { + "name": "shenyang", + "value": "浅沈阳市" + }, + { + "name": "shenhe", + "value": "浅沈河区" + }, + { + "name": "heping", + "value": "浅和平区" + }, + { + "name": "hunnan", + "value": "浅浑南区" + }, + { + "name": "dalian", + "value": "浅大连市" + }, + { + "name": "zhongshan", + "value": "浅中山区" + }, + { + "name": "jinzhou", + "value": "浅金州区" + }, + { + "name": "changhai", + "value": "浅长海县" + }, + { + "name": "jilin", + "value": "浅吉林省" + }, + { + "name": "changchun", + "value": "浅长春市" + }, + { + "name": "nanguan", + "value": "浅南关区" + }, + { + "name": "kuancheng", + "value": "浅宽城区" + }, + { + "name": "chaoyang", + "value": "浅朝阳区" + }, + { + "name": "siping", + "value": "浅四平市" + }, + { + "name": "tiexi", + "value": "浅铁西区" + }, + { + "name": "tiedong", + "value": "浅铁东区" + }, + { + "name": "lishu", + "value": "浅梨树县" + }, + { + "name": "heilongjiang", + "value": "浅黑龙江省" + }, + { + "name": "haerbing", + "value": "浅哈尔滨市" + }, + { + "name": "daoli", + "value": "浅道里区" + }, + { + "name": "daowai", + "value": "浅道外区" + }, + { + "name": "nangang", + "value": "浅南岗区" + }, + { + "name": "mudan", + "value": "浅牡丹江市" + }, + { + "name": "dongan", + "value": "浅东安区" + }, + { + "name": "xian", + "value": "浅西安区" + }, + { + "name": "aimin", + "value": "浅爱民区" + }, + { + "name": "100vpDark200", + "value": "100vp" + }, + { + "name": "100vpDark120", + "value": "100vp" + }, + { + "name": "200vpDark220", + "value": "200vp" + }, + { + "name": "20PercentDark25", + "value": "20%" + }, + { + "name": "40PercentDark45", + "value": "40%" + }, + { + "name": "99999vp", + "value": "99999vp" + } + ] +} \ No newline at end of file diff --git a/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/base/media/background.png b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/base/media/background.png new file mode 100644 index 0000000000000000000000000000000000000000..923f2b3f27e915d6871871deea0420eb45ce102f Binary files /dev/null and b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/base/media/background.png differ diff --git a/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/base/media/foreground.png b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/base/media/foreground.png new file mode 100644 index 0000000000000000000000000000000000000000..97014d3e10e5ff511409c378cd4255713aecd85f Binary files /dev/null and b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/base/media/foreground.png differ diff --git a/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/base/media/layered_image.json b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/base/media/layered_image.json new file mode 100644 index 0000000000000000000000000000000000000000..fb49920440fb4d246c82f9ada275e26123a2136a --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/base/media/layered_image.json @@ -0,0 +1,7 @@ +{ + "layered-image": + { + "background" : "$media:background", + "foreground" : "$media:foreground" + } +} \ No newline at end of file diff --git a/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/base/media/startIcon.png b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/base/media/startIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..205ad8b5a8a42e8762fbe4899b8e5e31ce822b8b Binary files /dev/null and b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/base/media/startIcon.png differ diff --git a/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/base/profile/backup_config.json b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/base/profile/backup_config.json new file mode 100644 index 0000000000000000000000000000000000000000..78f40ae7c494d71e2482278f359ec790ca73471a --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/base/profile/backup_config.json @@ -0,0 +1,3 @@ +{ + "allowToBackupRestore": true +} \ No newline at end of file diff --git a/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/base/profile/main_pages.json b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/base/profile/main_pages.json new file mode 100644 index 0000000000000000000000000000000000000000..1898d94f58d6128ab712be2c68acc7c98e9ab9ce --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/base/profile/main_pages.json @@ -0,0 +1,5 @@ +{ + "src": [ + "pages/Index" + ] +} diff --git a/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/dark/element/color.json b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/dark/element/color.json new file mode 100644 index 0000000000000000000000000000000000000000..79b11c2747aec33e710fd3a7b2b3c94dd9965499 --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/dark/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#000000" + } + ] +} \ No newline at end of file diff --git a/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/dark/element/string.json b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/dark/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..b2a21310e4cbb10fe0ce32c9be32f27d29d62a58 --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/entry/src/main/resources/dark/element/string.json @@ -0,0 +1,136 @@ +{ + "string": [ + { + "name": "liaoning", + "value": "深辽宁省" + }, + { + "name": "shenyang", + "value": "深沈阳市" + }, + { + "name": "shenhe", + "value": "深沈河区" + }, + { + "name": "heping", + "value": "深和平区" + }, + { + "name": "hunnan", + "value": "深浑南区" + }, + { + "name": "dalian", + "value": "深大连市" + }, + { + "name": "zhongshan", + "value": "深中山区" + }, + { + "name": "jinzhou", + "value": "深金州区" + }, + { + "name": "changhai", + "value": "深长海县" + }, + { + "name": "jilin", + "value": "深吉林省" + }, + { + "name": "changchun", + "value": "深长春市" + }, + { + "name": "nanguan", + "value": "深南关区" + }, + { + "name": "kuancheng", + "value": "深宽城区" + }, + { + "name": "chaoyang", + "value": "深朝阳区" + }, + { + "name": "siping", + "value": "深四平市" + }, + { + "name": "tiexi", + "value": "深铁西区" + }, + { + "name": "tiedong", + "value": "深铁东区" + }, + { + "name": "lishu", + "value": "深梨树县" + }, + { + "name": "heilongjiang", + "value": "深黑龙江省" + }, + { + "name": "haerbing", + "value": "深哈尔滨市" + }, + { + "name": "daoli", + "value": "深道里区" + }, + { + "name": "daowai", + "value": "深道外区" + }, + { + "name": "nangang", + "value": "深南岗区" + }, + { + "name": "mudan", + "value": "深牡丹江市" + }, + { + "name": "dongan", + "value": "深东安区" + }, + { + "name": "xian", + "value": "深西安区" + }, + { + "name": "aimin", + "value": "深爱民区" + }, + { + "name": "100vpDark200", + "value": "200vp" + }, + { + "name": "100vpDark120", + "value": "120vp" + }, + { + "name": "200vpDark220", + "value": "220vp" + }, + { + "name": "20PercentDark25", + "value": "25%" + }, + { + "name": "40PercentDark45", + "value": "45%" + }, + { + "name": "99999vp", + "value": "99999vp" + } + ] +} \ No newline at end of file diff --git a/examples/Picker/TextPickerDialog_columnWidths/entry/src/mock/mock-config.json5 b/examples/Picker/TextPickerDialog_columnWidths/entry/src/mock/mock-config.json5 new file mode 100644 index 0000000000000000000000000000000000000000..7a73a41bfdf76d6f793007240d80983a52f15f97 --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/entry/src/mock/mock-config.json5 @@ -0,0 +1,2 @@ +{ +} \ No newline at end of file diff --git a/examples/Picker/TextPickerDialog_columnWidths/entry/src/ohosTest/ets/test/Ability.test.ets b/examples/Picker/TextPickerDialog_columnWidths/entry/src/ohosTest/ets/test/Ability.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..85c78f67579d6e31b5f5aeea463e216b9b141048 --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/entry/src/ohosTest/ets/test/Ability.test.ets @@ -0,0 +1,35 @@ +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; + +export default function abilityTest() { + describe('ActsAbilityTest', () => { + // Defines a test suite. Two parameters are supported: test suite name and test suite function. + beforeAll(() => { + // 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(() => { + // 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(() => { + // 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(() => { + // 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, () => { + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. + 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/examples/Picker/TextPickerDialog_columnWidths/entry/src/ohosTest/ets/test/List.test.ets b/examples/Picker/TextPickerDialog_columnWidths/entry/src/ohosTest/ets/test/List.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..794c7dc4ed66bd98fa3865e07922906e2fcef545 --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/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/examples/Picker/TextPickerDialog_columnWidths/entry/src/ohosTest/module.json5 b/examples/Picker/TextPickerDialog_columnWidths/entry/src/ohosTest/module.json5 new file mode 100644 index 0000000000000000000000000000000000000000..509a3a28a3e6be8d7f98cc563fa8195657d77d1d --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/entry/src/ohosTest/module.json5 @@ -0,0 +1,11 @@ +{ + "module": { + "name": "entry_test", + "type": "feature", + "deviceTypes": [ + "phone" + ], + "deliveryWithInstall": true, + "installationFree": false + } +} diff --git a/examples/Picker/TextPickerDialog_columnWidths/entry/src/test/List.test.ets b/examples/Picker/TextPickerDialog_columnWidths/entry/src/test/List.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..bb5b5c3731e283dd507c847560ee59bde477bbc7 --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/entry/src/test/List.test.ets @@ -0,0 +1,5 @@ +import localUnitTest from './LocalUnit.test'; + +export default function testsuite() { + localUnitTest(); +} \ No newline at end of file diff --git a/examples/Picker/TextPickerDialog_columnWidths/entry/src/test/LocalUnit.test.ets b/examples/Picker/TextPickerDialog_columnWidths/entry/src/test/LocalUnit.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..165fc1615ee8618b4cb6a622f144a9a707eee99f --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/entry/src/test/LocalUnit.test.ets @@ -0,0 +1,33 @@ +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; + +export default function localUnitTest() { + describe('localUnitTest', () => { + // Defines a test suite. Two parameters are supported: test suite name and test suite function. + beforeAll(() => { + // 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(() => { + // 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(() => { + // 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(() => { + // 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, () => { + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. + 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/examples/Picker/TextPickerDialog_columnWidths/hvigor/hvigor-config.json5 b/examples/Picker/TextPickerDialog_columnWidths/hvigor/hvigor-config.json5 new file mode 100644 index 0000000000000000000000000000000000000000..4bd5c6b99856d717ed8cdc7c7f85755571c27128 --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/hvigor/hvigor-config.json5 @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{ + "modelVersion": "5.1.1", + "dependencies": { + }, + "execution": { + // "analyze": "normal", /* Define the build analyze mode. Value: [ "normal" | "advanced" | false ]. Default: "normal" */ + // "daemon": true, /* Enable daemon compilation. Value: [ true | false ]. Default: true */ + // "incremental": true, /* Enable incremental compilation. Value: [ true | false ]. Default: true */ + // "parallel": true, /* Enable parallel compilation. Value: [ true | false ]. Default: true */ + // "typeCheck": false, /* Enable typeCheck. Value: [ true | false ]. Default: false */ + }, + "logging": { + // "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */ + }, + "debugging": { + // "stacktrace": false /* Disable stacktrace compilation. Value: [ true | false ]. Default: false */ + }, + "nodeOptions": { + // "maxOldSpaceSize": 8192 /* Enable nodeOptions maxOldSpaceSize compilation. Unit M. Used for the daemon process. Default: 8192*/ + // "exposeGC": true /* Enable to trigger garbage collection explicitly. Default: true*/ + } +} diff --git a/examples/Picker/TextPickerDialog_columnWidths/hvigorfile.ts b/examples/Picker/TextPickerDialog_columnWidths/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..ae9086af35844176c08f1be3772d081d95d267c6 --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/hvigorfile.ts @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { appTasks } from '@ohos/hvigor-ohos-plugin'; + +export default { + system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins: [] /* Custom plugin to extend the functionality of Hvigor. */ +} \ No newline at end of file diff --git a/examples/Picker/TextPickerDialog_columnWidths/oh-package-lock.json5 b/examples/Picker/TextPickerDialog_columnWidths/oh-package-lock.json5 new file mode 100644 index 0000000000000000000000000000000000000000..01f291e148fe3bb4fde8c5b9aba73b25d493f3d2 --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/oh-package-lock.json5 @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{ + "meta": { + "stableOrder": true, + "enableUnifiedLockfile": false + }, + "lockfileVersion": 3, + "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", + "specifiers": { + "@ohos/hamock@1.0.0": "@ohos/hamock@1.0.0", + "@ohos/hypium@1.0.21": "@ohos/hypium@1.0.21" + }, + "packages": { + "@ohos/hamock@1.0.0": { + "name": "@ohos/hamock", + "version": "1.0.0", + "integrity": "sha512-K6lDPYc6VkKe6ZBNQa9aoG+ZZMiwqfcR/7yAVFSUGIuOAhPvCJAo9+t1fZnpe0dBRBPxj2bxPPbKh69VuyAtDg==", + "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hamock/-/hamock-1.0.0.har", + "registryType": "ohpm" + }, + "@ohos/hypium@1.0.21": { + "name": "@ohos/hypium", + "version": "1.0.21", + "integrity": "sha512-iyKGMXxE+9PpCkqEwu0VykN/7hNpb+QOeIuHwkmZnxOpI+dFZt6yhPB7k89EgV1MiSK/ieV/hMjr5Z2mWwRfMQ==", + "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hypium/-/hypium-1.0.21.har", + "registryType": "ohpm" + } + } +} \ No newline at end of file diff --git a/examples/Picker/TextPickerDialog_columnWidths/oh-package.json5 b/examples/Picker/TextPickerDialog_columnWidths/oh-package.json5 new file mode 100644 index 0000000000000000000000000000000000000000..41ed05598470e02379db2b68e6cb9015c0847509 --- /dev/null +++ b/examples/Picker/TextPickerDialog_columnWidths/oh-package.json5 @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{ + "modelVersion": "5.1.1", + "description": "Please describe the basic information.", + "dependencies": { + }, + "devDependencies": { + "@ohos/hypium": "1.0.21", + "@ohos/hamock": "1.0.0" + } +}