correct entityActions type and implementation
This commit is contained in:
@@ -44,7 +44,7 @@ export class UmbEntityActionsBundleElement extends UmbLitElement {
|
||||
this.observe(
|
||||
umbExtensionsRegistry
|
||||
.extensionsOfType('entityAction')
|
||||
.pipe(map((actions) => actions.filter((action) => action.conditions.entityTypes.includes(this.entityType!)))),
|
||||
.pipe(map((actions) => actions.filter((action) => action.meta.entityTypes.includes(this.entityType!)))),
|
||||
(actions) => {
|
||||
this._hasActions = actions.length > 0;
|
||||
},
|
||||
|
||||
@@ -28,7 +28,15 @@ export class UmbExtensionSlotElement extends UmbLitElement {
|
||||
public type = '';
|
||||
|
||||
@property({ type: Object, attribute: false })
|
||||
public filter: (manifest: any) => boolean = () => true;
|
||||
public get filter(): (manifest: any) => boolean {
|
||||
return this._filter;
|
||||
}
|
||||
public set filter(value: (manifest: any) => boolean) {
|
||||
if (value === this._filter) return;
|
||||
this._filter = value;
|
||||
this._observeExtensions();
|
||||
}
|
||||
private _filter: (manifest: any) => boolean = () => true;
|
||||
|
||||
private _props?: Record<string, any> = {};
|
||||
@property({ type: Object, attribute: false })
|
||||
|
||||
@@ -1,50 +1,38 @@
|
||||
import { html, customElement, property, state } from '@umbraco-cms/backoffice/external/lit';
|
||||
import { map } from '@umbraco-cms/backoffice/external/rxjs';
|
||||
import { ManifestEntityAction, umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';
|
||||
import { ManifestEntityAction } from '@umbraco-cms/backoffice/extension-registry';
|
||||
import { UmbLitElement } from '@umbraco-cms/internal/lit-element';
|
||||
|
||||
@customElement('umb-entity-action-list')
|
||||
export class UmbEntityActionListElement extends UmbLitElement {
|
||||
private _entityType = '';
|
||||
@property({ type: String, attribute: 'entity-type' })
|
||||
public get entityType() {
|
||||
private _entityType: string = '';
|
||||
public get entityType(): string {
|
||||
return this._entityType;
|
||||
}
|
||||
public set entityType(value) {
|
||||
const oldValue = this._entityType;
|
||||
public set entityType(value: string) {
|
||||
if (value === this._entityType) return;
|
||||
this._entityType = value;
|
||||
if (oldValue !== this._entityType) {
|
||||
this.#observeEntityActions();
|
||||
this.requestUpdate('entityType', oldValue);
|
||||
}
|
||||
const oldValue = this._filter;
|
||||
this._filter = (extension: ManifestEntityAction) => extension.meta.entityTypes.includes(this.entityType);
|
||||
this.requestUpdate('_filter', oldValue);
|
||||
}
|
||||
|
||||
@property({ type: String })
|
||||
public unique?: string;
|
||||
|
||||
@state()
|
||||
private _entityActions?: Array<ManifestEntityAction>;
|
||||
_filter?: (extension: ManifestEntityAction) => boolean;
|
||||
|
||||
// TODO: find a solution to use extension slot
|
||||
#observeEntityActions() {
|
||||
this.observe(
|
||||
umbExtensionsRegistry.extensionsOfType('entityAction').pipe(
|
||||
map((extensions) => {
|
||||
return extensions.filter((extension) => extension.conditions.entityTypes.includes(this.entityType));
|
||||
})
|
||||
),
|
||||
(actions) => {
|
||||
this._entityActions = actions;
|
||||
}
|
||||
);
|
||||
}
|
||||
@property({ type: String })
|
||||
public unique?: string | null;
|
||||
|
||||
render() {
|
||||
return html`
|
||||
${this._entityActions?.map(
|
||||
(manifest) => html`<umb-entity-action .unique=${this.unique} .manifest=${manifest}></umb-entity-action>`
|
||||
)}
|
||||
`;
|
||||
return this._filter
|
||||
? html`
|
||||
<umb-extension-slot
|
||||
type="entityAction"
|
||||
default-element="umb-entity-action"
|
||||
.filter=${this._filter}
|
||||
.props=${{ unique: this.unique }}></umb-extension-slot>
|
||||
`
|
||||
: '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
import type { ManifestElement } from '@umbraco-cms/backoffice/extension-api';
|
||||
import type { ManifestElement, ManifestWithDynamicConditions } from '@umbraco-cms/backoffice/extension-api';
|
||||
|
||||
/**
|
||||
* An action to perform on an entity
|
||||
* For example for content you may wish to create a new document etc
|
||||
*/
|
||||
export interface ManifestEntityAction extends ManifestElement {
|
||||
export interface ManifestEntityAction extends ManifestElement, ManifestWithDynamicConditions {
|
||||
type: 'entityAction';
|
||||
meta: MetaEntityAction;
|
||||
conditions: ConditionsEntityAction;
|
||||
}
|
||||
|
||||
export interface MetaEntityAction {
|
||||
@@ -44,9 +43,7 @@ export interface MetaEntityAction {
|
||||
* ]
|
||||
*/
|
||||
repositoryAlias: string;
|
||||
}
|
||||
|
||||
export interface ConditionsEntityAction {
|
||||
/**
|
||||
* The entity types that this action can be performed on
|
||||
* @examples [
|
||||
|
||||
@@ -71,7 +71,7 @@ export class UmbSectionSidebarContextMenuElement extends UmbLitElement {
|
||||
|
||||
// TODO: allow different views depending on left or right click
|
||||
#renderModal() {
|
||||
return this._isOpen && this._unique && this._entityType
|
||||
return this._isOpen && this._unique !== undefined && this._entityType
|
||||
? html`<div id="action-modal">
|
||||
<h3>${this._headline}</h3>
|
||||
<umb-entity-action-list
|
||||
|
||||
@@ -180,7 +180,7 @@ export class UmbTreeItemContextBase<TreeItemType extends TreeItemPresentationMod
|
||||
this.observe(
|
||||
umbExtensionsRegistry
|
||||
.extensionsOfType('entityAction')
|
||||
.pipe(map((actions) => actions.filter((action) => action.conditions.entityTypes.includes(this.type!)))),
|
||||
.pipe(map((actions) => actions.filter((action) => action.meta.entityTypes.includes(this.type!)))),
|
||||
(actions) => {
|
||||
this.#hasActions.next(actions.length > 0);
|
||||
},
|
||||
|
||||
@@ -20,8 +20,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Create',
|
||||
repositoryAlias,
|
||||
api: UmbCreateDictionaryEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [entityType],
|
||||
},
|
||||
},
|
||||
@@ -35,8 +33,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Move',
|
||||
repositoryAlias,
|
||||
api: UmbMoveEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [entityType],
|
||||
},
|
||||
},
|
||||
@@ -50,8 +46,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Export',
|
||||
repositoryAlias,
|
||||
api: UmbExportDictionaryEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [entityType],
|
||||
},
|
||||
},
|
||||
@@ -65,8 +59,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Import',
|
||||
repositoryAlias,
|
||||
api: UmbImportDictionaryEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [entityType],
|
||||
},
|
||||
},
|
||||
@@ -80,8 +72,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Reload',
|
||||
repositoryAlias,
|
||||
api: UmbReloadDictionaryEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [entityType],
|
||||
},
|
||||
},
|
||||
@@ -95,8 +85,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Delete',
|
||||
repositoryAlias,
|
||||
api: UmbDeleteEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [entityType],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -18,8 +18,6 @@ const entityActions: Array<ManifestTypes> = [
|
||||
label: 'Create...',
|
||||
repositoryAlias: DOCUMENT_TYPE_REPOSITORY_ALIAS,
|
||||
api: UmbCreateDataTypeEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [DOCUMENT_TYPE_ENTITY_TYPE, DOCUMENT_TYPE_ROOT_ENTITY_TYPE, DOCUMENT_TYPE_FOLDER_ENTITY_TYPE],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -21,8 +21,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Delete (TBD)',
|
||||
repositoryAlias: DOCUMENT_TYPE_REPOSITORY_ALIAS,
|
||||
api: UmbDeleteEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [entityType],
|
||||
},
|
||||
},
|
||||
@@ -36,8 +34,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Move',
|
||||
repositoryAlias: DOCUMENT_TYPE_REPOSITORY_ALIAS,
|
||||
api: UmbMoveEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [entityType],
|
||||
},
|
||||
},
|
||||
@@ -51,8 +47,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Copy',
|
||||
repositoryAlias: DOCUMENT_TYPE_REPOSITORY_ALIAS,
|
||||
api: UmbCopyEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [entityType],
|
||||
},
|
||||
},
|
||||
@@ -66,8 +60,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Sort',
|
||||
repositoryAlias: DOCUMENT_TYPE_REPOSITORY_ALIAS,
|
||||
api: UmbSortChildrenOfEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [entityType],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -27,8 +27,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Create',
|
||||
repositoryAlias: DOCUMENT_REPOSITORY_ALIAS,
|
||||
api: UmbCreateDocumentEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [DOCUMENT_ROOT_ENTITY_TYPE, DOCUMENT_ENTITY_TYPE],
|
||||
},
|
||||
},
|
||||
@@ -42,8 +40,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Trash',
|
||||
repositoryAlias: DOCUMENT_REPOSITORY_ALIAS,
|
||||
api: UmbTrashEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [DOCUMENT_ENTITY_TYPE],
|
||||
},
|
||||
},
|
||||
@@ -57,8 +53,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Create Content Template',
|
||||
repositoryAlias: DOCUMENT_REPOSITORY_ALIAS,
|
||||
api: UmbCreateDocumentBlueprintEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [DOCUMENT_ENTITY_TYPE],
|
||||
},
|
||||
},
|
||||
@@ -72,8 +66,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Move',
|
||||
repositoryAlias: DOCUMENT_REPOSITORY_ALIAS,
|
||||
api: UmbMoveEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [DOCUMENT_ENTITY_TYPE],
|
||||
},
|
||||
},
|
||||
@@ -87,8 +79,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Copy',
|
||||
repositoryAlias: DOCUMENT_REPOSITORY_ALIAS,
|
||||
api: UmbCopyEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [DOCUMENT_ENTITY_TYPE],
|
||||
},
|
||||
},
|
||||
@@ -102,8 +92,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Sort',
|
||||
repositoryAlias: DOCUMENT_REPOSITORY_ALIAS,
|
||||
api: UmbSortChildrenOfEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [DOCUMENT_ROOT_ENTITY_TYPE, DOCUMENT_ENTITY_TYPE],
|
||||
},
|
||||
},
|
||||
@@ -117,8 +105,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Culture And Hostnames',
|
||||
repositoryAlias: DOCUMENT_REPOSITORY_ALIAS,
|
||||
api: UmbDocumentCultureAndHostnamesEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [DOCUMENT_ENTITY_TYPE],
|
||||
},
|
||||
},
|
||||
@@ -131,8 +117,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Permissions',
|
||||
repositoryAlias: DOCUMENT_REPOSITORY_ALIAS,
|
||||
api: UmbDocumentPermissionsEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [DOCUMENT_ENTITY_TYPE],
|
||||
},
|
||||
},
|
||||
@@ -145,8 +129,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Public Access',
|
||||
repositoryAlias: DOCUMENT_REPOSITORY_ALIAS,
|
||||
api: UmbDocumentPublicAccessEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [DOCUMENT_ENTITY_TYPE],
|
||||
},
|
||||
},
|
||||
@@ -159,8 +141,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Publish',
|
||||
repositoryAlias: DOCUMENT_REPOSITORY_ALIAS,
|
||||
api: UmbPublishDocumentEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [DOCUMENT_ENTITY_TYPE],
|
||||
},
|
||||
},
|
||||
@@ -173,8 +153,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Unpublish',
|
||||
repositoryAlias: DOCUMENT_REPOSITORY_ALIAS,
|
||||
api: UmbUnpublishDocumentEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [DOCUMENT_ENTITY_TYPE],
|
||||
},
|
||||
},
|
||||
@@ -187,8 +165,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Rollback',
|
||||
repositoryAlias: DOCUMENT_REPOSITORY_ALIAS,
|
||||
api: UmbRollbackDocumentEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [DOCUMENT_ENTITY_TYPE],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -13,7 +13,6 @@ export class UmbDocumentTreeItemElement extends UmbLitElement implements UmbTree
|
||||
return this._item;
|
||||
}
|
||||
public set item(value: DocumentTreeItemResponseModel | undefined) {
|
||||
console.log('Item prop', value);
|
||||
this._item = value;
|
||||
this.#context.setTreeItem(value);
|
||||
}
|
||||
|
||||
@@ -18,8 +18,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Create',
|
||||
repositoryAlias,
|
||||
api: UmbCreateMediaTypeEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [entityType],
|
||||
},
|
||||
},
|
||||
@@ -33,8 +31,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Move',
|
||||
repositoryAlias,
|
||||
api: UmbMoveEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [entityType],
|
||||
},
|
||||
},
|
||||
@@ -48,8 +44,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Copy',
|
||||
repositoryAlias,
|
||||
api: UmbCopyEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [entityType],
|
||||
},
|
||||
},
|
||||
@@ -63,8 +57,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Delete',
|
||||
repositoryAlias,
|
||||
api: UmbDeleteEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [entityType],
|
||||
},
|
||||
},
|
||||
@@ -78,8 +70,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Reload',
|
||||
repositoryAlias,
|
||||
api: UmbReloadMediaTypeEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [entityType],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -12,8 +12,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Trash',
|
||||
api: UmbTrashEntityAction,
|
||||
repositoryAlias: MEDIA_REPOSITORY_ALIAS,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: ['media'],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -12,8 +12,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Delete',
|
||||
api: UmbDeleteEntityAction,
|
||||
repositoryAlias: MEMBER_GROUP_REPOSITORY_ALIAS,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: ['member-group'],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -16,8 +16,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Delete',
|
||||
repositoryAlias,
|
||||
api: UmbDeleteEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [entityType],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -12,8 +12,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Delete',
|
||||
api: UmbDeleteEntityAction,
|
||||
repositoryAlias: MEMBER_REPOSITORY_ALIAS,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: ['member'],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -14,8 +14,6 @@ const entityActions: Array<ManifestTypes> = [
|
||||
label: 'Copy to...',
|
||||
repositoryAlias: DATA_TYPE_REPOSITORY_ALIAS,
|
||||
api: UmbCopyDataTypeEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [DATA_TYPE_ENTITY_TYPE],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -14,8 +14,6 @@ const entityActions: Array<ManifestTypes> = [
|
||||
label: 'Create...',
|
||||
repositoryAlias: DATA_TYPE_REPOSITORY_ALIAS,
|
||||
api: UmbCreateDataTypeEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [DATA_TYPE_ENTITY_TYPE, DATA_TYPE_ROOT_ENTITY_TYPE, DATA_TYPE_FOLDER_ENTITY_TYPE],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -22,8 +22,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Delete...',
|
||||
repositoryAlias: DATA_TYPE_REPOSITORY_ALIAS,
|
||||
api: UmbDeleteEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [DATA_TYPE_ENTITY_TYPE],
|
||||
},
|
||||
},
|
||||
@@ -37,8 +35,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Delete Folder...',
|
||||
repositoryAlias: DATA_TYPE_REPOSITORY_ALIAS,
|
||||
api: UmbDeleteFolderEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [DATA_TYPE_ENTITY_TYPE, DATA_TYPE_FOLDER_ENTITY_TYPE],
|
||||
},
|
||||
},
|
||||
@@ -52,8 +48,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Rename Folder...',
|
||||
repositoryAlias: DATA_TYPE_REPOSITORY_ALIAS,
|
||||
api: UmbFolderUpdateEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [DATA_TYPE_ENTITY_TYPE, DATA_TYPE_FOLDER_ENTITY_TYPE],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -14,8 +14,6 @@ const entityActions: Array<ManifestTypes> = [
|
||||
label: 'Move to...',
|
||||
repositoryAlias: DATA_TYPE_REPOSITORY_ALIAS,
|
||||
api: UmbMoveDataTypeEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [DATA_TYPE_ENTITY_TYPE],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -14,8 +14,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
icon: 'umb:trash',
|
||||
label: 'Delete',
|
||||
api: UmbDeleteEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [LANGUAGE_ENTITY_TYPE],
|
||||
},
|
||||
},
|
||||
@@ -29,8 +27,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Create',
|
||||
repositoryAlias: LANGUAGE_REPOSITORY_ALIAS,
|
||||
api: UmbLanguageCreateEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [LANGUAGE_ENTITY_TYPE, LANGUAGE_ROOT_ENTITY_TYPE],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -27,8 +27,6 @@ const partialViewActions: Array<ManifestEntityAction> = [
|
||||
label: 'Delete',
|
||||
api: UmbDeleteEntityAction,
|
||||
repositoryAlias: PARTIAL_VIEW_REPOSITORY_ALIAS,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [PARTIAL_VIEW_ENTITY_TYPE],
|
||||
},
|
||||
},
|
||||
@@ -46,8 +44,6 @@ const partialViewFolderActions: Array<ManifestEntityAction> = [
|
||||
label: 'New empty partial view',
|
||||
api: UmbCreateEmptyPartialViewAction,
|
||||
repositoryAlias: PARTIAL_VIEW_REPOSITORY_ALIAS,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [PARTIAL_VIEW_FOLDER_ENTITY_TYPE, PARTIAL_VIEW_ROOT_ENTITY_TYPE],
|
||||
},
|
||||
},
|
||||
@@ -60,8 +56,6 @@ const partialViewFolderActions: Array<ManifestEntityAction> = [
|
||||
label: 'New partial view from snippet...',
|
||||
api: UmbCreateFromSnippetPartialViewAction,
|
||||
repositoryAlias: PARTIAL_VIEW_REPOSITORY_ALIAS,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [PARTIAL_VIEW_FOLDER_ENTITY_TYPE, PARTIAL_VIEW_ROOT_ENTITY_TYPE],
|
||||
},
|
||||
},
|
||||
@@ -74,8 +68,6 @@ const partialViewFolderActions: Array<ManifestEntityAction> = [
|
||||
label: 'Remove folder',
|
||||
api: UmbDeleteFolderEntityAction,
|
||||
repositoryAlias: PARTIAL_VIEW_REPOSITORY_ALIAS,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [PARTIAL_VIEW_FOLDER_EMPTY_ENTITY_TYPE],
|
||||
},
|
||||
},
|
||||
@@ -88,8 +80,6 @@ const partialViewFolderActions: Array<ManifestEntityAction> = [
|
||||
label: 'Create folder',
|
||||
api: UmbCreateFolderEntityAction,
|
||||
repositoryAlias: PARTIAL_VIEW_REPOSITORY_ALIAS,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [
|
||||
PARTIAL_VIEW_FOLDER_EMPTY_ENTITY_TYPE,
|
||||
PARTIAL_VIEW_FOLDER_ENTITY_TYPE,
|
||||
|
||||
@@ -14,8 +14,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Create',
|
||||
api: UmbCreateEntityAction,
|
||||
repositoryAlias: TEMPLATE_REPOSITORY_ALIAS,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [TEMPLATE_ENTITY_TYPE, TEMPLATE_ROOT_ENTITY_TYPE],
|
||||
},
|
||||
},
|
||||
@@ -28,8 +26,6 @@ const entityActions: Array<ManifestEntityAction> = [
|
||||
label: 'Delete',
|
||||
api: UmbDeleteEntityAction,
|
||||
repositoryAlias: TEMPLATE_REPOSITORY_ALIAS,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: [TEMPLATE_ENTITY_TYPE],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -68,8 +68,6 @@ const manifest = {
|
||||
label: 'My Entity Action',
|
||||
repositoryAlias: 'My.Repository',
|
||||
api: MyEntityAction,
|
||||
},
|
||||
conditions: {
|
||||
entityTypes: ['my-entity'],
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user