add conditions to property actions manifest
This commit is contained in:
@@ -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[];
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ export const manifests: Array<ManifestPropertyAction> = [
|
||||
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<ManifestPropertyAction> = [
|
||||
alias: 'Umb.PropertyAction.Clear',
|
||||
name: 'Clear Property Action',
|
||||
loader: () => import('./clear/property-action-clear.element'),
|
||||
meta: {
|
||||
conditions: {
|
||||
propertyEditors: ['Umb.PropertyEditorUI.TextBox'],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user