mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-11-27 01:11:35 +00:00
Signed-off-by: wangchun17 <chunn.wang@huawei.com> Change-Id: Id09ae493734b5e704d00216981e45ae7d16568ca
This commit is contained in:
parent
9392c56826
commit
967b055013
40
BUILD.gn
40
BUILD.gn
@ -120,6 +120,35 @@ ohos_copy("common_api") {
|
|||||||
module_install_name = ""
|
module_install_name = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template("ohos_declaration_template") {
|
||||||
|
forward_variables_from(invoker, "*")
|
||||||
|
action_with_pydeps(target_name) {
|
||||||
|
script = "//interface/sdk-js/remove_internal.py"
|
||||||
|
outputs = [ root_out_dir + "/$target_name/" ]
|
||||||
|
args = [
|
||||||
|
"--input",
|
||||||
|
rebase_path("//interface/sdk-js/api", root_build_dir),
|
||||||
|
"--output",
|
||||||
|
rebase_path(root_out_dir + "/ohos_declaration/$target_name/",
|
||||||
|
root_build_dir),
|
||||||
|
]
|
||||||
|
}
|
||||||
|
_module_info_target = "/ohos_declaration/${target_name}_info"
|
||||||
|
_target_name = target_name
|
||||||
|
generate_module_info(_module_info_target) {
|
||||||
|
module_type = "jsdoc"
|
||||||
|
module_install_name = ""
|
||||||
|
module_name = _target_name
|
||||||
|
module_source_dir = root_out_dir + "/ohos_declaration/$_target_name"
|
||||||
|
install_enable = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ohos_declaration_template("ohos_declaration_ets") {
|
||||||
|
}
|
||||||
|
ohos_declaration_template("ohos_declaration_phone") {
|
||||||
|
}
|
||||||
|
|
||||||
ohos_copy("ace_platform") {
|
ohos_copy("ace_platform") {
|
||||||
sources = [
|
sources = [
|
||||||
"api/config",
|
"api/config",
|
||||||
@ -129,3 +158,14 @@ ohos_copy("ace_platform") {
|
|||||||
module_source_dir = target_out_dir + "/$target_name"
|
module_source_dir = target_out_dir + "/$target_name"
|
||||||
module_install_name = ""
|
module_install_name = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ohos_copy("form_declaration") {
|
||||||
|
sources = [
|
||||||
|
"api/form/action",
|
||||||
|
"api/form/css",
|
||||||
|
"api/form/hml",
|
||||||
|
]
|
||||||
|
outputs = [ target_out_dir + "/$target_name/{{source_file_part}}" ]
|
||||||
|
module_source_dir = target_out_dir + "/$target_name"
|
||||||
|
module_install_name = ""
|
||||||
|
}
|
||||||
|
0
api/phone/@ohos.account.distributedaccount.d.ts → api/@ohos.account.distributedaccount.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.account.distributedaccount.d.ts → api/@ohos.account.distributedaccount.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.bundle_mgr.d.ts → api/@ohos.bundle_mgr.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.bundle_mgr.d.ts → api/@ohos.bundle_mgr.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.commonevent.d.ts → api/@ohos.commonevent.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.commonevent.d.ts → api/@ohos.commonevent.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.feature_ability.d.ts → api/@ohos.feature_ability.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.feature_ability.d.ts → api/@ohos.feature_ability.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.intl.d.ts → api/@ohos.intl.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.intl.d.ts → api/@ohos.intl.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.multimedia.audio.d.ts → api/@ohos.multimedia.audio.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.multimedia.audio.d.ts → api/@ohos.multimedia.audio.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.multimedia.media.d.ts → api/@ohos.multimedia.media.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.multimedia.media.d.ts → api/@ohos.multimedia.media.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.napi_ability_manager.d.ts → api/@ohos.napi_ability_manager.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.napi_ability_manager.d.ts → api/@ohos.napi_ability_manager.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.systemTime.d.ts → api/@ohos.systemTime.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.systemTime.d.ts → api/@ohos.systemTime.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.telephony.call.d.ts → api/@ohos.telephony.call.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.telephony.call.d.ts → api/@ohos.telephony.call.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.telephony.data.d.ts → api/@ohos.telephony.data.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.telephony.data.d.ts → api/@ohos.telephony.data.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.telephony.observer.d.ts → api/@ohos.telephony.observer.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.telephony.observer.d.ts → api/@ohos.telephony.observer.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.telephony.radio.d.ts → api/@ohos.telephony.radio.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.telephony.radio.d.ts → api/@ohos.telephony.radio.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.telephony.sim.d.ts → api/@ohos.telephony.sim.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.telephony.sim.d.ts → api/@ohos.telephony.sim.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.telephony.sms.d.ts → api/@ohos.telephony.sms.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.telephony.sms.d.ts → api/@ohos.telephony.sms.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.wifi.d.ts → api/@ohos.wifi.d.ts
vendored
Executable file → Normal file
0
api/phone/@ohos.wifi.d.ts → api/@ohos.wifi.d.ts
vendored
Executable file → Normal file
35
api/@system.app.d.ts
vendored
35
api/@system.app.d.ts
vendored
@ -1,35 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export interface AppResponse {
|
|
||||||
appName: string;
|
|
||||||
versionName: string;
|
|
||||||
versionCode: number;
|
|
||||||
}
|
|
||||||
export interface RequestFullWindowOptions {
|
|
||||||
duration?: number
|
|
||||||
}
|
|
||||||
export interface ScreenOnVisibleOptions {
|
|
||||||
visible?: boolean;
|
|
||||||
success?: () => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export default class App {
|
|
||||||
static getInfo(): AppResponse;
|
|
||||||
static terminate(): void;
|
|
||||||
static screenOnVisible(options?: ScreenOnVisibleOptions): void;
|
|
||||||
static requestFullWindow(options?: RequestFullWindowOptions): void;
|
|
||||||
}
|
|
27
api/@system.battery.d.ts
vendored
27
api/@system.battery.d.ts
vendored
@ -1,27 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export interface BatteryResponse {
|
|
||||||
charging: boolean;
|
|
||||||
level: number;
|
|
||||||
}
|
|
||||||
export interface GetStatusOptions {
|
|
||||||
success?: (data: BatteryResponse) => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export default class Battery {
|
|
||||||
static getStatus(options?: GetStatusOptions): void;
|
|
||||||
}
|
|
56
api/@system.brightness.d.ts
vendored
56
api/@system.brightness.d.ts
vendored
@ -1,56 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export interface BrightnessResponse {
|
|
||||||
value: number;
|
|
||||||
}
|
|
||||||
export interface GetBrightnessOptions {
|
|
||||||
success?: (data: BrightnessResponse) => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export interface SetBrightnessOptions {
|
|
||||||
value: number;
|
|
||||||
success?: () => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export interface BrightnessModeResponse {
|
|
||||||
mode: number;
|
|
||||||
}
|
|
||||||
export interface GetBrightnessModeOptions {
|
|
||||||
success?: (data: BrightnessModeResponse) => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export interface SetBrightnessModeOptions {
|
|
||||||
mode: number;
|
|
||||||
success?: () => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export interface SetKeepScreenOnOptions {
|
|
||||||
keepScreenOn: boolean;
|
|
||||||
success?: () => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export default class Brightness {
|
|
||||||
static getValue(options?: GetBrightnessOptions): void;
|
|
||||||
static setValue(options: SetBrightnessOptions): void;
|
|
||||||
static getMode(options?: GetBrightnessModeOptions): void;
|
|
||||||
static setMode(options: SetBrightnessModeOptions): void;
|
|
||||||
static setKeepScreenOn(options: SetKeepScreenOnOptions): void;
|
|
||||||
}
|
|
43
api/@system.cipher.d.ts
vendored
43
api/@system.cipher.d.ts
vendored
@ -1,43 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export interface CipherResponse {
|
|
||||||
text: string;
|
|
||||||
}
|
|
||||||
export interface CipherRsaOptions {
|
|
||||||
action: string;
|
|
||||||
text: string;
|
|
||||||
key: string;
|
|
||||||
transformation?: string;
|
|
||||||
success: (data: CipherResponse) => void;
|
|
||||||
fail: (data: string, code: number) => void;
|
|
||||||
complete: () => void;
|
|
||||||
}
|
|
||||||
export interface CipherAesOptions {
|
|
||||||
action: string;
|
|
||||||
text: string;
|
|
||||||
key: string;
|
|
||||||
transformation?: string;
|
|
||||||
iv?: string;
|
|
||||||
ivOffset?: string;
|
|
||||||
ivLen?: string;
|
|
||||||
success: (data: CipherResponse) => void;
|
|
||||||
fail: (data: string, code: number) => void;
|
|
||||||
complete: () => void;
|
|
||||||
}
|
|
||||||
export default class Cipher {
|
|
||||||
static rsa(options: CipherRsaOptions): void;
|
|
||||||
static aes(options: CipherAesOptions): void;
|
|
||||||
}
|
|
35
api/@system.device.d.ts
vendored
35
api/@system.device.d.ts
vendored
@ -1,35 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export interface DeviceResponse {
|
|
||||||
brand: string;
|
|
||||||
manufacturer: string;
|
|
||||||
model: string;
|
|
||||||
product: string;
|
|
||||||
language: string;
|
|
||||||
region: string;
|
|
||||||
windowWidth: number;
|
|
||||||
windowHeight: number;
|
|
||||||
screenDensity: number;
|
|
||||||
screenShape: "rect" | "circle";
|
|
||||||
}
|
|
||||||
export interface GetDeviceOptions {
|
|
||||||
success?: (data: DeviceResponse) => void;
|
|
||||||
fail?: (data: any, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export default class Device {
|
|
||||||
static getInfo(options?: GetDeviceOptions): void;
|
|
||||||
}
|
|
33
api/@system.fetch.d.ts
vendored
33
api/@system.fetch.d.ts
vendored
@ -1,33 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export interface FetchResponse {
|
|
||||||
code: number;
|
|
||||||
data: string | object;
|
|
||||||
headers: Object;
|
|
||||||
}
|
|
||||||
export interface FetchOptions {
|
|
||||||
url: string;
|
|
||||||
data?: string | object;
|
|
||||||
header?: Object;
|
|
||||||
method?: "OPTIONS" | "GET" | "HEAD" | "POST" | "PUT" | "DELETE" | "TRACE";
|
|
||||||
responseType?: string;
|
|
||||||
success?: (data: FetchResponse) => void;
|
|
||||||
fail?: (data: any, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export default class Fetch {
|
|
||||||
static fetch(options: FetchOptions): void;
|
|
||||||
}
|
|
133
api/@system.file.d.ts
vendored
133
api/@system.file.d.ts
vendored
@ -1,133 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export interface FileResponse {
|
|
||||||
uri: string;
|
|
||||||
length: number;
|
|
||||||
lastModifiedTime: number;
|
|
||||||
type: "dir" | "file";
|
|
||||||
subFiles?: Array<FileResponse>;
|
|
||||||
}
|
|
||||||
export interface FileMoveOption {
|
|
||||||
srcUri: string;
|
|
||||||
dstUri: string;
|
|
||||||
success?: (uri: string) => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export interface FileListResponse {
|
|
||||||
fileList: Array<FileResponse>;
|
|
||||||
}
|
|
||||||
export interface FileListOption {
|
|
||||||
uri: string;
|
|
||||||
success?: (data: FileListResponse) => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export interface FileCopyOption {
|
|
||||||
srcUri: string;
|
|
||||||
dstUri: string;
|
|
||||||
success?: (uri: string) => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export interface FileGetOption {
|
|
||||||
uri: string;
|
|
||||||
recursive?: boolean;
|
|
||||||
success?: (file: FileResponse) => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export interface FileDeleteOption {
|
|
||||||
uri: string;
|
|
||||||
success?: () => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export interface FileWriteTextOption {
|
|
||||||
uri: string;
|
|
||||||
text: string;
|
|
||||||
encoding?: string;
|
|
||||||
append?: boolean;
|
|
||||||
success?: () => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export interface FileReadTextResponse {
|
|
||||||
text: string;
|
|
||||||
}
|
|
||||||
export interface FileReadTextOption {
|
|
||||||
uri: string;
|
|
||||||
encoding?: string;
|
|
||||||
position?: number;
|
|
||||||
length?: number;
|
|
||||||
success?: (data: FileReadTextResponse) => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export interface FileWriteArrayBufferOption {
|
|
||||||
uri: string;
|
|
||||||
buffer: Uint8Array;
|
|
||||||
position?: number;
|
|
||||||
append?: boolean;
|
|
||||||
success?: () => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export interface FileReadArrayBufferResponse {
|
|
||||||
buffer: Uint8Array;
|
|
||||||
}
|
|
||||||
export interface FileReadArrayBufferOption {
|
|
||||||
uri: string;
|
|
||||||
position?: number;
|
|
||||||
length?: number;
|
|
||||||
success?: (data: FileReadArrayBufferResponse) => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export interface FileAccessOption {
|
|
||||||
uri: string;
|
|
||||||
success?: () => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export interface FileMkdirOption {
|
|
||||||
uri: string;
|
|
||||||
recursive?: boolean;
|
|
||||||
success?: () => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export interface FileRmdirOption {
|
|
||||||
uri: string;
|
|
||||||
recursive?: boolean;
|
|
||||||
success?: () => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export default class File {
|
|
||||||
static move(options: FileMoveOption): void;
|
|
||||||
static copy(options: FileCopyOption): void;
|
|
||||||
static list(options: FileListOption): void;
|
|
||||||
static get(options: FileGetOption): void;
|
|
||||||
static delete(options: FileDeleteOption): void;
|
|
||||||
static writeText(options: FileWriteTextOption): void;
|
|
||||||
static readText(options: FileReadTextOption): void;
|
|
||||||
static writeArrayBuffer(options: FileWriteArrayBufferOption): void;
|
|
||||||
static readArrayBuffer(options: FileReadArrayBufferOption): void;
|
|
||||||
static access(options: FileAccessOption): void;
|
|
||||||
static mkdir(options: FileMkdirOption): void;
|
|
||||||
static rmdir(options: FileRmdirOption): void;
|
|
||||||
}
|
|
49
api/@system.geolocation.d.ts
vendored
49
api/@system.geolocation.d.ts
vendored
@ -1,49 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export interface GeolocationResponse {
|
|
||||||
longitude: number;
|
|
||||||
latitude: number;
|
|
||||||
altitude: number;
|
|
||||||
accuracy: number;
|
|
||||||
time: number;
|
|
||||||
}
|
|
||||||
export interface GetLocationOption {
|
|
||||||
timeout?: number;
|
|
||||||
coordType?: string;
|
|
||||||
success?: (data: GeolocationResponse) => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export interface GetLocationTypeResponse {
|
|
||||||
types: Array<string>;
|
|
||||||
}
|
|
||||||
export interface GetLocationTypeOption {
|
|
||||||
success?: (data: GetLocationTypeResponse) => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export interface SubscribeLocationOption {
|
|
||||||
coordType?: string;
|
|
||||||
success: (data: GeolocationResponse) => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
}
|
|
||||||
export default class Geolocation {
|
|
||||||
static getLocation(options?: GetLocationOption): void;
|
|
||||||
static getLocationType(options?: GetLocationTypeOption): void;
|
|
||||||
static subscribe(options: SubscribeLocationOption): void;
|
|
||||||
static unsubscribe(): void;
|
|
||||||
static getSupportedCoordTypes(): Array<string>;
|
|
||||||
}
|
|
33
api/@system.network.d.ts
vendored
33
api/@system.network.d.ts
vendored
@ -1,33 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export interface NetworkResponse {
|
|
||||||
type: string;
|
|
||||||
metered: boolean;
|
|
||||||
}
|
|
||||||
export interface GetNetworkTypeOptions {
|
|
||||||
success?: (data: NetworkResponse) => void;
|
|
||||||
fail?: (data: any, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export interface SubscribeNetworkOptions {
|
|
||||||
success?: (data: NetworkResponse) => void;
|
|
||||||
fail?: (data: any, code: number) => void;
|
|
||||||
}
|
|
||||||
export default class Network {
|
|
||||||
static getType(options?: GetNetworkTypeOptions): void;
|
|
||||||
static subscribe(options?: SubscribeNetworkOptions): void;
|
|
||||||
static unsubscribe(): void;
|
|
||||||
}
|
|
28
api/@system.notification.d.ts
vendored
28
api/@system.notification.d.ts
vendored
@ -1,28 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export interface ActionResult {
|
|
||||||
bundleName: string;
|
|
||||||
abilityName: string;
|
|
||||||
uri: string;
|
|
||||||
}
|
|
||||||
export interface ShowNotificationOptions {
|
|
||||||
contentTitle?: string;
|
|
||||||
contentText?: string;
|
|
||||||
clickAction?: ActionResult;
|
|
||||||
}
|
|
||||||
export default class Notification {
|
|
||||||
static show(options?: ShowNotificationOptions): void;
|
|
||||||
}
|
|
38
api/@system.prompt.d.ts
vendored
38
api/@system.prompt.d.ts
vendored
@ -1,38 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export interface ShowToastOptions {
|
|
||||||
message: string;
|
|
||||||
duration?: number;
|
|
||||||
}
|
|
||||||
export interface Button {
|
|
||||||
text: string;
|
|
||||||
color: string;
|
|
||||||
}
|
|
||||||
export interface ShowDialogSuccessResponse {
|
|
||||||
index: number;
|
|
||||||
}
|
|
||||||
export interface ShowDialogOptions {
|
|
||||||
title?: string;
|
|
||||||
message?: string;
|
|
||||||
buttons?: [Button, Button?, Button?];
|
|
||||||
success?: (data: ShowDialogSuccessResponse) => void;
|
|
||||||
cancel?: (data: string, code: string) => void;
|
|
||||||
complete?: (data: string) => void;
|
|
||||||
}
|
|
||||||
export default class Prompt {
|
|
||||||
static showToast(options: ShowToastOptions): void;
|
|
||||||
static showDialog(options: ShowDialogOptions): void;
|
|
||||||
}
|
|
66
api/@system.request.d.ts
vendored
66
api/@system.request.d.ts
vendored
@ -1,66 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export interface UploadResponse {
|
|
||||||
code: number;
|
|
||||||
data: string;
|
|
||||||
headers: Object;
|
|
||||||
}
|
|
||||||
export interface DownloadResponse {
|
|
||||||
token: string;
|
|
||||||
}
|
|
||||||
export interface OnDownloadCompleteResponse {
|
|
||||||
uri: string;
|
|
||||||
}
|
|
||||||
export interface RequestFile {
|
|
||||||
filename?: string;
|
|
||||||
name?: string;
|
|
||||||
uri: string;
|
|
||||||
type?: string;
|
|
||||||
}
|
|
||||||
export interface RequestData {
|
|
||||||
name: string;
|
|
||||||
value: string;
|
|
||||||
}
|
|
||||||
export interface UploadRequestOptions {
|
|
||||||
url: string;
|
|
||||||
data?: Array<RequestData>;
|
|
||||||
files: Array<RequestFile>;
|
|
||||||
header?: Object;
|
|
||||||
method?: string;
|
|
||||||
success?: (data: UploadResponse) => void;
|
|
||||||
fail?: (data: any, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export interface DownloadRequestOptions {
|
|
||||||
url: string;
|
|
||||||
filename?: string;
|
|
||||||
header?: string;
|
|
||||||
description?: string;
|
|
||||||
success?: (data: DownloadResponse) => void;
|
|
||||||
fail?: (data: any, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export interface OnDownloadCompleteOptions {
|
|
||||||
token: string;
|
|
||||||
success?: (data: OnDownloadCompleteResponse) => void;
|
|
||||||
fail?: (data: any, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export default class Request {
|
|
||||||
static upload(options: UploadRequestOptions): void;
|
|
||||||
static download(options: DownloadRequestOptions): void;
|
|
||||||
static onDownloadComplete(options: OnDownloadCompleteOptions): void;
|
|
||||||
}
|
|
35
api/@system.router.d.ts
vendored
35
api/@system.router.d.ts
vendored
@ -1,35 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export interface RouterOptions {
|
|
||||||
uri: string;
|
|
||||||
params?: Object;
|
|
||||||
}
|
|
||||||
export interface BackRouterOptions {
|
|
||||||
path?: string;
|
|
||||||
}
|
|
||||||
export interface RouterState {
|
|
||||||
index: number;
|
|
||||||
name: string;
|
|
||||||
path: string;
|
|
||||||
}
|
|
||||||
export default class Router {
|
|
||||||
static push(options: RouterOptions): void;
|
|
||||||
static replace(options: RouterOptions): void;
|
|
||||||
static back(options?: BackRouterOptions): void;
|
|
||||||
static clear(): void;
|
|
||||||
static getLength(): string;
|
|
||||||
static getState(): RouterState;
|
|
||||||
}
|
|
98
api/@system.sensor.d.ts
vendored
98
api/@system.sensor.d.ts
vendored
@ -1,98 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export interface AccelerometerResponse {
|
|
||||||
x: number;
|
|
||||||
y: number;
|
|
||||||
z: number;
|
|
||||||
}
|
|
||||||
export interface subscribeAccelerometerOptions {
|
|
||||||
interval: string;
|
|
||||||
success: (data: AccelerometerResponse) => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
}
|
|
||||||
export interface CompassResponse {
|
|
||||||
direction: number;
|
|
||||||
}
|
|
||||||
export interface SubscribeCompassOptions {
|
|
||||||
success: (data: CompassResponse) => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
}
|
|
||||||
export interface ProximityResponse {
|
|
||||||
distance: number;
|
|
||||||
}
|
|
||||||
export interface SubscribeProximityOptions {
|
|
||||||
success: (data: ProximityResponse) => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
}
|
|
||||||
export interface LightResponse {
|
|
||||||
intensity: number;
|
|
||||||
}
|
|
||||||
export interface SubscribeLightOptions {
|
|
||||||
success: (data: LightResponse) => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
}
|
|
||||||
export interface StepCounterResponse {
|
|
||||||
steps: number;
|
|
||||||
}
|
|
||||||
export interface SubscribeStepCounterOptions {
|
|
||||||
success: (data: StepCounterResponse) => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
}
|
|
||||||
export interface BarometerResponse {
|
|
||||||
pressure: number;
|
|
||||||
}
|
|
||||||
export interface SubscribeBarometerOptions {
|
|
||||||
success: (data: BarometerResponse) => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
}
|
|
||||||
export interface HeartRateResponse {
|
|
||||||
heartRate: number;
|
|
||||||
}
|
|
||||||
export interface SubscribeHeartRateOptions {
|
|
||||||
success: (data: HeartRateResponse) => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
}
|
|
||||||
export interface OnBodyStateResponse {
|
|
||||||
value: boolean;
|
|
||||||
}
|
|
||||||
export interface SubscribeOnBodyStateOptions {
|
|
||||||
success: (data: OnBodyStateResponse) => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
}
|
|
||||||
export interface GetOnBodyStateOptions {
|
|
||||||
success: (data: OnBodyStateResponse) => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export default class Sensor {
|
|
||||||
static subscribeAccelerometer(options: subscribeAccelerometerOptions): void;
|
|
||||||
static unsubscribeAccelerometer(): void;
|
|
||||||
static subscribeCompass(options: SubscribeCompassOptions): void;
|
|
||||||
static unsubscribeCompass(): void;
|
|
||||||
static subscribeProximity(options: SubscribeProximityOptions): void;
|
|
||||||
static unsubscribeProximity(): void;
|
|
||||||
static subscribeLight(options: SubscribeLightOptions): void;
|
|
||||||
static unsubscribeLight(): void;
|
|
||||||
static subscribeStepCounter(options: SubscribeStepCounterOptions): void;
|
|
||||||
static unsubscribeStepCounter(): void;
|
|
||||||
static subscribeBarometer(options: SubscribeBarometerOptions): void;
|
|
||||||
static unsubscribeBarometer(): void;
|
|
||||||
static subscribeHeartRate(options: SubscribeHeartRateOptions): void;
|
|
||||||
static unsubscribeHeartRate(): void;
|
|
||||||
static subscribeOnBodyState(options: SubscribeOnBodyStateOptions): void;
|
|
||||||
static unsubscribeOnBodyState(): void;
|
|
||||||
static getOnBodyState(options: GetOnBodyStateOptions): void;
|
|
||||||
}
|
|
46
api/@system.storage.d.ts
vendored
46
api/@system.storage.d.ts
vendored
@ -1,46 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export interface GetStorageOptions {
|
|
||||||
key: string;
|
|
||||||
default?: string;
|
|
||||||
success?: (data: any) => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export interface SetStorageOptions {
|
|
||||||
key: string;
|
|
||||||
value: string;
|
|
||||||
success?: () => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export interface ClearStorageOptions {
|
|
||||||
success?: () => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export interface DeleteStorageOptions {
|
|
||||||
key: string;
|
|
||||||
success?: () => void;
|
|
||||||
fail?: (data: string, code: number) => void;
|
|
||||||
complete?: () => void;
|
|
||||||
}
|
|
||||||
export default class Storage {
|
|
||||||
static get(options: GetStorageOptions): void;
|
|
||||||
static set(options: SetStorageOptions): void;
|
|
||||||
static clear(options?: ClearStorageOptions): void;
|
|
||||||
static delete(options: DeleteStorageOptions): void;
|
|
||||||
}
|
|
0
api/phone/basic.d.ts → api/basic.d.ts
vendored
Executable file → Normal file
0
api/phone/basic.d.ts → api/basic.d.ts
vendored
Executable file → Normal file
18
api/form/action/form-schema.json
Normal file
18
api/form/action/form-schema.json
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"properties":{
|
||||||
|
"data": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "Defines variables."
|
||||||
|
},
|
||||||
|
"actions": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "Defines events."
|
||||||
|
},
|
||||||
|
"apiVersion": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "Defines api version compatibility information."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
283
api/form/css/css-json-schema.json
Normal file
283
api/form/css/css-json-schema.json
Normal file
@ -0,0 +1,283 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"properties": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"supportedDevices": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "本字段非必填,如果为空,表示该属性支持所有的设备类型",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["tv", "phone", "tablet", "wearable", "liteWearable", "smartVision"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"syntax": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "语法",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "支持<length>、<color>、<percentage> 、<line-width>、<line-style>、<repeat-style>、<time>、<transform-list>等内置类型单个或多个(||分割)"
|
||||||
|
},
|
||||||
|
"supportedDevices": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "本字段非必填,如果为空,表示该属性继承属性支持的设备类型",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["tv", "phone", "tablet", "wearable", "liteWearable", "smartVision"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["name"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "该属性的当前的版本",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "版本号例如:v3.0"
|
||||||
|
},
|
||||||
|
"supportedDevices": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "本字段非必填,如果为空,表示该属性继承属性支持的设备类型",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["tv", "phone", "tablet", "wearable", "liteWearable", "smartVision"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["name"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "属性的描述文档"
|
||||||
|
},
|
||||||
|
"supportedDevices": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "本字段非必填,如果为空,表示该属性继承属性支持的设备类型",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["tv", "phone", "tablet", "wearable", "liteWearable", "smartVision"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["name"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"restrictions": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "语法限制",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "语法限制,单个或多个组合",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"enum",
|
||||||
|
"length",
|
||||||
|
"line-style",
|
||||||
|
"color",
|
||||||
|
"percentage",
|
||||||
|
"image",
|
||||||
|
"string",
|
||||||
|
"repeat",
|
||||||
|
"position",
|
||||||
|
"identifier",
|
||||||
|
"number",
|
||||||
|
"time"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"supportedDevices": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "本字段非必填,如果为空,表示该属性继承属性支持的设备类型",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["tv", "phone", "tablet", "wearable", "liteWearable", "smartVision"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["name"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"values": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "当restrictions字段存在enum时存在该字段,表示该属性对应的值的可选值",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "可选值"
|
||||||
|
},
|
||||||
|
"supportedDevices": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "本字段非必填,如果为空,表示该属性继承属性支持的设备类型",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["tv", "phone", "tablet", "wearable", "liteWearable", "smartVision"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["name"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["name", "version", "description"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"atDirectives": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "指令列表",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "指令名称"
|
||||||
|
},
|
||||||
|
"supportedDevices": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "本字段非必填,如果为空,表示该属性支持所有的设备类型",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["tv", "phone", "tablet", "wearable", "liteWearable", "smartVision"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "版本",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "版本号eg: v3.0"
|
||||||
|
},
|
||||||
|
"supportedDevices": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "本字段非必填,如果为空,表示该属性继承指令支持的设备类型",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["tv", "phone", "tablet", "wearable", "liteWearable", "smartVision"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["name"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "指令的描述",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"supportedDevices": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "本字段非必填,如果为空,表示该属性继承指令支持的设备类型",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["tv", "phone", "tablet", "wearable", "liteWearable", "smartVision"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["name"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pseudoClasses": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "伪类列表",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "伪类名称"
|
||||||
|
},
|
||||||
|
"supportedDevices": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "本字段非必填,如果为空,表示该伪类支持所有的设备类型",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["tv", "phone", "tablet", "wearable", "liteWearable", "smartVision"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "版本",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "版本号eg: v3.0"
|
||||||
|
},
|
||||||
|
"supportedDevices": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "本字段非必填,如果为空,表示该伪类继承指令支持的设备类型",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["tv", "phone", "tablet", "wearable", "liteWearable", "smartVision"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["name"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "伪类的描述",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"supportedDevices": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "本字段非必填,如果为空,表示该伪类继承指令支持的设备类型",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["tv", "phone", "tablet", "wearable", "liteWearable", "smartVision"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["name"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["properties", "atDirectives", "pseudoClasses"]
|
||||||
|
}
|
5437
api/form/css/cssConfig.json
Normal file
5437
api/form/css/cssConfig.json
Normal file
File diff suppressed because it is too large
Load Diff
54
api/form/hml/basic/block.json
Normal file
54
api/form/hml/basic/block.json
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
{
|
||||||
|
"name": "block",
|
||||||
|
"version": [
|
||||||
|
{
|
||||||
|
"name": "v3.0"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "'Logic control block.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": [
|
||||||
|
{
|
||||||
|
"name": "for",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Expands the current element based on the configured data list.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "if",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is added or removed.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"events": [],
|
||||||
|
"supportedSubComponents": true,
|
||||||
|
"supportedSubComponentsRestriction": [],
|
||||||
|
"unSupportSubComponentsRestriction": [],
|
||||||
|
"parentComponentsRestriction": []
|
||||||
|
}
|
400
api/form/hml/basic/button.json
Normal file
400
api/form/hml/basic/button.json
Normal file
@ -0,0 +1,400 @@
|
|||||||
|
{
|
||||||
|
"name": "button",
|
||||||
|
"version": [
|
||||||
|
{
|
||||||
|
"name": "v3.0"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The <button> component includes capsule, circle, text, arc, and download buttons.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": [
|
||||||
|
{
|
||||||
|
"name": "type",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Dynamic modification is not supported. If this attribute is not set, capsule-like buttons are displayed. Different from the capsule button, the four rounded corners of a capsule-like button can be configured using border-radius. Available button types are as follows: capsule: a capsule button with fillets, background color, and text. circle: a circle button which can be used to place icons. text: a text button which displays the text only. arc: an arc button. download: a download button. The download progress bar is added.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "capsule"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "circle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "text"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "value",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Text value of the button. This attribute is unavailable for circle buttons.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "icon",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Path of the button icon. This parameter is valid only for the circle button. The supported icon formatformats are JPG, PNG, and SVG.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "url"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "placement",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Position of the button icon in text. This attribute is valid only when type is not set. Available values are as follows: start: The button icon is at the beginning of the text. end: The button icon is at the end of the text. top: The button icon is at the top of the text.bottom: The button icon is at the bottom of the text.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "end"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "start"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "top"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "bottom"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "waiting",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Waiting status. When waiting is set to true, the waiting transition is displayed on the left of the text. This attribute is unavailable for download buttons and smart watches.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Unique ID of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "style",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style declaration of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "class",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style class of a component, which is used to refer to a style table.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "disabled",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the component is disabled. If the component is disabled, the component cannot respond to user interaction.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "voicelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice label. When a voice label is triggered, the click event of the component is triggered. NOTE: The voice label takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptflag",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice subscript switch. Available values are as follows: auto: For the <image> and <list-item> components, if subscriptflag is set to auto, the voice subscript is turned on. For other components, if subscriptflag is set to auto, the voice subscript is turned off. on: Turn on the voice subscript. off: Turn off the voice subscript. If no customized subscript is set, the subscript is automatically accumulated from 1. NOTE The voice subscript takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "auto"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "on"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "off"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptlabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Custom subscript. After it is set, the subscript is displayed in the way you specified. To make this attribute take effect, you need to turn on the voice subscript.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "scenelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Available values are as follows: video: Video scenario. For example, to watch a video, a user can say the voiceLabel (usually the video name), play voiceLabel, see voiceLabel, or watch voiceLabel, etc. audio: Music scenario. For example, to listen to a song, a user can say the voiceLabel (usually the song name), play voiceLabel, or listen voiceLabel, etc. page: Page scenario. For example, to go to a page, a user can say the voiceLabel (usually the page name), switch to voiceLabel, go to voiceLabel, or jump to voiceLabel, etc. switch: Switch scenario. For example, to turn on or turn off a switch, a user can say the voiceLabel (usually the switch name), turn on voiceLabel, open voiceLabel, turn off voiceLabel, close voiceLabel, etc. common: Common scenario, which is triggered by the voiceLabel.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "video"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "audio"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "page"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "switch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitygroup",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility group. If this attribute is set to true, the component and all its child components form an entire selectable component, and the accessibility service will no longer available for the content of its child components.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitytext",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility text. If a component does not contain text information, it will not be read when the component is selected by the screen reader. In this case, the screen reader user cannot know which component is selected. To solve this problem, you can set this attribute for components without text information. When the component is selected by the screen reader, the specified accessibility text will be read, informing the user which component is selected. If a component with this attribute set contains text information, only the accessibility text will be read.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitydescription",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility description. You can specify further explanation of the current component, for example, possible operation consequences, especially those cannot be learned from component attributes and accessibility text. You can set a detailed description text for the attribute of the component to help users understand the operation to be performed. If a component contains both text information and the accessibility description, the text is read first and then the accessibility description, when the component is selected.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilityimportance",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility importance, which is used to decide whether a component can be identified by the accessibility service. The value can be auto, yes, no, or no-hide-descendants. The last value forces the screen reader to ignore the current component and all its subcomponents. yes: The current component is selectable for the accessibility service. no: The current component is not selectable for the accessibility service.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "for",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Expands the current element based on the configured data list.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tid",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The tid attribute is used to accelerate the for loop. It is used to improve the re-rendering efficiency when data in a loop changes. The tid attribute specifies the unique ID of each element in the array. If it is not specified, the index of each element in the array is used as the ID. For example, tid='id' indicates that the id attribute of each element is its unique identifier.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "if",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is added or removed.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "elif",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "else",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "show",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is displayed or hidden.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"events": [
|
||||||
|
{
|
||||||
|
"name": "click",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Triggered when a component is clicked.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supportedSubComponents": false,
|
||||||
|
"supportedSubComponentsRestriction": [],
|
||||||
|
"unSupportSubComponentsRestriction": [],
|
||||||
|
"parentComponentsRestriction": []
|
||||||
|
}
|
373
api/form/hml/basic/calendar.json
Normal file
373
api/form/hml/basic/calendar.json
Normal file
@ -0,0 +1,373 @@
|
|||||||
|
{
|
||||||
|
"name": "calendar",
|
||||||
|
"version": [
|
||||||
|
{
|
||||||
|
"name": "v3.0"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The <calendar> component displays a calendar.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": [
|
||||||
|
{
|
||||||
|
"name": "date",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "cardcalendar",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "startdayofweek",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "calendardata",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "showholiday",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Unique ID of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "style",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style declaration of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "class",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style class of a component, which is used to refer to a style table.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "voicelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice label. When a voice label is triggered, the click event of the component is triggered. NOTE: The voice label takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptflag",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice subscript switch. Available values are as follows: auto: For the <image> and <list-item> components, if subscriptflag is set to auto, the voice subscript is turned on. For other components, if subscriptflag is set to auto, the voice subscript is turned off. on: Turn on the voice subscript. off: Turn off the voice subscript. If no customized subscript is set, the subscript is automatically accumulated from 1. NOTE The voice subscript takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "auto"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "on"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "off"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptlabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Custom subscript. After it is set, the subscript is displayed in the way you specified. To make this attribute take effect, you need to turn on the voice subscript.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "scenelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Available values are as follows: video: Video scenario. For example, to watch a video, a user can say the voiceLabel (usually the video name), play voiceLabel, see voiceLabel, or watch voiceLabel, etc. audio: Music scenario. For example, to listen to a song, a user can say the voiceLabel (usually the song name), play voiceLabel, or listen voiceLabel, etc. page: Page scenario. For example, to go to a page, a user can say the voiceLabel (usually the page name), switch to voiceLabel, go to voiceLabel, or jump to voiceLabel, etc. switch: Switch scenario. For example, to turn on or turn off a switch, a user can say the voiceLabel (usually the switch name), turn on voiceLabel, open voiceLabel, turn off voiceLabel, close voiceLabel, etc. common: Common scenario, which is triggered by the voiceLabel.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "video"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "audio"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "page"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "switch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitygroup",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility group. If this attribute is set to true, the component and all its child components form an entire selectable component, and the accessibility service will no longer available for the content of its child components.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitytext",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility text. If a component does not contain text information, it will not be read when the component is selected by the screen reader. In this case, the screen reader user cannot know which component is selected. To solve this problem, you can set this attribute for components without text information. When the component is selected by the screen reader, the specified accessibility text will be read, informing the user which component is selected. If a component with this attribute set contains text information, only the accessibility text will be read.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitydescription",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility description. You can specify further explanation of the current component, for example, possible operation consequences, especially those cannot be learned from component attributes and accessibility text. You can set a detailed description text for the attribute of the component to help users understand the operation to be performed. If a component contains both text information and the accessibility description, the text is read first and then the accessibility description, when the component is selected.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilityimportance",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility importance, which is used to decide whether a component can be identified by the accessibility service. The value can be auto, yes, no, or no-hide-descendants. The last value forces the screen reader to ignore the current component and all its subcomponents. yes: The current component is selectable for the accessibility service. no: The current component is not selectable for the accessibility service.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "for",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Expands the current element based on the configured data list.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tid",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The tid attribute is used to accelerate the for loop. It is used to improve the re-rendering efficiency when data in a loop changes. The tid attribute specifies the unique ID of each element in the array. If it is not specified, the index of each element in the array is used as the ID. For example, tid='id' indicates that the id attribute of each element is its unique identifier.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "if",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is added or removed.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "elif",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "else",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "show",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is displayed or hidden.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"events": [
|
||||||
|
{
|
||||||
|
"name": "selectedchange",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "requestdata",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supportedSubComponents": false,
|
||||||
|
"supportedSubComponentsRestriction": [],
|
||||||
|
"unSupportSubComponentsRestriction": [],
|
||||||
|
"parentComponentsRestriction": []
|
||||||
|
}
|
407
api/form/hml/basic/chart.json
Normal file
407
api/form/hml/basic/chart.json
Normal file
@ -0,0 +1,407 @@
|
|||||||
|
{
|
||||||
|
"name": "chart",
|
||||||
|
"version": [
|
||||||
|
{
|
||||||
|
"name": "v3.0"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The <chart> component displays line charts, gauge charts, and bar charts.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": [
|
||||||
|
{
|
||||||
|
"name": "type",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Chart type. Dynamic modification is not supported. Available values include: bar: bar chart. line: line chart. gauge: gauge chart (not supported by lite devices).",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "bar"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "line"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "gauge"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "progress"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "loading"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "rainbow"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "options",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Chart parameters. You must set parameters for bar charts and line charts. Parameter settings for gauge charts do not take effect. You can set the minimum value, maximum value, scale, and line width of the x-axis or y-axis, whether to display the x-axis or y-axis, and whether the line is smooth. Dynamic modification is not supported.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "datasets",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Data set. You must set data sets for bar charts and line charts. Data set for a gauge chart does not take effect. You can set multiple datasets and their background colors.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "segments",
|
||||||
|
"supportedDevices": ["phone"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Data structures used by progress, loading, and rainbow charts. DataSegment is available for progress and loading charts.Array<DataSegment> is available for rainbow charts. A maximum of nine DataSegment are supported in the array.",
|
||||||
|
"supportedDevices": ["phone"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "effects",
|
||||||
|
"supportedDevices": ["phone"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether to enable the effects for progress and rainbow charts.",
|
||||||
|
"supportedDevices": ["phone"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "percent",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Percentage of the current value to the total value. The value ranges from 0 to 100.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Unique ID of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "style",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style declaration of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "class",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style class of a component, which is used to refer to a style table.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "disabled",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the component is disabled. If the component is disabled, the component cannot respond to user interaction.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "voicelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice label. When a voice label is triggered, the click event of the component is triggered. NOTE: The voice label takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptflag",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice subscript switch. Available values are as follows: auto: For the <image> and <list-item> components, if subscriptflag is set to auto, the voice subscript is turned on. For other components, if subscriptflag is set to auto, the voice subscript is turned off. on: Turn on the voice subscript. off: Turn off the voice subscript. If no customized subscript is set, the subscript is automatically accumulated from 1. NOTE The voice subscript takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "auto"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "on"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "off"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptlabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Custom subscript. After it is set, the subscript is displayed in the way you specified. To make this attribute take effect, you need to turn on the voice subscript.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "scenelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Available values are as follows: video: Video scenario. For example, to watch a video, a user can say the voiceLabel (usually the video name), play voiceLabel, see voiceLabel, or watch voiceLabel, etc. audio: Music scenario. For example, to listen to a song, a user can say the voiceLabel (usually the song name), play voiceLabel, or listen voiceLabel, etc. page: Page scenario. For example, to go to a page, a user can say the voiceLabel (usually the page name), switch to voiceLabel, go to voiceLabel, or jump to voiceLabel, etc. switch: Switch scenario. For example, to turn on or turn off a switch, a user can say the voiceLabel (usually the switch name), turn on voiceLabel, open voiceLabel, turn off voiceLabel, close voiceLabel, etc. common: Common scenario, which is triggered by the voiceLabel.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "video"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "audio"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "page"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "switch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitygroup",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility group. If this attribute is set to true, the component and all its child components form an entire selectable component, and the accessibility service will no longer available for the content of its child components.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitytext",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility text. If a component does not contain text information, it will not be read when the component is selected by the screen reader. In this case, the screen reader user cannot know which component is selected. To solve this problem, you can set this attribute for components without text information. When the component is selected by the screen reader, the specified accessibility text will be read, informing the user which component is selected. If a component with this attribute set contains text information, only the accessibility text will be read.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitydescription",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility description. You can specify further explanation of the current component, for example, possible operation consequences, especially those cannot be learned from component attributes and accessibility text. You can set a detailed description text for the attribute of the component to help users understand the operation to be performed. If a component contains both text information and the accessibility description, the text is read first and then the accessibility description, when the component is selected.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilityimportance",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility importance, which is used to decide whether a component can be identified by the accessibility service. The value can be auto, yes, no, or no-hide-descendants. The last value forces the screen reader to ignore the current component and all its subcomponents. yes: The current component is selectable for the accessibility service. no: The current component is not selectable for the accessibility service.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "for",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Expands the current element based on the configured data list.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tid",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The tid attribute is used to accelerate the for loop. It is used to improve the re-rendering efficiency when data in a loop changes. The tid attribute specifies the unique ID of each element in the array. If it is not specified, the index of each element in the array is used as the ID. For example, tid='id' indicates that the id attribute of each element is its unique identifier.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "if",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is added or removed.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "elif",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "else",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "show",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is displayed or hidden.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"events": [
|
||||||
|
{
|
||||||
|
"name": "click",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Triggered when a component is clicked.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supportedSubComponents": false,
|
||||||
|
"supportedSubComponentsRestriction": [],
|
||||||
|
"unSupportSubComponentsRestriction": [],
|
||||||
|
"parentComponentsRestriction": []
|
||||||
|
}
|
284
api/form/hml/basic/clock.json
Normal file
284
api/form/hml/basic/clock.json
Normal file
@ -0,0 +1,284 @@
|
|||||||
|
{
|
||||||
|
"name": "clock",
|
||||||
|
"version": [
|
||||||
|
{
|
||||||
|
"name": "v3.0"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The <clock> component displays a clock.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": [
|
||||||
|
{
|
||||||
|
"name": "clockconfig",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "showdigit",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hourswest",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "voicelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice label. When a voice label is triggered, the click event of the component is triggered. NOTE: The voice label takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptflag",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice subscript switch. Available values are as follows: auto: For the <image> and <list-item> components, if subscriptflag is set to auto, the voice subscript is turned on. For other components, if subscriptflag is set to auto, the voice subscript is turned off. on: Turn on the voice subscript. off: Turn off the voice subscript. If no customized subscript is set, the subscript is automatically accumulated from 1. NOTE The voice subscript takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "auto"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "on"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "off"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptlabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Custom subscript. After it is set, the subscript is displayed in the way you specified. To make this attribute take effect, you need to turn on the voice subscript.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "scenelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Available values are as follows: video: Video scenario. For example, to watch a video, a user can say the voiceLabel (usually the video name), play voiceLabel, see voiceLabel, or watch voiceLabel, etc. audio: Music scenario. For example, to listen to a song, a user can say the voiceLabel (usually the song name), play voiceLabel, or listen voiceLabel, etc. page: Page scenario. For example, to go to a page, a user can say the voiceLabel (usually the page name), switch to voiceLabel, go to voiceLabel, or jump to voiceLabel, etc. switch: Switch scenario. For example, to turn on or turn off a switch, a user can say the voiceLabel (usually the switch name), turn on voiceLabel, open voiceLabel, turn off voiceLabel, close voiceLabel, etc. common: Common scenario, which is triggered by the voiceLabel.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "video"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "audio"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "page"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "switch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitygroup",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility group. If this attribute is set to true, the component and all its child components form an entire selectable component, and the accessibility service will no longer available for the content of its child components.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitytext",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility text. If a component does not contain text information, it will not be read when the component is selected by the screen reader. In this case, the screen reader user cannot know which component is selected. To solve this problem, you can set this attribute for components without text information. When the component is selected by the screen reader, the specified accessibility text will be read, informing the user which component is selected. If a component with this attribute set contains text information, only the accessibility text will be read.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitydescription",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility description. You can specify further explanation of the current component, for example, possible operation consequences, especially those cannot be learned from component attributes and accessibility text. You can set a detailed description text for the attribute of the component to help users understand the operation to be performed. If a component contains both text information and the accessibility description, the text is read first and then the accessibility description, when the component is selected.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilityimportance",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility importance, which is used to decide whether a component can be identified by the accessibility service. The value can be auto, yes, no, or no-hide-descendants. The last value forces the screen reader to ignore the current component and all its subcomponents. yes: The current component is selectable for the accessibility service. no: The current component is not selectable for the accessibility service.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "for",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Expands the current element based on the configured data list.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tid",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The tid attribute is used to accelerate the for loop. It is used to improve the re-rendering efficiency when data in a loop changes. The tid attribute specifies the unique ID of each element in the array. If it is not specified, the index of each element in the array is used as the ID. For example, tid='id' indicates that the id attribute of each element is its unique identifier.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "if",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is added or removed.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "elif",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "else",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "show",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is displayed or hidden.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"events": [],
|
||||||
|
"supportedSubComponents": false,
|
||||||
|
"supportedSubComponentsRestriction": [],
|
||||||
|
"unSupportSubComponentsRestriction": [],
|
||||||
|
"parentComponentsRestriction": []
|
||||||
|
}
|
296
api/form/hml/basic/divider.json
Normal file
296
api/form/hml/basic/divider.json
Normal file
@ -0,0 +1,296 @@
|
|||||||
|
{
|
||||||
|
"name": "divider",
|
||||||
|
"version": [
|
||||||
|
{
|
||||||
|
"name": "v3.0"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The <divider> component is used to separate content blocks and content elements. It can be used for the list or interface layout.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": [
|
||||||
|
{
|
||||||
|
"name": "vertical",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether to use the vertical divider. The default value is false, indicating that the horizontal divider is used.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Unique ID of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "style",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style declaration of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "class",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style class of a component, which is used to refer to a style table.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "voicelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice label. When a voice label is triggered, the click event of the component is triggered. NOTE: The voice label takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptflag",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice subscript switch. Available values are as follows: auto: For the <image> and <list-item> components, if subscriptflag is set to auto, the voice subscript is turned on. For other components, if subscriptflag is set to auto, the voice subscript is turned off. on: Turn on the voice subscript. off: Turn off the voice subscript. If no customized subscript is set, the subscript is automatically accumulated from 1. NOTE The voice subscript takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "auto"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "on"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "off"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptlabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Custom subscript. After it is set, the subscript is displayed in the way you specified. To make this attribute take effect, you need to turn on the voice subscript.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "scenelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Available values are as follows: video: Video scenario. For example, to watch a video, a user can say the voiceLabel (usually the video name), play voiceLabel, see voiceLabel, or watch voiceLabel, etc. audio: Music scenario. For example, to listen to a song, a user can say the voiceLabel (usually the song name), play voiceLabel, or listen voiceLabel, etc. page: Page scenario. For example, to go to a page, a user can say the voiceLabel (usually the page name), switch to voiceLabel, go to voiceLabel, or jump to voiceLabel, etc. switch: Switch scenario. For example, to turn on or turn off a switch, a user can say the voiceLabel (usually the switch name), turn on voiceLabel, open voiceLabel, turn off voiceLabel, close voiceLabel, etc. common: Common scenario, which is triggered by the voiceLabel.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "video"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "audio"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "page"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "switch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitygroup",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility group. If this attribute is set to true, the component and all its child components form an entire selectable component, and the accessibility service will no longer available for the content of its child components.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitytext",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility text. If a component does not contain text information, it will not be read when the component is selected by the screen reader. In this case, the screen reader user cannot know which component is selected. To solve this problem, you can set this attribute for components without text information. When the component is selected by the screen reader, the specified accessibility text will be read, informing the user which component is selected. If a component with this attribute set contains text information, only the accessibility text will be read.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitydescription",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility description. You can specify further explanation of the current component, for example, possible operation consequences, especially those cannot be learned from component attributes and accessibility text. You can set a detailed description text for the attribute of the component to help users understand the operation to be performed. If a component contains both text information and the accessibility description, the text is read first and then the accessibility description, when the component is selected.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilityimportance",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility importance, which is used to decide whether a component can be identified by the accessibility service. The value can be auto, yes, no, or no-hide-descendants. The last value forces the screen reader to ignore the current component and all its subcomponents. yes: The current component is selectable for the accessibility service. no: The current component is not selectable for the accessibility service.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "for",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Expands the current element based on the configured data list.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tid",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The tid attribute is used to accelerate the for loop. It is used to improve the re-rendering efficiency when data in a loop changes. The tid attribute specifies the unique ID of each element in the array. If it is not specified, the index of each element in the array is used as the ID. For example, tid='id' indicates that the id attribute of each element is its unique identifier.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "if",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is added or removed.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "elif",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "else",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "show",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is displayed or hidden.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"events": [],
|
||||||
|
"supportedSubComponents": false,
|
||||||
|
"supportedSubComponentsRestriction": [],
|
||||||
|
"unSupportSubComponentsRestriction": [],
|
||||||
|
"parentComponentsRestriction": []
|
||||||
|
}
|
351
api/form/hml/basic/image.json
Normal file
351
api/form/hml/basic/image.json
Normal file
@ -0,0 +1,351 @@
|
|||||||
|
{
|
||||||
|
"name": "image",
|
||||||
|
"version": [
|
||||||
|
{
|
||||||
|
"name": "v3.0"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The <image> component is used to render and display images.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": [
|
||||||
|
{
|
||||||
|
"name": "src",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Image path, which supports both local and cloud paths. The supported image formats include PNG, JPG, SVG, and GIF. Image path. The supported image formats include PNG and JPG.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "url"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "alt",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Placeholder image displayed during image loading.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Unique ID of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "style",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style declaration of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "class",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style class of a component, which is used to refer to a style table.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "disabled",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the component is disabled. If the component is disabled, the component cannot respond to user interaction.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "voicelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice label. When a voice label is triggered, the click event of the component is triggered. NOTE: The voice label takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptflag",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice subscript switch. Available values are as follows: auto: For the <image> and <list-item> components, if subscriptflag is set to auto, the voice subscript is turned on. For other components, if subscriptflag is set to auto, the voice subscript is turned off. on: Turn on the voice subscript. off: Turn off the voice subscript. If no customized subscript is set, the subscript is automatically accumulated from 1. NOTE The voice subscript takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "auto"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "on"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "off"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptlabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Custom subscript. After it is set, the subscript is displayed in the way you specified. To make this attribute take effect, you need to turn on the voice subscript.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "scenelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Available values are as follows: video: Video scenario. For example, to watch a video, a user can say the voiceLabel (usually the video name), play voiceLabel, see voiceLabel, or watch voiceLabel, etc. audio: Music scenario. For example, to listen to a song, a user can say the voiceLabel (usually the song name), play voiceLabel, or listen voiceLabel, etc. page: Page scenario. For example, to go to a page, a user can say the voiceLabel (usually the page name), switch to voiceLabel, go to voiceLabel, or jump to voiceLabel, etc. switch: Switch scenario. For example, to turn on or turn off a switch, a user can say the voiceLabel (usually the switch name), turn on voiceLabel, open voiceLabel, turn off voiceLabel, close voiceLabel, etc. common: Common scenario, which is triggered by the voiceLabel.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "video"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "audio"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "page"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "switch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitygroup",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility group. If this attribute is set to true, the component and all its child components form an entire selectable component, and the accessibility service will no longer available for the content of its child components.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitytext",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility text. If a component does not contain text information, it will not be read when the component is selected by the screen reader. In this case, the screen reader user cannot know which component is selected. To solve this problem, you can set this attribute for components without text information. When the component is selected by the screen reader, the specified accessibility text will be read, informing the user which component is selected. If a component with this attribute set contains text information, only the accessibility text will be read.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitydescription",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility description. You can specify further explanation of the current component, for example, possible operation consequences, especially those cannot be learned from component attributes and accessibility text. You can set a detailed description text for the attribute of the component to help users understand the operation to be performed. If a component contains both text information and the accessibility description, the text is read first and then the accessibility description, when the component is selected.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilityimportance",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility importance, which is used to decide whether a component can be identified by the accessibility service. The value can be auto, yes, no, or no-hide-descendants. The last value forces the screen reader to ignore the current component and all its subcomponents. yes: The current component is selectable for the accessibility service. no: The current component is not selectable for the accessibility service.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "for",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Expands the current element based on the configured data list.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tid",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The tid attribute is used to accelerate the for loop. It is used to improve the re-rendering efficiency when data in a loop changes. The tid attribute specifies the unique ID of each element in the array. If it is not specified, the index of each element in the array is used as the ID. For example, tid='id' indicates that the id attribute of each element is its unique identifier.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "if",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is added or removed.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "elif",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "else",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "show",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is displayed or hidden.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"events": [
|
||||||
|
{
|
||||||
|
"name": "complete",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Triggered when an image is successfully loaded.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "error",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Triggered when an exception occurs during image loading.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "click",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Triggered when a component is clicked.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supportedSubComponents": false,
|
||||||
|
"supportedSubComponentsRestriction": [],
|
||||||
|
"unSupportSubComponentsRestriction": [],
|
||||||
|
"parentComponentsRestriction": []
|
||||||
|
}
|
401
api/form/hml/basic/input.json
Normal file
401
api/form/hml/basic/input.json
Normal file
@ -0,0 +1,401 @@
|
|||||||
|
{
|
||||||
|
"name": "input",
|
||||||
|
"version": [
|
||||||
|
{
|
||||||
|
"name": "v3.0"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The <input> component provides an interactive interface to receive user input. It can be a radio button, check box, button, single-line text box, etc.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": [
|
||||||
|
{
|
||||||
|
"name": "type",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Type of the input component. Available values include text (Rich), email (Rich), date (Rich), time (Rich), number (Rich), password (Rich), button.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "radio"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "checked",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the component is checked or not.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dir",
|
||||||
|
"supportedDevices": ["phone", "tablet", "tv", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Specify the text direction of an element.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "tv", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "ltr"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "rtl"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "auto"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "name",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Name of the input component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "value",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Value of the input component. When type is radio, this attribute is mandatory and the value must be unique for radio buttons with the same name.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Unique ID of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "style",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style declaration of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "class",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style class of a component, which is used to refer to a style table.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "disabled",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the component is disabled. If the component is disabled, the component cannot respond to user interaction.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "voicelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice label. When a voice label is triggered, the click event of the component is triggered. NOTE: The voice label takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptflag",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice subscript switch. Available values are as follows: auto: For the <image> and <list-item> components, if subscriptflag is set to auto, the voice subscript is turned on. For other components, if subscriptflag is set to auto, the voice subscript is turned off. on: Turn on the voice subscript. off: Turn off the voice subscript. If no customized subscript is set, the subscript is automatically accumulated from 1. NOTE The voice subscript takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "auto"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "on"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "off"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptlabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Custom subscript. After it is set, the subscript is displayed in the way you specified. To make this attribute take effect, you need to turn on the voice subscript.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "scenelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Available values are as follows: video: Video scenario. For example, to watch a video, a user can say the voiceLabel (usually the video name), play voiceLabel, see voiceLabel, or watch voiceLabel, etc. audio: Music scenario. For example, to listen to a song, a user can say the voiceLabel (usually the song name), play voiceLabel, or listen voiceLabel, etc. page: Page scenario. For example, to go to a page, a user can say the voiceLabel (usually the page name), switch to voiceLabel, go to voiceLabel, or jump to voiceLabel, etc. switch: Switch scenario. For example, to turn on or turn off a switch, a user can say the voiceLabel (usually the switch name), turn on voiceLabel, open voiceLabel, turn off voiceLabel, close voiceLabel, etc. common: Common scenario, which is triggered by the voiceLabel.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "video"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "audio"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "page"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "switch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitygroup",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility group. If this attribute is set to true, the component and all its child components form an entire selectable component, and the accessibility service will no longer available for the content of its child components.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitytext",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility text. If a component does not contain text information, it will not be read when the component is selected by the screen reader. In this case, the screen reader user cannot know which component is selected. To solve this problem, you can set this attribute for components without text information. When the component is selected by the screen reader, the specified accessibility text will be read, informing the user which component is selected. If a component with this attribute set contains text information, only the accessibility text will be read.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitydescription",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility description. You can specify further explanation of the current component, for example, possible operation consequences, especially those cannot be learned from component attributes and accessibility text. You can set a detailed description text for the attribute of the component to help users understand the operation to be performed. If a component contains both text information and the accessibility description, the text is read first and then the accessibility description, when the component is selected.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilityimportance",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility importance, which is used to decide whether a component can be identified by the accessibility service. The value can be auto, yes, no, or no-hide-descendants. The last value forces the screen reader to ignore the current component and all its subcomponents. yes: The current component is selectable for the accessibility service. no: The current component is not selectable for the accessibility service.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "for",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Expands the current element based on the configured data list.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tid",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The tid attribute is used to accelerate the for loop. It is used to improve the re-rendering efficiency when data in a loop changes. The tid attribute specifies the unique ID of each element in the array. If it is not specified, the index of each element in the array is used as the ID. For example, tid='id' indicates that the id attribute of each element is its unique identifier.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "if",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is added or removed.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "elif",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "else",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "show",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is displayed or hidden.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"events": [
|
||||||
|
{
|
||||||
|
"name": "change",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Triggered when the content entered in the text box changes. The latest textsmost recent text entered by the user is returned.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "click",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Triggered when a component is clicked.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supportedSubComponents": false,
|
||||||
|
"supportedSubComponentsRestriction": [],
|
||||||
|
"unSupportSubComponentsRestriction": [],
|
||||||
|
"parentComponentsRestriction": []
|
||||||
|
}
|
363
api/form/hml/basic/progress.json
Normal file
363
api/form/hml/basic/progress.json
Normal file
@ -0,0 +1,363 @@
|
|||||||
|
{
|
||||||
|
"name": "progress",
|
||||||
|
"version": [
|
||||||
|
{
|
||||||
|
"name": "v3.0"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The <progress> component is used to provide a progress bar that displays the progress of content loading or operation processing.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": [
|
||||||
|
{
|
||||||
|
"name": "type",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Type of the progress bar, which cannot be changed dynamically. Available values are as follows: horizontal: linear progress bar. circular (Rich): loading progress bar. ring (Rich): ring progress bar. scale-ring (Rich): ring progress bar with a scale. arc: arc progress bar.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "horizontal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "circular"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ring"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "scale-ring"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "arc"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "eclipse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "percent",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Current progress. The value ranges from 0 to 100.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "secondarypercent",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Secondary progress. The value ranges from 0 to 100.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "clockwise",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the ring progress bar uses clockwise.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Unique ID of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "style",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style declaration of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "class",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style class of a component, which is used to refer to a style table.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "voicelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice label. When a voice label is triggered, the click event of the component is triggered. NOTE: The voice label takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptflag",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice subscript switch. Available values are as follows: auto: For the <image> and <list-item> components, if subscriptflag is set to auto, the voice subscript is turned on. For other components, if subscriptflag is set to auto, the voice subscript is turned off. on: Turn on the voice subscript. off: Turn off the voice subscript. If no customized subscript is set, the subscript is automatically accumulated from 1. NOTE The voice subscript takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "auto"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "on"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "off"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptlabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Custom subscript. After it is set, the subscript is displayed in the way you specified. To make this attribute take effect, you need to turn on the voice subscript.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "scenelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Available values are as follows: video: Video scenario. For example, to watch a video, a user can say the voiceLabel (usually the video name), play voiceLabel, see voiceLabel, or watch voiceLabel, etc. audio: Music scenario. For example, to listen to a song, a user can say the voiceLabel (usually the song name), play voiceLabel, or listen voiceLabel, etc. page: Page scenario. For example, to go to a page, a user can say the voiceLabel (usually the page name), switch to voiceLabel, go to voiceLabel, or jump to voiceLabel, etc. switch: Switch scenario. For example, to turn on or turn off a switch, a user can say the voiceLabel (usually the switch name), turn on voiceLabel, open voiceLabel, turn off voiceLabel, close voiceLabel, etc. common: Common scenario, which is triggered by the voiceLabel.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "video"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "audio"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "page"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "switch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitygroup",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility group. If this attribute is set to true, the component and all its child components form an entire selectable component, and the accessibility service will no longer available for the content of its child components.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitytext",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility text. If a component does not contain text information, it will not be read when the component is selected by the screen reader. In this case, the screen reader user cannot know which component is selected. To solve this problem, you can set this attribute for components without text information. When the component is selected by the screen reader, the specified accessibility text will be read, informing the user which component is selected. If a component with this attribute set contains text information, only the accessibility text will be read.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitydescription",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility description. You can specify further explanation of the current component, for example, possible operation consequences, especially those cannot be learned from component attributes and accessibility text. You can set a detailed description text for the attribute of the component to help users understand the operation to be performed. If a component contains both text information and the accessibility description, the text is read first and then the accessibility description, when the component is selected.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilityimportance",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility importance, which is used to decide whether a component can be identified by the accessibility service. The value can be auto, yes, no, or no-hide-descendants. The last value forces the screen reader to ignore the current component and all its subcomponents. yes: The current component is selectable for the accessibility service. no: The current component is not selectable for the accessibility service.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "for",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Expands the current element based on the configured data list.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tid",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The tid attribute is used to accelerate the for loop. It is used to improve the re-rendering efficiency when data in a loop changes. The tid attribute specifies the unique ID of each element in the array. If it is not specified, the index of each element in the array is used as the ID. For example, tid='id' indicates that the id attribute of each element is its unique identifier.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "if",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is added or removed.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "elif",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "else",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "show",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is displayed or hidden.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"events": [
|
||||||
|
{
|
||||||
|
"name": "click",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Triggered when a component is clicked.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supportedSubComponents": false,
|
||||||
|
"supportedSubComponentsRestriction": [],
|
||||||
|
"unSupportSubComponentsRestriction": [],
|
||||||
|
"parentComponentsRestriction": []
|
||||||
|
}
|
281
api/form/hml/basic/span.json
Normal file
281
api/form/hml/basic/span.json
Normal file
@ -0,0 +1,281 @@
|
|||||||
|
{
|
||||||
|
"name": "span",
|
||||||
|
"version": [
|
||||||
|
{
|
||||||
|
"name": "v3.0"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The <span> child component of <text> is used as a text modifier.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Unique ID of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "style",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style declaration of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "class",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style class of a component, which is used to refer to a style table.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "voicelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice label. When a voice label is triggered, the click event of the component is triggered. NOTE: The voice label takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptflag",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice subscript switch. Available values are as follows: auto: For the <image> and <list-item> components, if subscriptflag is set to auto, the voice subscript is turned on. For other components, if subscriptflag is set to auto, the voice subscript is turned off. on: Turn on the voice subscript. off: Turn off the voice subscript. If no customized subscript is set, the subscript is automatically accumulated from 1. NOTE The voice subscript takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "auto"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "on"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "off"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptlabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Custom subscript. After it is set, the subscript is displayed in the way you specified. To make this attribute take effect, you need to turn on the voice subscript.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "scenelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Available values are as follows: video: Video scenario. For example, to watch a video, a user can say the voiceLabel (usually the video name), play voiceLabel, see voiceLabel, or watch voiceLabel, etc. audio: Music scenario. For example, to listen to a song, a user can say the voiceLabel (usually the song name), play voiceLabel, or listen voiceLabel, etc. page: Page scenario. For example, to go to a page, a user can say the voiceLabel (usually the page name), switch to voiceLabel, go to voiceLabel, or jump to voiceLabel, etc. switch: Switch scenario. For example, to turn on or turn off a switch, a user can say the voiceLabel (usually the switch name), turn on voiceLabel, open voiceLabel, turn off voiceLabel, close voiceLabel, etc. common: Common scenario, which is triggered by the voiceLabel.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "video"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "audio"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "page"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "switch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitygroup",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility group. If this attribute is set to true, the component and all its child components form an entire selectable component, and the accessibility service will no longer available for the content of its child components.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitytext",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility text. If a component does not contain text information, it will not be read when the component is selected by the screen reader. In this case, the screen reader user cannot know which component is selected. To solve this problem, you can set this attribute for components without text information. When the component is selected by the screen reader, the specified accessibility text will be read, informing the user which component is selected. If a component with this attribute set contains text information, only the accessibility text will be read.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitydescription",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility description. You can specify further explanation of the current component, for example, possible operation consequences, especially those cannot be learned from component attributes and accessibility text. You can set a detailed description text for the attribute of the component to help users understand the operation to be performed. If a component contains both text information and the accessibility description, the text is read first and then the accessibility description, when the component is selected.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilityimportance",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility importance, which is used to decide whether a component can be identified by the accessibility service. The value can be auto, yes, no, or no-hide-descendants. The last value forces the screen reader to ignore the current component and all its subcomponents. yes: The current component is selectable for the accessibility service. no: The current component is not selectable for the accessibility service.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "for",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Expands the current element based on the configured data list.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tid",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The tid attribute is used to accelerate the for loop. It is used to improve the re-rendering efficiency when data in a loop changes. The tid attribute specifies the unique ID of each element in the array. If it is not specified, the index of each element in the array is used as the ID. For example, tid='id' indicates that the id attribute of each element is its unique identifier.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "if",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is added or removed.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "elif",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "else",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "show",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is displayed or hidden.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"events": [],
|
||||||
|
"supportedSubComponents": true,
|
||||||
|
"supportedSubComponentsRestriction": [
|
||||||
|
{
|
||||||
|
"name": "span",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"unSupportSubComponentsRestriction": [],
|
||||||
|
"parentComponentsRestriction": []
|
||||||
|
}
|
313
api/form/hml/basic/text.json
Normal file
313
api/form/hml/basic/text.json
Normal file
@ -0,0 +1,313 @@
|
|||||||
|
{
|
||||||
|
"name": "text",
|
||||||
|
"version": [
|
||||||
|
{
|
||||||
|
"name": "v3.0"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The <text> component is used to display a piece of textual information.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Unique ID of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "style",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style declaration of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "class",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style class of a component, which is used to refer to a style table.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "disabled",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the component is disabled. If the component is disabled, the component cannot respond to user interaction.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "voicelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice label. When a voice label is triggered, the click event of the component is triggered. NOTE: The voice label takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptflag",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice subscript switch. Available values are as follows: auto: For the <image> and <list-item> components, if subscriptflag is set to auto, the voice subscript is turned on. For other components, if subscriptflag is set to auto, the voice subscript is turned off. on: Turn on the voice subscript. off: Turn off the voice subscript. If no customized subscript is set, the subscript is automatically accumulated from 1. NOTE The voice subscript takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "auto"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "on"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "off"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptlabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Custom subscript. After it is set, the subscript is displayed in the way you specified. To make this attribute take effect, you need to turn on the voice subscript.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "scenelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Available values are as follows: video: Video scenario. For example, to watch a video, a user can say the voiceLabel (usually the video name), play voiceLabel, see voiceLabel, or watch voiceLabel, etc. audio: Music scenario. For example, to listen to a song, a user can say the voiceLabel (usually the song name), play voiceLabel, or listen voiceLabel, etc. page: Page scenario. For example, to go to a page, a user can say the voiceLabel (usually the page name), switch to voiceLabel, go to voiceLabel, or jump to voiceLabel, etc. switch: Switch scenario. For example, to turn on or turn off a switch, a user can say the voiceLabel (usually the switch name), turn on voiceLabel, open voiceLabel, turn off voiceLabel, close voiceLabel, etc. common: Common scenario, which is triggered by the voiceLabel.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "video"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "audio"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "page"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "switch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitygroup",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility group. If this attribute is set to true, the component and all its child components form an entire selectable component, and the accessibility service will no longer available for the content of its child components.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitytext",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility text. If a component does not contain text information, it will not be read when the component is selected by the screen reader. In this case, the screen reader user cannot know which component is selected. To solve this problem, you can set this attribute for components without text information. When the component is selected by the screen reader, the specified accessibility text will be read, informing the user which component is selected. If a component with this attribute set contains text information, only the accessibility text will be read.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitydescription",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility description. You can specify further explanation of the current component, for example, possible operation consequences, especially those cannot be learned from component attributes and accessibility text. You can set a detailed description text for the attribute of the component to help users understand the operation to be performed. If a component contains both text information and the accessibility description, the text is read first and then the accessibility description, when the component is selected.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilityimportance",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility importance, which is used to decide whether a component can be identified by the accessibility service. The value can be auto, yes, no, or no-hide-descendants. The last value forces the screen reader to ignore the current component and all its subcomponents. yes: The current component is selectable for the accessibility service. no: The current component is not selectable for the accessibility service.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "for",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Expands the current element based on the configured data list.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tid",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The tid attribute is used to accelerate the for loop. It is used to improve the re-rendering efficiency when data in a loop changes. The tid attribute specifies the unique ID of each element in the array. If it is not specified, the index of each element in the array is used as the ID. For example, tid='id' indicates that the id attribute of each element is its unique identifier.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "if",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is added or removed.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "elif",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "else",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "show",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is displayed or hidden.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"events": [
|
||||||
|
{
|
||||||
|
"name": "click",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Triggered when a component is clicked.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supportedSubComponents": true,
|
||||||
|
"supportedSubComponentsRestriction": [
|
||||||
|
{
|
||||||
|
"name": "span",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"level": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"unSupportSubComponentsRestriction": [],
|
||||||
|
"parentComponentsRestriction": []
|
||||||
|
}
|
417
api/form/hml/container/badge.json
Normal file
417
api/form/hml/container/badge.json
Normal file
@ -0,0 +1,417 @@
|
|||||||
|
{
|
||||||
|
"name": "badge",
|
||||||
|
"version": [
|
||||||
|
{
|
||||||
|
"name": "v4.0"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The <badge> component is used to mark new events that require user attention in your application.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": [
|
||||||
|
{
|
||||||
|
"name": "placement",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Position of a number or dot badge. Available values are as follows: right: on the right border of the component. rightTop: in the upper right corner of the component border.left: on the left border of the component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "left"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "right"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "rightTop"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "count",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Number of notifications displayed via the badge. The default value is 0. If the number of notifications is greater than 0, the badge changes from a dot to the number. If this attribute is not set or the value is less than or equal to 0, the badge is a dot.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "visible",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether to display the badge. The value true means that the badge shows up when a new notification is received. To use a number badge, set the count attribute.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "maxcount",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Maximum number of notifications. When the number of new notifications exceeds the value of this attribute, maxcount+ is displayed, for example, 99+.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "config",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Configuration of the badge.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"badgeColor": "#fa2a2d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"textColor": "#ffffff"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"textSize": "10px"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"badgeSize": "6px"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "label",
|
||||||
|
"supportedDevices": ["phone", "tablet"],
|
||||||
|
"version": [
|
||||||
|
{
|
||||||
|
"name": "v6.0"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Sets the text value for the new event alert.",
|
||||||
|
"supportedDevices": ["phone", "tablet"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Unique ID of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "style",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style declaration of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "class",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style class of a component, which is used to refer to a style table.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "disabled",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the component is disabled. If the component is disabled, the component cannot respond to user interaction.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "voicelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice label. When a voice label is triggered, the click event of the component is triggered. NOTE: The voice label takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptflag",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice subscript switch. Available values are as follows: auto: For the <image> and <list-item> components, if subscriptflag is set to auto, the voice subscript is turned on. For other components, if subscriptflag is set to auto, the voice subscript is turned off. on: Turn on the voice subscript. off: Turn off the voice subscript. If no customized subscript is set, the subscript is automatically accumulated from 1. NOTE The voice subscript takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "auto"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "on"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "off"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptlabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Custom subscript. After it is set, the subscript is displayed in the way you specified. To make this attribute take effect, you need to turn on the voice subscript.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "scenelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Available values are as follows: video: Video scenario. For example, to watch a video, a user can say the voiceLabel (usually the video name), play voiceLabel, see voiceLabel, or watch voiceLabel, etc. audio: Music scenario. For example, to listen to a song, a user can say the voiceLabel (usually the song name), play voiceLabel, or listen voiceLabel, etc. page: Page scenario. For example, to go to a page, a user can say the voiceLabel (usually the page name), switch to voiceLabel, go to voiceLabel, or jump to voiceLabel, etc. switch: Switch scenario. For example, to turn on or turn off a switch, a user can say the voiceLabel (usually the switch name), turn on voiceLabel, open voiceLabel, turn off voiceLabel, close voiceLabel, etc. common: Common scenario, which is triggered by the voiceLabel.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "video"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "audio"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "page"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "switch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitygroup",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility group. If this attribute is set to true, the component and all its child components form an entire selectable component, and the accessibility service will no longer available for the content of its child components.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitytext",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility text. If a component does not contain text information, it will not be read when the component is selected by the screen reader. In this case, the screen reader user cannot know which component is selected. To solve this problem, you can set this attribute for components without text information. When the component is selected by the screen reader, the specified accessibility text will be read, informing the user which component is selected. If a component with this attribute set contains text information, only the accessibility text will be read.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitydescription",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility description. You can specify further explanation of the current component, for example, possible operation consequences, especially those cannot be learned from component attributes and accessibility text. You can set a detailed description text for the attribute of the component to help users understand the operation to be performed. If a component contains both text information and the accessibility description, the text is read first and then the accessibility description, when the component is selected.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilityimportance",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility importance, which is used to decide whether a component can be identified by the accessibility service. The value can be auto, yes, no, or no-hide-descendants. The last value forces the screen reader to ignore the current component and all its subcomponents. yes: The current component is selectable for the accessibility service. no: The current component is not selectable for the accessibility service.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "if",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is added or removed.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "elif",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "else",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "for",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Expands the current element based on the configured data list.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tid",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The tid attribute is used to accelerate the for loop. It is used to improve the re-rendering efficiency when data in a loop changes. The tid attribute specifies the unique ID of each element in the array. If it is not specified, the index of each element in the array is used as the ID. For example, tid='id' indicates that the id attribute of each element is its unique identifier.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "show",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is displayed or hidden.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"events": [
|
||||||
|
{
|
||||||
|
"name": "click",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Triggered when a component is clicked.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supportedSubComponents": true,
|
||||||
|
"supportedSubComponentsRestriction": [],
|
||||||
|
"unSupportSubComponentsRestriction": [],
|
||||||
|
"parentComponentsRestriction": []
|
||||||
|
}
|
330
api/form/hml/container/div.json
Normal file
330
api/form/hml/container/div.json
Normal file
@ -0,0 +1,330 @@
|
|||||||
|
{
|
||||||
|
"name": "div",
|
||||||
|
"version": [
|
||||||
|
{
|
||||||
|
"name": "v3.0"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The <div> component is a basic container that is used as the root node of the page structure or is used to group the content.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Unique ID of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "style",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style declaration of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "class",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style class of a component, which is used to refer to a style table.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "disabled",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the component is disabled. If the component is disabled, the component cannot respond to user interaction.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "voicelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice label. When a voice label is triggered, the click event of the component is triggered. NOTE: The voice label takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptflag",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice subscript switch. Available values are as follows: auto: For the <image> and <list-item> components, if subscriptflag is set to auto, the voice subscript is turned on. For other components, if subscriptflag is set to auto, the voice subscript is turned off. on: Turn on the voice subscript. off: Turn off the voice subscript. If no customized subscript is set, the subscript is automatically accumulated from 1. NOTE The voice subscript takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "auto"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "on"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "off"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptlabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Custom subscript. After it is set, the subscript is displayed in the way you specified. To make this attribute take effect, you need to turn on the voice subscript.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "scenelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Available values are as follows: video: Video scenario. For example, to watch a video, a user can say the voiceLabel (usually the video name), play voiceLabel, see voiceLabel, or watch voiceLabel, etc. audio: Music scenario. For example, to listen to a song, a user can say the voiceLabel (usually the song name), play voiceLabel, or listen voiceLabel, etc. page: Page scenario. For example, to go to a page, a user can say the voiceLabel (usually the page name), switch to voiceLabel, go to voiceLabel, or jump to voiceLabel, etc. switch: Switch scenario. For example, to turn on or turn off a switch, a user can say the voiceLabel (usually the switch name), turn on voiceLabel, open voiceLabel, turn off voiceLabel, close voiceLabel, etc. common: Common scenario, which is triggered by the voiceLabel.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "video"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "audio"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "page"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "switch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitygroup",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility group. If this attribute is set to true, the component and all its child components form an entire selectable component, and the accessibility service will no longer available for the content of its child components.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitytext",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility text. If a component does not contain text information, it will not be read when the component is selected by the screen reader. In this case, the screen reader user cannot know which component is selected. To solve this problem, you can set this attribute for components without text information. When the component is selected by the screen reader, the specified accessibility text will be read, informing the user which component is selected. If a component with this attribute set contains text information, only the accessibility text will be read.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitydescription",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility description. You can specify further explanation of the current component, for example, possible operation consequences, especially those cannot be learned from component attributes and accessibility text. You can set a detailed description text for the attribute of the component to help users understand the operation to be performed. If a component contains both text information and the accessibility description, the text is read first and then the accessibility description, when the component is selected.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilityimportance",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility importance, which is used to decide whether a component can be identified by the accessibility service. The value can be auto, yes, no, or no-hide-descendants. The last value forces the screen reader to ignore the current component and all its subcomponents. yes: The current component is selectable for the accessibility service. no: The current component is not selectable for the accessibility service.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "for",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Expands the current element based on the configured data list.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tid",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The tid attribute is used to accelerate the for loop. It is used to improve the re-rendering efficiency when data in a loop changes. The tid attribute specifies the unique ID of each element in the array. If it is not specified, the index of each element in the array is used as the ID. For example, tid='id' indicates that the id attribute of each element is its unique identifier.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "if",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is added or removed.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dir",
|
||||||
|
"supportedDevices": ["phone", "tablet", "tv", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Specify the text direction of an element.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "tv", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "ltr"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "rtl"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "auto"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "elif",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "else",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "show",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is displayed or hidden.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"events": [
|
||||||
|
{
|
||||||
|
"name": "click",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Triggered when a component is clicked.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supportedSubComponents": true,
|
||||||
|
"supportedSubComponentsRestriction": [],
|
||||||
|
"unSupportSubComponentsRestriction": [],
|
||||||
|
"parentComponentsRestriction": []
|
||||||
|
}
|
380
api/form/hml/container/list-item.json
Normal file
380
api/form/hml/container/list-item.json
Normal file
@ -0,0 +1,380 @@
|
|||||||
|
{
|
||||||
|
"name": "list-item",
|
||||||
|
"version": [
|
||||||
|
{
|
||||||
|
"name": "v3.0"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "<list-item> is a child component of <list> and is used to display items in a list.",
|
||||||
|
"supportedDevices": ["liteWearable", "smartVision"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "<list-item> is a child component of <list> and is used to display items in a list. The width of <list-item> fills that of <list>.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": [
|
||||||
|
{
|
||||||
|
"name": "type",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Type of the list-item. A list can contain multiple list-item types. The same type of list-items should have the same view layout after being rendered. If the type is fixed, replace the if attribute with the show attribute to ensure that the view layout remains unchanged.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "section",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Matching string of the item. It takes effect when the indexer is enabled. If this attribute is not specified, the matching string is empty. This attribute cannot be modified dynamically. In a group, only the matching string set for the primary item is valid.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sticky",
|
||||||
|
"supportedDevices": ["tv", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Matching string of the item. It takes effect when the indexer is enabled. If this attribute is not specified, the matching string is empty. This attribute cannot be modified dynamically. In a group, only the matching string set for the primary item is valid.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "none",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "normal",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "opacity",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "clickeffect",
|
||||||
|
"supportedDevices": ["phone", "tablet", "tv", "wearable"],
|
||||||
|
"version": [
|
||||||
|
{
|
||||||
|
"name": "v5.0"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Sets whether the current item has the click effect.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "tv", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Unique ID of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "style",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style declaration of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "class",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style class of a component, which is used to refer to a style table.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "disabled",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the component is disabled. If the component is disabled, the component cannot respond to user interaction.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "voicelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice label. When a voice label is triggered, the click event of the component is triggered. NOTE: The voice label takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptflag",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice subscript switch. Available values are as follows: auto: For the <image> and <list-item> components, if subscriptflag is set to auto, the voice subscript is turned on. For other components, if subscriptflag is set to auto, the voice subscript is turned off. on: Turn on the voice subscript. off: Turn off the voice subscript. If no customized subscript is set, the subscript is automatically accumulated from 1. NOTE The voice subscript takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "auto"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "on"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "off"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptlabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Custom subscript. After it is set, the subscript is displayed in the way you specified. To make this attribute take effect, you need to turn on the voice subscript.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "scenelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Available values are as follows: video: Video scenario. For example, to watch a video, a user can say the voiceLabel (usually the video name), play voiceLabel, see voiceLabel, or watch voiceLabel, etc. audio: Music scenario. For example, to listen to a song, a user can say the voiceLabel (usually the song name), play voiceLabel, or listen voiceLabel, etc. page: Page scenario. For example, to go to a page, a user can say the voiceLabel (usually the page name), switch to voiceLabel, go to voiceLabel, or jump to voiceLabel, etc. switch: Switch scenario. For example, to turn on or turn off a switch, a user can say the voiceLabel (usually the switch name), turn on voiceLabel, open voiceLabel, turn off voiceLabel, close voiceLabel, etc. common: Common scenario, which is triggered by the voiceLabel.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "video"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "audio"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "page"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "switch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitygroup",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility group. If this attribute is set to true, the component and all its child components form an entire selectable component, and the accessibility service will no longer available for the content of its child components.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitytext",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility text. If a component does not contain text information, it will not be read when the component is selected by the screen reader. In this case, the screen reader user cannot know which component is selected. To solve this problem, you can set this attribute for components without text information. When the component is selected by the screen reader, the specified accessibility text will be read, informing the user which component is selected. If a component with this attribute set contains text information, only the accessibility text will be read.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitydescription",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility description. You can specify further explanation of the current component, for example, possible operation consequences, especially those cannot be learned from component attributes and accessibility text. You can set a detailed description text for the attribute of the component to help users understand the operation to be performed. If a component contains both text information and the accessibility description, the text is read first and then the accessibility description, when the component is selected.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilityimportance",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility importance, which is used to decide whether a component can be identified by the accessibility service. The value can be auto, yes, no, or no-hide-descendants. The last value forces the screen reader to ignore the current component and all its subcomponents. yes: The current component is selectable for the accessibility service. no: The current component is not selectable for the accessibility service.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "for",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Expands the current element based on the configured data list.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tid",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The tid attribute is used to accelerate the for loop. It is used to improve the re-rendering efficiency when data in a loop changes. The tid attribute specifies the unique ID of each element in the array. If it is not specified, the index of each element in the array is used as the ID. For example, tid='id' indicates that the id attribute of each element is its unique identifier.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "if",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is added or removed.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "elif",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "else",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "show",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is displayed or hidden.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"events": [],
|
||||||
|
"supportedSubComponents": true,
|
||||||
|
"supportedSubComponentsRestriction": [],
|
||||||
|
"unSupportSubComponentsRestriction": [],
|
||||||
|
"parentComponentsRestriction": [
|
||||||
|
{
|
||||||
|
"name": "list",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
491
api/form/hml/container/list.json
Normal file
491
api/form/hml/container/list.json
Normal file
@ -0,0 +1,491 @@
|
|||||||
|
{
|
||||||
|
"name": "list",
|
||||||
|
"version": [
|
||||||
|
{
|
||||||
|
"name": "v3.0"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The <list> component provides a list container that presents a series of list items arranged in a column with the same width. Lists support presentations of the same data in a multiple and coherent row style, for example, images and texts.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": [
|
||||||
|
{
|
||||||
|
"name": "cachedcount",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Minimum number of cached list-items when the long list is loaded with delay. When the number of list-items cached outside the visible area is less than the value of this attribute, a requestitem event is triggered.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dir",
|
||||||
|
"supportedDevices": ["phone", "tablet", "tv", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Specify the text direction of an element.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "tv", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "ltr"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "rtl"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "auto"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "scrollbar",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Display mode of the side scroll bar. (Currently, only the vertical scroll bar is supported.) off: No display; auto: Displayed on demand (The side scroll bar is displayed when you touch it and disappears 2s later.); on: Always displayed.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "off",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "auto",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "on",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "scrolleffect",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Scroll effect. Available values are as follows: spring: Similar to the physical dynamic effect of a spring. After scrolling to the edge, you can continue to scroll for a distance based on the initial speed or by using a touch event. After you release your hand, the screen is rebounded; fade: Similar to the physical dynamic effect of fade. When you scroll to the edge, a wave shape fades. The fade changes according to the speed and scrolling distance; no: No effect after the scroll bar is moved to the edge.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "spring",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "fade",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "no",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "divider",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether list items are separated by dividers.For details about divider styles, see divider-color, divider-height, divider-length, and divider-origin in the Styles table.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "shapemode",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Shape of the side scroll bar. default: Not specified (following the theme); rect: Rectangle; round: Circle.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "default",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "rect",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "round",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "updateeffect",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether a dynamic effect is displayed when an item in the list is deleted or added. false: No dynamic effect is displayed; true: A dynamic effect is displayed when an item is added or deleted.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "initialindex",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Item displayed at the start position of the viewport when the current list is loaded for the first time. The default value is 0, indicating that the first item is displayed. If the number you set is greater than the index of the last item, the setting does not take effect. When the initialoffset attribute is set, the current attribute does not take effect.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "initialoffset",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The start offset of the viewport when the current list is loaded for the first time. The offset cannot exceed the scrolling range of the current list. Otherwise, the offset is truncated to the maximum value of the scrolling range.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "length"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "selected",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Selected item in the current list. The value can be a section value of any list items.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Unique ID of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "style",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style declaration of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "class",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style class of a component, which is used to refer to a style table.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "disabled",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the component is disabled. If the component is disabled, the component cannot respond to user interaction.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "voicelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice label. When a voice label is triggered, the click event of the component is triggered. NOTE: The voice label takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptflag",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice subscript switch. Available values are as follows: auto: For the <image> and <list-item> components, if subscriptflag is set to auto, the voice subscript is turned on. For other components, if subscriptflag is set to auto, the voice subscript is turned off. on: Turn on the voice subscript. off: Turn off the voice subscript. If no customized subscript is set, the subscript is automatically accumulated from 1. NOTE The voice subscript takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "auto"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "on"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "off"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptlabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Custom subscript. After it is set, the subscript is displayed in the way you specified. To make this attribute take effect, you need to turn on the voice subscript.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "scenelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Available values are as follows: video: Video scenario. For example, to watch a video, a user can say the voiceLabel (usually the video name), play voiceLabel, see voiceLabel, or watch voiceLabel, etc. audio: Music scenario. For example, to listen to a song, a user can say the voiceLabel (usually the song name), play voiceLabel, or listen voiceLabel, etc. page: Page scenario. For example, to go to a page, a user can say the voiceLabel (usually the page name), switch to voiceLabel, go to voiceLabel, or jump to voiceLabel, etc. switch: Switch scenario. For example, to turn on or turn off a switch, a user can say the voiceLabel (usually the switch name), turn on voiceLabel, open voiceLabel, turn off voiceLabel, close voiceLabel, etc. common: Common scenario, which is triggered by the voiceLabel.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "video"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "audio"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "page"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "switch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitygroup",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility group. If this attribute is set to true, the component and all its child components form an entire selectable component, and the accessibility service will no longer available for the content of its child components.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitytext",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility text. If a component does not contain text information, it will not be read when the component is selected by the screen reader. In this case, the screen reader user cannot know which component is selected. To solve this problem, you can set this attribute for components without text information. When the component is selected by the screen reader, the specified accessibility text will be read, informing the user which component is selected. If a component with this attribute set contains text information, only the accessibility text will be read.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitydescription",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility description. You can specify further explanation of the current component, for example, possible operation consequences, especially those cannot be learned from component attributes and accessibility text. You can set a detailed description text for the attribute of the component to help users understand the operation to be performed. If a component contains both text information and the accessibility description, the text is read first and then the accessibility description, when the component is selected.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilityimportance",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility importance, which is used to decide whether a component can be identified by the accessibility service. The value can be auto, yes, no, or no-hide-descendants. The last value forces the screen reader to ignore the current component and all its subcomponents. yes: The current component is selectable for the accessibility service. no: The current component is not selectable for the accessibility service.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "for",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Expands the current element based on the configured data list.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tid",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The tid attribute is used to accelerate the for loop. It is used to improve the re-rendering efficiency when data in a loop changes. The tid attribute specifies the unique ID of each element in the array. If it is not specified, the index of each element in the array is used as the ID. For example, tid='id' indicates that the id attribute of each element is its unique identifier.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "if",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is added or removed.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "elif",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "else",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "show",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is displayed or hidden.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"events": [],
|
||||||
|
"supportedSubComponents": true,
|
||||||
|
"supportedSubComponentsRestriction": [
|
||||||
|
{
|
||||||
|
"name": "list-item",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"level": 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"unSupportSubComponentsRestriction": [],
|
||||||
|
"parentComponentsRestriction": []
|
||||||
|
}
|
267
api/form/hml/container/stack.json
Normal file
267
api/form/hml/container/stack.json
Normal file
@ -0,0 +1,267 @@
|
|||||||
|
{
|
||||||
|
"name": "stack",
|
||||||
|
"version": [
|
||||||
|
{
|
||||||
|
"name": "v3.0"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The <stack> component provides a stack container where child components are successively stacked and the latter one overwrites the previous one.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Unique ID of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "style",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style declaration of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "class",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style class of a component, which is used to refer to a style table.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "disabled",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the component is disabled. If the component is disabled, the component cannot respond to user interaction.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "voicelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice label. When a voice label is triggered, the click event of the component is triggered. NOTE: The voice label takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptflag",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice subscript switch. Available values are as follows: auto: For the <image> and <list-item> components, if subscriptflag is set to auto, the voice subscript is turned on. For other components, if subscriptflag is set to auto, the voice subscript is turned off. on: Turn on the voice subscript. off: Turn off the voice subscript. If no customized subscript is set, the subscript is automatically accumulated from 1. NOTE The voice subscript takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "auto"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "on"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "off"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptlabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Custom subscript. After it is set, the subscript is displayed in the way you specified. To make this attribute take effect, you need to turn on the voice subscript.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "scenelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Available values are as follows: video: Video scenario. For example, to watch a video, a user can say the voiceLabel (usually the video name), play voiceLabel, see voiceLabel, or watch voiceLabel, etc. audio: Music scenario. For example, to listen to a song, a user can say the voiceLabel (usually the song name), play voiceLabel, or listen voiceLabel, etc. page: Page scenario. For example, to go to a page, a user can say the voiceLabel (usually the page name), switch to voiceLabel, go to voiceLabel, or jump to voiceLabel, etc. switch: Switch scenario. For example, to turn on or turn off a switch, a user can say the voiceLabel (usually the switch name), turn on voiceLabel, open voiceLabel, turn off voiceLabel, close voiceLabel, etc. common: Common scenario, which is triggered by the voiceLabel.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "video"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "audio"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "page"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "switch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitygroup",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility group. If this attribute is set to true, the component and all its child components form an entire selectable component, and the accessibility service will no longer available for the content of its child components.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitytext",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility text. If a component does not contain text information, it will not be read when the component is selected by the screen reader. In this case, the screen reader user cannot know which component is selected. To solve this problem, you can set this attribute for components without text information. When the component is selected by the screen reader, the specified accessibility text will be read, informing the user which component is selected. If a component with this attribute set contains text information, only the accessibility text will be read.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitydescription",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility description. You can specify further explanation of the current component, for example, possible operation consequences, especially those cannot be learned from component attributes and accessibility text. You can set a detailed description text for the attribute of the component to help users understand the operation to be performed. If a component contains both text information and the accessibility description, the text is read first and then the accessibility description, when the component is selected.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilityimportance",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility importance, which is used to decide whether a component can be identified by the accessibility service. The value can be auto, yes, no, or no-hide-descendants. The last value forces the screen reader to ignore the current component and all its subcomponents. yes: The current component is selectable for the accessibility service. no: The current component is not selectable for the accessibility service.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "for",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Expands the current element based on the configured data list.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tid",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The tid attribute is used to accelerate the for loop. It is used to improve the re-rendering efficiency when data in a loop changes. The tid attribute specifies the unique ID of each element in the array. If it is not specified, the index of each element in the array is used as the ID. For example, tid='id' indicates that the id attribute of each element is its unique identifier.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "elif",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "else",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"events": [
|
||||||
|
{
|
||||||
|
"name": "click",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Triggered when a component is clicked.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supportedSubComponents": true,
|
||||||
|
"supportedSubComponentsRestriction": [],
|
||||||
|
"unSupportSubComponentsRestriction": [],
|
||||||
|
"parentComponentsRestriction": []
|
||||||
|
}
|
503
api/form/hml/container/swiper.json
Normal file
503
api/form/hml/container/swiper.json
Normal file
@ -0,0 +1,503 @@
|
|||||||
|
{
|
||||||
|
"name": "swiper",
|
||||||
|
"version": [
|
||||||
|
{
|
||||||
|
"name": "v3.0"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The <swiper> component provides a swiper container that enables the switch of child components.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": [
|
||||||
|
{
|
||||||
|
"name": "index",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Index of the child component currently displayed in the container.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "indicator",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether to enable the navigation point indicator. The default value is true.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "digital",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether to enable the digital indicator. The default value is false.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "indicatordisabled",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether gesture operations are disabled on the indicator. If this attribute is set to true, the indicator does not respond to clicking or dragging operations.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "loop",
|
||||||
|
"supportedDevices": ["phone", "tablet", "tv", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether to enable looping.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "tv", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "duration",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Duration of the animation played for switching between child components.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "vertical",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the swipe gesture is performed vertically. A vertical swipe uses the vertical indicator. Dynamic modification is not supported.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Unique ID of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "style",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style declaration of a component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "class",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Style class of a component, which is used to refer to a style table.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "disabled",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the component is disabled. If the component is disabled, the component cannot respond to user interaction.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "voicelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice label. When a voice label is triggered, the click event of the component is triggered. NOTE: The voice label takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptflag",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Voice subscript switch. Available values are as follows: auto: For the <image> and <list-item> components, if subscriptflag is set to auto, the voice subscript is turned on. For other components, if subscriptflag is set to auto, the voice subscript is turned off. on: Turn on the voice subscript. off: Turn off the voice subscript. If no customized subscript is set, the subscript is automatically accumulated from 1. NOTE The voice subscript takes effect only when the click event is set.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "auto"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "on"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "off"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscriptlabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Custom subscript. After it is set, the subscript is displayed in the way you specified. To make this attribute take effect, you need to turn on the voice subscript.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "scenelabel",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Available values are as follows: video: Video scenario. For example, to watch a video, a user can say the voiceLabel (usually the video name), play voiceLabel, see voiceLabel, or watch voiceLabel, etc. audio: Music scenario. For example, to listen to a song, a user can say the voiceLabel (usually the song name), play voiceLabel, or listen voiceLabel, etc. page: Page scenario. For example, to go to a page, a user can say the voiceLabel (usually the page name), switch to voiceLabel, go to voiceLabel, or jump to voiceLabel, etc. switch: Switch scenario. For example, to turn on or turn off a switch, a user can say the voiceLabel (usually the switch name), turn on voiceLabel, open voiceLabel, turn off voiceLabel, close voiceLabel, etc. common: Common scenario, which is triggered by the voiceLabel.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "video"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "audio"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "page"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "switch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitygroup",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility group. If this attribute is set to true, the component and all its child components form an entire selectable component, and the accessibility service will no longer available for the content of its child components.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "cachedsize",
|
||||||
|
"supportedDevices": ["phone", "tablet", "tv", "wearable"],
|
||||||
|
"version": [
|
||||||
|
{
|
||||||
|
"name": "v6.0"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Sets the number of sub-elements loaded in front of and back of the current page of the swiper.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "tv", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "scrolleffect",
|
||||||
|
"supportedDevices": ["phone", "tablet", "tv", "wearable"],
|
||||||
|
"version": [
|
||||||
|
{
|
||||||
|
"name": "v6.0"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Sets the boundary bounce effect.\nSpring: elastic physical action. After sliding to the edge, you can continue sliding for a certain distance based on the initial speed or touch event. When you release the hand, you can spring back.\nFading: The physical effect of fading. When you slide to the edge, a wave-like fading is displayed. The fading also changes according to the speed and sliding distance.\nnone: No effect is displayed when the user slides to the edge.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "tv", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "spring"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "fade"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "none"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitytext",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility text. If a component does not contain text information, it will not be read when the component is selected by the screen reader. In this case, the screen reader user cannot know which component is selected. To solve this problem, you can set this attribute for components without text information. When the component is selected by the screen reader, the specified accessibility text will be read, informing the user which component is selected. If a component with this attribute set contains text information, only the accessibility text will be read.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilitydescription",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility description. You can specify further explanation of the current component, for example, possible operation consequences, especially those cannot be learned from component attributes and accessibility text. You can set a detailed description text for the attribute of the component to help users understand the operation to be performed. If a component contains both text information and the accessibility description, the text is read first and then the accessibility description, when the component is selected.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accessibilityimportance",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Accessibility importance, which is used to decide whether a component can be identified by the accessibility service. The value can be auto, yes, no, or no-hide-descendants. The last value forces the screen reader to ignore the current component and all its subcomponents. yes: The current component is selectable for the accessibility service. no: The current component is not selectable for the accessibility service.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "for",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Expands the current element based on the configured data list.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tid",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "The tid attribute is used to accelerate the for loop. It is used to improve the re-rendering efficiency when data in a loop changes. The tid attribute specifies the unique ID of each element in the array. If it is not specified, the index of each element in the array is used as the ID. For example, tid='id' indicates that the id attribute of each element is its unique identifier.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "if",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is added or removed.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dir",
|
||||||
|
"supportedDevices": ["phone", "tablet", "tv", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Specify the text direction of an element.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "tv", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "ltr"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "rtl"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "auto"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "elif",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "else",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "show",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Whether the element is displayed or hidden.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "enum",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"events": [
|
||||||
|
{
|
||||||
|
"name": "click",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "Triggered when a component is clicked.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supportedSubComponents": true,
|
||||||
|
"supportedSubComponentsRestriction": [],
|
||||||
|
"unSupportSubComponentsRestriction": [
|
||||||
|
{
|
||||||
|
"name": "list"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parentComponentsRestriction": []
|
||||||
|
}
|
46
api/form/hml/custom/element.json
Normal file
46
api/form/hml/custom/element.json
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
{
|
||||||
|
"name": "element",
|
||||||
|
"version": [
|
||||||
|
{
|
||||||
|
"name": "v3.0"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "custom component.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": [
|
||||||
|
{
|
||||||
|
"name": "name",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": false,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "custom component name.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "src",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"],
|
||||||
|
"required": true,
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"name": "custom component path.",
|
||||||
|
"supportedDevices": ["phone", "tablet", "wearable"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "url"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"events": [],
|
||||||
|
"supportedSubComponents": false,
|
||||||
|
"supportedSubComponentsRestriction": [],
|
||||||
|
"unSupportSubComponentsRestriction": [],
|
||||||
|
"parentComponentsRestriction": []
|
||||||
|
}
|
266
api/form/hml/hml-json-schema.json
Normal file
266
api/form/hml/hml-json-schema.json
Normal file
@ -0,0 +1,266 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "组件名称,如div、list等"
|
||||||
|
},
|
||||||
|
"version": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "该属性的当前的版本",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "版本号例如:V3.0"
|
||||||
|
},
|
||||||
|
"supportedDevices": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "本字段非必填,如果为空,表示该属性继承属性支持的设备类型",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["tv", "phone", "tablet", "wearable", "liteWearable", "smartVision"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["name"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"supportedDevices": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "本字段非必填,如果为空,表示该属性支持所有的设备类型",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["tv", "phone", "tablet", "wearable", "liteWearable", "smartVision"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "属性的描述文档"
|
||||||
|
},
|
||||||
|
"supportedDevices": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "本字段非必填,如果为空,表示该属性继承属性支持的设备类型",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["tv", "phone", "tablet", "wearable", "liteWearable", "smartVision"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["name"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"attributes": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "组件的属性信息",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "属性名称"
|
||||||
|
},
|
||||||
|
"supportedDevices": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "本字段非必填,如果为空,表示该属性继承属性支持的设备类型",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["tv", "phone", "tablet", "wearable", "liteWearable", "smartVision"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "表示属性是否为组件的必填属性"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "属性的描述文档"
|
||||||
|
},
|
||||||
|
"supportedDevices": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "本字段非必填,如果为空,表示该属性继承属性支持的设备类型",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["tv", "phone", "tablet", "wearable", "liteWearable", "smartVision"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["name"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "属性的类型"
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "本字段非必填,表示属性值的枚举类型,当属性type为'enum'时才生效",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "属性值"
|
||||||
|
},
|
||||||
|
"supportedDevices": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "本字段非必填,如果为空,表示该属性继承属性支持的设备类型",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["tv", "phone", "tablet", "wearable", "liteWearable", "smartVision"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["name"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["name", "required", "description", "type"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"events": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "组件支持的事件",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "事件名称"
|
||||||
|
},
|
||||||
|
"supportedDevices": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "本字段非必填,如果为空,表示该属性继承属性支持的设备类型",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["tv", "phone", "tablet", "wearable", "liteWearable", "smartVision"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "事件的描述文档"
|
||||||
|
},
|
||||||
|
"supportedDevices": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "本字段非必填,如果为空,表示该属性继承属性支持的设备类型",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["tv", "phone", "tablet", "wearable", "liteWearable", "smartVision"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["name", "description"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"supportedSubComponents": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "组件是否支持子组件,参数为false表示不支持子组件,为true表示支持子组件。当参数为true并且supportedSubComponentsRestriction为空时,表示支持所以子组件"
|
||||||
|
},
|
||||||
|
"supportedSubComponentsRestriction": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "组件支持的子组件列表",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "支持的子组件名称"
|
||||||
|
},
|
||||||
|
"supportedDevices": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "本字段非必填,如果为空,表示该属性继承属性支持的设备类型",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["tv", "phone", "tablet", "wearable", "liteWearable", "smartVision"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"level": {
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["name"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"unSupportSubComponentsRestriction": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "组件不支持的子组件列表",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "不支持的子组件名称"
|
||||||
|
},
|
||||||
|
"supportedDevices": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "本字段非必填,如果为空,表示该属性继承属性支持的设备类型",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["tv", "phone", "tablet", "wearable", "liteWearable", "smartVision"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"level": {
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["name"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"parentComponentsRestriction": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "支持的父组件列表,即只支持列表中的组件作为自己的父组件",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "支持的父组件的组件名称"
|
||||||
|
},
|
||||||
|
"supportedDevices": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "本字段非必填,如果为空,表示该属性继承属性支持的设备类型",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["tv", "phone", "tablet", "wearable", "liteWearable", "smartVision"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"level": {
|
||||||
|
"type": "number",
|
||||||
|
"description": "本字段非必填,取值范围大于等于1,只有标签补齐时需要联想出对应子组件时需要填此字段,如果level为n+1时,level为n的组件有且只有一个(n>1)"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["name"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"name",
|
||||||
|
"version",
|
||||||
|
"description",
|
||||||
|
"attributes",
|
||||||
|
"events",
|
||||||
|
"supportedSubComponents",
|
||||||
|
"supportedSubComponentsRestriction",
|
||||||
|
"unSupportSubComponentsRestriction",
|
||||||
|
"parentComponentsRestriction"
|
||||||
|
]
|
||||||
|
}
|
75
api/phone/@system.app.d.ts
vendored
Normal file
75
api/phone/@system.app.d.ts
vendored
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export interface AppResponse {
|
||||||
|
/**
|
||||||
|
* Application bundleName.
|
||||||
|
* @since 6
|
||||||
|
*/
|
||||||
|
appID: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Application name.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
appName: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Application version name.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
versionName: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Application version.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
versionCode: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface RequestFullWindowOptions {
|
||||||
|
/**
|
||||||
|
* Duration for transition from non-full window to full window, in milliseconds.
|
||||||
|
* By default, the value is in direct proportion to the distance between the non-full window and the full window.
|
||||||
|
* @devices phone, tablet
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
duration?: number
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Syscap SysCap.ACE.UIEngine
|
||||||
|
*/
|
||||||
|
export default class App {
|
||||||
|
/**
|
||||||
|
* Obtains the declared information in the config.json file of an application.
|
||||||
|
*/
|
||||||
|
static getInfo(): AppResponse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destroys the current ability.
|
||||||
|
*/
|
||||||
|
static terminate(): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Requests the application to run in full window.
|
||||||
|
* In some scenarios, such as semi-modal FA, the FA runs in non-full window.
|
||||||
|
* In this case, you can call this API.
|
||||||
|
* This API is invalid for an application already in full-window mode.
|
||||||
|
* @param obj Transition time from non-full window to full window, in milliseconds.
|
||||||
|
* By default, the value is in direct proportion to the distance between the non-full window and the full window.
|
||||||
|
*/
|
||||||
|
static requestFullWindow(options?: RequestFullWindowOptions): void;
|
||||||
|
}
|
57
api/phone/@system.battery.d.ts
vendored
Normal file
57
api/phone/@system.battery.d.ts
vendored
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export interface BatteryResponse {
|
||||||
|
/**
|
||||||
|
* Whether the battery is being charged.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
charging: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Current battery level, which ranges from 0.00 to 1.00.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
level: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Syscap SysCap.ACE.UIEngine
|
||||||
|
*/
|
||||||
|
export default class Battery {
|
||||||
|
/**
|
||||||
|
* Obtains the battery level of the current device.
|
||||||
|
* @param options
|
||||||
|
*/
|
||||||
|
static getStatus(options?: {
|
||||||
|
/**
|
||||||
|
* Called when the current charging state and battery level are obtained.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
success?: (data: BatteryResponse) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the current charging state and battery level fail to be obtained.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
fail?: (data: any, code: number) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the execution is completed.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
complete?: () => void;
|
||||||
|
}): void;
|
||||||
|
}
|
79
api/phone/@system.bluetooth.d.ts
vendored
Normal file
79
api/phone/@system.bluetooth.d.ts
vendored
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export interface StartBLEScanOptions {
|
||||||
|
interval: number;
|
||||||
|
|
||||||
|
success: () => void;
|
||||||
|
|
||||||
|
fail: (data: string, code: number) => void;
|
||||||
|
|
||||||
|
complete: () => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface StopBLEScanOptions {
|
||||||
|
success: () => void;
|
||||||
|
|
||||||
|
fail: (data: string, code: number) => void;
|
||||||
|
|
||||||
|
complete: () => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface BluetoothDevice {
|
||||||
|
addrType: "public" | "random";
|
||||||
|
|
||||||
|
addr: string;
|
||||||
|
|
||||||
|
rssi: number;
|
||||||
|
|
||||||
|
txpower: string;
|
||||||
|
|
||||||
|
data: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface BLEFoundResponse {
|
||||||
|
devices: Array<BluetoothDevice>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SubscribeBLEFoundOptions{
|
||||||
|
success: (data: BLEFoundResponse) => void;
|
||||||
|
|
||||||
|
fail: (data: string, code: number) => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default class Bluetooth {
|
||||||
|
/**
|
||||||
|
* Start BLE scan
|
||||||
|
* @param options Options
|
||||||
|
*/
|
||||||
|
static startBLEScan(options: StartBLEScanOptions): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stop BLE scan
|
||||||
|
* @param options Options
|
||||||
|
*/
|
||||||
|
static stopBLEScan(options: StopBLEScanOptions): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Subscribe BLE found
|
||||||
|
* @param options Options
|
||||||
|
*/
|
||||||
|
static subscribeBLEFound(options: SubscribeBLEFoundOptions): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stop the subscription of BLE found
|
||||||
|
*/
|
||||||
|
static unsubscribeBLEFound(): void;
|
||||||
|
}
|
180
api/phone/@system.brightness.d.ts
vendored
Normal file
180
api/phone/@system.brightness.d.ts
vendored
Normal file
@ -0,0 +1,180 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The screen brightness mode.
|
||||||
|
*/
|
||||||
|
export enum BrightnessModeResponse {
|
||||||
|
/**
|
||||||
|
* The screen brightness is manually adjusted.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
MANUAL,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The screen brightness is automatically adjusted.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
AUTO
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Syscap SysCap.ACE.UIEngine
|
||||||
|
*/
|
||||||
|
export default class Brightness {
|
||||||
|
/**
|
||||||
|
* Obtains the current screen brightness.
|
||||||
|
* @param options
|
||||||
|
*/
|
||||||
|
static getValue(options?: {
|
||||||
|
/**
|
||||||
|
* Called when the current screen brightness is obtains.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
success?: (data: { value: number }) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the current screen bightness fails to be obtained.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
fail?: (data: any, code: number) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the execution is completed.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
complete?: () => void;
|
||||||
|
}): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the screen brightness.
|
||||||
|
* @param options
|
||||||
|
*/
|
||||||
|
static setValue(options: {
|
||||||
|
/**
|
||||||
|
* Screen brightness. The value is an integer ranging from 1 to 255.
|
||||||
|
* If the value is less than or equal to 0, value 1 will be used.
|
||||||
|
* If the value is greater than 255, value 255 will be used.
|
||||||
|
* If the value contains decimals, the integral part of the value will be used.
|
||||||
|
* For example, if value 8.1 is set, value 8 will be used.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
value: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the setting is successful.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
success?: () => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the setting fails.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
fail?: (data: any, code: number) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the execution os completed.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
complete?: () => void;
|
||||||
|
}): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Obtains the screen brightness adjustment mode.
|
||||||
|
* @param options
|
||||||
|
*/
|
||||||
|
static getMode(options?: {
|
||||||
|
/**
|
||||||
|
* Called when the screen brightness adjustment mode is obtained.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
success?: (data: { mode: BrightnessModeResponse }) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the screen brightness adjustment mode fails to be obtained.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
fail?: (data: any, code: number) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the execution is completed.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
complete?: () => void;
|
||||||
|
}): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the screen brightness adjustment mode.
|
||||||
|
* @param options
|
||||||
|
*/
|
||||||
|
static setMode(options: {
|
||||||
|
/**
|
||||||
|
* The screen brightness mode
|
||||||
|
* 0: The screen brightness is manually adjusted.
|
||||||
|
* 1: The screen brightness is automatically adjusted.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
mode: BrightnessModeResponse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the setting is successful.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
success?: () => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the setting fails.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
fail?: (data: any, code: number) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the execution is completed.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
complete?: () => void;
|
||||||
|
}): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets whether to always keep the screen on.
|
||||||
|
* @param options
|
||||||
|
*/
|
||||||
|
static setKeepScreenOn(options: {
|
||||||
|
/**
|
||||||
|
* Whether to always keep the screen on.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
keepScreenOn: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the setting is successful.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
success?: () => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the setting fails.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
fail?: (data: any, code: number) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the execution is completed.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
complete?: () => void;
|
||||||
|
}): void;
|
||||||
|
}
|
25
api/@system.configuration.d.ts → api/phone/@system.configuration.d.ts
vendored
Executable file → Normal file
25
api/@system.configuration.d.ts → api/phone/@system.configuration.d.ts
vendored
Executable file → Normal file
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
@ -14,10 +14,33 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export interface LocaleResponse {
|
export interface LocaleResponse {
|
||||||
|
/**
|
||||||
|
* Current language of the application. Example: zh.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
language: string;
|
language: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Country or region. Example: CN.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
countryOrRegion: string;
|
countryOrRegion: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Text layout direction. Available values are as follows:
|
||||||
|
* ltr: The text direction is from left to right.
|
||||||
|
* rtl: The text direction is from right to left.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
dir: "ltr" | "rtl";
|
dir: "ltr" | "rtl";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Syscap SysCap.ACE.UIEngine
|
||||||
|
*/
|
||||||
export default class Configuration {
|
export default class Configuration {
|
||||||
|
/**
|
||||||
|
* Obtains the current locale of the application, which is the same as the system locale.
|
||||||
|
*/
|
||||||
static getLocale(): LocaleResponse;
|
static getLocale(): LocaleResponse;
|
||||||
}
|
}
|
266
api/phone/@system.device.d.ts
vendored
Executable file → Normal file
266
api/phone/@system.device.d.ts
vendored
Executable file → Normal file
@ -1,133 +1,133 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export interface DeviceResponse {
|
export interface DeviceResponse {
|
||||||
/**
|
/**
|
||||||
* Brand.
|
* Brand.
|
||||||
* @since 3
|
* @since 3
|
||||||
*/
|
*/
|
||||||
brand: string;
|
brand: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manufacturer.
|
* Manufacturer.
|
||||||
* @since 3
|
* @since 3
|
||||||
*/
|
*/
|
||||||
manufacturer: string;
|
manufacturer: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model.
|
* Model.
|
||||||
* @since 3
|
* @since 3
|
||||||
*/
|
*/
|
||||||
model: string;
|
model: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Product number.
|
* Product number.
|
||||||
* @since 3
|
* @since 3
|
||||||
*/
|
*/
|
||||||
product: string;
|
product: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* System language.
|
* System language.
|
||||||
* @since 4
|
* @since 4
|
||||||
*/
|
*/
|
||||||
language: string;
|
language: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* System region.
|
* System region.
|
||||||
* @since 4
|
* @since 4
|
||||||
*/
|
*/
|
||||||
region: string;
|
region: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Window width.
|
* Window width.
|
||||||
* @since 3
|
* @since 3
|
||||||
*/
|
*/
|
||||||
windowWidth: number;
|
windowWidth: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Window Height.
|
* Window Height.
|
||||||
* @since 3
|
* @since 3
|
||||||
*/
|
*/
|
||||||
windowHeight: number;
|
windowHeight: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Screen density.
|
* Screen density.
|
||||||
* @since 4
|
* @since 4
|
||||||
*/
|
*/
|
||||||
screenDensity: number;
|
screenDensity: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Screen shape. The options are as follows:
|
* Screen shape. The options are as follows:
|
||||||
* rect: Rectangle screen.
|
* rect: Rectangle screen.
|
||||||
* cicle: Circle screen.
|
* cicle: Circle screen.
|
||||||
* @since 4
|
* @since 4
|
||||||
*/
|
*/
|
||||||
screenShape: "rect" | "circle";
|
screenShape: "rect" | "circle";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API version.
|
* API version.
|
||||||
* @devices tv, phone, tablet, wearable, liteWearable, smartVision
|
* @devices tv, phone, tablet, wearable, liteWearable, smartVision
|
||||||
* @since 4
|
* @since 4
|
||||||
*/
|
*/
|
||||||
apiVersion: number;
|
apiVersion: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Device type. The options are as follows:
|
* Device type. The options are as follows:
|
||||||
* phone: smartphone
|
* phone: smartphone
|
||||||
* tablet: tablet
|
* tablet: tablet
|
||||||
* tv: smart TV
|
* tv: smart TV
|
||||||
* wearable: wearable
|
* wearable: wearable
|
||||||
* liteWearable: lite wearable
|
* liteWearable: lite wearable
|
||||||
* ar: AR
|
* ar: AR
|
||||||
* vr: virtual reality
|
* vr: virtual reality
|
||||||
* earphones: headset
|
* earphones: headset
|
||||||
* pc: personal computer
|
* pc: personal computer
|
||||||
* speaker: speaker
|
* speaker: speaker
|
||||||
* smartVision: smart visual device
|
* smartVision: smart visual device
|
||||||
* linkIoT: connection module
|
* linkIoT: connection module
|
||||||
* @devices tv, phone, tablet, wearable, liteWearable, smartVision
|
* @devices tv, phone, tablet, wearable, liteWearable, smartVision
|
||||||
* @since 4
|
* @since 4
|
||||||
*/
|
*/
|
||||||
deviceType: string;
|
deviceType: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Syscap SysCap.ACE.UIEngine
|
* @Syscap SysCap.ACE.UIEngine
|
||||||
*/
|
*/
|
||||||
export default class Device {
|
export default class Device {
|
||||||
/**
|
/**
|
||||||
* Obtains the device information.
|
* Obtains the device information.
|
||||||
* @param options
|
* @param options
|
||||||
*/
|
*/
|
||||||
static getInfo(options?: {
|
static getInfo(options?: {
|
||||||
/**
|
/**
|
||||||
* Called when the device information is obtained.
|
* Called when the device information is obtained.
|
||||||
* @since 3
|
* @since 3
|
||||||
*/
|
*/
|
||||||
success?: (data: DeviceResponse) => void;
|
success?: (data: DeviceResponse) => void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the device information fails to be obtained.
|
* Called when the device information fails to be obtained.
|
||||||
* @since 3
|
* @since 3
|
||||||
*/
|
*/
|
||||||
fail?: (data: any, code: number) => void;
|
fail?: (data: any, code: number) => void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the execution is completed.
|
* Called when the execution is completed.
|
||||||
* @since 3
|
* @since 3
|
||||||
*/
|
*/
|
||||||
complete?: () => void;
|
complete?: () => void;
|
||||||
}): void;
|
}): void;
|
||||||
}
|
}
|
||||||
|
93
api/phone/@system.fetch.d.ts
vendored
Normal file
93
api/phone/@system.fetch.d.ts
vendored
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export interface FetchResponse {
|
||||||
|
/**
|
||||||
|
* Server status code.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
code: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Data returned by the success function.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
data: string | object;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* All headers in the response from the server.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
headers: Object;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Syscap SysCap.ACE.UIEngine
|
||||||
|
*/
|
||||||
|
export default class Fetch {
|
||||||
|
/**
|
||||||
|
* Obtains data through the network.
|
||||||
|
* @param options
|
||||||
|
*/
|
||||||
|
static fetch(options: {
|
||||||
|
/**
|
||||||
|
* Resource URL.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
url: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request parameter, which can be of the string type or a JSON object.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
data?: string | object;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request header, which accommodates all attributes of the request.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
header?: Object;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request methods available: OPTIONS, GET, HEAD, POST, PUT, DELETE and TRACE. The default value is GET.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
method?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The return type can be text, or JSON. By default, the return type is determined based on Content-Type in the header returned by the server.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
responseType?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the network data is obtained successfully.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
success?: (data: FetchResponse) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the network data fails to be obtained.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
fail?: (data: any, code: number) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the execution is completed.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
complete?: () => void;
|
||||||
|
}): void;
|
||||||
|
}
|
499
api/phone/@system.file.d.ts
vendored
Normal file
499
api/phone/@system.file.d.ts
vendored
Normal file
@ -0,0 +1,499 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export interface FileResponse {
|
||||||
|
/**
|
||||||
|
* File URI.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
uri: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* File size, in bytes.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
length: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Timestamp when the file is stored, which is the number of milliseconds elapsed since 1970/01/01 00:00:00 GMT.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
lastModifiedTime: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* File type. Available values are as follows:
|
||||||
|
* dir: directory
|
||||||
|
* file: file
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
type: "dir" | "file";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* File list.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
subFiles?: Array<FileResponse>;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Syscap SysCap.ACE.UIEngine
|
||||||
|
*/
|
||||||
|
export default class File {
|
||||||
|
/**
|
||||||
|
* Moves a specified file to a given location.
|
||||||
|
* @param options Options.
|
||||||
|
*/
|
||||||
|
static move(options: {
|
||||||
|
/**
|
||||||
|
* URI of the file to move.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
srcUri: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* URI of the location to which the file is to move.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
dstUri: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the source file is moved to the specified location successfully.
|
||||||
|
* This function returns the URI of the file moved to the target location.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
success?: (uri: string) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when moving fails.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
fail?: (data: any, code: number) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the execution is completed.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
complete?: () => void;
|
||||||
|
}): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copies a file and save the copy to a specified location.
|
||||||
|
* @param options Options.
|
||||||
|
*/
|
||||||
|
static copy(options: {
|
||||||
|
/**
|
||||||
|
* URI of the file to copy.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
srcUri: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* URI of the location to which the copy is to save.
|
||||||
|
* The directory of application resources and URI of the tmp type are not supported.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
dstUri: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the source file is copied and saved to the specified location successfully.
|
||||||
|
* This function returns the URI of the file moved to the target location.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
success?: (uri: string) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the copy or save operation fails.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
fail?: (data: any, code: number) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the execution is completed.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
complete?: () => void;
|
||||||
|
}): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Obtains the list of files in a specified directory.
|
||||||
|
* @param options Options.
|
||||||
|
*/
|
||||||
|
static list(options: {
|
||||||
|
/**
|
||||||
|
* URI of the directory.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
uri: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the list is obtained successfully.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
success?: (data: { fileList: Array<FileResponse> }) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the list fails to be obtained.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
fail?: (data: any, code: number) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the execution is completed.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
complete?: () => void;
|
||||||
|
}): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Obtains information about a specified local file.
|
||||||
|
* @param options
|
||||||
|
*/
|
||||||
|
static get(options: {
|
||||||
|
/**
|
||||||
|
* File URI.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
uri: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether to recursively obtain the file list under a subdirectory.
|
||||||
|
* The default value is false.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
recursive?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when file information is obtained successfully.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
success?: (file: FileResponse) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when file information fails to be obtained.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
fail?: (data: any, code: number) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the execution is completed.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
complete?: () => void;
|
||||||
|
}): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes a local file.
|
||||||
|
* @param options
|
||||||
|
*/
|
||||||
|
static delete(options: {
|
||||||
|
/**
|
||||||
|
* URI of the file to be deleted, which cannot be an application resource path.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
uri: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when local files are deleted successfully.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
success?: () => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the deletion fails.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
fail?: (data: any, code: number) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the execution is completed.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
complete?: () => void;
|
||||||
|
}): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes texts into a specified file.
|
||||||
|
* @param options
|
||||||
|
*/
|
||||||
|
static writeText(options: {
|
||||||
|
/**
|
||||||
|
* URI of a local file. If it does not exist, a file will be created.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
uri: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Character string to write into the local file.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
text: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Encoding format. The default format is UTF-8.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
encoding?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether to enable the append mode. The default value is false.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
append?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when texts are written into a file successfully.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
success?: () => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when texts fail to be written into a file.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
fail?: (data: any, code: number) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the execution is completed.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
complete?: () => void;
|
||||||
|
}): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reads texts from a specified file.
|
||||||
|
* @param options
|
||||||
|
*/
|
||||||
|
static readText(options: {
|
||||||
|
/**
|
||||||
|
* URI of a local file.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
uri: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Encoding format. The default format is UTF-8.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
encoding?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when texts are read successfully.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
success?: (data: { text: string }) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when texts fail to be read.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
fail?: (data: any, code: number) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the execution is completed.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
complete?: () => void;
|
||||||
|
}): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes buffer data into a specified file.
|
||||||
|
* @param options Options.
|
||||||
|
*/
|
||||||
|
static writeArrayBuffer(options: {
|
||||||
|
/**
|
||||||
|
* URI of a local file. If it does not exist, a file will be created.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
uri: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Buffer from which the data is derived.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
buffer: Uint8Array;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Offset to the position where the writing starts. The default value is 0.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
position?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether to enable the append mode. The default value is false. If the value is true, the position parameter will become invalid.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
append?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when data from a buffer is written into a file successfully.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
success?: () => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when data from a buffer fails to be written into a file.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
fail?: (data: any, code: number) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the execution is completed.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
complete?: () => void;
|
||||||
|
}): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reads buffer data from a specified file.
|
||||||
|
* @param options Options.
|
||||||
|
*/
|
||||||
|
static readArrayBuffer(options: {
|
||||||
|
/**
|
||||||
|
* URI of a local file.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
uri: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Position where the reading starts.
|
||||||
|
* The default value is the start position of the file.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
position?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Length of the content to read.
|
||||||
|
* If this parameter is not set, the reading proceeds until the end of the file.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
length?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the buffer data is read successfully.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
success?: (data: { buffer: Uint8Array }) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the buffer data fails to be read.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
fail?: (data: any, code: number) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the execution is completed.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
complete?: () => void;
|
||||||
|
}): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks whether a specified file or directory exists.
|
||||||
|
* @param options Options.
|
||||||
|
*/
|
||||||
|
static access(options: {
|
||||||
|
/**
|
||||||
|
* URI of the directory or file.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
uri: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the check result is obtained successfully.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
success?: () => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the check fails.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
fail?: (data: any, code: number) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the execution is completed.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
complete?: () => void;
|
||||||
|
}): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a specified directory.
|
||||||
|
* @param options Options.
|
||||||
|
*/
|
||||||
|
static mkdir(options: {
|
||||||
|
/**
|
||||||
|
* URI of the directory.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
uri: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether to recursively create upper-level directories of the specified directory.
|
||||||
|
* The default value is false.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
recursive?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the directory is created successfully.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
success?: () => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the creation fails.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
fail?: (data: any, code: number) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the execution is completed.
|
||||||
|
*/
|
||||||
|
complete?: () => void;
|
||||||
|
}): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes a specified directory.
|
||||||
|
* @param options
|
||||||
|
*/
|
||||||
|
static rmdir(options: {
|
||||||
|
/**
|
||||||
|
* URI of the directory.
|
||||||
|
*/
|
||||||
|
uri: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether to recursively delete sub files and subdirectories of the specified directory.
|
||||||
|
* The default value is false.
|
||||||
|
*/
|
||||||
|
recursive?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the directory is deleted successfully.
|
||||||
|
*/
|
||||||
|
success?: () => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the deletion fails.
|
||||||
|
*/
|
||||||
|
fail?: (data: any, code: number) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the execution is completed.
|
||||||
|
*/
|
||||||
|
complete?: () => void;
|
||||||
|
}): void;
|
||||||
|
}
|
156
api/phone/@system.geolocation.d.ts
vendored
Normal file
156
api/phone/@system.geolocation.d.ts
vendored
Normal file
@ -0,0 +1,156 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export interface GeolocationResponse {
|
||||||
|
/**
|
||||||
|
* Longitude.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
longitude: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Latitude.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
latitude: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Altitude.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
altitude: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Location accuracy.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
accuracy: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Time when the location is obtained.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
time: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface GetLocationTypeResponse {
|
||||||
|
/**
|
||||||
|
* Available location types, ['gps', 'network'].
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
types: Array<string>;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Syscap SysCap.ACE.UIEngine
|
||||||
|
*/
|
||||||
|
export default class Geolocation {
|
||||||
|
/**
|
||||||
|
* Obtains the geographic location.
|
||||||
|
* @param options
|
||||||
|
*/
|
||||||
|
static getLocation(options?: {
|
||||||
|
/**
|
||||||
|
* Timeout duration, in milliseconds. The default value is 30000.
|
||||||
|
* The timeout duration is necessary in case no result is returned if the request to obtain the geographic location is rejected for the lack of the required permission, weak positioning signal, or incorrect location settings. After the timeout duration expires, the fail function will be called.
|
||||||
|
* The value is a 32-digit positive integer. If the value set is less than or equal to 0, the default value will be used.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
timeout?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Coordinate system type. Available types can be obtained by getSupportedCoordTypes. The default type is wgs84.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
coordType?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the geographic location is obtained.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
success?: (data: GeolocationResponse) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the location types fail to be obtained
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
fail?: (data: any, code: number) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the execution is completed.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
complete?: () => void;
|
||||||
|
}): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Obtains the supported location types.
|
||||||
|
* @param options
|
||||||
|
*/
|
||||||
|
static getLocationType(options?: {
|
||||||
|
/**
|
||||||
|
* Called when the location types are obtained.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
success?: (data: GetLocationTypeResponse) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the location types fail to be obtained.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
fail?: (data: any, code: number) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the execution is completed.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
complete?: () => void;
|
||||||
|
}): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Listens to the geographical location. If this method is called multiple times, the last call takes effect.
|
||||||
|
* @param options
|
||||||
|
*/
|
||||||
|
static subscribe(options: {
|
||||||
|
/**
|
||||||
|
* Coordinate system type. Available types can be obtained by getSupportedCoordTypes. The default type is wgs84.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
coordType?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the geographical location changes.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
success: (data: GeolocationResponse) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the listening fails.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
fail?: (data: any, code: number) => void;
|
||||||
|
}): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cancels listening to the geographical location.
|
||||||
|
*/
|
||||||
|
static unsubscribe(): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Obtains coordinate system types supported by the device.
|
||||||
|
* @returns A string array of the supported coordinate system types. For details about the value, see coordType.
|
||||||
|
*/
|
||||||
|
static getSupportedCoordTypes(): Array<string>;
|
||||||
|
}
|
37
api/@system.mediaquery.d.ts → api/phone/@system.mediaquery.d.ts
vendored
Executable file → Normal file
37
api/@system.mediaquery.d.ts → api/phone/@system.mediaquery.d.ts
vendored
Executable file → Normal file
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
@ -16,13 +16,48 @@
|
|||||||
export interface MediaQueryEvent {
|
export interface MediaQueryEvent {
|
||||||
matches: boolean;
|
matches: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MediaQueryList {
|
export interface MediaQueryList {
|
||||||
|
/**
|
||||||
|
* Serialized media query condition.
|
||||||
|
* This parameter is read-only.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
media?: string;
|
media?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the query is successful. True if the query condition is matched successfully, false otherwise.
|
||||||
|
* This parameter is read-only.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
matches?: boolean;
|
matches?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the matches value changes.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
onchange?: (matches: boolean) => void;
|
onchange?: (matches: boolean) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a listening function to MediaQueryList.
|
||||||
|
* The listening function must be added before onShow is called, that is, added to the onInit or onReady function.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
addListener(callback: (event: MediaQueryEvent) => void): void;
|
addListener(callback: (event: MediaQueryEvent) => void): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes a listening function from MediaQueryList.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
removeListener(callback: (event: MediaQueryEvent) => void): void;
|
removeListener(callback: (event: MediaQueryEvent) => void): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Syscap SysCap.ACE.UIEngine
|
||||||
|
*/
|
||||||
export default class MediaQuery {
|
export default class MediaQuery {
|
||||||
|
/**
|
||||||
|
* Queries a media item and returns a MediaQueryList object.
|
||||||
|
*/
|
||||||
static matchMedia(condition: string): MediaQueryList;
|
static matchMedia(condition: string): MediaQueryList;
|
||||||
}
|
}
|
81
api/phone/@system.network.d.ts
vendored
Normal file
81
api/phone/@system.network.d.ts
vendored
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export interface NetworkResponse {
|
||||||
|
/**
|
||||||
|
* Network type. The values can be 2G, 3G, 4G, WiFi, or none.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
type: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the billing is based on the data volume.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
metered: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Syscap SysCap.ACE.UIEngine
|
||||||
|
*/
|
||||||
|
export default class Network {
|
||||||
|
/**
|
||||||
|
* Obtains the network type.
|
||||||
|
* @param options
|
||||||
|
*/
|
||||||
|
static getType(options?: {
|
||||||
|
/**
|
||||||
|
* Called when the network type is obtained.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
success?: (data: NetworkResponse) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the network type fails to be obtained.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
fail?: (data: any, code: number) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the execution is completed.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
complete?: () => void;
|
||||||
|
}): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Listens to the network connection state. If this method is called multiple times, the last call takes effect.
|
||||||
|
* @param options
|
||||||
|
*/
|
||||||
|
static subscribe(options?: {
|
||||||
|
/**
|
||||||
|
* Called when the network connection state changes.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
success?: (data: NetworkResponse) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the listening fails.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
fail?: (data: any, code: number) => void;
|
||||||
|
}): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cancels listening to the network connection state.
|
||||||
|
* @param options
|
||||||
|
*/
|
||||||
|
static unsubscribe(): void;
|
||||||
|
}
|
69
api/phone/@system.notification.d.ts
vendored
Normal file
69
api/phone/@system.notification.d.ts
vendored
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export interface ActionResult {
|
||||||
|
/**
|
||||||
|
* Bundle name of the application to be redirected to after the notification is clicked.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
bundleName: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ability name of the application to be redirected to after the notification is clicked.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
abilityName: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* URI of the page to be redirected to. The supported URI formats are as follows:
|
||||||
|
* 1. Absolute path of the page, which is provided by the pages list in the config.json file. Example:
|
||||||
|
* pages/index/index
|
||||||
|
* pages/detail/detail
|
||||||
|
* 2. Particular path. If the value is a slash (/), the home page is displayed.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
uri: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ShowNotificationOptions {
|
||||||
|
/**
|
||||||
|
* Notification title.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
contentTitle?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notification content.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
contentText?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Action triggered after the notification is clicked.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
|
clickAction?: ActionResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Syscap SysCap.ACE.UIEngine
|
||||||
|
*/
|
||||||
|
export default class Notification {
|
||||||
|
/**
|
||||||
|
* Displays the notification.
|
||||||
|
* @param options
|
||||||
|
*/
|
||||||
|
static show(options?: ShowNotificationOptions): void;
|
||||||
|
}
|
34
api/@system.package.d.ts → api/phone/@system.package.d.ts
vendored
Executable file → Normal file
34
api/@system.package.d.ts → api/phone/@system.package.d.ts
vendored
Executable file → Normal file
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
@ -14,14 +14,46 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export interface CheckPackageHasInstalledResponse {
|
export interface CheckPackageHasInstalledResponse {
|
||||||
|
/**
|
||||||
|
* Whether the application exists, or whether the native application has been installed.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
result: boolean;
|
result: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CheckPackageHasInstalledOptions {
|
export interface CheckPackageHasInstalledOptions {
|
||||||
|
/**
|
||||||
|
* Application bundle name.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
bundleName: string;
|
bundleName: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when native applications are installed.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
success?: (data: CheckPackageHasInstalledResponse) => void;
|
success?: (data: CheckPackageHasInstalledResponse) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when native applications fail to be installed.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
fail?: (data: any, code: number) => void;
|
fail?: (data: any, code: number) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the execution is completed.
|
||||||
|
* @since 3
|
||||||
|
*/
|
||||||
complete?: () => void;
|
complete?: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Syscap SysCap.ACE.UIEngine
|
||||||
|
*/
|
||||||
export default class Package {
|
export default class Package {
|
||||||
|
/**
|
||||||
|
* Checks whether an application exists, or whether a native application has been installed.
|
||||||
|
* @param options
|
||||||
|
*/
|
||||||
static hasInstalled(options: CheckPackageHasInstalledOptions): void;
|
static hasInstalled(options: CheckPackageHasInstalledOptions): void;
|
||||||
}
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user