From a4db26de7d034cb370cff30d489d13f0987bcdd7 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Mon, 13 Mar 2023 20:50:48 +0100 Subject: [PATCH] add conditions to property actions manifest --- .../libs/extensions-registry/property-action.models.ts | 4 ++-- .../src/backoffice/shared/property-actions/manifests.ts | 4 ++-- .../property-action-menu/property-action-menu.element.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/libs/extensions-registry/property-action.models.ts b/src/Umbraco.Web.UI.Client/libs/extensions-registry/property-action.models.ts index 640849b9d7..26148f2da9 100644 --- a/src/Umbraco.Web.UI.Client/libs/extensions-registry/property-action.models.ts +++ b/src/Umbraco.Web.UI.Client/libs/extensions-registry/property-action.models.ts @@ -2,9 +2,9 @@ import type { ManifestElement } from './models'; export interface ManifestPropertyAction extends ManifestElement { type: 'propertyAction'; - meta: MetaPropertyAction; + conditions: ConditionsPropertyAction; } -export interface MetaPropertyAction { +export interface ConditionsPropertyAction { propertyEditors: string[]; } diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/shared/property-actions/manifests.ts b/src/Umbraco.Web.UI.Client/src/backoffice/shared/property-actions/manifests.ts index 1b5a1b4307..cb7ae924dd 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/shared/property-actions/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/shared/property-actions/manifests.ts @@ -6,7 +6,7 @@ export const manifests: Array = [ alias: 'Umb.PropertyAction.Copy', name: 'Copy Property Action', loader: () => import('./copy/property-action-copy.element'), - meta: { + conditions: { propertyEditors: ['Umb.PropertyEditorUI.TextBox'], }, }, @@ -15,7 +15,7 @@ export const manifests: Array = [ alias: 'Umb.PropertyAction.Clear', name: 'Clear Property Action', loader: () => import('./clear/property-action-clear.element'), - meta: { + conditions: { propertyEditors: ['Umb.PropertyEditorUI.TextBox'], }, }, diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/shared/property-actions/shared/property-action-menu/property-action-menu.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/shared/property-actions/shared/property-action-menu/property-action-menu.element.ts index 1320ed1f17..ccaf533fdb 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/shared/property-actions/shared/property-action-menu/property-action-menu.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/shared/property-actions/shared/property-action-menu/property-action-menu.element.ts @@ -78,7 +78,7 @@ export class UmbPropertyActionMenuElement extends UmbLitElement { this._actionsObserver = this.observe( umbExtensionsRegistry.extensionsOfType('propertyAction').pipe( map((propertyActions) => { - return propertyActions.filter((propertyAction) => propertyAction.meta.propertyEditors.includes(alias)); + return propertyActions.filter((propertyAction) => propertyAction.conditions.propertyEditors.includes(alias)); }) ), (manifests) => {