diff --git a/api/@internal/component/ets/search.d.ts b/api/@internal/component/ets/search.d.ts index 7ce15eae7e18c0e50cba817f21cf6610371e20d4..0d4d102025c9a42ea386494eab8c6db0c385f71b 100644 --- a/api/@internal/component/ets/search.d.ts +++ b/api/@internal/component/ets/search.d.ts @@ -2115,6 +2115,17 @@ declare class SearchAttribute extends CommonMethod { */ enablePreviewText(enable: boolean): SearchAttribute; + /** + * Enable selected data detector. + * + * @param { SelectDataDetectorConfig | boolean } + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 21 + */ + enableSelectedDataDetector(config: SelectDataDetectorConfig | boolean): SearchAttribute + /** * Enable or disable haptic feedback. * diff --git a/api/@internal/component/ets/text.d.ts b/api/@internal/component/ets/text.d.ts index 7f498aaccebcbe7bd88b3a2158b2a49fd1d0e737..c3681497f1e97e1ccc28c5edd72123d1ff3ead63 100644 --- a/api/@internal/component/ets/text.d.ts +++ b/api/@internal/component/ets/text.d.ts @@ -1027,6 +1027,17 @@ declare class TextAttribute extends CommonMethod { * @arkts 1.1&1.2 */ decoration(value: DecorationStyleInterface): TextAttribute; + + /** + * Enable selected data detector. + * + * @param { SelectDataDetectorConfig | boolean } + * @returns { TextAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 21 + */ + enableSelectedDataDetector(config: SelectDataDetectorConfig | boolean): TextAttribute /** * Called when the distance between text fonts is set. diff --git a/api/@internal/component/ets/text_area.d.ts b/api/@internal/component/ets/text_area.d.ts index 5367dcb957f4d052d85780bf7b5f47e1330e7e7a..4035e44de210c369568cff0b6b3e02fd423d7d30 100644 --- a/api/@internal/component/ets/text_area.d.ts +++ b/api/@internal/component/ets/text_area.d.ts @@ -960,6 +960,17 @@ declare class TextAreaAttribute extends CommonMethod { */ selectedBackgroundColor(value: ResourceColor): TextAreaAttribute; + /** + * Enable selected data detector. + * + * @param { SelectDataDetectorConfig | boolean } + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 21 + */ + enableSelectedDataDetector(config: SelectDataDetectorConfig | boolean): TextAreaAttribute + /** * Called when submitted. * diff --git a/api/@internal/component/ets/text_common.d.ts b/api/@internal/component/ets/text_common.d.ts index 2f6b2461aee2a831d85a6da5e056dc9fe22c4250..726abccc51354d36db2f45e72251beb7439e459d 100644 --- a/api/@internal/component/ets/text_common.d.ts +++ b/api/@internal/component/ets/text_common.d.ts @@ -818,6 +818,26 @@ interface StyledStringChangeValue { previewText?: StyledString; } +/** + * Text selected data detector config. + * + * @interface SelectDataDetectorConfig + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 21 + */ +declare interface SelectDataDetectorConfig { + /** + * Text data detector types. + * + * @type { TextDataDetectorType[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 21 + */ + types: TextDataDetectorType[]; +} + /** * Define the LayoutManager for querying layout information. * diff --git a/api/@internal/component/ets/text_input.d.ts b/api/@internal/component/ets/text_input.d.ts index a4a7cf14adcd400ccfadf94ee25454798eacf9c1..c838941dff598c79a3b2b470df3873d33253a215 100644 --- a/api/@internal/component/ets/text_input.d.ts +++ b/api/@internal/component/ets/text_input.d.ts @@ -2814,6 +2814,17 @@ declare class TextInputAttribute extends CommonMethod { */ barState(value: BarState): TextInputAttribute; + /** + * Enable selected data detector. + * + * @param { SelectDataDetectorConfig | boolean } + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 21 + */ + enableSelectedDataDetector(config: SelectDataDetectorConfig | boolean): TextInputAttribute + /** * Define max lines of the text input. *