diff --git a/BUILD.gn b/BUILD.gn index 735000f5be05504a381da91de572826d9c6d021b..7622f93bb0c75c15f1038558da5fa85a59d24583 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -76,6 +76,7 @@ ohos_copy("ets_component") { "api/@internal/component/ets/panel.d.ts", "api/@internal/component/ets/path.d.ts", "api/@internal/component/ets/polygon.d.ts", + "api/@internal/component/ets/plugin_component.d.ts", "api/@internal/component/ets/polyline.d.ts", "api/@internal/component/ets/progress.d.ts", "api/@internal/component/ets/qrcode.d.ts", diff --git a/api/@internal/component/ets/plugin_component.d.ts b/api/@internal/component/ets/plugin_component.d.ts index 47300deaa7180ff98c64873b247e881d45a013a2..431e37e9c440b0c1daa059cee94792a92b3957f3 100644 --- a/api/@internal/component/ets/plugin_component.d.ts +++ b/api/@internal/component/ets/plugin_component.d.ts @@ -16,16 +16,19 @@ /** * PluginComponentTemplate * @since 8 + * @systemapi Hide this for inner system use. */ interface PluginComponentTemplate { /** * Defines the plugin source name. * @since 8 + * @systemapi Hide this for inner system use. */ source: string; /** * Defines the ability name. * @since 8 + * @systemapi Hide this for inner system use. */ ability: string; } @@ -33,11 +36,13 @@ interface PluginComponentTemplate { /** * Provides plugin component. * @since 8 + * @systemapi Hide this for inner system use. */ interface PluginComponentInterface { /** * Called when setting the plugin. * @since 8 + * @systemapi Hide this for inner system use. */ (value: { template: PluginComponentTemplate; data: any }): PluginComponentAttribute; } @@ -45,23 +50,27 @@ interface PluginComponentInterface { /** * Defines the plugin component attibute functions. * @since 8 + * @systemapi Hide this for inner system use. */ declare class PluginComponentAttribute extends CommonMethod { /** * Set pluginComponent size, * @since 8 + * @systemapi Hide this for inner system use. */ size(value: { width: number; height: number }): PluginComponentAttribute; /** * pluginComponent onComplete callback, * @since 8 + * @systemapi Hide this for inner system use. */ onComplete(callback: () => void): PluginComponentAttribute; /** * pluginComponent onError callback, * @since 8 + * @systemapi Hide this for inner system use. */ onError(callback: (info: { errcode: number; msg: string }) => void): PluginComponentAttribute; } diff --git a/api/@ohos.pluginComponent.d.ts b/api/@ohos.pluginComponent.d.ts index 4e54e395009ae6df1089ed92e84abe6f36c10e8a..d0244b8d26cd2fa0d07f4f15ba719050031c3709 100644 --- a/api/@ohos.pluginComponent.d.ts +++ b/api/@ohos.pluginComponent.d.ts @@ -20,6 +20,7 @@ import { Want } from './ability/want'; * Plugin component template property. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 + * @systemapi Hide this for inner system use. */ interface PluginComponentTemplate { source: string; @@ -30,6 +31,7 @@ interface PluginComponentTemplate { * Plugin component manager interface. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 + * @systemapi Hide this for inner system use. */ declare namespace pluginComponentManager { type KVObject = {[key: string]: number | string | boolean | [] | KVObject} @@ -37,6 +39,7 @@ declare namespace pluginComponentManager { /** * Plugin component push parameters. * @since 8 + * @systemapi Hide this for inner system use. */ interface PushParameters { want: Want; @@ -49,6 +52,7 @@ declare namespace pluginComponentManager { /** * Plugin component request parameters. * @since 8 + * @systemapi Hide this for inner system use. */ interface RequestParameters { want: Want; @@ -60,6 +64,7 @@ declare namespace pluginComponentManager { /** * Plugin component request callback parameters. * @since 8 + * @systemapi Hide this for inner system use. */ interface RequestCallbackParameters { componentTemplate: PluginComponentTemplate; @@ -70,6 +75,7 @@ declare namespace pluginComponentManager { /** * Plugin component request event result value. * @since 8 + * @systemapi Hide this for inner system use. */ interface RequestEventResult { template?: string; @@ -80,6 +86,7 @@ declare namespace pluginComponentManager { /** * Plugin component push event callback. * @since 8 + * @systemapi Hide this for inner system use. */ type OnPushEventCallback = (source: Want, template: PluginComponentTemplate, data: KVObject, extraData: KVObject) => void; @@ -87,6 +94,7 @@ declare namespace pluginComponentManager { /** * Plugin component request event callback. * @since 8 + * @systemapi Hide this for inner system use. */ type OnRequestEventCallback = (source: Want, name: string, data: KVObject) => RequestEventResult; @@ -94,18 +102,21 @@ declare namespace pluginComponentManager { /** * Plugin component push method. * @since 8 + * @systemapi Hide this for inner system use. */ function push(param: PushParameters, callback: AsyncCallback): void; /** * Plugin component request method. * @since 8 + * @systemapi Hide this for inner system use. */ function request(param: RequestParameters, callback: AsyncCallback): void; /** * Plugin component event listener. * @since 8 + * @systemapi Hide this for inner system use. */ function on(eventType: string, callback: OnPushEventCallback | OnRequestEventCallback): void; }