From d49924bda08e74f305d4c2cfc5f1ba2aa6d6dd10 Mon Sep 17 00:00:00 2001 From: yuxiaofei9 Date: Wed, 30 Jul 2025 15:09:24 +0800 Subject: [PATCH] [feate]advanced 1.2 add static Signed-off-by: yuxiaofei9 --- ...os.arkui.advanced.SplitLayout.static.d.ets | 86 +++++ ...ohos.arkui.advanced.SubHeader.static.d.ets | 353 ++++++++++++++++++ ...arkui.advanced.SwipeRefresher.static.d.ets | 59 +++ 3 files changed, 498 insertions(+) create mode 100644 api/@ohos.arkui.advanced.SplitLayout.static.d.ets create mode 100644 api/@ohos.arkui.advanced.SubHeader.static.d.ets create mode 100644 api/@ohos.arkui.advanced.SwipeRefresher.static.d.ets diff --git a/api/@ohos.arkui.advanced.SplitLayout.static.d.ets b/api/@ohos.arkui.advanced.SplitLayout.static.d.ets new file mode 100644 index 0000000000..d303796d5c --- /dev/null +++ b/api/@ohos.arkui.advanced.SplitLayout.static.d.ets @@ -0,0 +1,86 @@ +'use static' +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ +import { ResourceStr } from './arkui/component/units'; +import { State, PropRef } from './arkui/stateManagement/decorator'; +import { Component } from './arkui/component/customComponent'; +import { BuilderParam, Builder } from './arkui/component/builder'; +/** + * Declare SplitLayout.The SplitLayout is used for upper and lower graphic layouts. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +@Component +export declare struct SplitLayout { + /** + * Container in the user-defined splitlayout display area. + * + * @type { container: () => void }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @BuilderParam + container: () => void; + /** + * Image in the layout. + * + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @State + mainImage: ResourceStr; + /** + * Title text in the layout. + * + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef + primaryText: ResourceStr; + /** + * Description text in the layout. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef + secondaryText?: ResourceStr; + /** + * Auxiliary text in the layout. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef + tertiaryText?: ResourceStr; + /** + * The method to build component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder + build(): void; +} diff --git a/api/@ohos.arkui.advanced.SubHeader.static.d.ets b/api/@ohos.arkui.advanced.SubHeader.static.d.ets new file mode 100644 index 0000000000..723729efc1 --- /dev/null +++ b/api/@ohos.arkui.advanced.SubHeader.static.d.ets @@ -0,0 +1,353 @@ +'use static' +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ +import { TextModifier } from './arkui/TextModifier'; +import { ResourceStr, Resource, ResourceColor, LocalizedMargin, LocalizedPadding } from './arkui/component/units'; +import { SelectOption } from './arkui/component/select'; +import { PropRef } from './arkui/stateManagement/decorator'; +import { Component } from './arkui/component/customComponent'; +import { FontWeight } from './arkui/component/enums'; +import { SymbolEffectStrategy, SymbolRenderingStrategy } from './arkui/component/symbolglyph'; +import { BuilderParam, Builder } from './arkui/component/builder'; +/** + * Control style of operation element + * + * @enum { OperationStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum OperationType { + /** + * The TextArrow style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + TEXT_ARROW = 0, + /** + * The Button style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + BUTTON = 1, + /** + * The IconGroup style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ICON_GROUP = 2, + /** + * The LoadingProgress style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + LOADING = 3 +} +/** + * Declare type OperationOption + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class OperationOption { + /** + * The content of text or the address of icon. + * + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + value: ResourceStr; + /** + * callback function when operate the text or icon. + * + * @type { () => void }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + action?: () => void; + /** + * The accessibilityText of this text or icon. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityText?: ResourceStr; + /** + * The accessibilityDescription of this text or icon. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityDescription?: ResourceStr; + /** + * The accessibilityLevel of this text or icon. + * + * @type { ?string } + * @default "auto" + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityLevel?: string; + /** + * Sets the default focus state of the text or icon. + * + * @type { ?boolean }. + * @default { false } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + defaultFocus?: boolean; +} +/** + * Declare type SelectOption + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class SelectOptions { + /** + * SubOption array of the select. + * + * @type { Array }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + options: Array; + /** + * The default selected index. + * + * @type { number }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + selected?: number; + /** + * The default text value. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + value?: ResourceStr; + /** + * Callback when the select is selected. + * + * @type { (index: number, value?: string) => void }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onSelect?: (index: number, value?: string) => void; + /** + * Sets the default focus state of select. + * + * @type { ?boolean }. + * @default { false } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + defaultFocus?: boolean; +} +/** +* Declare type SymbolOptions +* +* @syscap SystemCapability.ArkUI.ArkUI.Full +* @since 20 +*/ +export declare class SymbolOptions { + /** + * The size of symbol icon. + * + * @type { ?(number | string | Resource) }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontSize?: number | string | Resource; + /** + * The color of symbol icon. + * + * @type { ?(Array) }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontColor?: Array; + /** + * The fontWeight of symbol icon. + * + * @type { ?(number | FontWeight | string) }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontWeight?: number | FontWeight | string; + /** + * The effect strategy of symbol icon. + * + * @type { ?(SymbolEffectStrategy) }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + effectStrategy?: SymbolEffectStrategy; + /** + * The rendering strategy of symbol icon. + * + * @type { ?(SymbolRenderingStrategy) }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + renderingStrategy?: SymbolRenderingStrategy; +} +/** + * Declare struct SubHeader + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +@Component +export declare struct SubHeader { + /** + * Icon resource of content area. + * + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef + icon?: ResourceStr; + /** + * Attributes of Symbol icon. + * + * @type { SymbolOptions}. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + iconSymbolOptions?: SymbolOptions; + /** + * The first line text of content area. + * + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef + primaryTitle?: ResourceStr; + /** + * The secondary line text of content area. + * + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef + secondaryTitle?: ResourceStr; + /** + * Select option of content area. + * + * @type { SelectOptions }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + select?: SelectOptions; + /** + * Operation style of SubHeader. + * + * @type { OperationStyle }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef + operationType?: OperationType; + /** + * operation item. + * + * @type { Array }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + operationItem?: Array; + /** + * Attributes of Symbol icons in operation area. + * + * @type { Array }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + operationSymbolOptions?: Array; + /** + * Text modifier for primary title. + * + * @type { TextModifier }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + primaryTitleModifier?: TextModifier; + /** + * Text modifier for secondary title. + * + * @type { TextModifier }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + secondaryTitleModifier?: TextModifier; + /** + * Set the title content. + * + * @type { () => void } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @BuilderParam + titleBuilder?: () => void; + /** + * Set the content margin. + * + * @type { ?LocalizedMargin } + * @default {start: LengthMetrics.resource($r('sys.float.margin_left')), + *
end: LengthMetrics.resource($r('sys.float.margin_right'))} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef + contentMargin?: LocalizedMargin; + /** + * Set the content padding. + * + * @type { ?LocalizedPadding } + * @default set different default values according to the width of the subHeader: + *
When the left area is secondaryTitle or the group of secondaryTitle and icon, + *
the default value is {start: LengthMetrics.vp(12), end: LengthMetrics.vp(12)}; + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef + contentPadding?: LocalizedPadding; + /** + * The method to build component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder + build(): void; +} diff --git a/api/@ohos.arkui.advanced.SwipeRefresher.static.d.ets b/api/@ohos.arkui.advanced.SwipeRefresher.static.d.ets new file mode 100644 index 0000000000..412d082d20 --- /dev/null +++ b/api/@ohos.arkui.advanced.SwipeRefresher.static.d.ets @@ -0,0 +1,59 @@ +'use static' +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ +import { ResourceStr } from './arkui/component/units'; +import { PropRef } from './arkui/stateManagement/decorator'; +import { Component } from './arkui/component/customComponent'; +import { Builder } from './arkui/component/builder'; +/** + * Declare component SwipeRefresher + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +@Component +export declare struct SwipeRefresher { + /** + * Sets the content when loading. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef + content?: ResourceStr; + /** + * Whether the component is loading. + * + * type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef + isLoading: boolean; + /** + * The method to build component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder + build(): void; +} -- Gitee