/* * Copyright (c) 2024 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 */ /** * Define the initialization parameters of the arc alphabet index bar * * @typedef ArcAlphabetIndexerInitInfo * @syscap SystemCapability.ArkUI.ArkUI.Circle * @crossplatform * @atomicservice * @since 18 */ declare interface ArcAlphabetIndexerInitInfo { /** * Array of alphabetic indexed strings, cannot be set to empty. * * @type { string[] } * @syscap SystemCapability.ArkUI.ArkUI.Circle * @crossplatform * @atomicservice * @since 18 */ arrayValue: string[]; /** * The index value of the initial selected item. * * @type { number } - If it is out of the index range, the default value is 0 * @syscap SystemCapability.ArkUI.ArkUI.Circle * @crossplatform * @atomicservice * @since 18 */ selected: number; } /** * Callback when index bar is selected. * * @typedef { function } OnSelectCallback * @param { number } index - the selected index * @syscap SystemCapability.ArkUI.ArkUI.Circle * @crossplatform * @atomicservice * @since 18 */ declare type OnSelectCallback = (index: number) => void; /** * Arc Alphabet index bar. * * @interface ArcAlphabetIndexerInterface * @syscap SystemCapability.ArkUI.ArkUI.Circle * @crossplatform * @atomicservice * @since 18 */ export interface ArcAlphabetIndexerInterface { /** * Create ArcAlphabetIndexer component * * ArrayValue: Alphabetical index string array. * selected: ID of the selected item. * * @param { ArcAlphabetIndexerInitInfo } info * @returns { ArcAlphabetIndexerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Circle * @crossplatform * @atomicservice * @since 18 */ (info: ArcAlphabetIndexerInitInfo): ArcAlphabetIndexerAttribute; } /** * Defines the arc alphabet index bar attribute functions. * * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Circle * @crossplatform * @atomicservice * @since 18 */ declare class ArcAlphabetIndexerAttribute extends CommonMethod { /** * Definitions text color. * * @param { Optional } color * @returns { ArcAlphabetIndexerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Circle * @crossplatform * @atomicservice * @since 18 */ color(color: Optional): ArcAlphabetIndexerAttribute; /** * Selected text color. * * @param { Optional } color * @returns { ArcAlphabetIndexerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Circle * @crossplatform * @atomicservice * @since 18 */ selectedColor(color: Optional): ArcAlphabetIndexerAttribute; /** * Font color of the pop-up prompt text. * * @param { Optional } color * @returns { ArcAlphabetIndexerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Circle * @crossplatform * @atomicservice * @since 18 */ popupColor(color: Optional): ArcAlphabetIndexerAttribute; /** * Select the text background color. * * @param { Optional } color * @returns { ArcAlphabetIndexerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Circle * @crossplatform * @atomicservice * @since 18 */ selectedBackgroundColor(color: Optional): ArcAlphabetIndexerAttribute; /** * Background color of the pop-up window. * * @param { Optional } color * @returns { ArcAlphabetIndexerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Circle * @crossplatform * @atomicservice * @since 18 */ popupBackground(color: Optional): ArcAlphabetIndexerAttribute; /** * Whether to use pop-up index hints. * * @param { Optional } enabled * @returns { ArcAlphabetIndexerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Circle * @crossplatform * @atomicservice * @since 18 */ usePopup(enabled: Optional): ArcAlphabetIndexerAttribute; /** * Selected text style. * * @param { Optional } font * @returns { ArcAlphabetIndexerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Circle * @crossplatform * @atomicservice * @since 18 */ selectedFont(font: Optional): ArcAlphabetIndexerAttribute; /** * Popup text style. * * @param { Optional } font * @returns { ArcAlphabetIndexerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Circle * @crossplatform * @atomicservice * @since 18 */ popupFont(font: Optional): ArcAlphabetIndexerAttribute; /** * Definitions fonts. * * @param { Optional } font * @returns { ArcAlphabetIndexerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Circle * @crossplatform * @atomicservice * @since 18 */ font(font: Optional): ArcAlphabetIndexerAttribute; /** * Size of the letter area on the letter index bar. The letter area is a circle. Set the diameter of the circle. * * @param { Optional } size * @returns { ArcAlphabetIndexerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Circle * @crossplatform * @atomicservice * @since 18 */ itemSize(size: Optional): ArcAlphabetIndexerAttribute; /** * Sets the selected index. * * @param { Optional } index * @returns { ArcAlphabetIndexerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Circle * @crossplatform * @atomicservice * @since 18 */ selected(index: Optional): ArcAlphabetIndexerAttribute; /** * Automatically collapses the characters when the indexer bar not enough to display all characters. * * @param { Optional } enable - A boolean value determines whether auto collapses is enabled for indexer bar. * @returns { ArcAlphabetIndexerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Circle * @crossplatform * @atomicservice * @since 18 */ autoCollapse(enable: Optional): ArcAlphabetIndexerAttribute; /** * Index bar selection callback. * * @param { Optional } handler * @returns { ArcAlphabetIndexerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Circle * @crossplatform * @atomicservice * @since 18 */ onSelect(handler: Optional): ArcAlphabetIndexerAttribute; /** * Set the background blurStyle of the pop-up window. * * @param { Optional } style * @returns { ArcAlphabetIndexerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Circle * @crossplatform * @atomicservice * @since 18 */ popupBackgroundBlurStyle(style: Optional): ArcAlphabetIndexerAttribute; } /** * Defines ArcAlphabetIndexer Component. * * @syscap SystemCapability.ArkUI.ArkUI.Circle * @crossplatform * @atomicservice * @since 18 */ /** * Defines ArcAlphabetIndexer Component. * * @syscap SystemCapability.ArkUI.ArkUI.Circle * @crossplatform * @atomicservice * @uicomponent * @since 19 */ declare const ArcAlphabetIndexer: ArcAlphabetIndexerInterface; /** * Defines ArcAlphabetIndexer Component instance. * * @syscap SystemCapability.ArkUI.ArkUI.Circle * @crossplatform * @atomicservice * @since 18 */ declare const ArcAlphabetIndexerInstance: ArcAlphabetIndexerAttribute;