diff --git a/api/@internal/component/ets/common.d.ts b/api/@internal/component/ets/common.d.ts index 4de8ecaa778ab1b55f04f31eae078526566c616f..2137e6189b756cc114eb9d35e3505386d0ae275c 100644 --- a/api/@internal/component/ets/common.d.ts +++ b/api/@internal/component/ets/common.d.ts @@ -26,6 +26,7 @@ import image from '../../@ohos.multimedia.image'; import unifiedDataChannel from '../../@ohos.data.unifiedDataChannel'; import promptAction from '../../@ohos.promptAction'; import uniformTypeDescriptor from '../../@ohos.data.uniformTypeDescriptor'; +import Want from '../../@ohos.app.ability.Want'; import { IntentionCode } from '../../@ohos.multimodalInput.intentionCode'; import { SymbolGlyphModifier } from '../../arkui/SymbolGlyphModifier'; import { CircleShape, EllipseShape, PathShape, RectShape } from '../../@ohos.arkui.shape'; @@ -32686,6 +32687,36 @@ declare interface DateRange { end?: Date; } +/** + * Indicates the information when the provider of the embedded UI is terminated. + * + * @interface TerminationInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @arkts 1.2 + */ +declare interface TerminationInfo { + /** + * Defines the termination code. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @arkts 1.2 + */ + code: number; + + /** + * Defines the additional termination information. + * + * @type { ?Want } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @arkts 1.2 + */ + want?: Want; +} + /** * Defines the format for displaying dates and times. * diff --git a/api/@internal/component/ets/embedded_component.d.ts b/api/@internal/component/ets/embedded_component.d.ts index 618d27c366c1c4ee72723a0401bb2601fc090dfd..1dca4bf8ee5164ec85f53afb032ba35fc9cf8250 100644 --- a/api/@internal/component/ets/embedded_component.d.ts +++ b/api/@internal/component/ets/embedded_component.d.ts @@ -21,7 +21,7 @@ /*** if arkts 1.2 */ import Want from '../../@ohos.app.ability.Want' import { Callback, ErrorCallback ,BusinessError} from '../../@ohos.base' -import { CommonMethod } from './common' +import { CommonMethod, TerminationInfo } from './common' import { EmbeddedType } from './enums' /*** endif */ @@ -100,36 +100,6 @@ declare interface TerminationInfo { want?: import('../api/@ohos.app.ability.Want').default; } -/** - * Indicates the information when the provider of the embedded UI is terminated. - * - * @interface TerminationInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - * @arkts 1.2 - */ -declare interface TerminationInfo { - /** - * Defines the termination code. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - * @arkts 1.2 - */ - code: number; - - /** - * Defines the additional termination information. - * - * @type { ?Want } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - * @arkts 1.2 - */ - want?: Want; -} - /** * Define the attribute functions of EmbeddedComponent. * @@ -177,7 +147,7 @@ declare class EmbeddedComponentAttribute extends CommonMethod } callback * @returns { EmbeddedComponentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice diff --git a/api/@internal/component/ets/ui_extension_component.d.ts b/api/@internal/component/ets/ui_extension_component.d.ts index eac19b4aa3ca5ce3bc9a027ceb7bb15ee0d12457..845647c8f43ab6aa649aab16075d08d70e56b990 100644 --- a/api/@internal/component/ets/ui_extension_component.d.ts +++ b/api/@internal/component/ets/ui_extension_component.d.ts @@ -20,8 +20,8 @@ /*** if arkts 1.2 */ import Want from '../../@ohos.app.ability.Want' -import { Callback, ErrorCallback,BusinessError } from '../../@ohos.base' -import { CommonMethod } from './common' +import { Callback, ErrorCallback, BusinessError } from '../../@ohos.base' +import { CommonMethod, TerminationInfo } from './common' import { ComponentContent } from '../ComponentContent' /*** endif */ @@ -61,14 +61,16 @@ declare enum DpiFollowStrategy { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum WindowModeFollowStrategy { /** * Followed the host Window Mode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ FOLLOW_HOST_WINDOW_MODE = 0, @@ -76,7 +78,8 @@ declare enum WindowModeFollowStrategy { * Followed the UIExtensionAbility. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ FOLLOW_UI_EXTENSION_ABILITY_WINDOW_MODE = 1, } @@ -147,7 +150,8 @@ declare interface UIExtensionOptions { * @default WindowModeFollowStrategy.FOLLOW_UI_EXTENSION_ABILITY_WINDOW_MODE * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ windowModeFollowStrategy?: WindowModeFollowStrategy; } @@ -182,39 +186,6 @@ declare interface TerminationInfo { want?: import('../api/@ohos.app.ability.Want').default; } -/** - * Indicates the information when the provider of the embedded UI is terminated. - * - * @interface TerminationInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 20 - * @arkts 1.2 - */ -declare interface TerminationInfo { - /** - * Defines the termination code. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 20 - * @arkts 1.2 - */ - code: number; - - /** - * Defines the additional termination information. - * - * @type { ?Want } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 20 - * @arkts 1.2 - */ - want?: Want; -} - /** * Get Callback from @ohos.base. * @@ -254,8 +225,7 @@ declare interface UIExtensionProxy { * @param { object } data * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ /** * This function is for sending data to the UIExtensionAbility. @@ -273,7 +243,7 @@ declare interface UIExtensionProxy { * * @param { object } data - data send to the UIExtensionAbility * @returns { object } data - data transferred from the UIExtensionAbility - * @throws { BusinessError } 100011 - No callback has been registered to response this request. + * @throws { BusinessError } 100011 - No callback has been registered to respond to this request. * @throws { BusinessError } 100012 - Transferring data failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi @@ -284,7 +254,7 @@ declare interface UIExtensionProxy { * * @param { Record } data - Data send to the UIExtensionAbility. * @returns { Record } data - Data transferred from the UIExtensionAbility. - * @throws { BusinessError } 100011 - No callback has been registered to response this request. + * @throws { BusinessError } 100011 - No callback has been registered to respond to this request. * @throws { BusinessError } 100012 - Transferring data failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi @@ -419,9 +389,10 @@ interface UIExtensionComponentInterface { * Construct the UIExtensionComponent.
* Called when the UIExtensionComponent is used. * - * @param { import('../api/@ohos.app.ability.Want').default } want - indicates the want of UIExtensionAbility + * @param { Want } want - indicates the want of UIExtensionAbility * @param { UIExtensionOptions } [options] - Construction configuration of UIExtensionComponentAttribute * @returns { UIExtensionComponentAttribute } + * @throws { BusinessError } 202 - Non-system applications are not allowed to use system APIs. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 20 @@ -457,10 +428,11 @@ declare class UIExtensionComponentAttribute extends CommonMethod } callback - * - callback called when remote UIExtensionAbility object is - *
ready for receive data + * callback called when remote UIExtensionAbility object is ready for receive data + * + * @param { Callback } callback * @returns { UIExtensionComponentAttribute } + * @throws { BusinessError } 202 - Non-system applications are not allowed to use system APIs. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 20 @@ -533,9 +505,11 @@ declare class UIExtensionComponentAttribute extends CommonMethod } callback * @returns { UIExtensionComponentAttribute } + * @throws { BusinessError } 202 - Non-system applications are not allowed to use system APIs. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 20 @@ -563,7 +537,8 @@ declare class UIExtensionComponentAttribute extends CommonMethod): UIExtensionComponentAttribute; }