Merge branch 'feature/entity-action-kind' of https://github.com/umbraco/Umbraco.CMS.Backoffice into feature/entity-action-kind

This commit is contained in:
Mads Rasmussen
2024-03-04 00:13:18 +01:00
3 changed files with 5 additions and 3 deletions

View File

@@ -1,7 +1,8 @@
import type { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
import type { ManifestElementAndApi, UmbApi } from '@umbraco-cms/backoffice/extension-api';
// TODO: Missing Extension API Interface:
export interface ManifestWorkspace extends ManifestElementAndApi<HTMLElement, UmbApi> {
export interface ManifestWorkspace extends ManifestElementAndApi<UmbControllerHostElement, UmbApi> {
type: 'workspace';
meta: MetaWorkspace;
}

View File

@@ -1,4 +1,5 @@
import { UMB_USER_GROUP_COLLECTION_ALIAS } from '../collection/index.js';
import { UMB_USER_GROUP_ENTITY_TYPE } from '../entity.js';
import { UMB_USER_GROUP_DETAIL_REPOSITORY_ALIAS } from '../repository/index.js';
import { UmbDeleteUserGroupEntityBulkAction } from './delete/delete.action.js';
import { UMB_COLLECTION_ALIAS_CONDITION } from '@umbraco-cms/backoffice/collection';
@@ -11,9 +12,9 @@ const entityActions: Array<ManifestEntityBulkAction> = [
name: 'Delete User Group Entity Bulk Action',
weight: 400,
api: UmbDeleteUserGroupEntityBulkAction,
forEntityTypes: [UMB_USER_GROUP_ENTITY_TYPE],
meta: {
label: 'Delete',
repositoryAlias: UMB_USER_GROUP_DETAIL_REPOSITORY_ALIAS,
},
conditions: [
{

View File

@@ -36,7 +36,7 @@ export class UmbUserGroupEntityUserPermissionListElement extends UmbLitElement {
this.observe(
umbExtensionsRegistry.byType('entityUserPermission'),
(manifests) => {
this._entityTypes = [...new Set(manifests.map((manifest) => manifest.entityTypeFor))];
this._entityTypes = [...new Set(manifests.flatMap((manifest) => manifest.forEntityTypes))];
},
'umbUserPermissionsObserver',
);