/* * Copyright (c) 2021-2023 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 */ /** * PluginComponentTemplate * * @interface PluginComponentTemplate * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 9 */ interface PluginComponentTemplate { /** * Defines the plugin source name. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 9 */ source: string; /** * Defines the bundle name of the Template. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 9 */ bundleName: string; } /** * Provides plugin component. * * @interface PluginComponentInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 9 */ interface PluginComponentInterface { /** * Called when setting the plugin. * * @param { object } value * @returns { PluginComponentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 9 */ (value: { template: PluginComponentTemplate; data: any }): PluginComponentAttribute; } /** * Defines the plugin component attribute functions. * * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 9 */ declare class PluginComponentAttribute extends CommonMethod { /** * pluginComponent onComplete callback, * * @param { function } callback * @returns { PluginComponentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 9 */ onComplete(callback: () => void): PluginComponentAttribute; /** * pluginComponent onError callback, * * @param { function } callback * @returns { PluginComponentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 9 */ onError(callback: (info: { errcode: number; msg: string }) => void): PluginComponentAttribute; } /** * Defines PluginComponent Component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 9 */ declare const PluginComponent: PluginComponentInterface; /** * Defines PluginComponent Component instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 9 */ declare const PluginComponentInstance: PluginComponentAttribute;