From e892ae228d904115f9c6102ddea4b857aad3cef0 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Sat, 2 Mar 2024 22:37:36 +0100 Subject: [PATCH] pass data according to interface --- .../src/packages/core/action/action.interface.ts | 6 ++++-- .../packages/core/entity-action/entity-action.element.ts | 4 ++-- .../src/packages/core/entity-action/entity-action.ts | 4 +--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/action/action.interface.ts b/src/Umbraco.Web.UI.Client/src/packages/core/action/action.interface.ts index 7825ab5168..abb9e04e80 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/action/action.interface.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/action/action.interface.ts @@ -1,5 +1,7 @@ import type { UmbApi } from '@umbraco-cms/backoffice/extension-api'; -export interface UmbAction extends UmbApi { - execute(): Promise; +export interface UmbAction extends UmbApi { + public args: ArgsType; + public execute(): Promise; + protected _host: UmbControllerHost; } diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/entity-action.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/entity-action.element.ts index 1ad3546232..88681a27b7 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/entity-action.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/entity-action.element.ts @@ -62,9 +62,9 @@ export class UmbEntityActionElement extends UmbLitElement { this.#api = await createExtensionApi(this.#manifest, [ this, { - unique: this.#unique, entityType: this.#entityType, - ...this.#manifest.meta, + unique: this.#unique, + meta: this.#manifest.meta, }, ]); diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/entity-action.ts b/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/entity-action.ts index 62b3b3ac6c..98078c35b8 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/entity-action.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/entity-action.ts @@ -5,9 +5,7 @@ import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; * @export * @interface UmbEntityAction */ -export interface UmbEntityAction { - args: UmbEntityActionArgs; - +export interface UmbEntityAction extends UmbAction> { /** * The href location, the action will act as a link. * @returns {Promise}