From f003fd3977ffde3be41b0b537515ea36c3f2aced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Sun, 3 Mar 2024 20:34:11 +0100 Subject: [PATCH] generic type extends for UmbEntityBulkActionArgs --- .../core/entity-bulk-action/entity-bulk-action-base.ts | 3 ++- .../core/entity-bulk-action/entity-bulk-action.interface.ts | 4 +++- .../src/packages/core/entity-bulk-action/types.ts | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/entity-bulk-action-base.ts b/src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/entity-bulk-action-base.ts index de4d10fceb..ab77a5702a 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/entity-bulk-action-base.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/entity-bulk-action-base.ts @@ -1,8 +1,9 @@ import type { UmbEntityBulkAction } from './entity-bulk-action.interface.js'; import type { UmbEntityBulkActionArgs } from './types.js'; +import type { MetaEntityBulkAction } from '@umbraco-cms/backoffice/extension-registry'; import { UmbActionBase } from '@umbraco-cms/backoffice/action'; -export abstract class UmbEntityBulkActionBase +export abstract class UmbEntityBulkActionBase extends UmbActionBase> implements UmbEntityBulkAction { diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/entity-bulk-action.interface.ts b/src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/entity-bulk-action.interface.ts index f399e101b8..aec4bdd613 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/entity-bulk-action.interface.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/entity-bulk-action.interface.ts @@ -1,7 +1,9 @@ import type { UmbEntityBulkActionArgs } from './types.js'; +import type { MetaEntityBulkAction } from '@umbraco-cms/backoffice/extension-registry'; import type { UmbAction } from '@umbraco-cms/backoffice/action'; -export interface UmbEntityBulkAction extends UmbAction> { +export interface UmbEntityBulkAction + extends UmbAction> { selection: Array; // I don't think we need this one, now that we have the above one? [NL] diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/types.ts b/src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/types.ts index f9588623f5..fe56b791bf 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/types.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/types.ts @@ -1,4 +1,6 @@ -export interface UmbEntityBulkActionArgs { +import type { MetaEntityBulkAction } from '../extension-registry/models/entity-bulk-action.model.js'; + +export interface UmbEntityBulkActionArgs { entityType: string; meta: MetaArgsType; }