diff --git a/api/@ohos.arkui.advanced.SubHeaderV2.static.d.ets b/api/@ohos.arkui.advanced.SubHeaderV2.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..ed1a6cbf7f680b9eb55524c0ff2757fe013f44b5 --- /dev/null +++ b/api/@ohos.arkui.advanced.SubHeaderV2.static.d.ets @@ -0,0 +1,529 @@ +'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 api/@ohos.arkui.advanced.SubHeaderV2.d.ts + * @kit ArkUI + */ +import { TextModifier } from './arkui/TextModifier'; +import { ResourceStr } from './arkui/component/units'; +import { SymbolGlyphModifier } from './arkui/SymbolGlyphModifier'; +import { SelectOption } from './arkui/component/select'; +import { ObservedV2, Trace, Param } from './arkui/stateManagement/decorator'; +import { ComponentV2 } from './arkui/component/customComponent'; +import { BuilderParam, Builder } from './arkui/component/builder'; +/** + * SubHeaderV2IconType + * + * @typedef { ResourceStr | SymbolGlyphModifier } SubHeaderV2IconType + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +declare type SubHeaderV2IconType = ResourceStr | SymbolGlyphModifier; +/** + * Defines the SubHeaderV2TitleOptions. + * + * @interface SubHeaderV2TitleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export interface SubHeaderV2TitleOptions { + /** + * The first line text of content area. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + primaryTitle?: ResourceStr; + /** + * Text modifier for primary title. + * + * @type { ?TextModifier }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + primaryTitleModifier?: TextModifier; + /** + * The secondary line text of content area. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + secondaryTitle?: ResourceStr; + /** + * Text modifier for secondary title. + * + * @type { ?TextModifier }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + secondaryTitleModifier?: TextModifier; +} +/** + * Declare the SubHeaderV2Title + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@ObservedV2 +export declare class SubHeaderV2Title { + /** + * The first line text of content area. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace primaryTitle?: ResourceStr; + /** + * Text modifier for primary title. + * + * @type { ?TextModifier }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace primaryTitleModifier?: TextModifier; + /** + * The secondary line text of content area. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace secondaryTitle?: ResourceStr; + /** + * Text modifier for secondary title. + * + * @type { ?TextModifier }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace secondaryTitleModifier?: TextModifier; + /** + * The constructor of SubHeaderV2Title + * + * @param options { SubHeaderV2TitleOptions } the options of the SubHeaderV2Title + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(options: SubHeaderV2TitleOptions); +} +/** + * The callback function that will be invoked when the selectedIndex of the SubHeaderV2Select is selected. + * + * @typedef { function } SubHeaderV2SelectOnSelect + * @param { number } selectedIndex - the index of selected item + * @param { ?string } selectedContent - the content of selected item + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export type SubHeaderV2SelectOnSelect = (selectedIndex: number, selectedContent?: string) => void; +/** + * Defines the SubHeaderV2SelectOptions. + * + * @interface SubHeaderV2SelectOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export interface SubHeaderV2SelectOptions { + /** + * Sets the options of the SubHeaderV2SelectOptions. + * + * @type { SelectOption[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + options: SelectOption[]; + /** + * Sets the selected index of the SubHeaderV2SelectOptions. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + selectedIndex?: number; + /** + * Sets the selected content of the SubHeaderV2SelectOptions. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + selectedContent?: ResourceStr; + /** + * Sets the onSelect of the SubHeaderV2SelectOptions. + * + * @type { ?SubHeaderV2SelectOnSelect } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onSelect?: SubHeaderV2SelectOnSelect; + /** + * Sets the default focus state of SubHeaderV2SelectOptions. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + defaultFocus?: boolean; +} +/** + * Declare the SubHeaderV2Select + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@ObservedV2 +export declare class SubHeaderV2Select { + /** + * Sets the options of the SubHeaderV2SelectOptions. + * + * @type { SelectOption[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace options: SelectOption[]; + /** + * Sets the selected index of the SubHeaderV2SelectOptions. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace selectedIndex?: number; + /** + * Sets the selected content of the SubHeaderV2SelectOptions. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace selectedContent?: ResourceStr; + /** + * Sets the onSelect of the SubHeaderV2SelectOptions. + * + * @type { ?SubHeaderV2SelectOnSelect } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace onSelect?: SubHeaderV2SelectOnSelect; + /** + * Sets the default focus state of SubHeaderV2SelectOptions. + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace defaultFocus?: boolean; + /** + * The constructor of SubHeaderV2Select + * + * @param options { SubHeaderV2SelectOptions } the options of the SubHeaderV2Select + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(options: SubHeaderV2SelectOptions); +} +/** + * Control style of operation element + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare enum SubHeaderV2OperationType { + /** + * 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 +} +/** + * Defines the action callback of the SubHeaderV2OperationItem. + * + * @typedef { function } OnClicked + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export type SubHeaderV2OperationItemAction = () => void; +/** + * SubHeaderV2OperationItemType + * + * @typedef { ResourceStr | SymbolGlyphModifier } SubHeaderV2OperationItemType + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +declare type SubHeaderV2OperationItemType = ResourceStr | SymbolGlyphModifier; +/** + * Defines the SubHeaderV2OperationItemOptions. + * + * @interface SubHeaderV2OperationItemOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export interface SubHeaderV2OperationItemOptions { + /** + * The content of text or the address of icon. + * + * @type { SubHeaderV2OperationItemType }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + content: SubHeaderV2OperationItemType; + /** + * callback function when operate the text or icon. + * + * @type { ?SubHeaderV2OperationItemAction }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + action?: SubHeaderV2OperationItemAction; + /** + * 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".The options are as follows:
+ * "auto":The value is converted to "yes" or "no" based on the component. + * "yes": the current component is selectable for the accessibility service. + * "no": The current component is not selectable for the accessibility service. + * "no-hide-descendants":The current component and all its child components are not selectable
+ * for the accessibility service. + * @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 the SubHeaderV2OperationItem + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@ObservedV2 +export declare class SubHeaderV2OperationItem { + /** + * The content of text or the address of icon. + * + * @type { SubHeaderV2OperationItemType }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace content: SubHeaderV2OperationItemType; + /** + * callback function when operate the text or icon. + * + * @type { ?SubHeaderV2OperationItemAction }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace action?: SubHeaderV2OperationItemAction; + /** + * The constructor of SubHeaderV2OperationItem + * + * @param options { SubHeaderV2OperationItemOptions } the options of the SubHeaderV2OperationItem + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(options: SubHeaderV2OperationItemOptions); + /** + * The accessibilityText of this text or icon. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace accessibilityText?: ResourceStr; + /** + * The accessibilityDescription of this text or icon. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace accessibilityDescription?: ResourceStr; + /** + * The accessibilityLevel of this text or icon. + * + * @type { ?string } + * @default "auto".The options are as follows:
+ * "auto":The value is converted to "yes" or "no" based on the component. + * "yes": the current component is selectable for the accessibility service. + * "no": The current component is not selectable for the accessibility service. + * "no-hide-descendants":The current component and all its child components are not selectable
+ * for the accessibility service. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace accessibilityLevel?: string; + /** + * Sets the default focus state of the text or icon. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace defaultFocus?: boolean; +} +/** + * The callback function that will be invoked when the title build. + * + * @typedef { function } SubHeaderV2TitleBuilder + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export type SubHeaderV2TitleBuilder = () => void; +/** + * Defines struct SubHeaderV2. + * + * @struct SubHeaderV2 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@ComponentV2 +export declare struct SubHeaderV2 { + /** + * Sets the icon of the SubHeaderV2. + * + * @type { ?SubHeaderV2IconType } + * @readonly + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + readonly icon?: SubHeaderV2IconType; + /** + * Sets the title of the SubHeaderV2. + * + * @type { ?SubHeaderV2Title } + * @readonly + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + readonly title?: SubHeaderV2Title; + /** + * Sets the select of the SubHeaderV2. + * + * @type { ?SubHeaderV2Select } + * @readonly + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + readonly select?: SubHeaderV2Select; + /** + * Sets the operationType of the SubHeaderV2. + * + * @type { ?SubHeaderV2OperationType } + * @readonly + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + readonly operationType?: SubHeaderV2OperationType; + /** + * Sets the operationItems of the SubHeaderV2. + * + * @type { ?SubHeaderV2OperationItem[] } + * @readonly + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + readonly operationItems?: SubHeaderV2OperationItem[]; + /** + * Set the title content. + * + * @type { ?SubHeaderV2TitleBuilder } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @BuilderParam + titleBuilder?: SubHeaderV2TitleBuilder; + + /** + * The method to build component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder + build(): void; +} \ No newline at end of file