From d8c2706b704e87ad10d519e9306e8e95e3fdedb6 Mon Sep 17 00:00:00 2001 From: wangxiuxiu96 Date: Wed, 13 Aug 2025 15:38:34 +0800 Subject: [PATCH] =?UTF-8?q?symbolglyph=E3=80=81api=20migrate=200728?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangxiuxiu96 --- .../component/ets/container_span.d.ts | 20 +- api/@internal/component/ets/hyperlink.d.ts | 10 - api/@internal/component/ets/image_span.d.ts | 69 +- api/@internal/component/ets/marquee.d.ts | 61 +- api/@internal/component/ets/search.d.ts | 274 +-- api/@internal/component/ets/span.d.ts | 91 +- api/@internal/component/ets/symbol_span.d.ts | 17 - api/@internal/component/ets/text_area.d.ts | 266 +-- api/@internal/component/ets/text_input.d.ts | 497 ++--- api/@ohos.font.d.ets | 798 -------- api/@ohos.font.d.ts | 111 +- api/@ohos.font.static.d.ets | 290 +++ api/arkui/ContainerSpanModifier.static.d.ets | 34 + api/arkui/HyperlinkModifier.static.d.ets | 32 + api/arkui/ImageSpanModifier.static.d.ets | 32 + api/arkui/SearchModifier.static.d.ets | 32 + api/arkui/SpanModifier.static.d.ets | 32 + ...d.ets => SymbolGlyphModifier.static.d.ets} | 15 +- api/arkui/SymbolSpanModifier.static.d.ets | 32 + api/arkui/TextAreaModifier.static.d.ets | 32 + api/arkui/TextInputModifier.static.d.ets | 32 + ...difier.d.ets => TextModifier.static.d.ets} | 3 +- .../component/containerSpan.static.d.ets | 66 + api/arkui/component/hyperlink.static.d.ets | 72 + api/arkui/component/imageSpan.static.d.ets | 213 ++ api/arkui/component/marquee.static.d.ets | 254 +++ api/arkui/component/search.static.d.ets | 1044 ++++++++++ api/arkui/component/span.static.d.ets | 215 ++ api/arkui/component/symbolSpan.static.d.ets | 118 ++ api/arkui/component/symbolglyph.static.d.ets | 181 +- api/arkui/component/text.static.d.ets | 202 +- api/arkui/component/textArea.static.d.ets | 1013 ++++++++++ api/arkui/component/textInput.static.d.ets | 1771 +++++++++++++++++ 33 files changed, 5805 insertions(+), 2124 deletions(-) delete mode 100644 api/@ohos.font.d.ets create mode 100644 api/@ohos.font.static.d.ets create mode 100644 api/arkui/ContainerSpanModifier.static.d.ets create mode 100644 api/arkui/HyperlinkModifier.static.d.ets create mode 100644 api/arkui/ImageSpanModifier.static.d.ets create mode 100644 api/arkui/SearchModifier.static.d.ets create mode 100644 api/arkui/SpanModifier.static.d.ets rename api/arkui/{SymbolGlyphModifier.d.ets => SymbolGlyphModifier.static.d.ets} (77%) create mode 100644 api/arkui/SymbolSpanModifier.static.d.ets create mode 100644 api/arkui/TextAreaModifier.static.d.ets create mode 100644 api/arkui/TextInputModifier.static.d.ets rename api/arkui/{TextModifier.d.ets => TextModifier.static.d.ets} (93%) create mode 100644 api/arkui/component/containerSpan.static.d.ets create mode 100644 api/arkui/component/hyperlink.static.d.ets create mode 100644 api/arkui/component/imageSpan.static.d.ets create mode 100644 api/arkui/component/marquee.static.d.ets create mode 100644 api/arkui/component/search.static.d.ets create mode 100644 api/arkui/component/span.static.d.ets create mode 100644 api/arkui/component/symbolSpan.static.d.ets create mode 100644 api/arkui/component/textArea.static.d.ets create mode 100644 api/arkui/component/textInput.static.d.ets diff --git a/api/@internal/component/ets/container_span.d.ts b/api/@internal/component/ets/container_span.d.ts index 93349f5594..aa555965ff 100644 --- a/api/@internal/component/ets/container_span.d.ts +++ b/api/@internal/component/ets/container_span.d.ts @@ -18,11 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { TextBackgroundStyle } from './span'; -import { AttributeModifier } from './common'; -/*** endif */ - /** * Span container interface. * @@ -38,8 +33,7 @@ import { AttributeModifier } from './common'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface ContainerSpanInterface { /** @@ -57,8 +51,7 @@ interface ContainerSpanInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ (): ContainerSpanAttribute; } @@ -76,8 +69,7 @@ interface ContainerSpanInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class ContainerSpanAttribute { /** @@ -97,8 +89,7 @@ declare class ContainerSpanAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ textBackgroundStyle(style: TextBackgroundStyle): ContainerSpanAttribute; @@ -110,8 +101,7 @@ declare class ContainerSpanAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ attributeModifier(modifier: AttributeModifier): ContainerSpanAttribute; } diff --git a/api/@internal/component/ets/hyperlink.d.ts b/api/@internal/component/ets/hyperlink.d.ts index 19098e14e3..416030a856 100755 --- a/api/@internal/component/ets/hyperlink.d.ts +++ b/api/@internal/component/ets/hyperlink.d.ts @@ -18,12 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { Resource } from './../../../api/global/resource' -import { CommonMethod } from './common' -import { Color } from './enums' -/*** endif */ - /** * Defines the hyperlink interface. * @@ -47,7 +41,6 @@ import { Color } from './enums' * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ interface HyperlinkInterface { /** @@ -85,7 +78,6 @@ interface HyperlinkInterface { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ (address: string | Resource, content?: string | Resource): HyperlinkAttribute; } @@ -113,7 +105,6 @@ interface HyperlinkInterface { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ declare class HyperlinkAttribute extends CommonMethod { /** @@ -142,7 +133,6 @@ declare class HyperlinkAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ color(value: Color | number | string | Resource): HyperlinkAttribute; } diff --git a/api/@internal/component/ets/image_span.d.ts b/api/@internal/component/ets/image_span.d.ts index 5c5ec30316..40109b352a 100644 --- a/api/@internal/component/ets/image_span.d.ts +++ b/api/@internal/component/ets/image_span.d.ts @@ -18,15 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { ResourceStr, ColorFilter} from './units'; -import { BaseSpan } from './span'; -import { ImageSpanAlignment, ImageFit } from './enums'; -import { ImageErrorCallback, DrawingColorFilter } from './image'; -import { PixelMap } from './common'; -import image from '../../@ohos.multimedia.image'; -/*** endif */ - /** * Provide image decoration in the text component. * @@ -42,8 +33,7 @@ import image from '../../@ohos.multimedia.image'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface ImageSpanInterface { /** @@ -63,8 +53,7 @@ interface ImageSpanInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (value: ResourceStr | PixelMap): ImageSpanAttribute; } @@ -84,8 +73,7 @@ interface ImageSpanInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class ImageSpanAttribute extends BaseSpan { /** @@ -105,8 +93,7 @@ declare class ImageSpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ verticalAlign(value: ImageSpanAlignment): ImageSpanAttribute; @@ -118,8 +105,7 @@ declare class ImageSpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ colorFilter(filter: ColorFilter | DrawingColorFilter): ImageSpanAttribute; @@ -140,8 +126,7 @@ declare class ImageSpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ objectFit(value: ImageFit): ImageSpanAttribute; @@ -154,8 +139,7 @@ declare class ImageSpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onComplete(callback: ImageCompleteCallback): ImageSpanAttribute; @@ -168,8 +152,7 @@ declare class ImageSpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onError(callback: ImageErrorCallback): ImageSpanAttribute; @@ -180,8 +163,7 @@ declare class ImageSpanAttribute extends BaseSpan { * @returns { ImageSpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ alt(value: PixelMap): ImageSpanAttribute; } @@ -228,8 +210,7 @@ declare const ImageSpanInstance: ImageSpanAttribute; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ type ImageCompleteCallback = (result: ImageLoadResult) => void; @@ -240,8 +221,7 @@ type ImageCompleteCallback = (result: ImageLoadResult) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface ImageLoadResult { /** @@ -251,8 +231,7 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ width: number; /** @@ -262,8 +241,7 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ height: number; /** @@ -273,8 +251,7 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ componentWidth: number; /** @@ -284,8 +261,7 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ componentHeight: number; /** @@ -297,8 +273,7 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ loadingStatus: number; /** @@ -308,8 +283,7 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ contentWidth: number; /** @@ -319,8 +293,7 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ contentHeight: number; /** @@ -330,8 +303,7 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ contentOffsetX: number; /** @@ -341,8 +313,7 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ contentOffsetY: number; } diff --git a/api/@internal/component/ets/marquee.d.ts b/api/@internal/component/ets/marquee.d.ts index 12e53cdcfd..897f051bea 100644 --- a/api/@internal/component/ets/marquee.d.ts +++ b/api/@internal/component/ets/marquee.d.ts @@ -18,13 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { ResourceColor, Length } from './units'; -import { CommonMethod } from './common'; -import { FontWeight, MarqueeUpdateStrategy } from './enums'; -import { Resource } from './../../../api/global/resource'; -/*** endif */ - /** * Defines Marquee constructor options. * @@ -34,8 +27,7 @@ import { Resource } from './../../../api/global/resource'; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface MarqueeOptions { /** @@ -88,8 +80,7 @@ interface MarqueeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ start: boolean; @@ -142,8 +133,7 @@ interface MarqueeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ step?: number; @@ -197,8 +187,7 @@ interface MarqueeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ loop?: number; @@ -246,8 +235,7 @@ interface MarqueeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ fromStart?: boolean; @@ -294,8 +282,7 @@ interface MarqueeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ src: string; } @@ -332,8 +319,7 @@ interface MarqueeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface MarqueeInterface { /** @@ -384,8 +370,7 @@ interface MarqueeInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ (options: MarqueeOptions): MarqueeAttribute; } @@ -422,8 +407,7 @@ interface MarqueeInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class MarqueeAttribute extends CommonMethod { /** @@ -462,8 +446,7 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontColor(value: ResourceColor): MarqueeAttribute; @@ -508,8 +491,7 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontSize(value: Length): MarqueeAttribute; @@ -553,8 +535,7 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ allowScale(value: boolean): MarqueeAttribute; @@ -603,8 +584,7 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontWeight(value: number | FontWeight | string): MarqueeAttribute; @@ -650,8 +630,7 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontFamily(value: string | Resource): MarqueeAttribute; @@ -668,8 +647,7 @@ declare class MarqueeAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ marqueeUpdateStrategy(value: MarqueeUpdateStrategy): MarqueeAttribute; @@ -709,8 +687,7 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onStart(event: () => void): MarqueeAttribute; @@ -754,8 +731,7 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onBounce(event: () => void): MarqueeAttribute; @@ -795,8 +771,7 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onFinish(event: () => void): MarqueeAttribute; } diff --git a/api/@internal/component/ets/search.d.ts b/api/@internal/component/ets/search.d.ts index fd40d664b0..ba0de09171 100644 --- a/api/@internal/component/ets/search.d.ts +++ b/api/@internal/component/ets/search.d.ts @@ -18,18 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { TextContentControllerBase, SelectionOptions,Callback,CommonMethod,Optional,TextDecorationOptions, Bindable } from './common'; -import { CustomBuilder } from './builder'; -import { ResourceStr,Length,ResourceColor ,Dimension,Font} from './units'; -import { CaretStyle, EditableTextOnChangeCallback, InsertValue, DeleteValue, EditMenuOptions,KeyboardAppearance,EditableTextChangeValue,AutoCapitalizationMode } from './textCommon'; -import { EnterKeyType, OnTextSelectionChangeCallback, OnContentScrollCallback, OnPasteCallback, SubmitEvent } from './textInput'; -import { CopyOptions,TextAlign } from './enums'; -import { KeyboardOptions } from './richEditor'; -import { Resource } from '../../global/resource'; -import { SymbolGlyphModifier } from '../SymbolGlyphModifier'; -/*** endif */ - /** * Provides the method of switching the cursor position. * @@ -52,8 +40,7 @@ import { SymbolGlyphModifier } from '../SymbolGlyphModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class SearchController extends TextContentControllerBase { /** @@ -76,8 +63,7 @@ declare class SearchController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ constructor(); @@ -103,8 +89,7 @@ declare class SearchController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ caretPosition(value: number): void; @@ -121,8 +106,7 @@ declare class SearchController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ stopEditing(): void; @@ -149,8 +133,7 @@ declare class SearchController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ setTextSelection(selectionStart: number, selectionEnd: number, options?: SelectionOptions): void; } @@ -170,8 +153,7 @@ declare class SearchController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum CancelButtonStyle { /** @@ -187,8 +169,7 @@ declare enum CancelButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ CONSTANT, @@ -205,8 +186,7 @@ declare enum CancelButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ INVISIBLE, @@ -223,8 +203,7 @@ declare enum CancelButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ INPUT } @@ -244,8 +223,7 @@ declare enum CancelButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum SearchType { /** @@ -261,8 +239,7 @@ declare enum SearchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NORMAL = 0, @@ -279,8 +256,7 @@ declare enum SearchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NUMBER = 2, @@ -298,8 +274,7 @@ declare enum SearchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PHONE_NUMBER = 3, @@ -317,8 +292,7 @@ declare enum SearchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ EMAIL = 5, @@ -328,8 +302,7 @@ declare enum SearchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NUMBER_DECIMAL = 12, @@ -339,8 +312,7 @@ declare enum SearchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ URL = 13, @@ -362,8 +334,7 @@ declare enum SearchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface SearchOptions { /** @@ -406,17 +377,6 @@ declare interface SearchOptions { */ value?: ResourceStr; - /** - * Text input in the search text box. - * - * @type { ?(string | Bindable)} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - value?: string | Bindable; - /** * Text displayed when there is no input. * @@ -446,8 +406,7 @@ declare interface SearchOptions { * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ placeholder?: ResourceStr; @@ -484,8 +443,7 @@ declare interface SearchOptions { * @type { ?string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ icon?: string; @@ -511,8 +469,7 @@ declare interface SearchOptions { * @type { ?SearchController } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ controller?: SearchController; } @@ -539,8 +496,7 @@ declare interface SearchOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface SearchInterface { /** @@ -579,8 +535,7 @@ interface SearchInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ (options?: SearchOptions): SearchAttribute; } @@ -600,8 +555,7 @@ interface SearchInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface IconOptions { /** @@ -623,8 +577,7 @@ interface IconOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ size?: Length; @@ -643,8 +596,7 @@ interface IconOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ color?: ResourceColor; @@ -663,8 +615,7 @@ interface IconOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ src?: ResourceStr; } @@ -684,8 +635,7 @@ interface IconOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface SearchButtonOptions { /** @@ -707,8 +657,7 @@ interface SearchButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontSize?: Length; @@ -727,8 +676,7 @@ interface SearchButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontColor?: ResourceColor; @@ -745,8 +693,7 @@ interface SearchButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ autoDisable?: Boolean; } @@ -758,8 +705,7 @@ interface SearchButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface CancelButtonOptions { /** @@ -770,8 +716,7 @@ interface CancelButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ style?: CancelButtonStyle; @@ -783,8 +728,7 @@ interface CancelButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ icon?: IconOptions; } @@ -805,7 +749,6 @@ interface CancelButtonOptions { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ interface CancelButtonSymbolOptions { /** @@ -815,8 +758,7 @@ interface CancelButtonSymbolOptions { * @type { ?CancelButtonStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ style?: CancelButtonStyle; @@ -838,7 +780,6 @@ interface CancelButtonSymbolOptions { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ icon?: SymbolGlyphModifier; } @@ -852,8 +793,7 @@ interface CancelButtonSymbolOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ declare type SearchSubmitCallback = (searchContent: string, event?: SubmitEvent) => void; @@ -879,8 +819,7 @@ declare type SearchSubmitCallback = (searchContent: string, event?: SubmitEvent) * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class SearchAttribute extends CommonMethod { /** @@ -929,7 +868,6 @@ declare class SearchAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ searchButton(value: ResourceStr, option?: SearchButtonOptions): SearchAttribute; @@ -954,8 +892,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontColor(value: ResourceColor): SearchAttribute; @@ -1006,8 +943,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ searchIcon(value: IconOptions | SymbolGlyphModifier): SearchAttribute; @@ -1054,8 +990,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ cancelButton(value: CancelButtonOptions | CancelButtonSymbolOptions): SearchAttribute; @@ -1067,8 +1002,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ textIndent(value: Dimension): SearchAttribute; @@ -1089,8 +1023,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ inputFilter(value: ResourceStr, error?: Callback): SearchAttribute; @@ -1103,8 +1036,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onEditChange(callback: Callback): SearchAttribute; @@ -1120,8 +1052,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ selectedBackgroundColor(value: ResourceColor): SearchAttribute; @@ -1153,8 +1084,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ caretStyle(value: CaretStyle): SearchAttribute; @@ -1183,8 +1113,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ placeholderColor(value: ResourceColor): SearchAttribute; @@ -1218,8 +1147,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ placeholderFont(value?: Font): SearchAttribute; @@ -1253,8 +1181,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ textFont(value?: Font): SearchAttribute; @@ -1266,8 +1193,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enterKeyType(value: EnterKeyType): SearchAttribute; @@ -1323,19 +1249,6 @@ declare class SearchAttribute extends CommonMethod { */ onSubmit(callback: SearchSubmitCallback): SearchAttribute; - /** - * Call the function when clicked the search button. - * - * @param { Callback | SearchSubmitCallback } callback - callback of the listened event. - * @returns { SearchAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - onSubmit(callback: Callback | SearchSubmitCallback): SearchAttribute; - /** * Call the function when editing the input text * @@ -1376,8 +1289,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onChange(callback: EditableTextOnChangeCallback): SearchAttribute; @@ -1409,8 +1321,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onTextSelectionChange(callback: OnTextSelectionChangeCallback): SearchAttribute; @@ -1442,8 +1353,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onContentScroll(callback: OnContentScrollCallback): SearchAttribute; @@ -1483,8 +1393,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onCopy(callback: Callback): SearchAttribute; @@ -1524,8 +1433,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onCut(callback: Callback): SearchAttribute; @@ -1568,8 +1476,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onPaste(callback: OnPasteCallback): SearchAttribute; @@ -1604,8 +1511,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ copyOption(value: CopyOptions): SearchAttribute; @@ -1645,7 +1551,6 @@ declare class SearchAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ maxLength(value: number): SearchAttribute; @@ -1678,8 +1583,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ textAlign(value: TextAlign): SearchAttribute; @@ -1704,8 +1608,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ enableKeyboardOnFocus(value: boolean): SearchAttribute; @@ -1733,8 +1636,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ selectionMenuHidden(value: boolean): SearchAttribute; @@ -1752,8 +1654,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ minFontSize(value: number | string | Resource): SearchAttribute; @@ -1771,8 +1672,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ maxFontSize(value: number | string | Resource): SearchAttribute; @@ -1810,7 +1710,6 @@ declare class SearchAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ minFontScale(scale: Optional): SearchAttribute; @@ -1846,7 +1745,6 @@ declare class SearchAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ maxFontScale(scale: Optional): SearchAttribute; @@ -1891,8 +1789,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ customKeyboard(value: CustomBuilder, options?: KeyboardOptions): SearchAttribute; @@ -1904,8 +1801,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ decoration(value: TextDecorationOptions): SearchAttribute; @@ -1924,8 +1820,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ letterSpacing(value: number | string | Resource): SearchAttribute; @@ -1942,8 +1837,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ lineHeight(value: number | string | Resource): SearchAttribute; @@ -1964,8 +1858,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ type(value: SearchType): SearchAttribute; @@ -1981,8 +1874,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontFeature(value: string): SearchAttribute; @@ -2000,8 +1892,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onWillInsert(callback: Callback): SearchAttribute; @@ -2017,8 +1908,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onDidInsert(callback: Callback): SearchAttribute; @@ -2036,8 +1926,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onWillDelete(callback: Callback): SearchAttribute; @@ -2053,8 +1942,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onDidDelete(callback: Callback): SearchAttribute; @@ -2080,8 +1968,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ editMenuOptions(editMenu: EditMenuOptions): SearchAttribute; @@ -2098,8 +1985,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enablePreviewText(enable: boolean): SearchAttribute; @@ -2123,8 +2009,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'13', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ enableHapticFeedback(isEnabled: boolean): SearchAttribute; @@ -2137,7 +2022,6 @@ declare class SearchAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ autoCapitalizationMode(mode: AutoCapitalizationMode): SearchAttribute; @@ -2149,8 +2033,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ halfLeading(halfLeading: Optional): SearchAttribute; @@ -2161,8 +2044,7 @@ declare class SearchAttribute extends CommonMethod { * @returns { SearchAttribute } returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ stopBackPress(isStopped: Optional): SearchAttribute; @@ -2179,8 +2061,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ onWillChange(callback: Callback): SearchAttribute; @@ -2191,8 +2072,7 @@ declare class SearchAttribute extends CommonMethod { * @returns { SearchAttribute } returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ keyboardAppearance(appearance: Optional): SearchAttribute; diff --git a/api/@internal/component/ets/span.d.ts b/api/@internal/component/ets/span.d.ts index 8646766bc0..cdeb16157e 100644 --- a/api/@internal/component/ets/span.d.ts +++ b/api/@internal/component/ets/span.d.ts @@ -18,15 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { ResourceColor, Dimension, BorderRadiuses, Length, Font } from './units'; -import { CommonMethod, ShadowOptions } from './common'; -import { LengthMetrics } from './../Graphics'; -import { Resource } from './../../../api/global/resource'; -import { FontStyle, FontWeight, TextCase } from './enums'; -import { DecorationStyleInterface } from './styledString'; -/*** endif */ - /** * Define the background style of span. * @@ -42,8 +33,7 @@ import { DecorationStyleInterface } from './styledString'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface TextBackgroundStyle { /** @@ -61,8 +51,7 @@ declare interface TextBackgroundStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ color?: ResourceColor; @@ -81,8 +70,7 @@ declare interface TextBackgroundStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ radius?: Dimension | BorderRadiuses; } @@ -102,8 +90,7 @@ declare interface TextBackgroundStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class BaseSpan extends CommonMethod { /** @@ -123,8 +110,7 @@ declare class BaseSpan extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ textBackgroundStyle(style: TextBackgroundStyle): T; @@ -136,8 +122,7 @@ declare class BaseSpan extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ baselineOffset(value: LengthMetrics): T; } @@ -174,8 +159,7 @@ declare class BaseSpan extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface SpanInterface { /** @@ -214,8 +198,7 @@ interface SpanInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (value: string | Resource): SpanAttribute; } @@ -244,8 +227,7 @@ interface SpanInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class SpanAttribute extends BaseSpan { /** @@ -264,8 +246,7 @@ declare class SpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ font(value: Font): SpanAttribute; @@ -305,8 +286,7 @@ declare class SpanAttribute extends BaseSpan { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontColor(value: ResourceColor): SpanAttribute; @@ -346,8 +326,7 @@ declare class SpanAttribute extends BaseSpan { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontSize(value: number | string | Resource): SpanAttribute; @@ -387,8 +366,7 @@ declare class SpanAttribute extends BaseSpan { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontStyle(value: FontStyle): SpanAttribute; @@ -443,20 +421,6 @@ declare class SpanAttribute extends BaseSpan { */ fontWeight(value: number | FontWeight | ResourceStr): SpanAttribute; - /** - * Called when the font weight is set. - * - * @param { number | FontWeight | string } value - * @returns { SpanAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - fontWeight(value: number | FontWeight | string): SpanAttribute; - /** * Called when the font list of text is set. * @@ -493,8 +457,7 @@ declare class SpanAttribute extends BaseSpan { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontFamily(value: string | Resource): SpanAttribute; @@ -545,8 +508,7 @@ declare class SpanAttribute extends BaseSpan { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ decoration(value: DecorationStyleInterface): SpanAttribute; @@ -601,20 +563,6 @@ declare class SpanAttribute extends BaseSpan { */ letterSpacing(value: number | ResourceStr): SpanAttribute; - /** - * Called when the distance between text fonts is set. - * - * @param { number | string } value - * @returns { SpanAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - letterSpacing(value: number | string): SpanAttribute; - /** * Called when the type of letter in the text font is set. * @@ -651,8 +599,7 @@ declare class SpanAttribute extends BaseSpan { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ textCase(value: TextCase): SpanAttribute; @@ -672,8 +619,7 @@ declare class SpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ lineHeight(value: Length): SpanAttribute; @@ -694,8 +640,7 @@ declare class SpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ textShadow(value: ShadowOptions | Array): SpanAttribute; } diff --git a/api/@internal/component/ets/symbol_span.d.ts b/api/@internal/component/ets/symbol_span.d.ts index d78fc42c8c..c11965a765 100644 --- a/api/@internal/component/ets/symbol_span.d.ts +++ b/api/@internal/component/ets/symbol_span.d.ts @@ -18,14 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { Resource } from './../../../api/global/resource'; -import { CommonMethod, AttributeModifier } from './common'; -import { ResourceColor } from './units'; -import { FontWeight } from './enums'; -import { SymbolEffectStrategy, SymbolRenderingStrategy } from './symbolglyph'; -/*** endif */ - /** * Provides an interface for SymbolSpan. * @@ -51,7 +43,6 @@ import { SymbolEffectStrategy, SymbolRenderingStrategy } from './symbolglyph'; * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ interface SymbolSpanInterface { /** @@ -82,7 +73,6 @@ interface SymbolSpanInterface { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ (value: Resource): SymbolSpanAttribute; } @@ -112,7 +102,6 @@ interface SymbolSpanInterface { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ declare class SymbolSpanAttribute extends CommonMethod { /** @@ -143,7 +132,6 @@ declare class SymbolSpanAttribute extends CommonMethod { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ fontSize(value: number | string | Resource): SymbolSpanAttribute; @@ -175,7 +163,6 @@ declare class SymbolSpanAttribute extends CommonMethod { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ fontColor(value: Array): SymbolSpanAttribute; @@ -207,7 +194,6 @@ declare class SymbolSpanAttribute extends CommonMethod { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ fontWeight(value: number | FontWeight | string): SymbolSpanAttribute; @@ -239,7 +225,6 @@ declare class SymbolSpanAttribute extends CommonMethod { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ effectStrategy(value: SymbolEffectStrategy): SymbolSpanAttribute; @@ -271,7 +256,6 @@ declare class SymbolSpanAttribute extends CommonMethod { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ renderingStrategy(value: SymbolRenderingStrategy): SymbolSpanAttribute; @@ -293,7 +277,6 @@ declare class SymbolSpanAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ attributeModifier(modifier: AttributeModifier): SymbolSpanAttribute; } diff --git a/api/@internal/component/ets/text_area.d.ts b/api/@internal/component/ets/text_area.d.ts index 89c7e073de..90fefc9c45 100644 --- a/api/@internal/component/ets/text_area.d.ts +++ b/api/@internal/component/ets/text_area.d.ts @@ -18,20 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { KeyboardOptions, PasteEvent } from './richEditor'; -import { CaretStyle, DeleteValue, EditMenuOptions, EditableTextOnChangeCallback, InsertValue, - AutoCapitalizationMode,EditableTextChangeValue,KeyboardAppearance } from './textCommon'; -import { BarState, CopyOptions, FontStyle, FontWeight, LineBreakStrategy, TextContentStyle, TextAlign, TextOverflow, - TextHeightAdaptivePolicy, WordBreak, EllipsisMode } from './enums'; -import { EnterKeyType, SubmitEvent, ContentType } from './textInput'; -import { Dimension, Font, Length, LengthMetrics, ResourceColor, ResourceStr } from './units'; -import { InputCounterOptions, TextContentControllerBase, SelectionOptions, - TextDecorationOptions, CommonMethod, Callback, Optional, Bindable } from './common'; -import { CustomBuilder } from './builder'; -import { Resource } from '../../global/resource'; -/*** endif */ - /** * Provides the method of switching the cursor position. * @@ -53,8 +39,7 @@ import { Resource } from '../../global/resource'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class TextAreaController extends TextContentControllerBase { /** @@ -77,8 +62,7 @@ declare class TextAreaController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ constructor(); @@ -104,8 +88,7 @@ declare class TextAreaController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ caretPosition(value: number): void; @@ -149,8 +132,7 @@ declare class TextAreaController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ setTextSelection(selectionStart: number, selectionEnd: number, options?: SelectionOptions): void; @@ -167,8 +149,7 @@ declare class TextAreaController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ stopEditing(): void; } @@ -195,8 +176,7 @@ declare class TextAreaController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface TextAreaOptions { /** @@ -227,8 +207,7 @@ declare interface TextAreaOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ placeholder?: ResourceStr; @@ -263,18 +242,6 @@ declare interface TextAreaOptions { */ text?: ResourceStr; - /** - * Sets the current value of TextArea. - * - * @type { ?(ResourceStr | Bindable | Bindable | Bindable) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - text?: ResourceStr | Bindable | Bindable | Bindable; - /** * Called when the position of the insertion cursor is set. * @@ -297,8 +264,7 @@ declare interface TextAreaOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ controller?: TextAreaController; } @@ -325,8 +291,7 @@ declare interface TextAreaOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface TextAreaInterface { /** @@ -354,8 +319,7 @@ interface TextAreaInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (value?: TextAreaOptions): TextAreaAttribute; } @@ -375,8 +339,7 @@ interface TextAreaInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum TextAreaType { /** @@ -392,8 +355,7 @@ declare enum TextAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NORMAL = 0, @@ -410,8 +372,7 @@ declare enum TextAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NUMBER = 2, @@ -429,8 +390,7 @@ declare enum TextAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PHONE_NUMBER = 3, @@ -448,8 +408,7 @@ declare enum TextAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ EMAIL = 5, @@ -459,8 +418,7 @@ declare enum TextAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NUMBER_DECIMAL = 12, @@ -470,8 +428,7 @@ declare enum TextAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ URL = 13, @@ -495,8 +452,7 @@ declare enum TextAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ declare type TextAreaSubmitCallback = (enterKeyType: EnterKeyType, event?: SubmitEvent) => void; @@ -522,8 +478,7 @@ declare type TextAreaSubmitCallback = (enterKeyType: EnterKeyType, event?: Submi * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class TextAreaAttribute extends CommonMethod { /** @@ -551,8 +506,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ placeholderColor(value: ResourceColor): TextAreaAttribute; @@ -582,8 +536,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ placeholderFont(value: Font): TextAreaAttribute; @@ -604,8 +557,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enterKeyType(value: EnterKeyType): TextAreaAttribute; @@ -645,8 +597,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ textAlign(value: TextAlign): TextAreaAttribute; @@ -679,8 +630,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ caretColor(value: ResourceColor): TextAreaAttribute; @@ -709,8 +659,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontColor(value: ResourceColor): TextAreaAttribute; @@ -741,8 +690,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontSize(value: Length): TextAreaAttribute; @@ -771,8 +719,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontStyle(value: FontStyle): TextAreaAttribute; @@ -793,7 +740,7 @@ declare class TextAreaAttribute extends CommonMethod { * @crossplatform * @since 10 */ - /** + /** * Called when the font weight is set. * *

NOTE: @@ -820,7 +767,6 @@ declare class TextAreaAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ fontWeight(value: number | FontWeight | ResourceStr): TextAreaAttribute; @@ -854,8 +800,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontFamily(value: ResourceStr): TextAreaAttribute; @@ -876,8 +821,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ textOverflow(value: TextOverflow): TextAreaAttribute; @@ -889,8 +833,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ textIndent(value: Dimension): TextAreaAttribute; @@ -928,8 +871,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ inputFilter(value: ResourceStr, error?: (value: string) => void): TextAreaAttribute; @@ -941,8 +883,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ caretStyle(value: CaretStyle): TextAreaAttribute; @@ -955,8 +896,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ selectedBackgroundColor(value: ResourceColor): TextAreaAttribute; @@ -993,18 +933,6 @@ declare class TextAreaAttribute extends CommonMethod { * @since 14 */ onSubmit(callback: TextAreaSubmitCallback): TextAreaAttribute; - /** - * Called when submitted. - * - * @param { ((enterKey: EnterKeyType) => void) | TextAreaSubmitCallback } callback - callback of the listened event. - * @returns { TextAreaAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - onSubmit(callback: ((enterKey: EnterKeyType) => void) | TextAreaSubmitCallback): TextAreaAttribute; /** * Called when the input changes. @@ -1047,8 +975,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onChange(callback: EditableTextOnChangeCallback): TextAreaAttribute; @@ -1070,8 +997,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onTextSelectionChange(callback: (selectionStart: number, selectionEnd: number) => void): TextAreaAttribute; @@ -1094,8 +1020,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onContentScroll(callback: (totalOffsetX: number, totalOffsetY: number) => void): TextAreaAttribute; @@ -1119,8 +1044,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onEditChange(callback: (isEditing: boolean) => void): TextAreaAttribute; @@ -1149,8 +1073,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onCopy(callback: (value: string) => void): TextAreaAttribute; @@ -1179,8 +1102,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onCut(callback: (value: string) => void): TextAreaAttribute; @@ -1212,8 +1134,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onPaste(callback: (value: string, event: PasteEvent) => void): TextAreaAttribute; @@ -1248,8 +1169,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ copyOption(value: CopyOptions): TextAreaAttribute; @@ -1270,8 +1190,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ enableKeyboardOnFocus(value: boolean): TextAreaAttribute; @@ -1297,8 +1216,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ maxLength(value: number): TextAreaAttribute; @@ -1337,8 +1255,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ showCounter(value: boolean, options?: InputCounterOptions): TextAreaAttribute; @@ -1362,8 +1279,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ style(value: TextContentStyle): TextAreaAttribute; @@ -1382,8 +1298,7 @@ declare class TextAreaAttribute extends CommonMethod { * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ barState(value: BarState): TextAreaAttribute; @@ -1413,8 +1328,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ selectionMenuHidden(value: boolean): TextAreaAttribute; @@ -1432,8 +1346,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ minFontSize(value: number | string | Resource): TextAreaAttribute; @@ -1451,8 +1364,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ maxFontSize(value: number | string | Resource): TextAreaAttribute; @@ -1490,7 +1402,6 @@ declare class TextAreaAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ minFontScale(scale: Optional): TextAreaAttribute; @@ -1524,7 +1435,6 @@ declare class TextAreaAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ maxFontScale(scale: Optional): TextAreaAttribute; @@ -1555,8 +1465,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ heightAdaptivePolicy(value: TextHeightAdaptivePolicy): TextAreaAttribute; @@ -1588,8 +1497,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ maxLines(value: number): TextAreaAttribute; @@ -1632,8 +1540,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ wordBreak(value: WordBreak): TextAreaAttribute; @@ -1649,8 +1556,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ lineBreakStrategy(strategy: LineBreakStrategy): TextAreaAttribute; @@ -1695,8 +1601,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ customKeyboard(value: CustomBuilder, options?: KeyboardOptions): TextAreaAttribute; @@ -1708,8 +1613,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ decoration(value: TextDecorationOptions): TextAreaAttribute; @@ -1728,8 +1632,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ letterSpacing(value: number | string | Resource): TextAreaAttribute; @@ -1745,8 +1648,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ lineSpacing(value: LengthMetrics): TextAreaAttribute; @@ -1776,8 +1678,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ lineHeight(value: number | string | Resource): TextAreaAttribute; @@ -1798,8 +1699,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ type(value: TextAreaType): TextAreaAttribute; @@ -1810,8 +1710,7 @@ declare class TextAreaAttribute extends CommonMethod { * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enableAutoFill(value: boolean): TextAreaAttribute; @@ -1822,8 +1721,7 @@ declare class TextAreaAttribute extends CommonMethod { * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ contentType(contentType: ContentType): TextAreaAttribute; @@ -1839,8 +1737,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontFeature(value: string): TextAreaAttribute; @@ -1858,8 +1755,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onWillInsert(callback: Callback): TextAreaAttribute; @@ -1875,8 +1771,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onDidInsert(callback: Callback): TextAreaAttribute; @@ -1894,8 +1789,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onWillDelete(callback: Callback): TextAreaAttribute; @@ -1911,8 +1805,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onDidDelete(callback: Callback): TextAreaAttribute; @@ -1926,8 +1819,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ editMenuOptions(editMenu: EditMenuOptions): TextAreaAttribute; @@ -1944,8 +1836,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enablePreviewText(enable: boolean): TextAreaAttribute; @@ -1969,8 +1860,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ enableHapticFeedback(isEnabled: boolean): TextAreaAttribute; @@ -1983,7 +1873,6 @@ declare class TextAreaAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ autoCapitalizationMode(mode: AutoCapitalizationMode): TextAreaAttribute; @@ -1995,8 +1884,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ halfLeading(halfLeading: Optional): TextAreaAttribute; @@ -2014,8 +1902,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ ellipsisMode(mode: Optional): TextAreaAttribute; @@ -2026,8 +1913,7 @@ declare class TextAreaAttribute extends CommonMethod { * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ stopBackPress(isStopped: Optional): TextAreaAttribute; @@ -2044,8 +1930,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ onWillChange(callback: Callback): TextAreaAttribute; @@ -2056,8 +1941,7 @@ declare class TextAreaAttribute extends CommonMethod { * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ keyboardAppearance(appearance: Optional): TextAreaAttribute; diff --git a/api/@internal/component/ets/text_input.d.ts b/api/@internal/component/ets/text_input.d.ts index 0db6fdf2b3..cd6888ae55 100644 --- a/api/@internal/component/ets/text_input.d.ts +++ b/api/@internal/component/ets/text_input.d.ts @@ -18,18 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CancelButtonSymbolOptions, CancelButtonOptions } from "./search"; -import { Callback, CommonMethod, TextContentControllerBase, SelectionOptions, InputCounterOptions, TextDecorationOptions, Optional, Bindable} from "./common"; -import { CustomBuilder } from './builder'; -import { BarState, LineBreakStrategy, TextAlign, FontStyle, FontWeight, WordBreak, TextOverflow, - CopyOptions, TextHeightAdaptivePolicy, TextContentStyle, EllipsisMode } from './enums'; -import { Resource, ResourceStr, ResourceColor, Dimension, Font, Length } from './units'; -import { InsertValue, DeleteValue, CaretStyle, EditableTextOnChangeCallback, EditMenuOptions, - AutoCapitalizationMode,EditableTextChangeValue,KeyboardAppearance } from "./textCommon"; -import { KeyboardOptions, PasteEvent } from "./richEditor"; -/*** endif */ - /** * Declare the type of input box * @@ -52,8 +40,7 @@ import { KeyboardOptions, PasteEvent } from "./richEditor"; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum InputType { /** @@ -75,8 +62,7 @@ declare enum InputType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Normal, @@ -99,8 +85,7 @@ declare enum InputType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Number, @@ -123,8 +108,7 @@ declare enum InputType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ PhoneNumber, @@ -152,8 +136,7 @@ declare enum InputType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Email, @@ -184,8 +167,7 @@ declare enum InputType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Password, @@ -209,8 +191,7 @@ declare enum InputType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NUMBER_PASSWORD = 8, @@ -219,8 +200,7 @@ declare enum InputType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ SCREEN_LOCK_PASSWORD = 9, @@ -239,8 +219,7 @@ declare enum InputType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ USER_NAME = 10, @@ -262,8 +241,7 @@ declare enum InputType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NEW_PASSWORD = 11, @@ -277,8 +255,7 @@ declare enum InputType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ NUMBER_DECIMAL = 12, @@ -288,8 +265,7 @@ declare enum InputType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ URL = 13, @@ -309,8 +285,7 @@ declare enum InputType { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum ContentType { /** @@ -319,8 +294,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ USER_NAME = 0, @@ -330,8 +304,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PASSWORD = 1, @@ -341,8 +314,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NEW_PASSWORD = 2, @@ -353,8 +325,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ FULL_STREET_ADDRESS = 3, @@ -365,8 +336,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ HOUSE_NUMBER = 4, @@ -377,8 +347,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ DISTRICT_ADDRESS = 5, @@ -389,8 +358,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ CITY_ADDRESS = 6, @@ -401,8 +369,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PROVINCE_ADDRESS = 7, @@ -413,8 +380,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ COUNTRY_ADDRESS = 8, @@ -425,8 +391,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PERSON_FULL_NAME = 9, @@ -437,8 +402,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PERSON_LAST_NAME = 10, @@ -449,8 +413,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PERSON_FIRST_NAME = 11, @@ -461,8 +424,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PHONE_NUMBER = 12, @@ -473,8 +435,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PHONE_COUNTRY_CODE = 13, @@ -485,8 +446,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ FULL_PHONE_NUMBER = 14, @@ -497,8 +457,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ EMAIL_ADDRESS = 15, @@ -509,8 +468,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ BANK_CARD_NUMBER = 16, @@ -521,8 +479,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ID_CARD_NUMBER = 17, @@ -533,8 +490,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NICKNAME = 23, @@ -545,8 +501,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ DETAIL_INFO_WITHOUT_STREET = 24, @@ -557,8 +512,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ FORMAT_ADDRESS = 25, @@ -569,8 +523,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ PASSPORT_NUMBER = 26, @@ -581,8 +534,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ VALIDITY = 27, @@ -593,8 +545,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ ISSUE_AT = 28, @@ -605,8 +556,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ ORGANIZATION = 29, @@ -617,8 +567,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ TAX_ID = 30, @@ -629,8 +578,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ ADDRESS_CITY_AND_STATE = 31, @@ -640,8 +588,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ FLIGHT_NUMBER = 32, @@ -651,8 +598,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ LICENSE_NUMBER = 33, @@ -662,8 +608,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ LICENSE_FILE_NUMBER = 34, @@ -674,8 +619,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ LICENSE_PLATE = 35, @@ -685,8 +629,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ ENGINE_NUMBER = 36, @@ -696,8 +639,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ LICENSE_CHASSIS_NUMBER = 37 } @@ -724,8 +666,7 @@ declare enum ContentType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum EnterKeyType { /** @@ -747,8 +688,7 @@ declare enum EnterKeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Go = 2, @@ -771,8 +711,7 @@ declare enum EnterKeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Search = 3, @@ -795,8 +734,7 @@ declare enum EnterKeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Send = 4, @@ -819,8 +757,7 @@ declare enum EnterKeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Next = 5, @@ -843,8 +780,7 @@ declare enum EnterKeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Done = 6, @@ -861,8 +797,7 @@ declare enum EnterKeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PREVIOUS = 7, @@ -879,8 +814,7 @@ declare enum EnterKeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NEW_LINE = 8, } @@ -892,8 +826,7 @@ declare enum EnterKeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface UnderlineColor { /** @@ -908,8 +841,7 @@ declare interface UnderlineColor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ typing?: ResourceColor | undefined; /** @@ -924,8 +856,7 @@ declare interface UnderlineColor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ normal?: ResourceColor | undefined; /** @@ -942,8 +873,7 @@ declare interface UnderlineColor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ error?: ResourceColor | undefined; /** @@ -958,8 +888,7 @@ declare interface UnderlineColor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ disable?: ResourceColor | undefined; } @@ -971,8 +900,7 @@ declare interface UnderlineColor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface SubmitEvent { /** @@ -981,8 +909,7 @@ declare interface SubmitEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ keepEditableState(): void; @@ -993,8 +920,7 @@ declare interface SubmitEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ text: string; } @@ -1020,8 +946,7 @@ declare interface SubmitEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class TextInputController extends TextContentControllerBase { /** @@ -1044,8 +969,7 @@ declare class TextInputController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ constructor(); @@ -1076,8 +1000,7 @@ declare class TextInputController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ caretPosition(value: number): void; @@ -1117,8 +1040,7 @@ declare class TextInputController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ setTextSelection(selectionStart: number, selectionEnd: number, options?: SelectionOptions): void; @@ -1135,8 +1057,7 @@ declare class TextInputController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ stopEditing(): void; } @@ -1163,8 +1084,7 @@ declare class TextInputController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface TextInputOptions { /** @@ -1189,8 +1109,7 @@ declare interface TextInputOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ placeholder?: ResourceStr; @@ -1227,18 +1146,6 @@ declare interface TextInputOptions { */ text?: ResourceStr; - /** - * Sets the current value of TextInput. - * - * @type { ?(ResourceStr | Bindable | Bindable | Bindable) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - text?: ResourceStr | Bindable | Bindable | Bindable; - /** * Called when the position of the insertion cursor is set. * @@ -1261,8 +1168,7 @@ declare interface TextInputOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ controller?: TextInputController; } @@ -1289,8 +1195,7 @@ declare interface TextInputOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum TextInputStyle { /** @@ -1317,8 +1222,7 @@ declare enum TextInputStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Default, @@ -1349,8 +1253,7 @@ declare enum TextInputStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Inline } @@ -1377,8 +1280,7 @@ declare enum TextInputStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface TextInputInterface { /** @@ -1406,8 +1308,7 @@ interface TextInputInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (value?: TextInputOptions): TextInputAttribute; } @@ -1426,8 +1327,7 @@ interface TextInputInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface PasswordIcon { /** @@ -1449,8 +1349,7 @@ interface PasswordIcon { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onIconSrc?: string | Resource; @@ -1473,8 +1372,7 @@ interface PasswordIcon { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ offIconSrc?: string | Resource; } @@ -1489,8 +1387,7 @@ interface PasswordIcon { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type OnSubmitCallback = (enterKey: EnterKeyType, event: SubmitEvent) => void; @@ -1504,8 +1401,7 @@ declare type OnSubmitCallback = (enterKey: EnterKeyType, event: SubmitEvent) => * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type OnTextSelectionChangeCallback = (selectionStart: number, selectionEnd: number) => void; @@ -1519,8 +1415,7 @@ declare type OnTextSelectionChangeCallback = (selectionStart: number, selectionE * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type OnContentScrollCallback = (totalOffsetX: number, totalOffsetY: number) => void; @@ -1535,8 +1430,7 @@ declare type OnContentScrollCallback = (totalOffsetX: number, totalOffsetY: numb * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type OnPasteCallback = (content: string, event: PasteEvent) => void; @@ -1562,8 +1456,7 @@ declare type OnPasteCallback = (content: string, event: PasteEvent) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class TextInputAttribute extends CommonMethod { /** @@ -1591,8 +1484,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ type(value: InputType): TextInputAttribute; @@ -1603,8 +1495,7 @@ declare class TextInputAttribute extends CommonMethod { * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ contentType(value: ContentType): TextInputAttribute; @@ -1633,8 +1524,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ placeholderColor(value: ResourceColor): TextInputAttribute; @@ -1659,8 +1549,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ textOverflow(value: TextOverflow): TextInputAttribute; @@ -1672,8 +1561,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ textIndent(value: Dimension): TextInputAttribute; @@ -1707,8 +1595,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ placeholderFont(value?: Font): TextInputAttribute; @@ -1737,8 +1624,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ enterKeyType(value: EnterKeyType): TextInputAttribute; @@ -1771,8 +1657,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ caretColor(value: ResourceColor): TextInputAttribute; @@ -1836,8 +1721,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onEditChange(callback: Callback): TextInputAttribute; @@ -1877,8 +1761,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onSubmit(callback: OnSubmitCallback): TextInputAttribute; @@ -1922,8 +1805,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onChange(callback: EditableTextOnChangeCallback): TextInputAttribute; @@ -1955,8 +1837,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onTextSelectionChange(callback: OnTextSelectionChangeCallback): TextInputAttribute; @@ -1988,8 +1869,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onContentScroll(callback: OnContentScrollCallback): TextInputAttribute; @@ -2023,8 +1903,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ maxLength(value: number): TextInputAttribute; @@ -2053,8 +1932,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontColor(value: ResourceColor): TextInputAttribute; @@ -2090,8 +1968,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontSize(value: Length): TextInputAttribute; @@ -2120,8 +1997,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontStyle(value: FontStyle): TextInputAttribute; @@ -2145,6 +2021,15 @@ declare class TextInputAttribute extends CommonMethod { /** * Called when the font weight is set. * + *

NOTE: + *
If the value is too large, the text may be clipped depending on the font. + *
For the number type, the value range is [100, 900], at an interval of 100. + *
The default value is 400. + *
A larger value indicates a heavier font weight. + *
For the string type, only strings that represent a number, for example, "400", + * and the following enumerated values of FontWeight are supported: "bold", "bolder", "lighter", "regular", and "medium". + *

+ * * @param { number | FontWeight | string } value - Default value is FontWeight.Normal. * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -2161,7 +2046,6 @@ declare class TextInputAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ fontWeight(value: number | FontWeight | ResourceStr): TextInputAttribute; @@ -2196,8 +2080,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontFamily(value: ResourceStr): TextInputAttribute; @@ -2250,8 +2133,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ inputFilter(value: ResourceStr, error?: Callback): TextInputAttribute; @@ -2291,8 +2173,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onCopy(callback: Callback): TextInputAttribute; @@ -2332,8 +2213,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onCut(callback: Callback): TextInputAttribute; @@ -2376,8 +2256,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onPaste(callback: OnPasteCallback): TextInputAttribute; @@ -2412,8 +2291,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ copyOption(value: CopyOptions): TextInputAttribute; @@ -2451,8 +2329,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ showPasswordIcon(value: boolean): TextInputAttribute; @@ -2490,8 +2367,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ textAlign(value: TextAlign): TextInputAttribute; @@ -2524,8 +2400,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ style(value: TextInputStyle | TextContentStyle): TextInputAttribute; @@ -2546,8 +2421,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ caretStyle(value: CaretStyle): TextInputAttribute; @@ -2572,8 +2446,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ selectedBackgroundColor(value: ResourceColor): TextInputAttribute; @@ -2594,8 +2467,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ caretPosition(value: number): TextInputAttribute; @@ -2621,8 +2493,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ enableKeyboardOnFocus(value: boolean): TextInputAttribute; @@ -2648,8 +2519,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ passwordIcon(value: PasswordIcon): TextInputAttribute; @@ -2687,8 +2557,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ showError(value?: ResourceStr | undefined): TextInputAttribute; @@ -2712,8 +2581,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ showUnit(value: CustomBuilder): TextInputAttribute; @@ -2738,8 +2606,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ showUnderline(value: boolean): TextInputAttribute; @@ -2758,8 +2625,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ underlineColor(value: ResourceColor | UnderlineColor | undefined): TextInputAttribute; @@ -2791,8 +2657,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ selectionMenuHidden(value: boolean): TextInputAttribute; @@ -2811,8 +2676,7 @@ declare class TextInputAttribute extends CommonMethod { * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ barState(value: BarState): TextInputAttribute; @@ -2833,8 +2697,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ maxLines(value: number): TextInputAttribute; @@ -2853,8 +2716,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ wordBreak(value: WordBreak): TextInputAttribute; @@ -2872,8 +2734,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ lineBreakStrategy(strategy: LineBreakStrategy): TextInputAttribute; @@ -2919,8 +2780,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ customKeyboard(value: CustomBuilder, options?: KeyboardOptions): TextInputAttribute; @@ -2948,8 +2808,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ showCounter(value: boolean, options?: InputCounterOptions): TextInputAttribute; @@ -3006,19 +2865,6 @@ declare class TextInputAttribute extends CommonMethod { */ cancelButton(symbolOptions: CancelButtonSymbolOptions): TextInputAttribute; - /** - * Set the cancel button style - * - * @param { CancelButtonOptions | CancelButtonSymbolOptions } symbolOptions - indicates the style of the cancel button. - * @returns { TextInputAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - cancelButton(symbolOptions: CancelButtonOptions | CancelButtonSymbolOptions): TextInputAttribute; - /** * Sets selection when on focus. * @@ -3040,8 +2886,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ selectAll(value: boolean): TextInputAttribute; @@ -3061,8 +2906,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ minFontSize(value: number | string | Resource): TextInputAttribute; @@ -3082,8 +2926,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ maxFontSize(value: number | string | Resource): TextInputAttribute; @@ -3105,7 +2948,6 @@ declare class TextInputAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ minFontScale(scale: Optional): TextInputAttribute; @@ -3127,7 +2969,6 @@ declare class TextInputAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ maxFontScale(scale: Optional): TextInputAttribute; @@ -3157,8 +2998,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ heightAdaptivePolicy(value: TextHeightAdaptivePolicy): TextInputAttribute; @@ -3177,8 +3017,7 @@ declare class TextInputAttribute extends CommonMethod { * @returns { TextInputAttribute } Returns the instance of the TextInputAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enableAutoFill(value: boolean): TextInputAttribute; @@ -3194,8 +3033,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ decoration(value: TextDecorationOptions): TextInputAttribute; @@ -3216,8 +3054,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ letterSpacing(value: number | string | Resource): TextInputAttribute; @@ -3235,8 +3072,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ lineHeight(value: number | string | Resource): TextInputAttribute; @@ -3259,8 +3095,7 @@ declare class TextInputAttribute extends CommonMethod { * @returns { TextInputAttribute } Returns the instance of the TextInputAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ passwordRules(value: string): TextInputAttribute; @@ -3281,8 +3116,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontFeature(value: string): TextInputAttribute; @@ -3303,8 +3137,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ showPassword(visible: boolean): TextInputAttribute; @@ -3316,8 +3149,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onSecurityStateChange(callback: Callback): TextInputAttribute; @@ -3335,8 +3167,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onWillInsert(callback: Callback): TextInputAttribute; @@ -3352,8 +3183,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onDidInsert(callback: Callback): TextInputAttribute; @@ -3371,8 +3201,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onWillDelete(callback: Callback): TextInputAttribute; @@ -3388,8 +3217,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onDidDelete(callback: Callback): TextInputAttribute; @@ -3415,8 +3243,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ editMenuOptions(editMenu: EditMenuOptions): TextInputAttribute; @@ -3433,8 +3260,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enablePreviewText(enable: boolean): TextInputAttribute; @@ -3446,8 +3272,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ enableHapticFeedback(isEnabled: boolean): TextInputAttribute; @@ -3460,7 +3285,6 @@ declare class TextInputAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ autoCapitalizationMode(mode: AutoCapitalizationMode): TextInputAttribute; @@ -3472,8 +3296,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ halfLeading(halfLeading: Optional): TextInputAttribute; @@ -3485,8 +3308,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ ellipsisMode(mode: Optional): TextInputAttribute; @@ -3497,8 +3319,7 @@ declare class TextInputAttribute extends CommonMethod { * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ stopBackPress(isStopped: Optional): TextInputAttribute; @@ -3510,8 +3331,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ onWillChange(callback: Callback): TextInputAttribute; @@ -3522,8 +3342,7 @@ declare class TextInputAttribute extends CommonMethod { * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ keyboardAppearance(appearance: Optional): TextInputAttribute; diff --git a/api/@ohos.font.d.ets b/api/@ohos.font.d.ets deleted file mode 100644 index 13654ce8ed..0000000000 --- a/api/@ohos.font.d.ets +++ /dev/null @@ -1,798 +0,0 @@ -/* - * Copyright (c) 2022-2024 Shenzhen Kaihong Digital Industry Development 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 - */ -import { Resource } from './global/resource' -/** - * @namespace font - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ -/** - * @namespace font - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ -/** - * @namespace font - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - declare namespace font { - /** - * @typedef FontOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * @typedef FontOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * @typedef FontOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export interface FontOptions { - - /** - * The font name to register. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * The font name to register. - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * The font name to register. - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * The font name to register. - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - familyName: string | Resource; - - /** - * The path of the font file. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * The path of the font file. - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * The path of the font file. - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * The path of the font file. - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - familySrc: string | Resource; - } - - /** - * @typedef FontInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * @typedef FontInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * @typedef FontInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export interface FontInfo { - - /** - * The path of the font file. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * The path of the font file. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * The path of the font file. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - path: string; - - /** - * The name of postscript. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * The name of postscript. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * The name of postscript. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - postScriptName: string; - - /** - * The font name. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * The font name. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * The font name. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - fullName: string; - - /** - * A set of fonts with a common design. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * A set of fonts with a common design. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * A set of fonts with a common design. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - family: string; - - /** - * A subset of the font family. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * A subset of the font family. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * A subset of the font family. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - subfamily: string; - - /** - * The weight of the font. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * The weight of the font. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * The weight of the font. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - weight: number; - - /** - * The width of the font style. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * The width of the font style. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * The width of the font style. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - width: number; - - /** - * Whether it is italic. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Whether it is italic. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Whether it is italic. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - italic: boolean; - - /** - * Whether it is compact. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Whether it is compact. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Whether it is compact. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - monoSpace: boolean; - - /** - * Whether symbol fonts are supported. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Whether symbol fonts are supported. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Whether symbol fonts are supported. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - symbolic: boolean; - } - - /** - * @typedef UIFontConfig - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * @typedef UIFontConfig - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export interface UIFontConfig { - /** - * The paths of system font files. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * The paths of system font files. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - fontDir: Array; - - /** - * The generic font info. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * The generic font info. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - generic: Array; - - /** - * The fallback font info. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * The fallback font info. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - fallbackGroups: Array; - } - - /** - * @typedef UIFontGenericInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * @typedef UIFontGenericInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export interface UIFontGenericInfo { - /** - * Name of the font set. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Name of the font set. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - family: string; - - /** - * Alias info of the font set. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Alias info of the font set. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - alias: Array; - - /** - * Adjust info of the font set. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Adjust info of the font set. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - adjust: Array; - } - - /** - * @typedef UIFontAliasInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * @typedef UIFontAliasInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export interface UIFontAliasInfo { - /** - * Font set name. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Font set name. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - name: string; - - /** - * Weight the font set contains only fonts with, if weight = 0, - * this font set can contain fonts with any weight. - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Weight the font set contains only fonts with, if weight = 0, - * this font set can contain fonts with any weight. - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - weight: number; - } - - /** - * @typedef UIFontAdjustInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * @typedef UIFontAdjustInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export interface UIFontAdjustInfo { - /** - * Original weight of the font - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Original weight of the font - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - weight: number; - /** - * Font weight displayed in the app - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Font weight displayed in the app - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - to: number; - } - - /** - * @typedef UIFontFallbackGroupInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * @typedef UIFontFallbackGroupInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export interface UIFontFallbackGroupInfo { - /** - * Indicates which font set uses following list for fallback font - * if the font set name is "", it means that the following list can be fallback font for all font sets. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Indicates which font set uses following list for fallback font - * if the font set name is "", it means that the following list can be fallback font for all font sets. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - fontSetName: string; - - /** - * Fallback font list related. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Fallback font list related. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - fallback: Array; - } - - /** - * @typedef UIFontFallbackInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * @typedef UIFontFallbackInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export interface UIFontFallbackInfo { - /** - * Language that font set support. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Language that font set support. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - language: string; - - /** - * Font name related. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Font name related. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - family: string; - } - - /** - * Register a customized font in the FontManager. - * - * @param { FontOptions } options - FontOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Register a customized font in the FontManager. - * - * @param { FontOptions } options - FontOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Register a customized font in the FontManager. - * - * @param { FontOptions } options - FontOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export function registerFont(options: FontOptions): void; - - /** - * Gets a list of fonts supported by system. - * - * @returns { Array } A list of font names - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Gets a list of fonts supported by system. - * - * @returns { Array } A list of font names - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Gets a list of fonts supported by system. - * - * @returns { Array } A list of font names - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export function getSystemFontList(): Array; - - /** - * Get font details according to the font name. - * - * @param { string } fontName - font name - * @returns { FontInfo } Returns the font info - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Get font details according to the font name. - * - * @param { string } fontName - font name - * @returns { FontInfo } Returns the font info - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Get font details according to the font name. - * - * @param { string } fontName - font name - * @returns { FontInfo } Returns the font info - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export function getFontByName(fontName: string): FontInfo; - - /** - * Get font details according to the font name. - * - * @returns { UIFontConfig } Returns the ui font config - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Get font details according to the font name. - * - * @returns { UIFontConfig } Returns the ui font config - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export function getUIFontConfig(): UIFontConfig; -} - -export default font; \ No newline at end of file diff --git a/api/@ohos.font.d.ts b/api/@ohos.font.d.ts index 3bddff9027..4a8422fd69 100644 --- a/api/@ohos.font.d.ts +++ b/api/@ohos.font.d.ts @@ -17,9 +17,6 @@ * @file * @kit ArkUI */ -/*** if arkts 1.2 */ -import { Resource } from './global/resource' -/*** endif */ /** * @namespace font @@ -37,8 +34,7 @@ import { Resource } from './global/resource' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare namespace font { /** @@ -57,8 +53,7 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface FontOptions { @@ -91,8 +86,7 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ familyName: string | Resource; @@ -125,8 +119,7 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ familySrc: string | Resource; } @@ -147,8 +140,7 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface FontInfo { @@ -174,8 +166,7 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ path: string; @@ -201,8 +192,7 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ postScriptName: string; @@ -228,8 +218,7 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fullName: string; @@ -255,8 +244,7 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ family: string; @@ -282,8 +270,7 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ subfamily: string; @@ -309,8 +296,7 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ weight: number; @@ -336,8 +322,7 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ width: number; @@ -363,8 +348,7 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ italic: boolean; @@ -390,8 +374,7 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ monoSpace: boolean; @@ -417,8 +400,7 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ symbolic: boolean; } @@ -432,8 +414,7 @@ declare namespace font { * @typedef UIFontConfig * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface UIFontConfig { /** @@ -447,8 +428,7 @@ declare namespace font { * @type { Array } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontDir: Array; @@ -463,8 +443,7 @@ declare namespace font { * @type { Array } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ generic: Array; @@ -479,8 +458,7 @@ declare namespace font { * @type { Array } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fallbackGroups: Array; } @@ -494,8 +472,7 @@ declare namespace font { * @typedef UIFontGenericInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface UIFontGenericInfo { /** @@ -509,8 +486,7 @@ declare namespace font { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ family: string; @@ -525,8 +501,7 @@ declare namespace font { * @type { Array } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ alias: Array; @@ -541,8 +516,7 @@ declare namespace font { * @type { Array } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ adjust: Array; } @@ -556,8 +530,7 @@ declare namespace font { * @typedef UIFontAliasInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface UIFontAliasInfo { /** @@ -571,8 +544,7 @@ declare namespace font { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ name: string; @@ -589,8 +561,7 @@ declare namespace font { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ weight: number; } @@ -604,8 +575,7 @@ declare namespace font { * @typedef UIFontAdjustInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface UIFontAdjustInfo { /** @@ -619,8 +589,7 @@ declare namespace font { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ weight: number; /** @@ -634,8 +603,7 @@ declare namespace font { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ to: number; } @@ -649,8 +617,7 @@ declare namespace font { * @typedef UIFontFallbackGroupInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface UIFontFallbackGroupInfo { /** @@ -666,8 +633,7 @@ declare namespace font { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontSetName: string; @@ -682,8 +648,7 @@ declare namespace font { * @type { Array } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fallback: Array; } @@ -697,8 +662,7 @@ declare namespace font { * @typedef UIFontFallbackInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface UIFontFallbackInfo { /** @@ -712,8 +676,7 @@ declare namespace font { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ language: string; @@ -728,8 +691,7 @@ declare namespace font { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ family: string; } @@ -834,8 +796,7 @@ declare namespace font { * @returns { UIFontConfig } Returns the ui font config * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ function getUIFontConfig(): UIFontConfig; } diff --git a/api/@ohos.font.static.d.ets b/api/@ohos.font.static.d.ets new file mode 100644 index 0000000000..d8b9c96ab6 --- /dev/null +++ b/api/@ohos.font.static.d.ets @@ -0,0 +1,290 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development 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 { Resource } from './global/resource'; + +/** + * @namespace font + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +declare namespace font { + /** + * @typedef FontOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interface FontOptions { + /** + * The font name to register. + * + * @type { string | Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + familyName: string | Resource; + + /** + * The path of the font file. + * + * @type { string | Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + familySrc: string | Resource; + } + /** + * @typedef FontInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interface FontInfo { + /** + * The path of the font file. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + path: string; + /** + * The name of postscript. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + postScriptName: string; + /** + * The font name. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fullName: string; + /** + * A set of fonts with a common design. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + family: string; + /** + * A subset of the font family. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + subfamily: string; + /** + * The weight of the font. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + weight: number; + /** + * The width of the font style. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + width: number; + /** + * Whether it is italic. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + italic: boolean; + /** + * Whether it is compact. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + monoSpace: boolean; + /** + * Whether symbol fonts are supported. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + symbolic: boolean; + } + /** + * @typedef UIFontConfig + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interface UIFontConfig { + /** + * The paths of system font files. + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontDir: Array; + /** + * The generic font info. + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + generic: Array; + /** + * The fallback font info. + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fallbackGroups: Array; + } + /** + * @typedef UIFontGenericInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interface UIFontGenericInfo { + /** + * Name of the font set. + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + family: string; + /** + * Alias info of the font set. + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + alias: Array; + /** + * Adjust info of the font set. + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + adjust: Array; + } + /** + * @typedef UIFontAliasInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interface UIFontAliasInfo { + /** + * Font set name. + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + name: string; + /** + * Weight the font set contains only fonts with, if weight = 0, + * this font set can contain fonts with any weight. + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + weight: number; + } + /** + * @typedef UIFontAdjustInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interface UIFontAdjustInfo { + /** + * Original weight of the font + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + weight: number; + /** + * Font weight displayed in the app + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + to: number; + } + /** + * @typedef UIFontFallbackGroupInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interface UIFontFallbackGroupInfo { + /** + * Indicates which font set uses following list for fallback font + * if the font set name is "", it means that the following list can be fallback font for all font sets. + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontSetName: string; + /** + * Fallback font list related. + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fallback: Array; + } + /** + * @typedef UIFontFallbackInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interface UIFontFallbackInfo { + /** + * Language that font set support. + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + language: string; + /** + * Font name related. + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + family: string; + } + /** + * Get font details according to the font name. + * + * @returns { UIFontConfig } Returns the ui font config + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + function getUIFontConfig(): UIFontConfig; +} +export default font; diff --git a/api/arkui/ContainerSpanModifier.static.d.ets b/api/arkui/ContainerSpanModifier.static.d.ets new file mode 100644 index 0000000000..f9e827c9a1 --- /dev/null +++ b/api/arkui/ContainerSpanModifier.static.d.ets @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AttributeModifier } from './component/common'; +import { ContainerSpanAttribute } from './component/containerSpan'; + +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ + +/** + * Defines ContainerSpan Modifier + * + * @implements ContainerSpanAttribute, AttributeModifier + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 +*/ +export declare class ContainerSpanModifier implements + ContainerSpanAttribute, AttributeModifier { +} diff --git a/api/arkui/HyperlinkModifier.static.d.ets b/api/arkui/HyperlinkModifier.static.d.ets new file mode 100644 index 0000000000..e6aa93fc79 --- /dev/null +++ b/api/arkui/HyperlinkModifier.static.d.ets @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AttributeModifier } from './component/common'; +import { HyperlinkAttribute } from './component/hyperlink'; + +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ + +/** + * Defines Hyperlink Modifier + * + * @implements HyperlinkAttribute, AttributeModifier + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 +*/ +export declare class HyperlinkModifier implements HyperlinkAttribute, AttributeModifier {} diff --git a/api/arkui/ImageSpanModifier.static.d.ets b/api/arkui/ImageSpanModifier.static.d.ets new file mode 100644 index 0000000000..50c8636ef7 --- /dev/null +++ b/api/arkui/ImageSpanModifier.static.d.ets @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AttributeModifier } from './component/common'; +import { ImageSpanAttribute } from './component/imageSpan'; + +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ + +/** + * Defines TextInput Modifier + * + * @implements ImageSpanAttribute, AttributeModifier + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 +*/ +export declare class ImageSpanModifier implements ImageSpanAttribute, AttributeModifier {} diff --git a/api/arkui/SearchModifier.static.d.ets b/api/arkui/SearchModifier.static.d.ets new file mode 100644 index 0000000000..346c12299c --- /dev/null +++ b/api/arkui/SearchModifier.static.d.ets @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AttributeModifier } from './component/common'; +import { SearchAttribute } from './component/search'; + +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ + +/** + * Defines Search Modifier + * + * @implements SearchAttribute, AttributeModifier + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 +*/ +export declare class SearchModifier implements SearchAttribute, AttributeModifier {} diff --git a/api/arkui/SpanModifier.static.d.ets b/api/arkui/SpanModifier.static.d.ets new file mode 100644 index 0000000000..6d8b3f075c --- /dev/null +++ b/api/arkui/SpanModifier.static.d.ets @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AttributeModifier } from './component/common'; +import { SpanAttribute } from './component/span'; + +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ + +/** + * Defines TextInput Modifier + * + * @implements SpanAttribute, AttributeModifier + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 +*/ +export declare class SpanModifier implements SpanAttribute, AttributeModifier {} diff --git a/api/arkui/SymbolGlyphModifier.d.ets b/api/arkui/SymbolGlyphModifier.static.d.ets similarity index 77% rename from api/arkui/SymbolGlyphModifier.d.ets rename to api/arkui/SymbolGlyphModifier.static.d.ets index c5b662e44e..c5cdb1e8b7 100644 --- a/api/arkui/SymbolGlyphModifier.d.ets +++ b/api/arkui/SymbolGlyphModifier.static.d.ets @@ -12,20 +12,31 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + /** * @file * @kit ArkUI + * @arkts 1.2 */ import { AttributeModifier } from './component/common'; import { SymbolGlyphAttribute } from './component/symbolglyph'; +import { Resource } from '../global/resource'; /** * Defines SymbolGlyph Modifier * * @implements SymbolGlyphAttribute, AttributeModifier * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ -export declare class SymbolGlyphModifier implements SymbolGlyphAttribute, AttributeModifier {} +export declare class SymbolGlyphModifier implements SymbolGlyphAttribute, AttributeModifier { + /** + * constructor + * + * @param { Resource } [src] + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(src?: Resource); +} diff --git a/api/arkui/SymbolSpanModifier.static.d.ets b/api/arkui/SymbolSpanModifier.static.d.ets new file mode 100644 index 0000000000..1e6849d434 --- /dev/null +++ b/api/arkui/SymbolSpanModifier.static.d.ets @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AttributeModifier } from './component/common'; +import { SymbolSpanAttribute } from './component/symbolSpan'; + +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ + +/** + * Defines ContainerSpan Modifier + * + * @implements SymbolSpanAttribute, AttributeModifier + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 +*/ +export declare class SymbolSpanModifier implements SymbolSpanAttribute, AttributeModifier {} diff --git a/api/arkui/TextAreaModifier.static.d.ets b/api/arkui/TextAreaModifier.static.d.ets new file mode 100644 index 0000000000..7a6e742c7f --- /dev/null +++ b/api/arkui/TextAreaModifier.static.d.ets @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AttributeModifier } from './component/common'; +import { TextAreaAttribute } from './component/textArea'; + +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ + +/** + * Defines TextArea Modifier + * + * @implements TextAreaAttribute, AttributeModifier + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 +*/ +export declare class TextAreaModifier implements TextAreaAttribute, AttributeModifier {} diff --git a/api/arkui/TextInputModifier.static.d.ets b/api/arkui/TextInputModifier.static.d.ets new file mode 100644 index 0000000000..386558745d --- /dev/null +++ b/api/arkui/TextInputModifier.static.d.ets @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AttributeModifier } from './component/common'; +import { TextInputAttribute } from './component/textInput'; + +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ + +/** + * Defines TextInput Modifier + * + * @implements TextInputAttribute, AttributeModifier + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 +*/ +export declare class TextInputModifier implements TextInputAttribute, AttributeModifier {} diff --git a/api/arkui/TextModifier.d.ets b/api/arkui/TextModifier.static.d.ets similarity index 93% rename from api/arkui/TextModifier.d.ets rename to api/arkui/TextModifier.static.d.ets index fbbe43b959..a945b4b3f6 100644 --- a/api/arkui/TextModifier.d.ets +++ b/api/arkui/TextModifier.static.d.ets @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * 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 @@ -26,7 +26,6 @@ import { TextAttribute } from './component/text'; * * @implements TextAttribute, AttributeModifier * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ export declare class TextModifier implements TextAttribute, AttributeModifier {} diff --git a/api/arkui/component/containerSpan.static.d.ets b/api/arkui/component/containerSpan.static.d.ets new file mode 100644 index 0000000000..40ba4855bf --- /dev/null +++ b/api/arkui/component/containerSpan.static.d.ets @@ -0,0 +1,66 @@ +/* + * 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 { TextBackgroundStyle } from "./span"; +import { AttributeModifier, CommonMethod } from "./common"; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; + +/** + * Define the ContainerSpan attribute functions. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare interface ContainerSpanAttribute { + /** + * Span background style. + * + * @param { TextBackgroundStyle | undefined } style - The background style of span. + * @returns { ContainerSpanAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default textBackgroundStyle(style: TextBackgroundStyle | undefined): this; + /** + * Sets the attribute modifier. + * + * @param { AttributeModifier | undefined } modifier. + * @returns { ContainerSpanAttribute } the attribute of the ContainerSpanAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default attributeModifier(modifier: AttributeModifier | undefined): this; +} + +/** + * Defines ContainerSpan Component. + * + * @param { function } [content_] + * @returns { ContainerSpanAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@memo +@ComponentBuilder +export declare function ContainerSpan( + @memo + content_?: () => void, +): ContainerSpanAttribute \ No newline at end of file diff --git a/api/arkui/component/hyperlink.static.d.ets b/api/arkui/component/hyperlink.static.d.ets new file mode 100644 index 0000000000..ed2af8e900 --- /dev/null +++ b/api/arkui/component/hyperlink.static.d.ets @@ -0,0 +1,72 @@ +/* + * 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 { Resource } from './../../../api/global/resource'; +import { CommonMethod, AttributeModifier } from "./common"; +import { Color } from "./enums"; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; + +/** + * Defines the hyperlink attribute functions + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare interface HyperlinkAttribute extends CommonMethod { + /** + * Set Color + * + * @param { Color | number | string | Resource } value + * @returns { HyperlinkAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default color(value: Color | number | string | Resource | undefined): this; + /** + * Sets the attribute modifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier. + * @returns { HyperlinkAttribute } the attribute of the HyperlinkAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; +} + +/** + * Defines Hyperlink Component. + * + * @param { string | Resource } address + * @param { string | Resource } [content] + * @param { function } [content_] + * @returns { HyperlinkAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@memo +@ComponentBuilder +export declare function Hyperlink( + address: string | Resource, content?: string | Resource, + @memo + content_?: () => void, +): HyperlinkAttribute \ No newline at end of file diff --git a/api/arkui/component/imageSpan.static.d.ets b/api/arkui/component/imageSpan.static.d.ets new file mode 100644 index 0000000000..aa3cd7e2af --- /dev/null +++ b/api/arkui/component/imageSpan.static.d.ets @@ -0,0 +1,213 @@ +/* + * 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, ColorFilter } from "./units"; +import { BaseSpan } from "./span"; +import { ImageSpanAlignment, ImageFit } from "./enums"; +import { ImageErrorCallback, DrawingColorFilter } from "./image"; +import { PixelMap, AttributeModifier, CommonMethod } from "./common"; +import image from '../../@ohos.multimedia.image'; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; + +/** + * Define the ImageSpan attribute functions. + * + * @extends BaseSpan + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare interface ImageSpanAttribute extends BaseSpan { + /** + * Called when the alignment of image span is set. + * + * @param { ImageSpanAlignment | undefined } value - The alignment type of image span. + * @returns { ImageSpanAttribute } The attribute of the image span. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default verticalAlign(value: ImageSpanAlignment | undefined): this; + /** + * Sets the color filter effect on the image span. + * + * @param { ColorFilter | DrawingColorFilter | undefined } filter ColorFilter object. + * @returns { ImageSpanAttribute } The attribute of the image span. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default colorFilter(filter: ColorFilter | DrawingColorFilter | undefined): this; + /** + * Sets the zoom type of an image. + * + * @param { ImageFit | undefined } value - Image display mode. + * @returns { ImageSpanAttribute } The attribute of the image span. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default objectFit(value: ImageFit | undefined): this; + /** + * Sets a callback which is triggered when the image is successfully loaded. + * The size of the image source that is successfully loaded is returned, in pixels. + * + * @param { ImageCompleteCallback | undefined } callback - Triggered when the image is successfully loaded. + * @returns { ImageSpanAttribute } The attribute of the image span. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onComplete(callback: ImageCompleteCallback | undefined): this; + /** + * Sets a callback which is triggered when an exception occurs during image loading. + * The field of "message" returned in the callback carries the detailed information of failed image loading. + * + * @param { ImageErrorCallback | undefined } callback - Triggered when an exception occurs during image loading. + * @returns { ImageSpanAttribute } The attribute of the image span. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onError(callback: ImageErrorCallback | undefined): this; + /** + * Placeholder displayed on load + * + * @param { PixelMap | undefined } value + * @returns { ImageSpanAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default alt(value: PixelMap | undefined): this; + /** + * Sets the attribute modifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier. + * @returns { ImageSpanAttribute } the attribute of the ImageSpanAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; +} +/** + * Callback function triggered when the image is successfully loaded. + * + * @typedef { function } ImageCompleteCallback + * @param { ImageLoadResult } result - the information about the successfully loaded image. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export type ImageCompleteCallback = (result: ImageLoadResult) => void; +/** + * The information about the successfully loaded image. + * + * @interface ImageLoadResult + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface ImageLoadResult { + /** + * The width of the image source. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + width: number; + /** + * The height of the image source. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + height: number; + /** + * The width of the component source. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + componentWidth: number; + /** + * The height of the component source. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + componentHeight: number; + /** + * The value of the status of the image being loaded successfully. + * If the returned status value is 0, the image data is successfully loaded. + * If the returned status value is 1, the image is successfully decoded. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + loadingStatus: number; + /** + * The width of the picture that is actually drawn. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + contentWidth: number; + /** + * The height of the picture that is actually drawn. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + contentHeight: number; + /** + * The offset between image content and image component on the X-axis. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + contentOffsetX: number; + /** + * The offset between image content and image component on the Y-axis. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + contentOffsetY: number; +} + +/** + * Defines ImageSpan Component. + * + * @param { ResourceStr | PixelMap } value + * @param { function } [content_] + * @returns { ImageSpanAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@memo +@ComponentBuilder +export declare function ImageSpan( + value: ResourceStr | PixelMap, + @memo + content_?: () => void, +): ImageSpanAttribute \ No newline at end of file diff --git a/api/arkui/component/marquee.static.d.ets b/api/arkui/component/marquee.static.d.ets new file mode 100644 index 0000000000..2752783d26 --- /dev/null +++ b/api/arkui/component/marquee.static.d.ets @@ -0,0 +1,254 @@ +/* + * 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 { ResourceColor, Length } from "./units"; +import { CommonMethod, AttributeModifier } from "./common"; +import { FontWeight, MarqueeUpdateStrategy } from "./enums"; +import { Resource } from './../../../api/global/resource'; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; + +/** + * Defines Marquee constructor options. + * + * Anonymous Object Rectification. + * @interface MarqueeOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface MarqueeOptions { + /** + * Control whether the running lamp enters the playing state. + * + * Anonymous Object Rectification. + * + *

NOTE: + *
true: Start scrolling. + *
false: Do not start scrolling. + *
This parameter cannot be used to restart scrolling that has been completed. + *

+ * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + start: boolean; + /** + * Scroll animation text scroll step, when step is larger than the text width of Marquee, take the default value. + * + * Anonymous Object Rectification. + * + *

NOTE: + *
If the value is greater than the text width of the marquee, the default value is used. + *

+ * + * @type { ?number } - The unit is vp. + * @default 6 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + step?: number; + /** + * Set the number of times the scroll is repeated, infinite loop if it is less than or equal to zero. + * + * Anonymous Object Rectification. + * + *

NOTE: + *
If the value is less than or equal to 0, the marquee will scroll continuously. + *
Regardless of the value, the marquee scrolls only once on an ArkTS widget. + *

+ * + * @type { ?number } + * @default -1 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + loop?: number; + /** + * Set text to scroll from the beginning or backward. + * + * Anonymous Object Rectification. + * @type { ?boolean } + * @default true + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fromStart?: boolean; + /** + * Text that needs scrolling. + * + * Anonymous Object Rectification. + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + src: string; +} + +/** + * Declares marquee properties. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare interface MarqueeAttribute extends CommonMethod { + /** + * Set marquee font Color. + * + * @param { ResourceColor | undefined } value + * @returns { MarqueeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default fontColor(value: ResourceColor | undefined): this; + /** + * Set marquee font size. + * + *

NOTE: + *
If fontSize is of the number type, the unit fp is used. The default font size is 16 fp. + *
This parameter cannot be set in percentage. + *

+ * + * @param { Length | undefined } value + * @returns { MarqueeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default fontSize(value: Length | undefined): this; + /** + * Set marquee allow scale. + * + *

NOTE: + *
This parameter is effective only when fontSize is in fp units. + *

+ * + * @param { boolean | undefined } value - Default value is false. + * @returns { MarqueeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default allowScale(value: boolean | undefined): this; + /** + * Set marquee font weight. + * + *

NOTE: + *
If the value is too large, the text may be clipped depending on the font. + *
For the number type, the value range is [100, 900], at an interval of 100. + *
The default value is 400. + *
A larger value indicates a heavier font weight. + *
For the string type, only strings that represent a number, for example, "400", + * and the following enumerated values of FontWeight are supported: "bold", "bolder", "lighter", "regular", and "medium". + *

+ * + * @param { number | FontWeight | string | undefined } value - Default value is FontWeight.Normal. + * @returns { MarqueeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default fontWeight(value: number | FontWeight | string | undefined): this; + /** + * Set marquee font family. + * + *

NOTE: + *
Default font: 'HarmonyOS Sans' + *
The 'HarmonyOS Sans' font and registered custom fonts are supported for applications. + *
Only the 'HarmonyOS Sans' font is supported for widgets. + *

+ * + * @param { string | Resource | undefined } value + * @returns { MarqueeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default fontFamily(value: string | Resource | undefined): this; + /** + * Marquee scrolling strategy after text update. + * + *

NOTE: + *
This attribute takes effect when the marquee is in the playing state + * and the text content width exceeds the width of the marquee component. + *

+ * + * @param { MarqueeUpdateStrategy | undefined } value - The scrolling strategy after text update.Default value is MarqueeUpdateStrategy.DEFAULT. + * @returns { MarqueeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default marqueeUpdateStrategy(value: MarqueeUpdateStrategy | undefined): this; + /** + * Called when scrolling starts. + * + * @param { function | undefined } event + * @returns { MarqueeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onStart(event: (() => void) | undefined): this; + /** + * Called when scrolling to the bottom. + * + *

NOTE: + *
This event will be triggered for multiple times if the loop attribute is not set to 1. + *

+ * + * @param { function | undefined } event + * @returns { MarqueeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onBounce(event: (() => void) | undefined): this; + /** + * Called when scrolling is complete. + * + * @param { function | undefined } event + * @returns { MarqueeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onFinish(event: (() => void) | undefined): this; + /** + * Sets the attribute modifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier. + * @returns { MarqueeAttribute } the attribute of the MarqueeAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; +} + +/** + * Defines Marquee Component. + * + * @param { MarqueeOptions } options + * @param { function } [content_] + * @returns { MarqueeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@memo +@ComponentBuilder +export declare function Marquee( + options: MarqueeOptions, + @memo + content_?: () => void, +): MarqueeAttribute \ No newline at end of file diff --git a/api/arkui/component/search.static.d.ets b/api/arkui/component/search.static.d.ets new file mode 100644 index 0000000000..9ef38d6790 --- /dev/null +++ b/api/arkui/component/search.static.d.ets @@ -0,0 +1,1044 @@ +/* + * 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 { TextContentControllerBase, SelectionOptions, Callback, CommonMethod, Optional, TextDecorationOptions, Bindable, AttributeModifier } from "./common"; +import { CustomBuilder } from './builder'; +import { ResourceStr, Length, ResourceColor, Dimension, Font } from "./units"; +import { CaretStyle, EditableTextOnChangeCallback, InsertValue, DeleteValue, EditMenuOptions, KeyboardAppearance, EditableTextChangeValue, AutoCapitalizationMode } from "./textCommon"; +import { EnterKeyType, OnTextSelectionChangeCallback, OnContentScrollCallback, OnPasteCallback, SubmitEvent } from "./textInput"; +import { CopyOptions, TextAlign } from "./enums"; +import { KeyboardOptions } from "./richEditor"; +import { Resource } from '../../global/resource'; +import { SymbolGlyphModifier } from '../SymbolGlyphModifier'; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; + +/** + * Provides the method of switching the cursor position. + * + * @extends TextContentControllerBase + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class SearchController extends TextContentControllerBase { + /** + * constructor. + * A constructor used to create a SearchController object. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(); + /** + * Called when the position of the insertion cursor is set. + * + * @param { number } value - Length from the start of the character string to the position where the caret is located. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + caretPosition(value: number): void; + /** + * Exit edit state. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + stopEditing(): void; + /** + * Text selection is achieved by specifying the start and end positions of the text. + * + *

NOTE: + *
If selectionStart or selectionEnd is set to undefined, the value 0 will be used. + *
If selectionMenuHidden is set to true or a 2-in-1 device is used, + * calling setTextSelection does not display the context menu even when options is set to MenuPolicy.SHOW. + *
If the selected text contains an emoji, the emoji is selected when its start position is within the text selection range. + *
Sets the text selection range and highlights the selected text when the component is focused. + *
This API works only when the value of selectionStart is less than that of selectionEnd. + *

+ * + * @param { number } selectionStart - The start position of the selected text. + * The start position of text in the text box is 0. + * A value less than 0 is handled as 0. + * A value greater than the maximum text length is handled as the maximum text length. + * @param { number } selectionEnd - The end position of the selected text. + * A value less than 0 is handled as the value 0. + * A value greater than the maximum text length is handled as the maximum text length. + * @param { SelectionOptions } [options] - Indicates the options of the text selection.Default value is MenuPolicy.DEFAULT. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + setTextSelection(selectionStart: number, selectionEnd: number, options?: SelectionOptions): void; +} +/** + * Enum for the style of cancel button + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum CancelButtonStyle { + /** + * The value of button style constant + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + CONSTANT, + /** + * The value of button style invisible + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + INVISIBLE, + /** + * The value of button style input + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + INPUT +} +/** + * Declare the type of search input box + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum SearchType { + /** + * Basic input mode. + * The value can contain digits, letters, underscores (_), spaces, and special characters. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + NORMAL = 0, + /** + * Pure digital input mode. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + NUMBER = 2, + /** + * Phone number entry mode. + * In this mode, the following are allowed: digits, spaces, plus signs (+), hyphens (-), asterisks (*), and number signs (#); + * the length is not limited. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + PHONE_NUMBER = 3, + /** + * E-mail address input mode. + * This mode accepts only digits, letters, underscores (_), dots (.), + * and the following special characters: ! # $ % & ' * + - / = ? ^ ` { | } ~ @ (which can only appear once) + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + EMAIL = 5, + /** + * Number decimal entry mode. + * The value can contain digits and one decimal point. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + NUMBER_DECIMAL = 12, + /** + * URL entry mode. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + URL = 13 +} +/** + * Options used to construct the search. + * + * Anonymous Object Rectification. + * @typedef SearchOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface SearchOptions { + /** + * Text input in the search text box. + * + * @type { ?(string | Bindable)} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + value?: string | Bindable; + /** + * Text displayed when there is no input. + * + * Anonymous Object Rectification. + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + placeholder?: ResourceStr; + /** + * Path to the search icon. + * + * Anonymous Object Rectification. + * + *

NOTE: + *
The icon data source can be a local or online image. + *

    + *
  • The supported formats include PNG, JPG, BMP, SVG, GIF, pixelmap, and HEIF.
  • + *
  • The Base64 string is supported in the following format: + * data:image/[png|jpeg|bmp|webp|heif];base64,[base64 data], where [base64 data] is a Base64 string.
  • + *
+ *
If this attribute and the searchIcon attribute are both set, the searchIcon attribute takes precedence. + *

+ * + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + icon?: string; + /** + * Controller of the component. + * + * Anonymous Object Rectification. + * @type { ?SearchController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + controller?: SearchController; +} +/** + * Defines the icon options + * + * @interface IconOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface IconOptions { + /** + * Set the icon size + * + *

NOTE: + *
It cannot be set in percentage. + *

+ * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + size?: Length; + /** + * Set the icon color + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + color?: ResourceColor; + /** + * Set the icon resource + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + src?: ResourceStr; +} +/** + * Defines the SearchButton options + * + * @interface SearchButtonOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface SearchButtonOptions { + /** + * Set the SearchButton fontSize + * + *

NOTE: + *
It cannot be set in percentage. + *

+ * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontSize?: Length; + /** + * Set the SearchButton fontColor + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontColor?: ResourceColor; + /** + * Automatically disables the search button before the user enters text + * + *

NOTE: + *
true: The search button is disabled when there is no text input. + *
false: The search button remains enabled regardless of the text input. + *

+ * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + autoDisable?: boolean; +} +/** + * Defines the CancelButton options + * + * @interface CancelButtonOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface CancelButtonOptions { + /** + * Set the CancelButton style + * Display state of the Cancel button on the right. + * + * @type { ?CancelButtonStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + style?: CancelButtonStyle; + /** + * Set the CancelButton icon + * Icon of the Cancel button on the right. + * + * @type { ?IconOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + icon?: IconOptions; +} +/** + * Defines the CancelButton symbol options + * + * @interface CancelButtonSymbolOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface CancelButtonSymbolOptions { + /** + * Set the CancelButton style. + * Display state of the Cancel button on the right. + * + * @type { ?CancelButtonStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + style?: CancelButtonStyle; + /** + * Set the CancelButton symbol icon. + * Symbol icon of the Cancel button on the right. + * + * @type { ?SymbolGlyphModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + icon?: SymbolGlyphModifier; +} +/** + * Declare the event listener callback of the enter key. + * + * @typedef { function } SearchSubmitCallback + * @param { string } searchContent - The submitted content of search. + * @param { SubmitEvent } [event] - Provides the method of keeping Search editable state when submitted. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export type SearchSubmitCallback = (searchContent: string, event?: SubmitEvent) => void; +/** + * The attribute function of search + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare interface SearchAttribute extends CommonMethod { + /** + * Set the search button text, fontSize and fontColor + * + * @param { string | undefined } value - indicates the text of the search button. + * @param { SearchButtonOptions | undefined } option - indicates the fontSize and fontColor of the search button. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default searchButton(value: string | undefined, option?: SearchButtonOptions | undefined): this; + /** + * Set the text Color + * + *

NOTE: + *
Universal text attributes fontSize, fontStyle, fontWeight, and fontFamily are set in the textFont attribute. + *

+ * + * @param { ResourceColor | undefined } value - indicates the color of the text.Default value is '#FF182431'.The default value on wearable devices is '#dbffffff'. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default fontColor(value: ResourceColor | undefined): this; + /** + * Set the search icon style + * + *

NOTE: + *
The default icon size on wearable devices is 16 vp. + *
Default value in light mode: + * + * { + * size: '16vp', + * color: '#99182431', + * src: ' ' + * } + * + *
Default value in dark mode: + * + * { + * size: '16vp', + * color: '#99ffffff', + * src: ' ' + * } + * + *

+ * + * @param { IconOptions | SymbolGlyphModifier | undefined } value - indicates the style of the search icon. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default searchIcon(value: IconOptions | SymbolGlyphModifier | undefined): this; + /** + * Set the cancel button style + * + *

NOTE: + *
The default icon size on wearable devices is 18 vp. + *
When style is set to CancelButtonStyle.CONSTANT, the Cancel button is always displayed. + *
Default value: + * + * { + * style: CancelButtonStyle.INPUT, + * icon: { + * size: '16vp', + * color: '#99ffffff', + * src: ' ' + * } + * } + * + *

+ * + * @param { CancelButtonOptions | CancelButtonSymbolOptions | undefined } value - indicates the style of the cancel button. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default cancelButton(value: CancelButtonOptions | CancelButtonSymbolOptions | undefined): this; + /** + * Specify the indentation of the first line in a text-block. + * + * @param { Dimension | undefined } value - The length of text indent.Default value is 0. + * @returns { SearchAttribute } The attribute of the text. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default textIndent(value: Dimension | undefined): this; + /** + * Called when the inputFilter of text is set. + * + *

NOTE: + *
Only inputs that comply with the regular expression can be displayed. + *
Other inputs are filtered out. + *
The specified regular expression can match single characters, but not strings. + *
If inputFilter is set and the entered characters are not null, + * the filtering effect attached to the text box type (specified through the type attribute) does not take effect. + *

+ * + * @param { ResourceStr | undefined } value - Regular expression. + * @param { Callback | undefined } error - Filtered-out content to return when regular expression matching fails. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default inputFilter(value: ResourceStr | undefined, error?: Callback | undefined): this; + /** + * Called when judging whether the text editing change finished. + * The text box is in the editing state when it has the caret placed in it, and is in the non-editing state otherwise. + * + * @param { Callback | undefined } callback - Returns true if the component is in an editing state. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onEditChange(callback: Callback | undefined): this; + /** + * Define the text selected background color of the text input. + * + *

NOTE: + *
If the opacity is not set, a 20% opacity will be used. + *

+ * + * @param { ResourceColor | undefined } value + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default selectedBackgroundColor(value: ResourceColor | undefined): this; + /** + * Set the cursor style + * + *

NOTE: + *
Since API version 12, this API can be used to set the text handle color, which is the same as the caret color. + *
Default value: + * + * { + * width: '1.5vp', + * color: '#007DFF' + * } + * + *

+ * + * @param { CaretStyle | undefined } value - indicates the style of the cursor. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default caretStyle(value: CaretStyle | undefined): this; + /** + * Set the place hold text color + * + * @param { ResourceColor | undefined } value - Default value is '#99182431'.The default value on wearable devices is '#99ffffff'. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default placeholderColor(value: ResourceColor | undefined): this; + /** + * Set the font used for place holder text + * + *

NOTE: + *
The 'HarmonyOS Sans' font and registered custom fonts are supported. + *
The default font size on wearable devices is 18 px. + *

+ * + * @param { Font | undefined } value + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default placeholderFont(value?: Font | undefined): this; + /** + * Set the font used for input text + * + *

NOTE: + *
Currently, only the default font family is supported. + *
The default font size on wearable devices is 18 fp. + *

+ * + * @param { Font | undefined } value + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default textFont(value?: Font | undefined): this; + /** + * Set enter key type of soft keyboard + * + * @param { EnterKeyType | undefined } value - Default value is EnterKeyType.Search. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default enterKeyType(value: EnterKeyType | undefined): this; + /** + * Call the function when clicked the search button. + * + * @param { Callback | SearchSubmitCallback | undefined } callback - callback of the listened event. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onSubmit(callback: Callback | SearchSubmitCallback | undefined): this; + /** + * Call the function when editing the input text + * + *

NOTE: + *
In this callback, if cursor operations are performed, + * developers need to adjust the cursor logic based on the previewText parameter to ensure it works seamlessly within the preview display scenario. + *

+ * + * @param { EditableTextOnChangeCallback | undefined } callback + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onChange(callback: EditableTextOnChangeCallback | undefined): this; + /** + * Called when the text selection changes. + * + * Anonymous Object Rectification. + * @param { OnTextSelectionChangeCallback | undefined } callback - Callback of the listened event. + * @returns { SearchAttribute } Returns the instance of the SearchAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onTextSelectionChange(callback: OnTextSelectionChangeCallback | undefined): this; + /** + * Called when the content scrolls. + * + * Anonymous Object Rectification. + * @param { OnContentScrollCallback | undefined } callback - Callback of the listened event. + * @returns { SearchAttribute } Returns the instance of the SearchAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onContentScroll(callback: OnContentScrollCallback | undefined): this; + /** + * Called when using the Clipboard menu. + * + * Anonymous Object Rectification. + * @param { Callback | undefined } callback - Callback used to return the copied text content. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onCopy(callback: Callback | undefined): this; + /** + * Called when using the Clipboard menu. + * + * Anonymous Object Rectification. + * @param { Callback | undefined } callback - Callback used to return the cut text content. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onCut(callback: Callback | undefined): this; + /** + * Called when using the Clipboard menu. + * + * Anonymous Object Rectification. + * @param { OnPasteCallback | undefined } callback - Executed when a paste operation is performed.Callback used to return the pasted text content. + * @returns { SearchAttribute } Returns the instance of the SearchAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onPaste(callback: OnPasteCallback | undefined): this; + /** + * Called when the copy option is set. + * + *

NOTE: + *
If this attribute is set to CopyOptions.None, the text can only be pasted; + * all other actions, such as copying, cutting, and sharing, are disabled. + *
Dragging is not allowed when CopyOptions.None is set. + *

+ * + * @param { CopyOptions | undefined } value - Default value is CopyOptions.LocalDevice. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default copyOption(value: CopyOptions | undefined): this; + /** + * Called when the input of maximum text length is set. + * + *

NOTE: + *
By default, there is no maximum number of characters. + *
When the maximum number is reached, no more characters can be entered. + *

+ * + * @param { number | undefined } value + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default maxLength(value: number | undefined): this; + /** + * Called when the text align is set. + * + *

NOTE: + *
Currently, the following alignment modes are supported: Start, Center, and End. + *

+ * + * @param { TextAlign | undefined } value - Default value is TextAlign.Start. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default textAlign(value: TextAlign | undefined): this; + /** + * Sets whether request keyboard or not when on focus. + * + *

NOTE: + *
Since API version 10, the Search component brings up the keyboard by default when it obtains focus. + *

+ * + * @param { boolean | undefined } value - Default value is true. + * @returns { SearchAttribute } Returns the instance of the SearchAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default enableKeyboardOnFocus(value: boolean | undefined): this; + /** + * Controls whether the selection menu pops up. + * + *

NOTE: + *
true: Tapping, long-pressing, double-tapping, triple-tapping, + * or right-clicking the text box will not trigger the system text selection menu. + *
false: Tapping, long-pressing, double-tapping, triple-tapping, + * or right-clicking the text box will trigger the system text selection menu. + *

+ * + * @param { boolean | undefined } value - Default value is false. + * @returns { SearchAttribute } returns the instance of the SearchAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default selectionMenuHidden(value: boolean | undefined): this; + /** + * Called when the minimum font size of the font is set. + * + *

NOTE: + *
For the string type, numeric string values with optional units, for example, "10" or "10fp", are supported. + *
For the setting to take effect, this attribute must be used together with maxFontSize or layout constraint settings. + *
When the adaptive font size is used, the fontSize settings do not take effect. + *

+ * + * @param { number | string | Resource | undefined } value - The unit is fp. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default minFontSize(value: number | string | Resource | undefined): this; + /** + * Called when the maximum font size of the font is set. + * + *

NOTE: + *
For the string type, numeric string values with optional units, for example, "10" or "10fp", are supported. + *
For the setting to take effect, this attribute must be used together with minFontSize or layout constraint settings. + *
When the adaptive font size is used, the fontSize settings do not take effect. + *

+ * + * @param { number | string | Resource | undefined } value - The unit is fp. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default maxFontSize(value: number | string | Resource | undefined): this; + /** + * Called when the minimum font scale of the font is set. + * Value range: [0, 1] + * + *

NOTE: + *
The undefined type is supported. + *
A value less than 0 is handled as 0. + *
A value greater than 1 is handled as 1. + *
Abnormal values are ineffective by default. + *

+ * + * @param { number | Resource | undefined } scale + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default minFontScale(scale: number | Resource | undefined): this; + /** + * Called when the maximum font scale of the font is set. + * Value range: [1, +∞) + * + *

NOTE: + *
The undefined type is supported. + *
A value less than 1 is handled as 1. + *
Abnormal values are ineffective by default. + *

+ * + * @param { number | Resource | undefined } scale + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default maxFontScale(scale: number | Resource | undefined): this; + /** + * Define custom keyboard. + * + *

NOTE: + *
When a custom keyboard is set, activating the text box opens the specified custom component, + * instead of the system input method. + *
The custom keyboard's height can be set through the height attribute of the custom component's root node, + * and its width is fixed at the default value. + *
The custom keyboard is presented by overlaying the original screen. + *
It is not compressed or lifted if avoid mode is not enabled or avoidance is not needed for the text box. + *
The custom keyboard cannot obtain the focus, but it blocks gesture events. + *
By default, the custom keyboard is closed when the input component loses the focus. + *
You can also use the stopEditing API to close the keyboard. + *
When a custom keyboard is set, the text box does not support camera input, even when the device supports. + *
When setting a custom keyboard, you can bind the onKeyPrelme event to prevent input from the physical keyboard. + *

+ * + * @param { CustomBuilder | undefined } value - Set up a custom keyboard of Search + * @param { KeyboardOptions | undefined } [options] - Indicates the custom keyboard options of Search + * @returns { SearchAttribute } returns the instance of the SearchAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default customKeyboard(value: CustomBuilder | undefined, options?: KeyboardOptions | undefined): this; + /** + * Called when the text decoration of the text is set. + * + * @param { TextDecorationOptions | undefined } value - Default value is { type: TextDecorationType.None, color: Color.Black, style: TextDecorationStyle.SOLID }. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default decoration(value: TextDecorationOptions | undefined): this; + /** + * Called when the distance between text fonts is set. + * + *

NOTE: + *
If the value specified is a percentage or 0, the default value is used. + *
For the string type, numeric string values with optional units, for example, "10" or "10fp", are supported. + *
If the value specified is a negative value, the text is compressed. + *
A negative value too small may result in the text being compressed to 0 and no content being displayed. + *

+ * + * @param { number | string | Resource | undefined } value - The unit is fp. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default letterSpacing(value: number | string | Resource | undefined): this; + /** + * Called when the line height of the font is set. + * + *

NOTE: + *
If the value is less than or equal to 0, the line height is not limited and the font size is adaptive. + *
If the value is of the number type, the unit fp is used. + *

+ * + * @param { number | string | Resource | undefined } value + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default lineHeight(value: number | string | Resource | undefined): this; + /** + * Called when the search type is set. + * + * @param { SearchType | undefined } value - Default value is SearchType.Normal. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default type(value: SearchType | undefined): this; + /** + * Set font feature. + * + * @param { string | undefined } value - The fontFeature. + * normal | , + * where = [ | on | off ], like: "ss01" 0 + * the values of reference to doc of search component + * number of can be single or multiple, and separated by comma ','. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default fontFeature(value: string | undefined): this; + /** + * Get text value information when about to input. + * + *

NOTE: + *
It returns true if the text is inserted; returns false otherwise. + *
This callback is not triggered for pre-edit or candidate word operations. + *
It is available only for system input methods. + *

+ * + * @param { Callback | undefined } callback - The triggered function when text content is about to insert. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onWillInsert(callback: Callback | undefined): this; + /** + * Get text value information when completed input. + * + *

NOTE: + *
It is available only for system input methods. + *

+ * + * @param { Callback | undefined } callback - The triggered function when text content has been inserted. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onDidInsert(callback: Callback | undefined): this; + /** + * Get text value information when about to delete. + * + *

NOTE: + *
It returns true if the text is deleted; returns false otherwise. + *
This callback is not invoked for text preview. + *
It is available only for system input methods. + *

+ * + * @param { Callback | undefined } callback - The triggered function when text content is about to delete. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onWillDelete(callback: Callback | undefined): this; + /** + * Get text value information when the deletion has been completed + * + *

NOTE: + *
It is available only for system input methods. + *

+ * + * @param { Callback | undefined } callback - The triggered function when text content has been deleted. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onDidDelete(callback: Callback | undefined): this; + /** + * Set the custom text menu. + * Sets the extended options of the custom context menu on selection, + * including the text content, icon, and callback. + * + * @param { EditMenuOptions | undefined } editMenu - Customize text menu options. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default editMenuOptions(editMenu: EditMenuOptions | undefined): this; + /** + * Define the preview text mode of the text input. + * + *

NOTE: + *
Preview text is in a temporary state and does not support text interception. + *
As such, it does not trigger onWillInsert, onDidInsert, onWillDelete, or onDidDelete callbacks. + *

+ * + * @param { boolean | undefined } enable - Indicates the preview text mode.Default value is true. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default enablePreviewText(enable: boolean | undefined): this; + /** + * Enable or disable haptic feedback. + * + *

NOTE: + *
To enable haptic feedback, + * you must declare the ohos.permission.VIBRATE permission under requestPermissions in the module.json5 file of the project. + * + * "requestPermissions": [ + * { + * "name": "ohos.permission.VIBRATE", + * } + * ] + * + *

+ * + * @param { boolean | undefined } isEnabled - Default value is true, set false to disable haptic feedback. + * @returns { SearchAttribute } returns the instance of the SearchAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default enableHapticFeedback(isEnabled: boolean | undefined): this; + /** + * Set text mode of automatic case mode switching. + * + * @param { AutoCapitalizationMode | undefined } mode - Automatic case mode switching. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default autoCapitalizationMode(mode: AutoCapitalizationMode | undefined): this; + /** + * Set the text with half leading. + * + * @param { Optional | undefined } halfLeading - Default value is false.The value true means that half leading is enabled, and false means the opposite. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default halfLeading(halfLeading: boolean | undefined): this; + /** + * Set whether stop backPressed callback event or not. + * + * @param { Optional | undefined } isStopped - Default value is true, set false to trigger the latest callback event. + * @returns { SearchAttribute } returns the instance of the SearchAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default stopBackPress(isStopped: boolean | undefined): this; + /** + * Get text value information when about to change. + * + *

NOTE: + *
This callback is triggered after onWillInsert and onWillDelete, but before onDidInsert and onDidDelete. + *

+ * + * @param { Callback | undefined } callback - The triggered function when text content is about to change. + * Returning true allows the change to proceed, while returning false cancels the change. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onWillChange(callback: Callback | undefined): this; + /** + * Set the keyboard appearance. + * + * @param { Optional | undefined } appearance - Default value is KeyboardAppearance.NONE_IMMERSIVE + * @returns { SearchAttribute } returns the instance of the SearchAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default keyboardAppearance(appearance: KeyboardAppearance | undefined): this; + /** + * Sets the attribute modifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier. + * @returns { SearchAttribute } the attribute of the SearchAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; +} + +/** + * Defines Search Component. + * + * @param { SearchOptions } [options] + * @param { function } [content_] + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@memo +@ComponentBuilder +export declare function Search( + options?: SearchOptions, + @memo + content_?: () => void, +): SearchAttribute \ No newline at end of file diff --git a/api/arkui/component/span.static.d.ets b/api/arkui/component/span.static.d.ets new file mode 100644 index 0000000000..7866b902fb --- /dev/null +++ b/api/arkui/component/span.static.d.ets @@ -0,0 +1,215 @@ +/* + * 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 { ResourceColor, Dimension, BorderRadiuses, Length, Font } from "./units"; +import { CommonMethod, ShadowOptions, AttributeModifier } from "./common"; +import { LengthMetrics } from './../Graphics'; +import { Resource } from './../../../api/global/resource'; +import { FontStyle, FontWeight, TextCase } from "./enums"; +import { DecorationStyleInterface } from "./styledString"; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; +/** + * Define the background style of span. + * + * @interface TextBackgroundStyle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface TextBackgroundStyle { + /** + * Background color of span. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + color?: ResourceColor; + /** + * Background radius of span. + * + * @type { ?(Dimension | BorderRadiuses) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + radius?: Dimension | BorderRadiuses; +} +/** + * Define the BaseSpan interface, contains the common methods of span. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface BaseSpan extends CommonMethod { + /** + * Span background style. + * + * @param { TextBackgroundStyle | undefined } style - The background style of span. + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default textBackgroundStyle(style: TextBackgroundStyle | undefined): this; + /** + * Base line offset of the Span. + * + * @param { LengthMetrics | undefined } value - The base line offset of the Span. + * @returns { T } The attribute of the Span. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default baselineOffset(value: LengthMetrics | undefined): this; +} +/** + * Define the Span attribute functions. + * + * @extends BaseSpan + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare interface SpanAttribute extends BaseSpan { + /** + * Called when the font is set. + * + * @param { Font | undefined } value - the span font size and weight and family and style. + * @returns { SpanAttribute } The attribute of the span. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default font(value: Font | undefined): this; + /** + * Called when the font color is set. + * + * @param { ResourceColor | undefined } value + * @returns { SpanAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default fontColor(value: ResourceColor | undefined): this; + /** + * Called when the font size is set. + * + * @param { number | string | Resource | undefined } value + * @returns { SpanAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default fontSize(value: number | string | Resource | undefined): this; + /** + * Called when the font style of a font is set. + * + * @param { FontStyle | undefined } value + * @returns { SpanAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default fontStyle(value: FontStyle | undefined): this; + /** + * Called when the font weight is set. + * + * @param { number | FontWeight | string | undefined } value + * @returns { SpanAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default fontWeight(value: number | FontWeight | string | undefined): this; + /** + * Called when the font list of text is set. + * + * @param { string | Resource | undefined } value + * @returns { SpanAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default fontFamily(value: string | Resource | undefined): this; + /** + * Called when the text decoration of the text is set. + * + * @param { DecorationStyleInterface | undefined } value + * @returns { SpanAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default decoration(value: DecorationStyleInterface | undefined): this; + /** + * Called when the distance between text fonts is set. + * + * @param { number | string | undefined } value + * @returns { SpanAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default letterSpacing(value: number | string | undefined): this; + /** + * Called when the type of letter in the text font is set. + * + * @param { TextCase | undefined } value + * @returns { SpanAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default textCase(value: TextCase | undefined): this; + /** + * Called when the line height of the span is set. + * + * @param { Length | undefined } value - The line height of the span. + * @returns { SpanAttribute } The attribute of the span. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default lineHeight(value: Length | undefined): this; + /** + * Called when the text shadow is set. + * + * @param { ShadowOptions | Array | undefined } value - The shadow options. + * @returns { SpanAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default textShadow(value: ShadowOptions | Array | undefined): this; + /** + * Sets the attribute modifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier. + * @returns { SpanAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; +} + +/** + * Defines Span Component. + * + * @param { string | Resource } value + * @param { function } [content_] + * @returns { SpanAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@memo +@ComponentBuilder +export declare function Span( + value: string | Resource, + @memo + content_?: () => void, +): SpanAttribute diff --git a/api/arkui/component/symbolSpan.static.d.ets b/api/arkui/component/symbolSpan.static.d.ets new file mode 100644 index 0000000000..49a3fed339 --- /dev/null +++ b/api/arkui/component/symbolSpan.static.d.ets @@ -0,0 +1,118 @@ +/* + * 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 { Resource } from './../../../api/global/resource'; +import { CommonMethod, AttributeModifier } from "./common"; +import { ResourceColor } from "./units"; +import { FontWeight } from "./enums"; +import { SymbolEffectStrategy, SymbolRenderingStrategy } from './symbolglyph'; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; + +/** + * Provides attribute for SymbolSpan. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare interface SymbolSpanAttribute extends CommonMethod { + /** + * Called when the SymbolSpan size is set. + * + * @param { number | string | Resource | undefined } value + * @returns { SymbolSpanAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default fontSize(value: number | string | Resource | undefined): this; + /** + * Called when the SymbolSpan color is set. + * + * @param { Array | undefined } value + * @returns { SymbolSpanAttribute } The attribute of the SymbolGlyph. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default fontColor(value: Array | undefined): this; + /** + * Called when the font SymbolSpan weight is set. + * + * @param { number | FontWeight | string | undefined } value + * @returns { SymbolSpanAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default fontWeight(value: number | FontWeight | string | undefined): this; + /** + * Called when the SymbolSpan effect is set. + * + * @param { SymbolEffectStrategy | undefined } value + * @returns { SymbolSpanAttribute } The attribute of the SymbolGlyph. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default effectStrategy(value: SymbolEffectStrategy | undefined): this; + /** + * Called when the SymbolSpan rendering strategy is set. + * + * @param { SymbolRenderingStrategy | undefined } value + * @returns { SymbolSpanAttribute } The attribute of the SymbolGlyph. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default renderingStrategy(value: SymbolRenderingStrategy | undefined): this; + /** + * Sets the attribute modifier. + * + * @param { AttributeModifier | undefined } modifier - The instance of symbol span modifier. + * @returns { SymbolSpanAttribute } the attribute of the SymbolSpanAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default attributeModifier(modifier: AttributeModifier | undefined): this; + /** + * Sets the attribute modifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier. + * @returns { SymbolSpanAttribute } the attribute of the SymbolSpanAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; +} + +/** + * Defines SymbolSpan Component. + * + * @param { Resource } value + * @param { function } [content_] + * @returns { SymbolSpanAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@memo +@ComponentBuilder +export declare function SymbolSpan( + value: Resource, + @memo + content_?: () => void, +): SymbolSpanAttribute \ No newline at end of file diff --git a/api/arkui/component/symbolglyph.static.d.ets b/api/arkui/component/symbolglyph.static.d.ets index 17d6a39fe8..b6f7d7c26e 100644 --- a/api/arkui/component/symbolglyph.static.d.ets +++ b/api/arkui/component/symbolglyph.static.d.ets @@ -1,6 +1,5 @@ -"use static" /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * 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 @@ -13,24 +12,22 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + /** * @file * @kit ArkUI + * @arkts 1.2 */ import { Resource } from '../../global/resource'; import { ResourceColor } from "./units"; import { FontWeight } from "./enums"; -import { CommonMethod, Optional } from "./common"; +import { CommonMethod, Optional, AttributeModifier } from "./common"; import { memo, ComponentBuilder } from "./../stateManagement/runtime"; -import { AttributeModifier, CommonMethod } from "./common"; /** * The symbol rendering strategy. * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export declare enum SymbolRenderingStrategy { @@ -38,9 +35,6 @@ export declare enum SymbolRenderingStrategy { * The single rendering strategy. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ SINGLE = 0, @@ -48,9 +42,6 @@ export declare enum SymbolRenderingStrategy { * The multiple color rendering strategy. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ MULTIPLE_COLOR = 1, @@ -58,9 +49,6 @@ export declare enum SymbolRenderingStrategy { * The multiple opacity rendering strategy. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ MULTIPLE_OPACITY = 2 @@ -70,9 +58,6 @@ export declare enum SymbolRenderingStrategy { * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export declare enum SymbolEffectStrategy { @@ -80,9 +65,6 @@ export declare enum SymbolEffectStrategy { * There is no effect strategy. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ NONE = 0, @@ -90,9 +72,6 @@ export declare enum SymbolEffectStrategy { * The scale effect strategy. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ SCALE = 1, @@ -100,9 +79,6 @@ export declare enum SymbolEffectStrategy { * The hierarchical effect strategy. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ HIERARCHICAL = 2 @@ -112,9 +88,6 @@ export declare enum SymbolEffectStrategy { * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export declare enum EffectDirection { @@ -122,9 +95,6 @@ export declare enum EffectDirection { * The scale down animation of symbol * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ DOWN = 0, @@ -132,9 +102,6 @@ export declare enum EffectDirection { * The scale up animation of symbol * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ UP = 1 @@ -144,9 +111,6 @@ export declare enum EffectDirection { * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export declare enum EffectScope { @@ -154,9 +118,6 @@ export declare enum EffectScope { * The layered animation of symbol * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ LAYER = 0, @@ -164,9 +125,6 @@ export declare enum EffectScope { * The whole animation of symbol * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ WHOLE = 1 @@ -176,9 +134,6 @@ export declare enum EffectScope { * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export declare enum EffectFillStyle { @@ -186,9 +141,6 @@ export declare enum EffectFillStyle { * The cumulative fill style of symbol * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ CUMULATIVE = 0, @@ -196,9 +148,6 @@ export declare enum EffectFillStyle { * The iterative fill style of symbol * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ ITERATIVE = 1 @@ -207,9 +156,6 @@ export declare enum EffectFillStyle { * Defines SymbolEffect class. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export declare class SymbolEffect { @@ -219,9 +165,6 @@ export declare class SymbolEffect { * * @extends SymbolEffect * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export declare class ScaleSymbolEffect extends SymbolEffect { @@ -231,9 +174,6 @@ export declare class ScaleSymbolEffect extends SymbolEffect { * @param { EffectScope } [scope] - The scope type of symbol effect. * @param { EffectDirection } [direction] - The direction of symbol effect. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ constructor(scope?: EffectScope, direction?: EffectDirection); @@ -242,9 +182,6 @@ export declare class ScaleSymbolEffect extends SymbolEffect { * * @type { ?EffectScope } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ scope?: EffectScope; @@ -253,9 +190,6 @@ export declare class ScaleSymbolEffect extends SymbolEffect { * * @type { ?EffectDirection } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ direction?: EffectDirection; @@ -265,9 +199,6 @@ export declare class ScaleSymbolEffect extends SymbolEffect { * * @extends SymbolEffect * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export declare class HierarchicalSymbolEffect extends SymbolEffect { @@ -276,9 +207,6 @@ export declare class HierarchicalSymbolEffect extends SymbolEffect { * * @param { EffectFillStyle } [fillStyle] - The fill style of symbol effect. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ constructor(fillStyle?: EffectFillStyle); @@ -287,9 +215,6 @@ export declare class HierarchicalSymbolEffect extends SymbolEffect { * * @type { ?EffectFillStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ fillStyle?: EffectFillStyle; @@ -299,9 +224,6 @@ export declare class HierarchicalSymbolEffect extends SymbolEffect { * * @extends SymbolEffect * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export declare class AppearSymbolEffect extends SymbolEffect { @@ -310,9 +232,6 @@ export declare class AppearSymbolEffect extends SymbolEffect { * * @param { EffectScope } [scope] - The scope type of symbol effect. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ constructor(scope?: EffectScope); @@ -321,9 +240,6 @@ export declare class AppearSymbolEffect extends SymbolEffect { * * @type { ?EffectScope } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ scope?: EffectScope; @@ -333,9 +249,6 @@ export declare class AppearSymbolEffect extends SymbolEffect { * * @extends SymbolEffect * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export declare class DisappearSymbolEffect extends SymbolEffect { @@ -344,9 +257,6 @@ export declare class DisappearSymbolEffect extends SymbolEffect { * * @param { EffectScope } [scope] - The scope type of symbol effect. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ constructor(scope?: EffectScope); @@ -355,9 +265,6 @@ export declare class DisappearSymbolEffect extends SymbolEffect { * * @type { ?EffectScope } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ scope?: EffectScope; @@ -367,9 +274,6 @@ export declare class DisappearSymbolEffect extends SymbolEffect { * * @extends SymbolEffect * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export declare class BounceSymbolEffect extends SymbolEffect { @@ -379,9 +283,6 @@ export declare class BounceSymbolEffect extends SymbolEffect { * @param { EffectScope } [scope] - The scope type of symbol effect. * @param { EffectDirection } [direction] - The direction of symbol effect. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ constructor(scope?: EffectScope, direction?: EffectDirection); @@ -390,9 +291,6 @@ export declare class BounceSymbolEffect extends SymbolEffect { * * @type { ?EffectScope } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ scope?: EffectScope; @@ -401,9 +299,6 @@ export declare class BounceSymbolEffect extends SymbolEffect { * * @type { ?EffectDirection } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ direction?: EffectDirection; @@ -413,9 +308,6 @@ export declare class BounceSymbolEffect extends SymbolEffect { * * @extends SymbolEffect * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export declare class ReplaceSymbolEffect extends SymbolEffect { @@ -424,9 +316,6 @@ export declare class ReplaceSymbolEffect extends SymbolEffect { * * @param { EffectScope } [scope] - The scope type of symbol effect. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ constructor(scope?: EffectScope); @@ -435,13 +324,27 @@ export declare class ReplaceSymbolEffect extends SymbolEffect { * * @type { ?EffectScope } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ scope?: EffectScope; } +/** + * Defines PulseSymbolEffect class. + * + * @extends SymbolEffect + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class PulseSymbolEffect extends SymbolEffect { +} +/** + * Provides attribute for SymbolGlyph. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ export declare interface SymbolGlyphAttribute extends CommonMethod { /** * Called when the SymbolGlyph size is set. @@ -449,9 +352,6 @@ export declare interface SymbolGlyphAttribute extends CommonMethod { * @param { number | string | Resource } value * @returns { SymbolGlyphAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default fontSize(value: number | string | Resource | undefined): this; @@ -461,9 +361,6 @@ export declare interface SymbolGlyphAttribute extends CommonMethod { * @param { Array } value * @returns { SymbolGlyphAttribute } The attribute of the SymbolGlyph. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default fontColor(value: Array | undefined): this; @@ -473,9 +370,6 @@ export declare interface SymbolGlyphAttribute extends CommonMethod { * @param { number | FontWeight | string } value * @returns { SymbolGlyphAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default fontWeight(value: number | FontWeight | string | undefined): this; @@ -485,9 +379,6 @@ export declare interface SymbolGlyphAttribute extends CommonMethod { * @param { SymbolEffectStrategy } value * @returns { SymbolGlyphAttribute } The attribute of the SymbolGlyph. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default effectStrategy(value: SymbolEffectStrategy | undefined): this; @@ -497,9 +388,6 @@ export declare interface SymbolGlyphAttribute extends CommonMethod { * @param { SymbolRenderingStrategy } value * @returns { SymbolGlyphAttribute } The attribute of the SymbolGlyph. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default renderingStrategy(value: SymbolRenderingStrategy | undefined): this; @@ -510,9 +398,6 @@ export declare interface SymbolGlyphAttribute extends CommonMethod { * @param { boolean | number } [triggerValue] - The trigger of the effect * @returns { SymbolGlyphAttribute } The attribute of the SymbolGlyph. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default symbolEffect(symbolEffect: SymbolEffect | undefined, triggerValue?: boolean | number | undefined): this; @@ -522,8 +407,6 @@ export declare interface SymbolGlyphAttribute extends CommonMethod { * @param { Optional } scale * @returns { SymbolGlyphAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default minFontScale(scale: number | Resource | undefined): this; @@ -533,18 +416,34 @@ export declare interface SymbolGlyphAttribute extends CommonMethod { * @param { Optional } scale * @returns { SymbolGlyphAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default maxFontScale(scale: number | Resource | undefined): this; + /** + * Sets the attribute modifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier. + * @returns { SymbolGlyphAttribute } the attribute of the SymbolGlyphAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; } +/** + * Defines SymbolGlyph Component. + * + * @param { Resource } [value] + * @param { function } [content_] + * @returns { SymbolGlyphAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ @memo @ComponentBuilder export declare function SymbolGlyph( value?: Resource, @memo content_?: () => void, -): SymbolGlyphAttribute \ No newline at end of file +): SymbolGlyphAttribute diff --git a/api/arkui/component/text.static.d.ets b/api/arkui/component/text.static.d.ets index dad04b5fd9..1c4e93d132 100644 --- a/api/arkui/component/text.static.d.ets +++ b/api/arkui/component/text.static.d.ets @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. + * 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 @@ -12,9 +12,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + /** * @file * @kit ArkUI + * @arkts 1.2 */ import { CommonMethod, ShadowOptions, Optional, Callback, AttributeModifier } from "./common"; import { CustomBuilder } from './builder'; @@ -30,9 +32,6 @@ import { memo, ComponentBuilder } from "./../stateManagement/runtime"; * Anonymous Object Rectification. * @interface TextOverflowOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export declare interface TextOverflowOptions { @@ -43,13 +42,18 @@ export declare interface TextOverflowOptions { * @type { TextOverflow } * @default TextOverflow.Clip * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ overflow: TextOverflow; } +/** + * TextAttribute. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ export declare interface TextAttribute extends CommonMethod { /** * Called when the font is set. @@ -62,9 +66,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { FontSettingOptions } options - font setting options. * @returns { TextAttribute } The attribute of the text. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default font(fontValue: Font | undefined, options?: FontSettingOptions | undefined): this; @@ -74,9 +75,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { ResourceColor } value - Default value is '#e6182431'.The default value on wearable devices is '#c5ffffff'. * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default fontColor(value: ResourceColor | undefined): this; @@ -90,9 +88,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { number | string | Resource } value - Default value is 16fp.The default value on wearable devices is 15fp. * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default fontSize(value: number | string | Resource | undefined): this; @@ -114,9 +109,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { number | string | Resource } value - The unit is fp. * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default minFontSize(value: number | string | Resource | undefined): this; @@ -138,9 +130,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { number | string | Resource } value - The unit is fp. * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default maxFontSize(value: number | string | Resource | undefined): this; @@ -157,8 +146,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { number | Resource } scale * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default minFontScale(scale: number | Resource | undefined): this; @@ -174,8 +161,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { number | Resource } scale * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default maxFontScale(scale: number | Resource | undefined): this; @@ -185,9 +170,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { FontStyle } value - Default value is FontStyle.Normal. * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default fontStyle(value: FontStyle | undefined): this; @@ -198,9 +180,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { FontSettingOptions } options - font setting options. * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default fontWeight(weight: number | FontWeight | string | undefined, options?: FontSettingOptions | undefined): this; @@ -214,8 +193,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { LengthMetrics } value - Default value is 0. * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default lineSpacing(value: LengthMetrics | undefined): this; @@ -237,9 +214,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { TextAlign } value - Default value is TextAlign.Start.The default value on wearable devices is TextAlign.Center. * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default textAlign(value: TextAlign | undefined): this; @@ -255,9 +229,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { number | string | Resource } value * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default lineHeight(value: number | string | Resource | undefined): this; @@ -284,9 +255,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { TextOverflowOptions } options - Text overflow options. * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default textOverflow(options: TextOverflowOptions | undefined): this; @@ -302,9 +270,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { string | Resource } value * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default fontFamily(value: string | Resource | undefined): this; @@ -320,9 +285,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { number } value * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default maxLines(value: number | undefined): this; @@ -336,9 +298,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { DecorationStyleInterface } value - Default value is { type: TextDecorationType.None, color: Color.Black, style: TextDecorationStyle.SOLID }. * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default decoration(value: DecorationStyleInterface | undefined): this; @@ -348,9 +307,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { number | string } value * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default letterSpacing(value: number | string | undefined): this; @@ -360,9 +316,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { TextCase } value - Default value is TextCase.Normal. * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default textCase(value: TextCase | undefined): this; @@ -372,9 +325,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { number | string } value * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default baselineOffset(value: number | string | undefined): this; @@ -390,9 +340,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { CopyOptions } value - Default value is CopyOptions.None. * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default copyOption(value: CopyOptions | undefined): this; @@ -409,8 +356,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { boolean } value - Default value is false. * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default draggable(value: boolean | undefined): this; @@ -424,9 +369,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { ShadowOptions | Array } value - The shadow options. * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default textShadow(value: ShadowOptions | Array | undefined): this; @@ -456,8 +398,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { TextHeightAdaptivePolicy } value - The height adaptive policy.Default value is TextHeightAdaptivePolicy.MAX_LINES_FIRST. * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default heightAdaptivePolicy(value: TextHeightAdaptivePolicy | undefined): this; @@ -467,8 +407,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { Length } value - The length of text indent.Default value is 0. * @returns { TextAttribute } The attribute of the text. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default textIndent(value: Length | undefined): this; @@ -483,8 +421,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { WordBreak } value - The word break type.Default value is WordBreak.BREAK_WORD. * @returns { TextAttribute } The attribute of the text. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default wordBreak(value: WordBreak | undefined): this; @@ -499,8 +435,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { LineBreakStrategy } strategy - The text line break strategy type.Default value is LineBreakStrategy.GREEDY. * @returns { TextAttribute } The attribute of the text. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default lineBreakStrategy(strategy: LineBreakStrategy | undefined): this; @@ -511,8 +445,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { function } callback - callback of the listened event. * @returns { TextAttribute } The attribute of the text. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default onCopy(callback: ((value: string) => void) | undefined): this; @@ -535,8 +467,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { number } selectionEnd - The end position of the selected text.Default value is -1. * @returns { TextAttribute } The attribute of the text. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default selection(selectionStart: number | undefined, selectionEnd: number | undefined): this; @@ -546,8 +476,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { ResourceColor } color - The color of the selected text caret. * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default caretColor(color: ResourceColor | undefined): this; @@ -557,8 +485,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { ResourceColor } color - The color of the selected text background. * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default selectedBackgroundColor(color: ResourceColor | undefined): this; @@ -574,8 +500,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { EllipsisMode } value - The ellipsis mode.Default value is EllipsisMode.END. * @returns { TextAttribute } The attribute of the text. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default ellipsisMode(value: EllipsisMode | undefined): this; @@ -607,7 +531,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { boolean } enable - Enable data detector.Default value is false. * @returns { TextAttribute } The attribute of the text. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ default enableDataDetector(enable: boolean | undefined): this; @@ -629,7 +552,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { TextDataDetectorConfig } config - The config of text data detector. * @returns { TextAttribute } The attribute of the text. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ default dataDetectorConfig(config: TextDataDetectorConfig | undefined): this; @@ -649,8 +571,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { SelectionMenuOptions } [options] - Indicates the options of selection menu. * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default bindSelectionMenu(spanType: TextSpanType | undefined, content: CustomBuilder | undefined, responseType: TextResponseType | undefined, options?: SelectionMenuOptions | undefined): this; @@ -660,8 +580,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { function } callback - callback of the listened event. * @returns { TextAttribute } returns the instance of the TextAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default onTextSelectionChange(callback: ((selectionStart: number, selectionEnd: number) => void) | undefined): this; @@ -675,9 +593,6 @@ export declare interface TextAttribute extends CommonMethod { * number of can be single or multiple, and separated by comma ','. * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default fontFeature(value: string | undefined): this; @@ -687,8 +602,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { Optional } options * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default marqueeOptions(options: TextMarqueeOptions | undefined): this; @@ -698,8 +611,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { Callback } callback - callback of the marquee state change event. * @returns { TextAttribute } returns the instance of the TextAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default onMarqueeStateChange(callback: Callback | undefined): this; @@ -715,8 +626,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { boolean } supported - Whether to support sensitive privacy information.Default value is false. * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @atomicservice * @since 20 */ default privacySensitive(supported: boolean | undefined): this; @@ -726,8 +635,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { TextSelectableMode } mode - Default value is TextSelectableMode.SELECTABLE_UNFOCUSABLE. * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default textSelectable(mode: TextSelectableMode | undefined): this; @@ -739,8 +646,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { EditMenuOptions } editMenu - Customize text menu options. * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default editMenuOptions(editMenu: EditMenuOptions | undefined): this; @@ -755,8 +660,6 @@ export declare interface TextAttribute extends CommonMethod { * @param { boolean } halfLeading - Default value is false. * @returns { TextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default halfLeading(halfLeading: boolean | undefined): this; @@ -766,11 +669,17 @@ export declare interface TextAttribute extends CommonMethod { * @param { boolean } isEnabled - Default value is true, set false to disable haptic feedback. * @returns { TextAttribute } returns the instance of the TextAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default enableHapticFeedback(isEnabled: boolean | undefined): this; + /** + * Sets the attribute modifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier. + * @returns { TextAttribute } the attribute of the TextAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; } /** @@ -789,8 +698,6 @@ export declare interface TextAttribute extends CommonMethod { * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ export declare enum TextSpanType { @@ -798,8 +705,6 @@ export declare enum TextSpanType { * Only contains text. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ TEXT = 0, @@ -807,8 +712,6 @@ export declare enum TextSpanType { * Only contains image. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ IMAGE = 1, @@ -816,8 +719,6 @@ export declare enum TextSpanType { * Contains both text and image. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ MIXED = 2, @@ -827,8 +728,6 @@ export declare enum TextSpanType { * this type will be triggered and displayed for those registered types. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ DEFAULT = 3 @@ -849,8 +748,6 @@ export declare enum TextSpanType { * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ export declare enum TextResponseType { @@ -858,8 +755,6 @@ export declare enum TextResponseType { * Right click. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ RIGHT_CLICK = 0, @@ -867,8 +762,6 @@ export declare enum TextResponseType { * Long press. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ LONG_PRESS = 1, @@ -876,8 +769,6 @@ export declare enum TextResponseType { * Selected by mouse. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ SELECT = 2, @@ -887,8 +778,6 @@ export declare enum TextResponseType { * this type will be triggered and displayed for right-click, long press, and mouse selection actions. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ DEFAULT = 3 @@ -898,8 +787,6 @@ export declare enum TextResponseType { * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ export declare enum MarqueeState { @@ -907,8 +794,6 @@ export declare enum MarqueeState { * The marquee started. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ START = 0, @@ -916,8 +801,6 @@ export declare enum MarqueeState { * The marquee a round finished and start next round. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ BOUNCE = 1, @@ -925,8 +808,6 @@ export declare enum MarqueeState { * The marquee all finished. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ FINISH = 2 @@ -936,8 +817,6 @@ export declare enum MarqueeState { * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ export declare enum MarqueeStartPolicy { @@ -945,8 +824,6 @@ export declare enum MarqueeStartPolicy { * Start marquee in any case. This is the default policy. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ DEFAULT = 0, @@ -954,8 +831,6 @@ export declare enum MarqueeStartPolicy { * Start marquee only when get focus. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ ON_FOCUS = 1 @@ -965,8 +840,6 @@ export declare enum MarqueeStartPolicy { * * @interface TextOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ export declare interface TextOptions { @@ -975,8 +848,6 @@ export declare interface TextOptions { * * @type { TextController } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ controller: TextController; @@ -986,8 +857,6 @@ export declare interface TextOptions { * * @interface TextMarqueeOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ export declare interface TextMarqueeOptions { @@ -996,8 +865,6 @@ export declare interface TextMarqueeOptions { * * @type { boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ start: boolean; @@ -1006,8 +873,6 @@ export declare interface TextMarqueeOptions { * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ step?: number; @@ -1016,8 +881,6 @@ export declare interface TextMarqueeOptions { * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ loop?: number; @@ -1026,8 +889,6 @@ export declare interface TextMarqueeOptions { * * @type { ?boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ fromStart?: boolean; @@ -1036,8 +897,6 @@ export declare interface TextMarqueeOptions { * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ delay?: number; @@ -1046,8 +905,6 @@ export declare interface TextMarqueeOptions { * * @type { ?boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ fadeout?: boolean; @@ -1056,8 +913,6 @@ export declare interface TextMarqueeOptions { * * @type { ?MarqueeStartPolicy } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ marqueeStartPolicy?: MarqueeStartPolicy; @@ -1066,8 +921,6 @@ export declare interface TextMarqueeOptions { * Defines the controller of Text. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ export declare class TextController { @@ -1075,8 +928,6 @@ export declare class TextController { * Close the select menu when menu is on. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ closeSelectionMenu(): void; @@ -1089,8 +940,6 @@ export declare class TextController { * * @param { StyledString } value * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ setStyledString(value: StyledString): void; @@ -1099,13 +948,22 @@ export declare class TextController { * * @returns { LayoutManager } - Return the LayoutManager. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ getLayoutManager(): LayoutManager; } +/** + * Defines Text Component. + * + * @param { string | Resource } [content] + * @param { TextOptions } [value] + * @param { function } [content_] + * @returns { TextAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ @memo @ComponentBuilder export declare function Text( diff --git a/api/arkui/component/textArea.static.d.ets b/api/arkui/component/textArea.static.d.ets new file mode 100644 index 0000000000..7dfad37fba --- /dev/null +++ b/api/arkui/component/textArea.static.d.ets @@ -0,0 +1,1013 @@ +/* + * 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 { KeyboardOptions, PasteEvent } from "./richEditor"; +import { CaretStyle, DeleteValue, EditMenuOptions, EditableTextOnChangeCallback, InsertValue, AutoCapitalizationMode, EditableTextChangeValue, KeyboardAppearance } from "./textCommon"; +import { BarState, CopyOptions, FontStyle, FontWeight, LineBreakStrategy, TextContentStyle, TextAlign, TextOverflow, TextHeightAdaptivePolicy, WordBreak, EllipsisMode } from "./enums"; +import { EnterKeyType, SubmitEvent, ContentType } from "./textInput"; +import { Dimension, Font, Length, LengthMetrics, ResourceColor, ResourceStr } from "./units"; +import { InputCounterOptions, TextContentControllerBase, SelectionOptions, TextDecorationOptions, CommonMethod, Callback, Optional, Bindable, AttributeModifier } from "./common"; +import { CustomBuilder } from './builder'; +import { Resource } from '../../global/resource'; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; +/** + * Provides the method of switching the cursor position. + * + * @extends TextContentControllerBase + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class TextAreaController extends TextContentControllerBase { + /** + * constructor. + * A constructor used to create a TextAreaController object. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(); + /** + * Called when the position of the insertion cursor is set. + * + * @param { number } value - Length from the start of the string to the position where the caret is located. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + caretPosition(value: number): void; + /** + * Text selection is achieved by specifying the start and end positions of the text. + * + *

NOTE: + *
If selectionMenuHidden is set to true or a 2-in-1 device is used, + * calling setTextSelection does not display the context menu even when options is set to MenuPolicy.SHOW. + *
If the selected text contains an emoji, + * the emoji is selected when its start position is within the text selection range. + *

+ * + * @param { number } selectionStart - The start position of the selected text. + * The start position of text in the text box is 0. + * A value less than 0 is handled as 0. + * A value greater than the maximum text length is handled as the maximum text length. + * @param { number } selectionEnd - The end position of the selected text. + * A value less than 0 is handled as the value 0. + * A value greater than the maximum text length is handled as the maximum text length. + * @param { SelectionOptions } [options] - Indicates the options of the text selection.Default value is MenuPolicy.DEFAULT. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + setTextSelection(selectionStart: number, selectionEnd: number, options?: SelectionOptions): void; + /** + * Exit edit state. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + stopEditing(): void; +} +/** + * Defines the options of TextArea. + * + * @interface TextAreaOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface TextAreaOptions { + /** + * The place holder text string. + * Text displayed when there is no input. + * + *

NOTE: + *
When only the placeholder attribute is set, the text selection handle is still available. + *
The caret stays at the beginning of the placeholder text when the handle is released. + *

+ * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + placeholder?: ResourceStr; + /** + * Sets the current value of TextArea. + * + * @type { ?(ResourceStr | Bindable | Bindable | Bindable) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + text?: ResourceStr | Bindable | Bindable | Bindable; + /** + * Called when the position of the insertion cursor is set. + * + * @type { ?TextAreaController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + controller?: TextAreaController; +} +/** + * Declare the type of input box + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum TextAreaType { + /** + * Basic input mode. + * The value can contain digits, letters, underscores (_), spaces, and special characters. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + NORMAL = 0, + /** + * Pure digital input mode. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + NUMBER = 2, + /** + * Phone number entry mode. + * In this mode, the following are allowed: digits, spaces, plus signs (+), hyphens (-), asterisks (*), and number signs (#). + * the length is not limited. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + PHONE_NUMBER = 3, + /** + * E-mail address input mode. + * This mode accepts only digits, letters, underscores (_), dots (.), + * and the following special characters: ! # $ % & ' * + - / = ? ^ ` { | } ~ @ (which can only appear once). + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + EMAIL = 5, + /** + * Number decimal entry mode. + * The value can contain digits and one decimal point. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + NUMBER_DECIMAL = 12, + /** + * URL entry mode. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + URL = 13 +} +/** + * Declare the event listener callback of the enter key. + * + * @typedef { function } TextAreaSubmitCallback + * @param { EnterKeyType } enterKeyType - The enter key type of soft keyboard. + * If the type is EnterKeyType.NEW_LINE, onSubmit is not triggered. + * @param { SubmitEvent } [event] - Provides the method of keeping textArea editable state when submitted. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export type TextAreaSubmitCallback = (enterKeyType: EnterKeyType, event?: SubmitEvent) => void; +/** + * Defines the attribute functions of TextArea. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 11 + * @noninterop + */ +export declare interface TextAreaAttribute extends CommonMethod { + /** + * Called when the color of the placeholder is set. + * + * @param { ResourceColor | undefined } value - Default value follows the theme. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default placeholderColor(value: ResourceColor | undefined): this; + /** + * Called when the font property of the placeholder is set. + * The 'HarmonyOS Sans' font and registered custom fonts are supported. + * + * @param { Font | undefined } value + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default placeholderFont(value: Font | undefined): this; + /** + * Called when the type of soft keyboard input button is set. + * + * @param { EnterKeyType | undefined } value the type of soft keyboard - Default value is EnterKeyType.NEW_LINE. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default enterKeyType(value: EnterKeyType | undefined): this; + /** + * Called when the alignment of the contents of a multiline text box is set. + * + *

NOTE: + *
To set vertical alignment for the text, use the align attribute. + *
The align attribute alone does not control the horizontal position of the text. + *
In other words, Alignment.TopStart, Alignment.Top, and Alignment.TopEnd produce the same effect, + * top-aligning the text; Alignment.Start, Alignment.Center, and Alignment.End produce the same effect, + * centered-aligning the text vertically; Alignment.BottomStart, Alignment.Bottom, + * and Alignment.BottomEnd produce the same effect, bottom-aligning the text. + *
When textAlign is set to TextAlign.JUSTIFY, the text in the last line is horizontally aligned with the start edge. + *
Since API version 11, textAlign can be set to TextAlign.JUSTIFY. + *

+ * + * @param { TextAlign | undefined } value - Default value is TextAlign.Start. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default textAlign(value: TextAlign | undefined): this; + /** + * Called when the insertion cursor color is set. + * + *

NOTE: + *
Since API version 12, this API can be used to set the text handle color, which is the same as the caret color. + *

+ * + * @param { ResourceColor | undefined } value - Default value is '#007DFF'. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default caretColor(value: ResourceColor | undefined): this; + /** + * Called when the font color is set. + * + * @param { ResourceColor | undefined } value + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default fontColor(value: ResourceColor | undefined): this; + /** + * Called when the font size is set. + * + * @param { Length | undefined } value - Default value is 16fp.The default value on wearable devices is 18fp. + * If fontSize is of the number type, the unit fp is used. + * This parameter cannot be set in percentage. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default fontSize(value: Length | undefined): this; + /** + * Called when the font style of a font is set. + * + * @param { FontStyle | undefined } value - Default value is FontStyle.Normal. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default fontStyle(value: FontStyle | undefined): this; + /** + * Called when the font weight is set. + * + * @param { number | FontWeight | string | undefined } value + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default fontWeight(value: number | FontWeight | string | undefined): this; + /** + * Called when the font list of text is set. + * + *

NOTE: + *
The 'HarmonyOS Sans' font and registered custom fonts are supported for applications. + *
Only the 'HarmonyOS Sans' font is supported for widgets. + *

+ * + * @param { ResourceStr | undefined } value - Default value is 'HarmonyOS Sans'. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default fontFamily(value: ResourceStr | undefined): this; + /** + * Called when the overflow mode of the font is set. + * + *

NOTE: + *
In inline style, the effect of truncating text according to maxLines only applies when textOverflow is set. + *
Text is clipped at the transition between words. + *
To clip text in the middle of a word, set wordBreak to WordBreak.BREAK_ALL. + *
If overflow is set to TextOverflow.None, TextOverflow.Clip, or TextOverflow.Ellipsis, + * this attribute must be used with maxLines for the settings to take effect. + *
TextOverflow.None produces the same effect as TextOverflow.Clip. + *

+ * + * @param { TextOverflow | undefined } value - Default value is TextOverflow.Clip. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default textOverflow(value: TextOverflow | undefined): this; + /** + * Specify the indentation of the first line in a text-block. + * + * @param { Dimension | undefined } value - The length of text indent.Default value is 0. + * @returns { TextAreaAttribute } The attribute of the text. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default textIndent(value: Dimension | undefined): this; + /** + * Called when the inputFilter of text is set. + * + *

NOTE: + *
Only inputs that comply with the regular expression can be displayed. + *
Other inputs are filtered out. + *
The specified regular expression can match single characters, but not strings. + *

+ * + * @param { ResourceStr | undefined } value + * @param { function | undefined } error + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default inputFilter(value: ResourceStr | undefined, error?: ((value: string) => void) | undefined): this; + /** + * Define the caret style of the text input. + * + * @param { CaretStyle | undefined } value + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default caretStyle(value: CaretStyle | undefined): this; + /** + * Define the text selected background color of the text input. + * If the opacity is not set, a 20% opacity will be used. + * + * @param { ResourceColor | undefined } value + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default selectedBackgroundColor(value: ResourceColor | undefined): this; + /** + * Called when submitted. + * + * @param { ((enterKey: EnterKeyType) => void) | TextAreaSubmitCallback | undefined } callback - callback of the listened event. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onSubmit(callback: ((enterKey: EnterKeyType) => void) | TextAreaSubmitCallback | undefined): this; + /** + * Called when the input changes. + * + *

NOTE: + *
In this callback, if cursor operations are performed, + * you need to adjust the cursor logic based on the previewText parameter + * to make sure it works seamlessly under the preview display scenario. + *

+ * + * @param { EditableTextOnChangeCallback | undefined } callback + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onChange(callback: EditableTextOnChangeCallback | undefined): this; + /** + * Called when the text selection changes. + * + * @param { function | undefined } callback - callback of the listened event. + * { number } selectionStart - The start position of text is 0. + * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onTextSelectionChange(callback: ((selectionStart: number, selectionEnd: number) => void) | undefined): this; + /** + * Called when the content scrolls. + * + * @param { function | undefined } callback - callback of the listened event. + * { number } totalOffsetX - The unit is px. + * { number } totalOffsetY - The unit is px. + * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onContentScroll(callback: ((totalOffsetX: number, totalOffsetY: number) => void) | undefined): this; + /** + * Called when judging whether the text editing change finished. + * The text box is in the editing state when it has the caret placed in it, and is in the non-editing state otherwise. + * + * @param { function | undefined } callback - Triggered when the text area status changes. + * If the value of isEditing is true, text area is in progress. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onEditChange(callback: ((isEditing: boolean) => void) | undefined): this; + /** + * Called when using the Clipboard menu + * + * @param { function | undefined } callback + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onCopy(callback: ((value: string) => void) | undefined): this; + /** + * Called when using the Clipboard menu + * + * @param { function | undefined } callback + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onCut(callback: ((value: string) => void) | undefined): this; + /** + * Called when using the Clipboard menu + * + * @param { function | undefined } callback + * Executed when a paste operation is performed. + * { string } value - The text content to be pasted. + * { PasteEvent } event - The user-defined paste event. + * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onPaste(callback: ((value: string, event: PasteEvent) => void) | undefined): this; + /** + * Called when the copy option is set. + * + *

NOTE: + *
If this attribute is set to CopyOptions.None, the text can only be pasted; + * all other actions, such as copying, cutting, and sharing, are disabled. + *
Dragging is not allowed when CopyOptions.None is set. + *

+ * + * @param { CopyOptions | undefined } value - Default value is CopyOptions.LocalDevice. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default copyOption(value: CopyOptions | undefined): this; + /** + * Sets whether request keyboard or not when on focus. + * + * @param { boolean | undefined } value - Default value is true. + * @returns { TextAreaAttribute } Returns the instance of the TextAreaAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default enableKeyboardOnFocus(value: boolean | undefined): this; + /** + * Define the max length content of the text area. + * + *

NOTE: + *
By default, there is no maximum number of characters. + *
When the maximum number of characters is reached, + * no more characters can be entered, and the border turns red. + *

+ * + * @param { number | undefined } value + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default maxLength(value: number | undefined): this; + /** + * Define show counter of the text area. + * + *

NOTE: + *
options can be set only when value is set to true, + * in which case a character counter is displayed below the text box. + *
This attribute must be used together with maxlength. + *
The character counter is displayed in this format: Number of characters entered/Character limit. + *
It is visible when the number of characters entered is greater than + * the character limit multiplied by the threshold percentage value. + *
If options is not set, the text box border and character counter subscript turn red + * when the number of characters entered reaches the limit. + *
If value is set to true and options is set, + * the text box border and character counter subscript turn red + * and the text box shakes when the number of characters entered reaches the limit, + * provided that the value of thresholdPercentage is valid. + *
If highlightBorder is set to false, the text box border does not turn red. + *
By default, highlightBorder is set to true. + *
The character counter is not displayed for text boxes in inline input style. + *

+ * + * @param { boolean | undefined } value - Set showcounter of the text area. + * @param { InputCounterOptions | undefined } options - Set the percentage of counter. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default showCounter(value: boolean | undefined, options?: InputCounterOptions | undefined): this; + /** + * Define style of the text area. + * + *

NOTE: + *
The inline input style is only available for the TextAreaType.Normal type. + *

+ * + * @param { TextContentStyle | undefined } value - Default value is TextContentStyle.DEFAULT. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default style(value: TextContentStyle | undefined): this; + /** + * Define bar state of the text area. + * + * @param { BarState | undefined } value - Default value is BarState.Auto. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default barState(value: BarState | undefined): this; + /** + * Controls whether the selection menu pops up. + * + *

NOTE: + *
true: + *
The system text selection menu does not appear under the following circumstances: clicking the text box cursor, + * long-pressing the text box, double-tapping the text box, triple-tapping the text box, or right-clicking the text box. + *
false: + *
The system text selection menu appears under the following circumstances: clicking the text box cursor, + * long-pressing the text box, double-tapping the text box, triple-tapping the text box, or right-clicking the text box. + *

+ * + * @param { boolean | undefined } value - Default value is false. + * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default selectionMenuHidden(value: boolean | undefined): this; + /** + * Called when the minimum font size of the font is set. + * + *

NOTE: + *
For the string type, numeric string values with optional units, for example, "10" or "10fp", are supported. + *
For the setting to take effect, this attribute must be used together with maxFontSize and maxLines,or layout constraint settings. + *
When the adaptive font size is used, the fontSize settings do not take effect. + *

+ * + * @param { number | string | Resource | undefined } value - The unit is fp. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default minFontSize(value: number | string | Resource | undefined): this; + /** + * Called when the maximum font size of the font is set. + * + *

NOTE: + *
For the string type, numeric string values with optional units, for example, "10" or "10fp", are supported. + *
For the setting to take effect, this attribute must be used together with minFontSize and maxLines, or layout constraint settings. + *
When the adaptive font size is used, the fontSize settings do not take effect. + *

+ * + * @param { number | string | Resource | undefined } value - The unit is fp. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default maxFontSize(value: number | string | Resource | undefined): this; + /** + * Called when the minimum font scale of the font is set. + * Value range: [0, 1] + * + *

NOTE: + *
The undefined type is supported. + *
A value less than 0 is handled as 0. + *
A value greater than 1 is handled as 1. + *
Abnormal values are ineffective by default. + *

+ * + * @param { number | Resource | undefined } scale + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default minFontScale(scale: number | Resource | undefined): this; + /** + * Called when the maximum font scale of the font is set. + * Value range: [1, +∞) + * + *

NOTE: + *
A value less than 1 is handled as 1. + *
Abnormal values are ineffective by default. + *

+ * + * @param { number | Resource | undefined } scale + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default maxFontScale(scale: number | Resource | undefined): this; + /** + * Called when the height adaptive policy is set. + * + *

NOTE: + *

    + *
  • When this attribute is set to TextHeightAdaptivePolicy.MAX_LINES_FIRST, + * the maxLines attribute takes precedence for adjusting the text height. + *
    If the maxLines setting results in a layout beyond the layout constraints, + * the text will shrink to a font size between minFontSize and maxFontSize to allow for more content to be shown. + *
    If the text box is in inline input style, + * the font size in the editing state is different from that in the non-editing state.
  • + *
  • If this attribute is set to TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST, + * the minFontSize attribute takes precedence for adjusting the text height. + *
    If the text can fit in one line with the minFontSize setting, + * the text will enlarge to the largest possible font size between minFontSize and maxFontSize.
  • + *
  • If this attribute is set to TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST, + * the layout constraints take precedence for adjusting the text height. + *
    If the resultant layout is beyond the layout constraints, + * the text will shrink to a font size between minFontSize and maxFontSize to respect the layout constraints.
  • + *
+ *

+ * + * @param { TextHeightAdaptivePolicy | undefined } value - The height adaptive policy.Default value is TextHeightAdaptivePolicy.MAX_LINES_FIRST. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default heightAdaptivePolicy(value: TextHeightAdaptivePolicy | undefined): this; + /** + * Define max lines of the text area. + * Value range: (0, +∞) + * + *

NOTE: + *
Sets the maximum number of lines that can be displayed. + *
When textOverflow is set, text is truncated if the content exceeds this limit. + *
When textOverflow is not set, in inline style, + * the text is scrollable if the content exceeds the limit while the text box is focused; + * maxLines does not apply when the text box is not focused. + *
In non-inline style, the text is truncated according to the number of lines. + *
Default value: 3 with the inline style; +∞ with the non-inline style, + * indicating that there is no maximum number of lines. + *

+ * + * @param { number | undefined } value + * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default maxLines(value: number | undefined): this; + /** + * Set the word break type. + * + *

NOTE: + *
This attribute does not take effect for the placeholder text. + *
The component does not support the clip attribute. + *
Therefore, setting this attribute does not affect text clipping. + *

+ * + * @param { WordBreak | undefined } value - The word break type.Default value is WordBreak.BREAK_WORD. + * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default wordBreak(value: WordBreak | undefined): this; + /** + * Set the text line break strategy type. + * + *

NOTE: + *
This attribute takes effect when wordBreak is not set to breakAll. Hyphens are not supported. + *

+ * + * @param { LineBreakStrategy | undefined } strategy - The text line break strategy type.Default value is LineBreakStrategy.GREEDY. + * @returns { TextAreaAttribute } The attribute of the TextAreaAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default lineBreakStrategy(strategy: LineBreakStrategy | undefined): this; + /** + * Define custom keyboard of the text area. + * + *

NOTE: + *
When a custom keyboard is set, activating the text box opens the specified custom component, + * instead of the system input method. + *
The custom keyboard's height can be set through the height attribute of the custom component's root node, + * and its width is fixed at the default value. + *
The custom keyboard is presented by overlaying the original screen, + * which is not compressed or lifted if avoid mode is not enabled or avoidance is not needed for the text box. + *
The custom keyboard cannot obtain the focus, but it blocks gesture events. + *
By default, the custom keyboard is closed when the input component loses the focus. + *
You can also use the TextAreaController.stopEditing API to close the keyboard. + *
When a custom keyboard is set, the text box does not support camera input, even when the device supports. + *
When setting a custom keyboard, you can bind the onKeyPrelme event to prevent input from the physical keyboard. + *

+ * + * @param { CustomBuilder | undefined } value - Set up a custom keyboard of TextArea + * @param { KeyboardOptions | undefined } [options] - Indicates the custom keyboard options of TextArea + * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default customKeyboard(value: CustomBuilder | undefined, options?: KeyboardOptions | undefined): this; + /** + * Called when the text decoration of the text is set. + * + * @param { TextDecorationOptions | undefined } value - Default value is { type: TextDecorationType.None, color: Color.Black, style: TextDecorationStyle.SOLID }. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default decoration(value: TextDecorationOptions | undefined): this; + /** + * Called when the distance between text fonts is set. + * + *

NOTE: + *
If the value specified is a percentage or 0, the default value is used. + *
For the string type, numeric string values with optional units, for example, "10" or "10fp", are supported. + *
If the value specified is a negative value, the text is compressed. + *
A negative value too small may result in the text being compressed to 0 and no content being displayed. + *

+ * + * @param { number | string | Resource | undefined } value - The unit is fp. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default letterSpacing(value: number | string | Resource | undefined): this; + /** + * Set font line spacing. + * + *

NOTE: + *
If the value specified is less than or equal to 0, the default value 0 is used. + *

+ * + * @param { LengthMetrics | undefined } value - Default value is 0. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default lineSpacing(value: LengthMetrics | undefined): this; + /** + * Called when the line height of the font is set. + * + *

NOTE: + *
If the value is less than or equal to 0, the line height is not limited and the font size is adaptive. + *
If the value is of the number type, the unit fp is used. + *

+ * + * @param { number | string | Resource | undefined } value + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default lineHeight(value: number | string | Resource | undefined): this; + /** + * Called when the input type is set. + * + * @param { TextAreaType | undefined } value - Default value is TextAreaType.Normal. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default type(value: TextAreaType | undefined): this; + /** + * Sets whether enable auto fill or not. + * + * @param { boolean | undefined } value - Indicates the flag whether autofill is enabled.Default value is true.True: enable, false: disable. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default enableAutoFill(value: boolean | undefined): this; + /** + * Called when the auto fill type is set. + * + * @param { ContentType | undefined } contentType - Indicates autofill type. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default contentType(contentType: ContentType | undefined): this; + /** + * Set font feature. + * + * @param { string | undefined } value - The fontFeature. + * normal | , + * where = [ | on | off ], like: "ss01" 0 + * the values of reference to doc of TextArea component + * number of can be single or multiple, and separated by comma ','. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default fontFeature(value: string | undefined): this; + /** + * Get text value information when about to input. + * + *

NOTE: + *
It returns true if the text is inserted; returns false otherwise. + *
This callback is not triggered for pre-edit or candidate word operations. + *
It is available only for system input methods. + *

+ * + * @param { Callback | undefined } callback - The triggered function when text content is about to insert. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onWillInsert(callback: Callback | undefined): this; + /** + * Get text value information when completed input. + * + *

NOTE: + *
It is available only for system input methods. + *

+ * + * @param { Callback | undefined } callback - The triggered function when text content has been inserted. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onDidInsert(callback: Callback | undefined): this; + /** + * Get text value information when about to delete. + * + *

NOTE: + *
It returns true if the text is deleted; returns false otherwise. + *
This callback is not called for text preview. + *
It is available only for system input methods. + *

+ * + * @param { Callback | undefined } callback - The triggered function when text content is about to delete. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onWillDelete(callback: Callback | undefined): this; + /** + * Get text value information when the deletion has been completed + * + *

NOTE: + *
It is available only for system input methods. + *

+ * + * @param { Callback | undefined } callback - The triggered function when text content has been deleted. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onDidDelete(callback: Callback | undefined): this; + /** + * Set the custom text menu. + * Sets the extended options of the custom context menu on selection, + * including the text content, icon, and callback. + * + * @param { EditMenuOptions | undefined } editMenu - Customize text menu options. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default editMenuOptions(editMenu: EditMenuOptions | undefined): this; + /** + * Define the preview text mode of the text input. + * + *

NOTE: + *
Preview text is in a temporary state and does not support text interception. + *
As such, it does not trigger onWillInsert, onDidInsert, onWillDelete, or onDidDelete callbacks. + *

+ * + * @param { boolean | undefined } enable - Indicates the preview text mode.Default value is true. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default enablePreviewText(enable: boolean | undefined): this; + /** + * Enable or disable haptic feedback. + * + *

NOTE: + *
To enable haptic feedback, + *
you must declare the ohos.permission.VIBRATE permission under requestPermissions in the module.json5 file of the project. + * + * "requestPermissions": [ + * { + * "name": "ohos.permission.VIBRATE", + * } + * ] + * + *

+ * + * @param { boolean | undefined } isEnabled - Default value is true, set false to disable haptic feedback. + * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default enableHapticFeedback(isEnabled: boolean | undefined): this; + /** + * Set text mode of automatic case mode switching. + * + * @param { AutoCapitalizationMode | undefined } mode - Automatic case mode values. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default autoCapitalizationMode(mode: AutoCapitalizationMode | undefined): this; + /** + * Set the text with half leading. + * + * @param { Optional | undefined } halfLeading - Default value is false.The value true means that half leading is enabled, and false means the opposite. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default halfLeading(halfLeading: boolean | undefined): this; + /** + * Set the ellipsis mode. + * + *

NOTE: + *
For the settings to work, overflow must be set to TextOverflow.Ellipsis and maxLines must be specified. + *
Setting ellipsisMode alone does not take effect. + *
EllipsisMode.START and EllipsisMode.CENTER take effect only when maxLines is set to 1. + *

+ * + * @param { EllipsisMode | undefined } mode - The ellipsis mode.Default value is EllipsisMode.END. + * @returns { TextAreaAttribute } The attribute of TextArea. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default ellipsisMode(mode: EllipsisMode | undefined): this; + /** + * Set whether stop backPressed callback event or not. + * + * @param { Optional | undefined } isStopped - Default value is true, set false to trigger the latest callback event. + * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default stopBackPress(isStopped: boolean | undefined): this; + /** + * Get text value information when about to change. + * + *

NOTE: + *
This callback is triggered after onWillInsert and onWillDelete, but before onDidInsert and onDidDelete. + *

+ * + * @param { Callback | undefined } callback - The triggered function when text content is about to change. + * Returning true allows the change to proceed, while returning false cancels the change. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onWillChange(callback: Callback | undefined): this; + /** + * Set the keyboard appearance. + * + * @param { Optional | undefined } appearance - Default value is KeyboardAppearance.NONE_IMMERSIVE + * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default keyboardAppearance(appearance: KeyboardAppearance | undefined): this; + /** + * Sets the attribute modifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier. + * @returns { TextAreaAttribute } the attribute of the TextAreaAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; +} + +/** + * Defines TextArea Component. + * + * @param { TextAreaOptions } [value] + * @param { function } [content_] + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@memo +@ComponentBuilder +export declare function TextArea( + value?: TextAreaOptions, + @memo + content_?: () => void, +): TextAreaAttribute \ No newline at end of file diff --git a/api/arkui/component/textInput.static.d.ets b/api/arkui/component/textInput.static.d.ets new file mode 100644 index 0000000000..d38c228ed4 --- /dev/null +++ b/api/arkui/component/textInput.static.d.ets @@ -0,0 +1,1771 @@ +/* + * 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 { CancelButtonSymbolOptions, CancelButtonOptions } from "./search"; +import { Callback, CommonMethod, TextContentControllerBase, SelectionOptions, InputCounterOptions, TextDecorationOptions, Optional, Bindable, AttributeModifier } from "./common"; +import { CustomBuilder } from './builder'; +import { BarState, LineBreakStrategy, TextAlign, FontStyle, FontWeight, WordBreak, TextOverflow, CopyOptions, TextHeightAdaptivePolicy, TextContentStyle, EllipsisMode } from "./enums"; +import { Resource, ResourceStr, ResourceColor, Dimension, Font, Length } from "./units"; +import { InsertValue, DeleteValue, CaretStyle, EditableTextOnChangeCallback, EditMenuOptions, AutoCapitalizationMode, EditableTextChangeValue, KeyboardAppearance } from "./textCommon"; +import { KeyboardOptions, PasteEvent } from "./richEditor"; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; +/** + * Declare the type of input box + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum InputType { + /** + * Basic input mode. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Normal, + /** + * Pure digital input mode. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Number, + /** + * Phone number entry mode. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + PhoneNumber, + /** + * E-mail address input mode. + * + *

NOTE: + *
This mode accepts only digits, letters, underscores (_), dots (.), + * and the following special characters: ! # $ % & ' " * + - / = ? ^ ` { | } ~ @ (which can only appear once) + *

+ * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Email, + /** + * Password entry mode. + * + *

NOTE: + *
An eye icon is used to show or hide the password. + *
By default, the entered characters are temporarily shown before being obscured by dots; + * they are directly obscured by dots since API version 12 on certain devices. + *
The password input mode does not support underlines. + *
If Password Vault is enabled, autofill is available for the username and password. + *

+ * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Password, + /** + * Number Password entry mode. + * + *

NOTE: + *
An eye icon is used to show or hide the password. + *
By default, the entered characters are temporarily shown before being obscured by dots; + * they are directly obscured by dots since API version 12 on certain devices. + *
The password input mode does not support underlines. + *

+ * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + NUMBER_PASSWORD = 8, + /** + * Screen Lock Password entry mode. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + */ + SCREEN_LOCK_PASSWORD = 9, + /** + * UserName entry mode. + * + *

NOTE: + *
If Password Vault is enabled, autofill is available for the username and password. + *

+ * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + USER_NAME = 10, + /** + * NewPassword entry mode. + * + *

NOTE: + *
An eye icon is used to show or hide the password. + *
By default, the entered characters are temporarily shown before being obscured by dots; + * they are directly obscured by dots since API version 12 on certain devices. + *
If Password Vault is enabled, a new password can be automatically generated. + *

+ * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + NEW_PASSWORD = 11, + /** + * Number decimal entry mode. + * + *

NOTE: + *
The value can contain digits and one decimal point. + *

+ * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + NUMBER_DECIMAL = 12, + /** + * URL entry mode. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + URL = 13 +} +/** + * Declare the type of input content + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum ContentType { + /** + * User name content type. + * Password Vault, when enabled, can automatically save and fill in usernames. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + USER_NAME = 0, + /** + * Password content type. + * Password Vault, when enabled, can automatically save and fill in passwords. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + PASSWORD = 1, + /** + * New password content type. + * Password Vault, when enabled, can automatically generate a new password. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + NEW_PASSWORD = 2, + /** + * Full street address content type. + * The scenario-based autofill feature, when enabled, + * can automatically save and fill in full street addresses. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + FULL_STREET_ADDRESS = 3, + /** + * House number content type. + * The scenario-based autofill feature, when enabled, + * can automatically save and fill in house numbers. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + HOUSE_NUMBER = 4, + /** + * District address content type. + * The scenario-based autofill feature, when enabled, + * can automatically save and fill in districts and counties. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + DISTRICT_ADDRESS = 5, + /** + * City address content type. + * The scenario-based autofill feature, when enabled, + * can automatically save and fill in cities. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + CITY_ADDRESS = 6, + /** + * Province address content type. + * The scenario-based autofill feature, when enabled, + * can automatically save and fill in provinces. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + PROVINCE_ADDRESS = 7, + /** + * Country address content type. + * The scenario-based autofill feature, when enabled, + * can automatically save and fill in countries. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + COUNTRY_ADDRESS = 8, + /** + * Person full name content type. + * The scenario-based autofill feature, when enabled, + * can automatically save and fill in full names. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + PERSON_FULL_NAME = 9, + /** + * Person last name content type. + * The scenario-based autofill feature, when enabled, + * can automatically save and fill in last names. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + PERSON_LAST_NAME = 10, + /** + * Person first name content type. + * The scenario-based autofill feature, when enabled, + * can automatically save and fill in first names. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + PERSON_FIRST_NAME = 11, + /** + * Phone number content type. + * The scenario-based autofill feature, when enabled, + * can automatically save and fill in phone numbers. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + PHONE_NUMBER = 12, + /** + * Phone country code content type. + * The scenario-based autofill feature, when enabled, + * can automatically save and fill in country codes. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + PHONE_COUNTRY_CODE = 13, + /** + * Full phone number content type. + * The scenario-based autofill feature, when enabled, + * can automatically save and fill in phone numbers with country codes. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + FULL_PHONE_NUMBER = 14, + /** + * Email address content type. + * The scenario-based autofill feature, when enabled, + * can automatically save and fill in email addresses. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + EMAIL_ADDRESS = 15, + /** + * Bank card number content type. + * The scenario-based autofill feature, when enabled, + * can automatically save and fill in bank card numbers. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + BANK_CARD_NUMBER = 16, + /** + * ID card number content type. + * The scenario-based autofill feature, when enabled, + * can automatically save and fill in ID card numbers. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ID_CARD_NUMBER = 17, + /** + * Nickname content type. + * The scenario-based autofill feature, when enabled, + * can automatically save and fill in nicknames. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + NICKNAME = 23, + /** + * Detail info without street content type. + * The scenario-based autofill feature, when enabled, + * can automatically save and fill in address information without street addresses. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + DETAIL_INFO_WITHOUT_STREET = 24, + /** + * Format address content type. + * The scenario-based autofill feature, when enabled, + * can automatically save and fill in standard addresses. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + FORMAT_ADDRESS = 25, + /** + * Passport number content type. + * The scenario-based autofill feature, when enabled, + * can automatically save and fill in passport numbers. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + PASSPORT_NUMBER = 26, + /** + * Passport validity content type. + * The scenario-based autofill feature, when enabled, + * can automatically save and fill in passport validity periods. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + VALIDITY = 27, + /** + * Place of issue content type. + * The scenario-based autofill feature, when enabled, + * can automatically save and fill in the place of issue for passports. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ISSUE_AT = 28, + /** + * Invoice organization content type. + * The scenario-based autofill feature, when enabled, + * can automatically save and fill in invoice titles. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ORGANIZATION = 29, + /** + * Invoice tax id content type. + * The scenario-based autofill feature, when enabled, + * can automatically save and fill in tax IDs. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + TAX_ID = 30, + /** + * Address city and state content type. + * The scenario-based autofill feature, when enabled, + * can automatically save and fill in locations. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ADDRESS_CITY_AND_STATE = 31, + /** + * Airline flight number content type. + * Currently not supported for automatic saving and auto-filling. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + FLIGHT_NUMBER = 32, + /** + * License number for drivers content type. + * Currently not supported for automatic saving and auto-filling. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + LICENSE_NUMBER = 33, + /** + * License file number for drivers content type. + * Currently not supported for automatic saving and auto-filling. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + LICENSE_FILE_NUMBER = 34, + /** + * License plate for vehicles content type. + * The scenario-based autofill feature, when enabled, + * can automatically save and fill in license plate numbers. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + LICENSE_PLATE = 35, + /** + * Engine number for vehicles content type. + * Currently not supported for automatic saving and auto-filling. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ENGINE_NUMBER = 36, + /** + * License chassis number for vehicles content type. + * Currently not supported for automatic saving and auto-filling. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + LICENSE_CHASSIS_NUMBER = 37 +} +/** + * Declare the type of soft keyboard. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum EnterKeyType { + /** + * Go. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Go = 2, + /** + * Search. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Search = 3, + /** + * Send. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Send = 4, + /** + * Next. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Next = 5, + /** + * Done. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Done = 6, + /** + * Showed as 'previous' pattern. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + PREVIOUS = 7, + /** + * Showed as 'new line' pattern. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + NEW_LINE = 8 +} +/** + * Defines the underline color width property. + * + * @interface UnderlineColor + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface UnderlineColor { + /** + * Typing underline color width property. + * + *

NOTE: + *
If no value is specified or if the value specified is undefined, + * null, or invalid, the default value is used. + *

+ * + * @type { ?(ResourceColor | undefined) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + typing?: ResourceColor | undefined; + /** + * Normal underline color width property. + * + *

NOTE: + *
If no value is specified or if the value specified is undefined, + * null, or invalid, the default value is used. + *

+ * + * @type { ?(ResourceColor | undefined) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + normal?: ResourceColor | undefined; + /** + * Error underline color width property. + * + *

NOTE: + *
If no value is specified or if the value specified is undefined, + * null, or invalid, the default value is used. + *
This option changes the color used in the showCounter attribute + * when the maximum number of characters is reached. + *

+ * + * @type { ?(ResourceColor | undefined) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + error?: ResourceColor | undefined; + /** + * Disable underline color width property. + * + *

NOTE: + *
If no value is specified or if the value specified is undefined, + * null, or invalid, the default value is used. + *

+ * + * @type { ?(ResourceColor | undefined) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + disable?: ResourceColor | undefined; +} +/** + * Provides the method of keeping TextInput editable state when submitted. + * + * @interface SubmitEvent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface SubmitEvent { + /** + * Keeps TextInput editable state when submitted + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + keepEditableState(): void; + /** + * Sets the current value of TextInput. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + text: string; +} +/** + * Provides the method of switching the cursor position. + * + * @extends TextContentControllerBase + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class TextInputController extends TextContentControllerBase { + /** + * constructor. + * A constructor used to create a TextInputController object. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(); + /** + * Called when the position of the insertion cursor is set. + * + *

NOTE: + *
If the value is less than 0, the value 0 is used. + *
If the value exceeds the text length, the caret is placed at the end of the text. + *

+ * + * @param { number } value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + caretPosition(value: number): void; + /** + * Text selection is achieved by specifying the start and end positions of the text. + * + *

NOTE: + *
If selectionStart or selectionEnd is set to undefined, the value 0 will be used. + *
If selectionMenuHidden is set to true or a 2-in-1 device is used, + * calling setTextSelection does not display the context menu even when options is set to MenuPolicy.SHOW. + *
If the selected text contains an emoji, + * the emoji is selected when its start position is within the text selection range. + *

+ * + * @param { number } selectionStart - The start position of the selected text.The start position of text in the text box is 0. + * @param { number } selectionEnd - The end position of the selected text. + * @param { SelectionOptions } [options] - Indicates the options of the text selection.Default value is MenuPolicy.DEFAULT. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + setTextSelection(selectionStart: number, selectionEnd: number, options?: SelectionOptions): void; + /** + * Exit edit state. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + stopEditing(): void; +} +/** + * Defines the options of TextInput. + * + * @interface TextInputOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface TextInputOptions { + /** + * The place holder text string. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + placeholder?: ResourceStr; + /** + * Sets the current value of TextInput. + * + * @type { ?(ResourceStr | Bindable | Bindable | Bindable) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + text?: ResourceStr | Bindable | Bindable | Bindable; + /** + * Called when the position of the insertion cursor is set. + * + * @type { ?TextInputController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + controller?: TextInputController; +} +/** + * Text input style. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum TextInputStyle { + /** + * Text input default style. + * + *

NOTE: + *
The caret width is fixed at 1.5 vp, + * and the caret height is subject to the background height and font size of the selected text. + *

+ * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Default, + /** + * Text input inline style. + * + *

NOTE: + *
The background height of the selected text is the same as the height of the text box. + *
This style is used in scenarios where editing and non-editing states are obvious, + * for example, renaming in the file list view. + *
The showError attribute is not supported for this style. + *
This style does not allow for text dragging and dropping. + *

+ * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Inline +} +/** + * PasswordIcon object. + * + * @interface PasswordIcon + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface PasswordIcon { + /** + * Define the on icon source of PasswordIcon. + * + *

NOTE: + *
Icon that can be used to hide the password in password input mode. + *
The string type can be used to load network images and local images. + *

+ * + * @type { ?(string | Resource) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onIconSrc?: string | Resource; + /** + * Define the off icon source of PasswordIcon. + * + *

NOTE: + *
Icon that can be used to show the password in password input mode. + *
The string type can be used to load network images and local images. + *

+ * + * @type { ?(string | Resource) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + offIconSrc?: string | Resource; +} +/** + * Defines a TextInput callback when onSubmit. + * + * Anonymous Object Rectification. + * @typedef { function } OnSubmitCallback + * @param { EnterKeyType } enterKey - Input method Enter key type. + * @param { SubmitEvent } event - The event submitted. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export type OnSubmitCallback = (enterKey: EnterKeyType, event: SubmitEvent) => void; +/** + * Defines a TextInput callback when onTextSelectionChange. + * + * Anonymous Object Rectification. + * @typedef { function } OnTextSelectionChangeCallback + * @param { number } selectionStart - The starting position of the selected text, the starting position of the text is 0. + * @param { number } selectionEnd - The end location of the selected text. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export type OnTextSelectionChangeCallback = (selectionStart: number, selectionEnd: number) => void; +/** + * Defines a TextInput callback when onContentScroll. + * + * Anonymous Object Rectification. + * @typedef { function } OnContentScrollCallback + * @param { number } totalOffsetX - The text is offset in px on the horizontal axis of the content area. + * @param { number } totalOffsetY - The text is offset in px on the vertical axis of the content area. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export type OnContentScrollCallback = (totalOffsetX: number, totalOffsetY: number) => void; +/** + * Defines a TextInput callback when onPaste. + * + * Anonymous Object Rectification. + * @typedef { function } OnPasteCallback + * @param { string } content - The text content of the paste. + * @param { PasteEvent } event - User-defined paste event. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export type OnPasteCallback = (content: string, event: PasteEvent) => void; +/** + * Defines the TextInput attribute functions. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare interface TextInputAttribute extends CommonMethod { + /** + * Called when the input type is set. + * + * @param { InputType | undefined } value - Default value is InputType.Normal. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default type(value: InputType | undefined): this; + /** + * Called when the content type is set. + * + * @param { ContentType | undefined } value + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default contentType(value: ContentType | undefined): this; + /** + * Called when the color of the placeholder is set. + * + * @param { ResourceColor | undefined } value - Default value follows the theme.The default value on wearable devices is '#99ffffff'. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default placeholderColor(value: ResourceColor | undefined): this; + /** + * Called when the overflow mode of the font is set. + * + *

NOTE: + *
This attribute is only available for the inline input style. + *
Text is clipped at the transition between words. + *
To clip text in the middle of a word, set wordBreak to WordBreak.BREAK_ALL. + *
TextOverflow.None produces the same effect as TextOverflow.Clip. + *
Default value in non-editing state in the inline input style: TextOverflow.Ellipsis. + *
Default value in editing state in the inline input style: TextOverflow.Clip. + *
The TextInput component does not support the TextOverflow.MARQUEE mode. + *
If TextOverflow.MARQUEE is set, the component automatically switches to TextOverflow.Ellipsis + * for the non-editing state in the inline input style and TextOverflow.Clip + * for the non-inline input style and the editing state in the inline input style. + *

+ * + * @param { TextOverflow | undefined } value + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default textOverflow(value: TextOverflow | undefined): this; + /** + * Specify the indentation of the first line in a text-block. + * + * @param { Dimension | undefined } value - The length of text indent.Default value is 0. + * @returns { TextInputAttribute } The attribute of the text. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default textIndent(value: Dimension | undefined): this; + /** + * Called when the font property of the placeholder is set. + * + *

NOTE: + *
The 'HarmonyOS Sans' font and registered custom fonts are supported. + *
The default value on wearable devices is 18fp. + *

+ * + * @param { Font | undefined } value + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default placeholderFont(value?: Font | undefined): this; + /** + * Called when the type of soft keyboard input button is set. + * + * @param { EnterKeyType | undefined } value - Default value is EnterKeyType.Done. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default enterKeyType(value: EnterKeyType | undefined): this; + /** + * Called when the color of the insertion cursor is set. + * + *

NOTE: + *
Since API version 12, this API can be used to set the text handle color, which is the same as the caret color. + *

+ * + * @param { ResourceColor | undefined } value - Default value is '#007DFF'. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default caretColor(value: ResourceColor | undefined): this; + /** + * Called when judging whether the text editing change finished. + * + * Anonymous Object Rectification. + * + *

NOTE: + *
The text box is in the editing state when it has the caret placed in it, + * and is in the non-editing state otherwise. + *
It returns true if the input operation is currently in progress. + *

+ * + * @param { Callback | undefined } callback + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onEditChange(callback: Callback | undefined): this; + /** + * Called when submitted. + * + * Anonymous Object Rectification. + * @param { OnSubmitCallback | undefined } callback - Callback of the listened event. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onSubmit(callback: OnSubmitCallback | undefined): this; + /** + * Called when the input of the input box changes. + * + *

NOTE: + *
In this callback, if cursor operations are performed, you need to adjust the cursor logic + * based on the previewText parameter to ensure it works seamlessly within the preview display scenario. + *

+ * + * @param { EditableTextOnChangeCallback | undefined } callback + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onChange(callback: EditableTextOnChangeCallback | undefined): this; + /** + * Called when the text selection changes. + * + * Anonymous Object Rectification. + * @param { OnTextSelectionChangeCallback | undefined } callback - Callback of the listened event. + * @returns { TextInputAttribute } Returns the instance of the TextInputAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onTextSelectionChange(callback: OnTextSelectionChangeCallback | undefined): this; + /** + * Called when the content scrolls. + * + * Anonymous Object Rectification. + * @param { OnContentScrollCallback | undefined } callback - Callback of the listened event. + * @returns { TextInputAttribute } Returns the instance of the TextInputAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onContentScroll(callback: OnContentScrollCallback | undefined): this; + /** + * Called when the input of maximum text length is set. + * + *

NOTE: + *
If this attribute is not set or is set to an invalid value, the default value is used. + *
If a decimal number is specified, the integer part is used. + *

+ * + * @param { number | undefined } value - Default value is Infinity, indicating that there is no upper limit on the number of characters that can be entered. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default maxLength(value: number | undefined): this; + /** + * Called when the font color is set. + * + * @param { ResourceColor | undefined } value - The default value on wearable devices is '#dbffffff'. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default fontColor(value: ResourceColor | undefined): this; + /** + * Called when the font size is set. + * + *

NOTE: + *
If fontSize is of the number type, the unit fp is used. + *
The default font size is 16 fp. + *
The value cannot be a percentage. + *
The default value on wearable devices is 18fp. + *

+ * + * @param { Length | undefined } value + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default fontSize(value: Length | undefined): this; + /** + * Called when the font style of a font is set. + * + * @param { FontStyle | undefined } value - Default value is FontStyle.Normal. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default fontStyle(value: FontStyle | undefined): this; + /** + * Called when the font weight is set. + * + * @param { number | FontWeight | string | undefined } value + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default fontWeight(value: number | FontWeight | string | undefined): this; + /** + * Called when the font list of text is set. + * + *

NOTE: + *
Default font: 'HarmonyOS Sans' + *
The 'HarmonyOS Sans' font and registered custom fonts are supported for applications. + *
Only the 'HarmonyOS Sans' font is supported for widgets. + *

+ * + * @param { ResourceStr | undefined } value + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default fontFamily(value: ResourceStr | undefined): this; + /** + * Called when the inputFilter of text is set. + * + * Anonymous Object Rectification. + * + *

NOTE: + *
Only inputs that comply with the regular expression can be displayed. + *
Other inputs are filtered out. + *
The specified regular expression can match single characters, but not strings. + *
Since API version 11, if inputFilter is set and the entered characters are not null, + * the filtering effect attached to the text box type (specified through the type attribute) does not take effect. + *

+ * + * @param { ResourceStr | undefined } value + * @param { Callback | undefined } [error] + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default inputFilter(value: ResourceStr | undefined, error?: Callback | undefined): this; + /** + * Called when using the Clipboard menu. + * + * Anonymous Object Rectification. + * @param { Callback | undefined } callback - Callback used to return the copied text content. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onCopy(callback: Callback | undefined): this; + /** + * Called when using the Clipboard menu. + * + * Anonymous Object Rectification. + * @param { Callback | undefined } callback + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onCut(callback: Callback | undefined): this; + /** + * Called when using the Clipboard menu. + * + * Anonymous Object Rectification. + * @param { OnPasteCallback | undefined } callback - Executed when a paste operation is performed. + * @returns { TextInputAttribute } Returns the instance of the TextInputAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onPaste(callback: OnPasteCallback | undefined): this; + /** + * Called when the copy option is set. + * + *

NOTE: + *
If this attribute is set to CopyOptions.None, the text can only be pasted; + * all other actions, such as copying, cutting, and sharing, are disabled. + *
Dragging is not allowed when CopyOptions.None is set. + *

+ * + * @param { CopyOptions | undefined } value - Default value is CopyOptions.LocalDevice. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default copyOption(value: CopyOptions | undefined): this; + /** + * Called when the password show/hide icon is set. + * + *

NOTE: + *
This API has effect only when the input type is set to Password, + * NEWPASSWORD, or NUMBERPASSWORD mode. It does not work in other modes. + *
When in password mode, there may be inconsistency between the backend state of the text box + * and the frontend application's state management variables. + *
This can cause issues with the icon at the end of the password text box. + *
To avoid such issues, use the onSecurityStateChange callback to sync the states. + *

+ * + * @param { boolean | undefined } value - Default value is false. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default showPasswordIcon(value: boolean | undefined): this; + /** + * Called when the text align is set. + * + *

NOTE: + *
Available options are TextAlign.Start, TextAlign.Center, and TextAlign.End. + *
To set vertical alignment for the text, use the align attribute. + *
The align attribute alone does not control the horizontal position of the text. + *
In other words, Alignment.TopStart, Alignment.Top, and Alignment.TopEnd produce the same effect, top-aligning the text; + * Alignment.Start, Alignment.Center, and Alignment.End produce the same effect, centered-aligning the text vertically; + * Alignment.BottomStart, Alignment.Bottom, and Alignment.BottomEnd produce the same effect, bottom-aligning the text. + *

+ * + * @param { TextAlign | undefined } value - Default value is TextAlign.Start. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default textAlign(value: TextAlign | undefined): this; + /** + * Text input style + * + *

NOTE: + *
The inline input style only supports InputType.Normal. + *

+ * + * @param { TextInputStyle | TextContentStyle | undefined } value - Text input style.Default value is TextInputStyle.Default. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default style(value: TextInputStyle | TextContentStyle | undefined): this; + /** + * Define the caret style of the text input + * + * @param { CaretStyle | undefined } value + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default caretStyle(value: CaretStyle | undefined): this; + /** + * Define the text selected background color of the text input. + * + *

NOTE: + *
If the opacity is not set, a 20% opacity will be used. + *

+ * + * @param { ResourceColor | undefined } value + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default selectedBackgroundColor(value: ResourceColor | undefined): this; + /** + * Define the caret position of the text input. + * + * @param { number | undefined } value + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default caretPosition(value: number | undefined): this; + /** + * Sets whether request keyboard or not when on focus. + * Sets whether to enable the input method when the TextInput component obtains focus in a way other than clicking. + * + *

NOTE: + *
Since API version 10, the TextInput component brings up the keyboard by default when it obtains focus. + *

+ * + * @param { boolean | undefined } value - Default value is true. + * @returns { TextInputAttribute } Returns the instance of the TextInputAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default enableKeyboardOnFocus(value: boolean | undefined): this; + /** + * Define the password icon of the text input. + * + *

NOTE: + *
Images in JPG, PNG, BMP, HEIC, and WEBP formats are supported. + *
By default, the system-provided icon is used. + *
The icon size is fixed at 24 vp (or 28 vp on wearable devices), regardless of the source image size. + *

+ * + * @param { PasswordIcon | undefined } value + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default passwordIcon(value: PasswordIcon | undefined): this; + /** + * Define the show error of the text input. + * + *

NOTE: + *
On wearable devices, the error message is displayed at a font size of 13 fp and center-aligned. + *
If the data type is ResourceStr and the input content does not comply with specifications, the error message is displayed. + *
If the error message does not fit in one line, an ellipsis (…) is displayed to represent clipped text. + *
If the data type is undefined, no error message is displayed. + *
By default, no error message is displayed. + *

+ * + * @param { ResourceStr | undefined } [value] + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default showError(value?: ResourceStr | undefined): this; + /** + * Define the show unit of the text input. + * + *

NOTE: + *
This attribute effective only when showUnderline is set to true. + *

+ * + * @param { CustomBuilder | undefined } value + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default showUnit(value: CustomBuilder | undefined): this; + /** + * Define the show underline of the text input. + * + *

NOTE: + *
By default, the underline comes in the color of '#33182431', thickness of 1 px, and text box size of 48 vp. + *
The underline is only available for the InputType.Normal type. + *

+ * + * @param { boolean | undefined } value - Default value is false. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default showUnderline(value: boolean | undefined): this; + /** + * Define the underline color of the text input. + * + *

NOTE: + *
The underline color changes with the underline mode. + *
If the underline color is only set for the normal state, you can directly enter a value of the ResourceColor type. + *
If the value specified is undefined, null, or invalid, all underlines are restored to the default value. + *
Default value: underline color configured for the theme, which is #33182431 by default. + *

+ * + * @param { ResourceColor | UnderlineColor | undefined } value + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default underlineColor(value: ResourceColor | UnderlineColor | undefined): this; + /** + * Controls whether the selection menu pops up. + * + *

NOTE: + *
true: + *
The system text selection menu does not appear under the following circumstances: + * clicking the text box cursor, long-pressing the text box, double-tapping the text box, + * triple-tapping the text box, or right-clicking the text box. + *
false: + *
The system text selection menu appears under the following circumstances: + * clicking the text box cursor, long-pressing the text box, double-tapping the text box, + * triple-tapping the text box, or right-clicking the text box. + *

+ * + * @param { boolean | undefined } value - Default value is false. + * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default selectionMenuHidden(value: boolean | undefined): this; + /** + * Define bar state of the text input. + * + * @param { BarState | undefined } value - Default value is BarState.Auto. + * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default barState(value: BarState | undefined): this; + /** + * Define max lines of the text input. + * Value range: (0, +∞) + * + * @param { number | undefined } value - Default value is 3. + * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default maxLines(value: number | undefined): this; + /** + * Set the text inline style word break type. + * + *

NOTE: + *
This attribute is effective for the inline input style, + * but does not apply to the placeholder text. + *
The component does not support the clip attribute. + *
Therefore, setting this attribute does not affect text clipping. + *

+ * + * @param { WordBreak | undefined } value - The word break type.Default value is WordBreak.BREAK_WORD. + * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default wordBreak(value: WordBreak | undefined): this; + /** + * Set the text line break strategy type. + * + *

NOTE: + *
This attribute takes effect when wordBreak is not set to breakAll. + *
Hyphens are not supported. + *
This attribute does not take effect for the non-inline input style. + *

+ * + * @param { LineBreakStrategy | undefined } strategy - The text line break strategy type.Default value is LineBreakStrategy.GREEDY. + * @returns { TextInputAttribute } The attribute of the TextInputAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default lineBreakStrategy(strategy: LineBreakStrategy | undefined): this; + /** + * Define custom keyboard of the text input. + * + *

NOTE: + *
When a custom keyboard is set, activating the text box opens the specified custom component, + * instead of the system input method. + *
The custom keyboard's height can be set through the height attribute of the custom component's root node, + * and its width is fixed at the default value. + *
The custom keyboard is presented by overlaying the original screen, + * which is not compressed or lifted if avoid mode is not enabled or avoidance is not needed for the text box. + *
The custom keyboard cannot obtain the focus, but it blocks gesture events. + *
By default, the custom keyboard is closed when the input component loses the focus. + *
You can also use the TextInputController.stopEditing API to close the keyboard. + *
When a custom keyboard is set, the text box does not support camera input, even when the device supports. + *
When setting a custom keyboard, you can bind the onKeyPrelme event to prevent input from the physical keyboard. + *

+ * + * @param { CustomBuilder | undefined } value - Set up a custom keyboard of TextInput + * @param { KeyboardOptions | undefined } [options] - Indicates the custom keyboard options of TextInput + * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default customKeyboard(value: CustomBuilder | undefined, options?: KeyboardOptions | undefined): this; + /** + * Show the counter when the number of characters entered exceeds the threshold through InputCounterOptions. + * + *

NOTE: + *
options can be set only when value is set to true, in which case a character counter is displayed below the text box. + *
This attribute must be used together with maxLength. + *
The character counter is displayed in this format: Number of characters entered/Character limit. + *
It is visible when the number of characters entered is greater than the character limit multiplied by the threshold percentage value. + *
If options is not set, the text box border and character counter subscript turn red + * when the number of characters entered exceeds the limit. + *
If value is set to true and options is set, the text box border and character counter subscript turn red + * and the text box shakes when the number of characters entered reaches the limit, + * provided that the value of thresholdPercentage is valid. + *
If highlightBorder is set to false, the text box border does not turn red. + *
By default, highlightBorder is set to true. + *
The character counter is not displayed for text boxes in inline or password input style. + *

+ * + * @param { boolean | undefined } value - Set showcounter of the text input. + * @param { InputCounterOptions | undefined } options - Set the percentage of counter. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default showCounter(value: boolean | undefined, options?: InputCounterOptions | undefined): this; + /** + * Set the cancel button style + * + * @param { CancelButtonOptions | CancelButtonSymbolOptions | undefined } symbolOptions - indicates the style of the cancel button. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default cancelButton(symbolOptions: CancelButtonOptions | CancelButtonSymbolOptions | undefined): this; + /** + * Sets selection when on focus. + * + *

NOTE: + *
This attribute is not available for the inline input style. + *

+ * + * @param { boolean | undefined } value - Sets selection or not.Default value is false. + * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default selectAll(value: boolean | undefined): this; + /** + * Called when the minimum font size of the font is set. + * + *

NOTE: + *
For the string type, numeric string values with optional units, + * for example, "10" or "10fp", are supported. + *
For the setting to take effect, this attribute must be used together with maxFontSize + * and maxLines (when the component is in editing state in the inline input style), or layout constraint settings. + *
When the adaptive font size is used, the fontSize settings do not take effect. + *

+ * + * @param { number | string | Resource | undefined } value - The unit is fp. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default minFontSize(value: number | string | Resource | undefined): this; + /** + * Called when the maximum font size of the font is set. + * + *

NOTE: + *
For the string type, numeric string values with optional units, + * for example, "10" or "10fp", are supported. + *
For the setting to take effect, this attribute must be used together with minFontSize + * and maxLines (when the component is in editing state in the inline input style), or layout constraint settings. + *
When the adaptive font size is used, the fontSize settings do not take effect. + *

+ * + * @param { number | string | Resource | undefined } value - The unit is fp. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default maxFontSize(value: number | string | Resource | undefined): this; + /** + * Called when the minimum font scale of the font is set. + * + * @param { number | Resource | undefined } scale + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default minFontScale(scale: number | Resource | undefined): this; + /** + * Called when the maximum font scale of the font is set. + * + * @param { number | Resource | undefined } scale + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default maxFontScale(scale: number | Resource | undefined): this; + /** + * Called when the height adaptive policy is set. + * + *

NOTE: + *

    + *
  • When this attribute is set to TextHeightAdaptivePolicy.MAX_LINES_FIRST, + * the maxLines attribute takes precedence for adjusting the text height. + *
    If the maxLines setting results in a layout beyond the layout constraints, + * the text will shrink to a font size between minFontSize and maxFontSize to allow for more content to be shown.
  • + *
  • If this attribute is set to TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST, + * the minFontSize attribute takes precedence for adjusting the text height. + *
    If the text can fit in one line with the minFontSize setting, + * the text will enlarge to the largest possible font size between minFontSize and maxFontSize.
  • + *
  • TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST produces the same effect as TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST.
  • + *
+ *
When the component is in the non-inline input style, the three values of TextHeightAdaptivePolicy have the same effect, + * that is, the text will shrink to a font size between minFontSize and maxFontSize to allow for more content to be shown. + *
If the text box is in inline input style, + * the font size in the editing state is different from that in the non-editing state. + *

+ * + * @param { TextHeightAdaptivePolicy | undefined } value - The height adaptive policy.Default value is TextHeightAdaptivePolicy.MAX_LINES_FIRST. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default heightAdaptivePolicy(value: TextHeightAdaptivePolicy | undefined): this; + /** + * Sets whether enable auto fill or not. + * + * @param { boolean | undefined } value - Indicates the flag whether autofill is enabled.Default value is rue.True: enable, false: disable. + * @returns { TextInputAttribute } Returns the instance of the TextInputAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default enableAutoFill(value: boolean | undefined): this; + /** + * Called when the text decoration of the text is set. + * + *

NOTE: + *
This attribute does not take effect for the password input mode. + *

+ * + * @param { TextDecorationOptions | undefined } value - Default value is { type: TextDecorationType.None, color: Color.Black, style: TextDecorationStyle.SOLID }. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default decoration(value: TextDecorationOptions | undefined): this; + /** + * Called when the distance between text fonts is set. + * + *

NOTE: + *
If the value specified is a percentage or 0, the default value is used. + *
For the string type, numeric string values with optional units, + * for example, "10" or "10fp", are supported. + *
If the value specified is a negative value, the text is compressed. + *
A negative value too small may result in the text being compressed to 0 + * and no content being displayed. + *

+ * + * @param { number | string | Resource | undefined } value - The unit is fp. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default letterSpacing(value: number | string | Resource | undefined): this; + /** + * Called when the line height of the font is set. + * + *

NOTE: + *
If the value is less than or equal to 0, the line height is not limited and the font size is adaptive. + *
If the value is of the number type, the unit fp is used. + *
For the string type, numeric string values with optional units, for example, "10" or "10fp", are supported. + *

+ * + * @param { number | string | Resource | undefined } value + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default lineHeight(value: number | string | Resource | undefined): this; + /** + * Define the password rules of the text input. + * + *

NOTE: + *
When autofill is used, these rules are transparently transmitted to Password Vault for generating a new password. + *

+ * + * @param { string | undefined } value - Indicates the password rules. + * @returns { TextInputAttribute } Returns the instance of the TextInputAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default passwordRules(value: string | undefined): this; + /** + * Set font feature. + * + *

NOTE: + *
This attribute is not available when type is set to an enum value that indicates the password input mode, + * such as Password, NEW_PASSWORD, or NUMBER_PASSWORD. + *

+ * + * @param { string | undefined } value - The fontFeature. + * normal | , + * where = [ | on | off ], like: "ss01" 0 + * the values of reference to doc of TextInput component + * number of can be single or multiple, and separated by comma ','. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default fontFeature(value: string | undefined): this; + /** + * Define the password visible mode of the text input. + * + *

NOTE: + *
This API has effect only when the input type is set to Password, NEWPASSWORD, or NUMBERPASSWORD mode. + *
It does not work in other modes. + *
When in password mode, there may be inconsistency between the backend state of the text box + * and the frontend application's state management variables. + *
This can cause issues with the icon at the end of the password text box. + *
To avoid such issues, use the onSecurityStateChange callback to sync the states. + *

+ * + * @param { boolean | undefined } visible - Indicates the password visible mode. Default value is false. + * @returns { TextInputAttribute } Returns the instance of the TextInputAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default showPassword(visible: boolean | undefined): this; + /** + * Called when changing the password visible mode of the text input. + * + * @param { Callback | undefined } callback - callback of the password visible mode change event. + * @returns { TextInputAttribute } Returns the instance of the TextInputAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onSecurityStateChange(callback: Callback | undefined): this; + /** + * Get text value information when about to input. + * + *

NOTE: + *
It returns true if the text is inserted; returns false otherwise. + *
This callback is not triggered for pre-edit or candidate word operations. + *
It is available only for system input methods. + *

+ * + * @param { Callback | undefined } callback - The triggered function when text content is about to insert. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onWillInsert(callback: Callback | undefined): this; + /** + * Get text value information when completed input. + * + *

NOTE: + *
It is available only for system input methods. + *

+ * + * @param { Callback | undefined } callback - The triggered function when text content has been inserted. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onDidInsert(callback: Callback | undefined): this; + /** + * Get text value information when about to delete. + * + *

NOTE: + *
It returns true if the text is deleted; returns false otherwise. + *
This callback is not called for text preview. + *
It is available only for system input methods. + *

+ * + * @param { Callback | undefined } callback - The triggered function when text content is about to delete. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onWillDelete(callback: Callback | undefined): this; + /** + * Get text value information when the deletion has been completed + * + *

NOTE: + *
It is available only for system input methods. + *

+ * + * @param { Callback | undefined } callback - The triggered function when text content has been deleted. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onDidDelete(callback: Callback | undefined): this; + /** + * Set the custom text menu. + * Sets the extended options of the custom context menu on selection, + * including the text content, icon, and callback. + * + * @param { EditMenuOptions | undefined } editMenu - Customize text menu options. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default editMenuOptions(editMenu: EditMenuOptions | undefined): this; + /** + * Define the preview text mode of the text input. + * + *

NOTE: + *
Preview text is in a temporary state and does not support text interception. + *
As such, it does not trigger onWillInsert, onDidInsert, onWillDelete, or onDidDelete callbacks. + *

+ * + * @param { boolean | undefined } enable - Indicates the preview text mode.Default value is true. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default enablePreviewText(enable: boolean | undefined): this; + /** + * Enable or disable haptic feedback. + * + * @param { boolean | undefined } isEnabled - Default value is true, set false to disable haptic feedback. + * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default enableHapticFeedback(isEnabled: boolean | undefined): this; + /** + * Set text mode of automatic case mode switching. + * + * @param { AutoCapitalizationMode | undefined } mode - Automatic case mode switching. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default autoCapitalizationMode(mode: AutoCapitalizationMode | undefined): this; + /** + * Set the text with half leading. + * + * @param { boolean | undefined } halfLeading + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default halfLeading(halfLeading: boolean | undefined): this; + /** + * Set the ellipsis mode. + * + * @param { EllipsisMode | undefined } mode - The ellipsis mode. + * @returns { TextInputAttribute } The attribute of TextInput. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default ellipsisMode(mode: EllipsisMode | undefined): this; + /** + * Set whether stop backPressed callback event or not. + * + * @param { boolean | undefined } isStopped - Default value is true, set false to trigger the latest callback event. + * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default stopBackPress(isStopped: boolean | undefined): this; + /** + * Get text value information when about to change. + * + * @param { Callback | undefined } callback - The triggered function when text content is about to change. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onWillChange(callback: Callback | undefined): this; + /** + * Set the keyboard appearance. + * + * @param { KeyboardAppearance | undefined } appearance - Default value is KeyboardAppearance.NONE_IMMERSIVE + * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default keyboardAppearance(appearance: KeyboardAppearance | undefined): this; + /** + * Sets the attribute modifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier. + * @returns { TextInputAttribute } the attribute of the TextInputAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; +} + +/** + * Defines TextInput Component. + * + * @param { TextInputOptions } [value] + * @param { function } [content_] + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@memo +@ComponentBuilder +export declare function TextInput( + value?: TextInputOptions, + @memo + content_?: () => void, +): TextInputAttribute \ No newline at end of file -- Gitee