Merge branch 'main' into v14/bugfix/hide-content-workspace-view-when-no-properties

This commit is contained in:
Mads Rasmussen
2024-07-05 10:11:46 +02:00
134 changed files with 371 additions and 272 deletions

View File

@@ -23,7 +23,8 @@
"./src/packages/tags",
"./src/packages/templating",
"./src/packages/property-editors",
"./src/packages/media"
"./src/packages/media",
"./src/packages/user"
],
"dependencies": {
"@types/diff": "^5.2.1",
@@ -7686,6 +7687,10 @@
"resolved": "src/packages/umbraco-news",
"link": true
},
"node_modules/@umbraco-backoffice/user": {
"resolved": "src/packages/user",
"link": true
},
"node_modules/@umbraco-backoffice/webhook": {
"resolved": "src/packages/webhook",
"link": true
@@ -22305,6 +22310,9 @@
"src/packages/umbraco-news": {
"name": "@umbraco-backoffice/umbraco-news"
},
"src/packages/user": {
"name": "@umbraco-backoffice/user"
},
"src/packages/webhook": {
"name": "@umbraco-backoffice/webhook"
}

View File

@@ -141,7 +141,8 @@
"./src/packages/tags",
"./src/packages/templating",
"./src/packages/property-editors",
"./src/packages/media"
"./src/packages/media",
"./src/packages/user"
],
"scripts": {
"backoffice:test:e2e": "npx playwright test",

View File

@@ -48,7 +48,7 @@ export class RouterSlot<D = any, P = any> extends HTMLElement implements IRouter
/**
* Method to cancel navigation if changed.
*/
private _cancelNavigation ?:() => void;
private _cancelNavigation?: () => void;
/**
* Listeners on the router.
@@ -208,7 +208,7 @@ export class RouterSlot<D = any, P = any> extends HTMLElement implements IRouter
if (this.isConnected) {
const newMatch = this.getRouteMatch();
// Check if this match matches the current match (aka. If the path has changed), if so we should navigate. [NL]
if(newMatch) {
if (newMatch) {
navigate = shouldNavigate(this.match, newMatch);
}
}
@@ -318,7 +318,6 @@ export class RouterSlot<D = any, P = any> extends HTMLElement implements IRouter
* Returns true if a navigation was made to a new page.
*/
protected async renderPath(path: string | PathFragment): Promise<boolean> {
// Notice: Since this is never called from any other place than one higher in this file(when writing this...), we could just retrieve the path and find a match by using this.getRouteMatch() [NL]
// Find the corresponding route.
const match = matchRoutes(this._routes, path);
@@ -336,7 +335,6 @@ export class RouterSlot<D = any, P = any> extends HTMLElement implements IRouter
// Only change route if its a new route.
const navigate = shouldNavigate(this.match, match);
if (navigate) {
// If another navigation is still begin resolved in this very moment, then we need to cancel that so it does not end up overriding this new navigation.[NL]
this._cancelNavigation?.();
// Listen for another push state event. If another push state event happens
@@ -412,7 +410,7 @@ export class RouterSlot<D = any, P = any> extends HTMLElement implements IRouter
// We have some routes that share the same component instance, those should not be removed and re-appended [NL]
const isTheSameComponent = this.firstChild === page;
if(!isTheSameComponent) {
if (!isTheSameComponent) {
// Remove the old page by clearing the slot
this.clearChildren();
}
@@ -421,7 +419,7 @@ export class RouterSlot<D = any, P = any> extends HTMLElement implements IRouter
// We do this to ensure that we can find the match in the connectedCallback of the page.
this._routeMatch = match;
if(!isTheSameComponent) {
if (!isTheSameComponent) {
if (page) {
// Append the new page
this.appendChild(page);

View File

@@ -1,7 +1,7 @@
import { UmbSectionSidebarContext } from './section-sidebar.context.js';
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
import { css, html, customElement } from '@umbraco-cms/backoffice/external/lit';
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
import { UmbSectionSidebarContext } from './section-sidebar.context.js';
@customElement('umb-section-sidebar')
export class UmbSectionSidebarElement extends UmbLitElement {

View File

@@ -0,0 +1,4 @@
import type UmbCurrentUserContext from './current-user.context.js';
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
export const UMB_CURRENT_USER_CONTEXT = new UmbContextToken<UmbCurrentUserContext>('UmbCurrentUserContext');

View File

@@ -1,6 +1,6 @@
import type { UmbCurrentUserModel } from './types.js';
import { UmbCurrentUserRepository } from './repository/index.js';
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
import { UMB_CURRENT_USER_CONTEXT } from './current-user.context.token.js';
import { UmbContextBase } from '@umbraco-cms/backoffice/class-api';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
import { firstValueFrom } from '@umbraco-cms/backoffice/external/rxjs';
@@ -116,5 +116,3 @@ export class UmbCurrentUserContext extends UmbContextBase<UmbCurrentUserContext>
}
export default UmbCurrentUserContext;
export const UMB_CURRENT_USER_CONTEXT = new UmbContextToken<UmbCurrentUserContext>('UmbCurrentUserContext');

View File

@@ -16,3 +16,5 @@ export class UmbConfigureExternalLoginProvidersApi<ArgsMetaType = never>
await modalManagerContext.open(this, UMB_CURRENT_USER_EXTERNAL_LOGIN_MODAL).onSubmit();
}
}
export { UmbConfigureExternalLoginProvidersApi as api };

View File

@@ -1,4 +1,3 @@
import { UmbConfigureExternalLoginProvidersApi } from './configure-external-login-providers-action.js';
import type { ManifestCurrentUserActionDefaultKind, ManifestModal } from '@umbraco-cms/backoffice/extension-registry';
export const modals: Array<ManifestModal> = [
@@ -17,7 +16,7 @@ export const userProfileApps: Array<ManifestCurrentUserActionDefaultKind> = [
alias: 'Umb.CurrentUser.App.ExternalLoginProviders',
name: 'External Login Providers Current User App',
weight: 700,
api: UmbConfigureExternalLoginProvidersApi,
api: () => import('./configure-external-login-providers-action.js'),
meta: {
label: '#defaultdialogs_externalLoginProviders',
icon: 'icon-lock',

View File

@@ -1,5 +1,5 @@
import type { UmbCurrentUserHistoryItem, UmbCurrentUserHistoryStore } from './current-user-history.store.js';
import { UMB_CURRENT_USER_HISTORY_STORE_CONTEXT } from './current-user-history.store.js';
import { UMB_CURRENT_USER_HISTORY_STORE_CONTEXT } from './current-user-history.store.token.js';
import { html, customElement, state, map, ifDefined, css } from '@umbraco-cms/backoffice/external/lit';
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';

View File

@@ -0,0 +1,6 @@
import type UmbCurrentUserHistoryStore from './current-user-history.store.js';
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
export const UMB_CURRENT_USER_HISTORY_STORE_CONTEXT = new UmbContextToken<UmbCurrentUserHistoryStore>(
'UmbCurrentUserHistoryStore',
);

View File

@@ -1,4 +1,4 @@
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
import { UMB_CURRENT_USER_HISTORY_STORE_CONTEXT } from './current-user-history.store.token.js';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
import { UmbId } from '@umbraco-cms/backoffice/id';
import { UmbArrayState } from '@umbraco-cms/backoffice/observable-api';
@@ -61,9 +61,5 @@ export class UmbCurrentUserHistoryStore extends UmbStoreBase<UmbCurrentUserHisto
}
}
export const UMB_CURRENT_USER_HISTORY_STORE_CONTEXT = new UmbContextToken<UmbCurrentUserHistoryStore>(
'UmbCurrentUserHistoryStore',
);
// Default export for the globalContext manifest:
export default UmbCurrentUserHistoryStore;

View File

@@ -3,4 +3,5 @@ export * from './components/index.js';
export * from './history/current-user-history.store.js';
export * from './utils/index.js';
export * from './current-user.context.js';
export * from './current-user.context.token.js';
export type * from './types.js';

View File

@@ -16,3 +16,5 @@ export class UmbConfigureMfaProvidersApi<ArgsMetaType = never>
await modalManagerContext.open(this, UMB_CURRENT_USER_MFA_MODAL).onSubmit();
}
}
export { UmbConfigureMfaProvidersApi as api };

View File

@@ -1,4 +1,3 @@
import { UmbConfigureMfaProvidersApi } from './configure-mfa-providers-action.js';
import type { ManifestCurrentUserActionDefaultKind, ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
export const userProfileApps: Array<ManifestCurrentUserActionDefaultKind> = [
@@ -8,7 +7,7 @@ export const userProfileApps: Array<ManifestCurrentUserActionDefaultKind> = [
alias: 'Umb.CurrentUser.App.MfaLoginProviders',
name: 'MFA Login Providers Current User App',
weight: 800,
api: UmbConfigureMfaProvidersApi,
api: () => import('./configure-mfa-providers-action.js'),
meta: {
label: '#user_configureTwoFactor',
icon: 'icon-rectangle-ellipsis',

View File

@@ -1,4 +1,4 @@
import { UMB_CURRENT_USER_CONTEXT } from '../../current-user.context.js';
import { UMB_CURRENT_USER_CONTEXT } from '../../current-user.context.token.js';
import type { UmbCurrentUserModel } from '../../types.js';
import { UMB_AUTH_CONTEXT } from '@umbraco-cms/backoffice/auth';
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';

View File

@@ -1,4 +1,4 @@
import { UMB_CURRENT_USER_CONTEXT } from '../current-user.context.js';
import { UMB_CURRENT_USER_CONTEXT } from '../current-user.context.token.js';
import { UmbActionBase } from '@umbraco-cms/backoffice/action';
import type { UmbCurrentUserAction, UmbCurrentUserActionArgs } from '@umbraco-cms/backoffice/extension-registry';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
@@ -41,3 +41,5 @@ export class UmbChangePasswordCurrentUserAction<ArgsMetaType = never>
});
}
}
export { UmbChangePasswordCurrentUserAction as api };

View File

@@ -1,4 +1,4 @@
import { UMB_CURRENT_USER_CONTEXT } from '../current-user.context.js';
import { UMB_CURRENT_USER_CONTEXT } from '../current-user.context.token.js';
import { UmbActionBase } from '@umbraco-cms/backoffice/action';
import type { UmbCurrentUserAction, UmbCurrentUserActionArgs } from '@umbraco-cms/backoffice/extension-registry';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
@@ -36,3 +36,5 @@ export class UmbEditCurrentUserAction<ArgsMetaType = never>
return;
}
}
export { UmbEditCurrentUserAction as api };

View File

@@ -1,5 +1,3 @@
import { UmbChangePasswordCurrentUserAction } from './change-password-current-user.action.js';
import { UmbEditCurrentUserAction } from './edit-current-user.action.js';
import type {
ManifestCurrentUserActionDefaultKind,
ManifestTypes,
@@ -27,7 +25,7 @@ const currentUserActions: Array<ManifestCurrentUserActionDefaultKind> = [
alias: 'Umb.CurrentUser.Button.Edit',
name: 'Current User Edit Button',
weight: 1000,
api: UmbEditCurrentUserAction,
api: () => import('./edit-current-user.action.js'),
meta: {
label: '#general_edit',
icon: 'edit',
@@ -45,7 +43,7 @@ const currentUserActions: Array<ManifestCurrentUserActionDefaultKind> = [
alias: 'Umb.CurrentUser.Button.ChangePassword',
name: 'Current User Change Password Button',
weight: 900,
api: UmbChangePasswordCurrentUserAction,
api: () => import('./change-password-current-user.action.js'),
meta: {
label: '#general_changePassword',
icon: 'lock',

View File

@@ -0,0 +1 @@
export const UMB_CURRENT_USER_REPOSITORY_ALIAS = 'Umb.Repository.CurrentUser';

View File

@@ -1,5 +1,5 @@
import { UmbCurrentUserServerDataSource } from './current-user.server.data-source.js';
import { UMB_CURRENT_USER_STORE_CONTEXT } from './current-user.store.js';
import { UMB_CURRENT_USER_STORE_CONTEXT } from './current-user.store.token.js';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
import { UmbRepositoryBase } from '@umbraco-cms/backoffice/repository';

View File

@@ -0,0 +1,4 @@
import type UmbCurrentUserStore from './current-user.store.js';
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
export const UMB_CURRENT_USER_STORE_CONTEXT = new UmbContextToken<UmbCurrentUserStore>('UmbCurrentUserStore');

View File

@@ -3,10 +3,10 @@ import type {
UmbCurrentUserMfaProviderModel,
UmbCurrentUserModel,
} from '../types.js';
import { UMB_CURRENT_USER_STORE_CONTEXT } from './current-user.store.token.js';
import type { UmbUserDetailModel } from '@umbraco-cms/backoffice/user';
import { UMB_USER_DETAIL_STORE_CONTEXT } from '@umbraco-cms/backoffice/user';
import { UmbContextBase } from '@umbraco-cms/backoffice/class-api';
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
import { UmbArrayState, UmbObjectState } from '@umbraco-cms/backoffice/observable-api';
@@ -106,5 +106,3 @@ export class UmbCurrentUserStore extends UmbContextBase<UmbCurrentUserStore> {
}
export default UmbCurrentUserStore;
export const UMB_CURRENT_USER_STORE_CONTEXT = new UmbContextToken<UmbCurrentUserStore>('UmbCurrentUserStore');

View File

@@ -1,3 +1,4 @@
export { UMB_CURRENT_USER_REPOSITORY_ALIAS } from './constants.js';
export { UMB_CURRENT_USER_STORE_CONTEXT } from './current-user.store.token.js';
export { UmbCurrentUserRepository } from './current-user.repository.js';
export { UMB_CURRENT_USER_REPOSITORY_ALIAS } from './manifests.js';
export { UmbCurrentUserStore, UMB_CURRENT_USER_STORE_CONTEXT } from './current-user.store.js';
export { UmbCurrentUserStore } from './current-user.store.js';

View File

@@ -1,7 +1,6 @@
import { UMB_CURRENT_USER_REPOSITORY_ALIAS } from './constants.js';
import type { ManifestRepository, ManifestStore, ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
export const UMB_CURRENT_USER_REPOSITORY_ALIAS = 'Umb.Repository.CurrentUser';
const repository: ManifestRepository = {
type: 'repository',
alias: UMB_CURRENT_USER_REPOSITORY_ALIAS,

View File

@@ -1,4 +1,4 @@
import { UMB_CURRENT_USER_CONTEXT } from '../current-user.context.js';
import { UMB_CURRENT_USER_CONTEXT } from '../current-user.context.token.js';
import { UmbContextConsumerController } from '@umbraco-cms/backoffice/context-api';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';

View File

@@ -1,5 +1,5 @@
import { UmbUserItemRepository } from '../../user/repository/item/user-item.repository.js';
import { UMB_CURRENT_USER_CONTEXT } from '../../current-user/current-user.context.js';
import { UMB_CURRENT_USER_CONTEXT } from '@umbraco-cms/backoffice/current-user';
import { UmbUserItemRepository } from '@umbraco-cms/backoffice/user';
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
import type { CSSResultGroup } from '@umbraco-cms/backoffice/external/lit';
import { css, html, nothing, customElement, state } from '@umbraco-cms/backoffice/external/lit';

View File

@@ -0,0 +1,8 @@
{
"name": "@umbraco-backoffice/user",
"private": true,
"type": "module",
"scripts": {
"build": "vite build"
}
}

View File

@@ -0,0 +1 @@
export const UMB_USER_GROUP_COLLECTION_ALIAS = 'Umb.Collection.UserGroup';

View File

@@ -1,2 +1,2 @@
export * from './repository/index.js';
export { UMB_USER_GROUP_COLLECTION_ALIAS } from './manifests.js';
export { UMB_USER_GROUP_COLLECTION_ALIAS } from './constants.js';

View File

@@ -1,12 +1,10 @@
import {
UMB_USER_GROUP_COLLECTION_REPOSITORY_ALIAS,
manifests as repositoryManifests,
} from './repository/manifests.js';
import { manifests as repositoryManifests } from './repository/manifests.js';
import { manifests as collectionViewManifests } from './views/manifests.js';
import { manifests as collectionActionManifests } from './action/manifests.js';
import { UMB_USER_GROUP_COLLECTION_ALIAS } from './constants.js';
import { UMB_USER_GROUP_COLLECTION_REPOSITORY_ALIAS } from './repository/constants.js';
import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
export const UMB_USER_GROUP_COLLECTION_ALIAS = 'Umb.Collection.UserGroup';
const collection: ManifestTypes = {
type: 'collection',
alias: UMB_USER_GROUP_COLLECTION_ALIAS,

View File

@@ -0,0 +1 @@
export const UMB_USER_GROUP_COLLECTION_REPOSITORY_ALIAS = 'Umb.Repository.UserGroupCollection';

View File

@@ -1,7 +1,6 @@
import { UMB_USER_GROUP_COLLECTION_REPOSITORY_ALIAS } from './constants.js';
import type { ManifestRepository, ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
export const UMB_USER_GROUP_COLLECTION_REPOSITORY_ALIAS = 'Umb.Repository.UserGroupCollection';
const repository: ManifestRepository = {
type: 'repository',
alias: UMB_USER_GROUP_COLLECTION_REPOSITORY_ALIAS,

View File

@@ -25,3 +25,5 @@ export class UmbDeleteUserGroupEntityBulkAction extends UmbEntityBulkActionBase<
}
}
}
export { UmbDeleteUserGroupEntityBulkAction as api };

View File

@@ -1,6 +1,5 @@
import { UMB_USER_GROUP_COLLECTION_ALIAS } from '../collection/index.js';
import { UMB_USER_GROUP_ENTITY_TYPE } from '../entity.js';
import { UmbDeleteUserGroupEntityBulkAction } from './delete/delete.action.js';
import { UMB_COLLECTION_ALIAS_CONDITION } from '@umbraco-cms/backoffice/collection';
import type { ManifestEntityBulkAction, ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
@@ -10,7 +9,7 @@ const entityActions: Array<ManifestEntityBulkAction> = [
alias: 'Umb.EntityBulkAction.UserGroup.Delete',
name: 'Delete User Group Entity Bulk Action',
weight: 400,
api: UmbDeleteUserGroupEntityBulkAction,
api: () => import('./delete/delete.action.js'),
forEntityTypes: [UMB_USER_GROUP_ENTITY_TYPE],
meta: {
label: 'Delete',

View File

@@ -0,0 +1,2 @@
export const UMB_USER_GROUP_DETAIL_REPOSITORY_ALIAS = 'Umb.Repository.UserGroup.Detail';
export const UMB_USER_GROUP_DETAIL_STORE_ALIAS = 'Umb.Store.UserGroup.Detail';

View File

@@ -1,5 +1,5 @@
export { UmbUserGroupDetailRepository } from './user-group-detail.repository.js';
export { UMB_USER_GROUP_DETAIL_REPOSITORY_ALIAS } from './manifests.js';
export { UMB_USER_GROUP_DETAIL_STORE_CONTEXT } from './user-group-detail.store.js';
export { UMB_USER_GROUP_DETAIL_REPOSITORY_ALIAS } from './constants.js';
export { UMB_USER_GROUP_DETAIL_STORE_CONTEXT } from './user-group-detail.store.token.js';
export type { UmbUserGroupDetailStore } from './user-group-detail.store.js';

View File

@@ -1,7 +1,6 @@
import { UMB_USER_GROUP_DETAIL_REPOSITORY_ALIAS, UMB_USER_GROUP_DETAIL_STORE_ALIAS } from './constants.js';
import type { ManifestRepository, ManifestStore, ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
export const UMB_USER_GROUP_DETAIL_REPOSITORY_ALIAS = 'Umb.Repository.UserGroup.Detail';
const repository: ManifestRepository = {
type: 'repository',
alias: UMB_USER_GROUP_DETAIL_REPOSITORY_ALIAS,
@@ -9,8 +8,6 @@ const repository: ManifestRepository = {
api: () => import('./user-group-detail.repository.js'),
};
export const UMB_USER_GROUP_DETAIL_STORE_ALIAS = 'Umb.Store.UserGroup.Detail';
const store: ManifestStore = {
type: 'store',
alias: UMB_USER_GROUP_DETAIL_STORE_ALIAS,

View File

@@ -1,6 +1,6 @@
import type { UmbUserGroupDetailModel } from '../../types.js';
import { UmbUserGroupServerDataSource } from './user-group-detail.server.data-source.js';
import { UMB_USER_GROUP_DETAIL_STORE_CONTEXT } from './user-group-detail.store.js';
import { UMB_USER_GROUP_DETAIL_STORE_CONTEXT } from './user-group-detail.store.token.js';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
import { UmbDetailRepositoryBase } from '@umbraco-cms/backoffice/repository';

View File

@@ -0,0 +1,6 @@
import type UmbUserGroupDetailStore from './user-group-detail.store.js';
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
export const UMB_USER_GROUP_DETAIL_STORE_CONTEXT = new UmbContextToken<UmbUserGroupDetailStore>(
'UmbUserGroupDetailStore',
);

View File

@@ -1,5 +1,5 @@
import type { UmbUserGroupDetailModel } from '../../types.js';
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
import { UMB_USER_GROUP_DETAIL_STORE_CONTEXT } from './user-group-detail.store.token.js';
import { UmbDetailStoreBase } from '@umbraco-cms/backoffice/store';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
@@ -21,7 +21,3 @@ export class UmbUserGroupDetailStore extends UmbDetailStoreBase<UmbUserGroupDeta
}
export default UmbUserGroupDetailStore;
export const UMB_USER_GROUP_DETAIL_STORE_CONTEXT = new UmbContextToken<UmbUserGroupDetailStore>(
'UmbUserGroupDetailStore',
);

View File

@@ -0,0 +1,2 @@
export const UMB_USER_GROUP_ITEM_REPOSITORY_ALIAS = 'Umb.Repository.UserGroupItem';
export const UMB_USER_GROUP_STORE_ALIAS = 'Umb.Store.UserGroupItem';

View File

@@ -1,3 +1,3 @@
export { UmbUserGroupItemRepository } from './user-group-item.repository.js';
export { UMB_USER_GROUP_ITEM_REPOSITORY_ALIAS } from './manifests.js';
export { UMB_USER_GROUP_ITEM_REPOSITORY_ALIAS } from './constants.js';
export type { UmbUserGroupItemModel } from './types.js';

View File

@@ -1,8 +1,6 @@
import { UMB_USER_GROUP_ITEM_REPOSITORY_ALIAS, UMB_USER_GROUP_STORE_ALIAS } from './constants.js';
import type { ManifestRepository, ManifestItemStore, ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
export const UMB_USER_GROUP_ITEM_REPOSITORY_ALIAS = 'Umb.Repository.UserGroupItem';
export const UMB_USER_GROUP_STORE_ALIAS = 'Umb.Store.UserGroupItem';
const itemRepository: ManifestRepository = {
type: 'repository',
alias: UMB_USER_GROUP_ITEM_REPOSITORY_ALIAS,

View File

@@ -1,5 +1,5 @@
import { UmbUserGroupItemServerDataSource } from './user-group-item.server.data-source.js';
import { UMB_USER_GROUP_ITEM_STORE_CONTEXT } from './user-group-item.store.js';
import { UMB_USER_GROUP_ITEM_STORE_CONTEXT } from './user-group-item.store.token.js';
import type { UmbUserGroupItemModel } from './types.js';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
import { UmbItemRepositoryBase } from '@umbraco-cms/backoffice/repository';

View File

@@ -0,0 +1,4 @@
import type UmbUserGroupItemStore from './user-group-item.store.js';
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
export const UMB_USER_GROUP_ITEM_STORE_CONTEXT = new UmbContextToken<UmbUserGroupItemStore>('UmbUserGroupItemStore');

View File

@@ -1,5 +1,5 @@
import type { UmbUserGroupItemModel } from './types.js';
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
import { UMB_USER_GROUP_ITEM_STORE_CONTEXT } from './user-group-item.store.token.js';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
import { UmbItemStoreBase } from '@umbraco-cms/backoffice/store';
@@ -22,5 +22,3 @@ export class UmbUserGroupItemStore extends UmbItemStoreBase<UmbUserGroupItemMode
}
export default UmbUserGroupItemStore;
export const UMB_USER_GROUP_ITEM_STORE_CONTEXT = new UmbContextToken<UmbUserGroupItemStore>('UmbUserGroupItemStore');

View File

@@ -1,4 +1,4 @@
import { UMB_USER_MANAGEMENT_SECTION_ALIAS } from '../../user-section/manifests.js';
import { UMB_USER_MANAGEMENT_SECTION_ALIAS } from '../../user-section/index.js';
import type { ManifestSectionView, ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
const sectionsViews: Array<ManifestSectionView> = [

View File

@@ -0,0 +1 @@
export const UMB_USER_MANAGEMENT_SECTION_ALIAS = 'Umb.Section.Users';

View File

@@ -0,0 +1 @@
export * from './constants.js';

View File

@@ -1,7 +1,6 @@
import { UMB_USER_MANAGEMENT_SECTION_ALIAS } from './constants.js';
import type { ManifestSection, ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
export const UMB_USER_MANAGEMENT_SECTION_ALIAS = 'Umb.Section.Users';
const section: ManifestSection = {
type: 'section',
alias: UMB_USER_MANAGEMENT_SECTION_ALIAS,

View File

@@ -0,0 +1 @@
export const UMB_USER_COLLECTION_ALIAS = 'Umb.Collection.User';

View File

@@ -1 +1,2 @@
export * from './repository/index.js';
export * from './constants.js';

View File

@@ -2,9 +2,9 @@ import { UMB_USER_COLLECTION_REPOSITORY_ALIAS } from './repository/index.js';
import { manifests as collectionRepositoryManifests } from './repository/manifests.js';
import { manifests as collectionViewManifests } from './views/manifests.js';
import { manifests as collectionActionManifests } from './action/manifests.js';
import { UMB_USER_COLLECTION_ALIAS } from './constants.js';
import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
export const UMB_USER_COLLECTION_ALIAS = 'Umb.Collection.User';
const collectionManifest: ManifestTypes = {
type: 'collection',
alias: UMB_USER_COLLECTION_ALIAS,

View File

@@ -0,0 +1 @@
export const UMB_USER_COLLECTION_REPOSITORY_ALIAS = 'Umb.Repository.UserCollection';

View File

@@ -1,2 +1,2 @@
export { UMB_USER_COLLECTION_REPOSITORY_ALIAS } from './manifests.js';
export { UMB_USER_COLLECTION_REPOSITORY_ALIAS } from './constants.js';
export { UmbUserCollectionRepository } from './user-collection.repository.js';

View File

@@ -1,7 +1,6 @@
import { UMB_USER_COLLECTION_REPOSITORY_ALIAS } from './constants.js';
import type { ManifestRepository, ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
export const UMB_USER_COLLECTION_REPOSITORY_ALIAS = 'Umb.Repository.UserCollection';
const repository: ManifestRepository = {
type: 'repository',
alias: UMB_USER_COLLECTION_REPOSITORY_ALIAS,

View File

@@ -0,0 +1,2 @@
export const UMB_COLLECTION_VIEW_USER_TABLE = 'Umb.CollectionView.User.Table';
export const UMB_COLLECTION_VIEW_USER_GRID = 'Umb.CollectionView.User.Grid';

View File

@@ -1,2 +1 @@
export { UMB_COLLECTION_VIEW_USER_TABLE } from './manifests.js';
export { UMB_COLLECTION_VIEW_USER_GRID } from './manifests.js';
export * from './constants.js';

View File

@@ -1,8 +1,7 @@
import { UMB_COLLECTION_VIEW_USER_GRID, UMB_COLLECTION_VIEW_USER_TABLE } from './constants.js';
import { UMB_COLLECTION_ALIAS_CONDITION } from '@umbraco-cms/backoffice/collection';
import type { ManifestCollectionView, ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
export const UMB_COLLECTION_VIEW_USER_TABLE = 'Umb.CollectionView.User.Table';
const tableCollectionView: ManifestCollectionView = {
type: 'collectionView',
alias: UMB_COLLECTION_VIEW_USER_TABLE,
@@ -21,8 +20,6 @@ const tableCollectionView: ManifestCollectionView = {
],
};
export const UMB_COLLECTION_VIEW_USER_GRID = 'Umb.CollectionView.User.Grid';
const gridCollectionView: ManifestCollectionView = {
type: 'collectionView',
alias: UMB_COLLECTION_VIEW_USER_GRID,

View File

@@ -0,0 +1,10 @@
import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
export const manifests: Array<ManifestTypes> = [
{
type: 'condition',
name: 'User Allow Delete Action Condition',
alias: 'Umb.Condition.User.AllowDeleteAction',
api: () => import('./user-allow-delete-action.condition.js'),
},
];

View File

@@ -0,0 +1,14 @@
import { UmbUserActionConditionBase } from '../user-allow-action-base.condition.js';
export class UmbUserAllowDeleteActionCondition extends UmbUserActionConditionBase {
async _onUserDataChange() {
// don't allow the current user to delete themselves
if (!this.userUnique || (await this.isCurrentUser())) {
this.permitted = false;
} else {
this.permitted = true;
}
}
}
export { UmbUserAllowDeleteActionCondition as api };

View File

@@ -0,0 +1,10 @@
import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
export const manifests: Array<ManifestTypes> = [
{
type: 'condition',
name: 'User Allow Disable Action Condition',
alias: 'Umb.Condition.User.AllowDisableAction',
api: () => import('./user-allow-disable-action.condition.js'),
},
];

View File

@@ -0,0 +1,16 @@
import { UmbUserStateEnum } from '../../types.js';
import { UmbUserActionConditionBase } from '../user-allow-action-base.condition.js';
export class UmbUserAllowDisableActionCondition extends UmbUserActionConditionBase {
async _onUserDataChange() {
// don't allow the current user to disable themselves
if (!this.userUnique || (await this.isCurrentUser())) {
this.permitted = false;
return;
}
this.permitted = this.userState !== UmbUserStateEnum.DISABLED;
}
}
export { UmbUserAllowDisableActionCondition as api };

View File

@@ -0,0 +1,10 @@
import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
export const manifests: Array<ManifestTypes> = [
{
type: 'condition',
name: 'User Allow Enable Action Condition',
alias: 'Umb.Condition.User.AllowEnableAction',
api: () => import('./user-allow-enable-action.condition.js'),
},
];

View File

@@ -0,0 +1,16 @@
import { UmbUserStateEnum } from '../../types.js';
import { UmbUserActionConditionBase } from '../user-allow-action-base.condition.js';
export class UmbUserAllowEnableActionCondition extends UmbUserActionConditionBase {
async _onUserDataChange() {
// don't allow the current user to enable themselves
if (!this.userUnique || (await this.isCurrentUser())) {
this.permitted = false;
return;
}
this.permitted = this.userState === UmbUserStateEnum.DISABLED;
}
}
export { UmbUserAllowEnableActionCondition as api };

View File

@@ -0,0 +1,10 @@
import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
export const manifests: Array<ManifestTypes> = [
{
type: 'condition',
name: 'User Allow ExternalLogin Action Condition',
alias: 'Umb.Condition.User.AllowExternalLoginAction',
api: () => import('./user-allow-external-login-action.condition.js'),
},
];

View File

@@ -1,5 +1,4 @@
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
import type { ManifestCondition } from '@umbraco-cms/backoffice/extension-api';
import { UmbConditionBase, umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';
export class UmbUserAllowExternalLoginActionCondition extends UmbConditionBase<never> {
@@ -16,9 +15,4 @@ export class UmbUserAllowExternalLoginActionCondition extends UmbConditionBase<n
}
}
export const manifest: ManifestCondition = {
type: 'condition',
name: 'User Allow ExternalLogin Action Condition',
alias: 'Umb.Condition.User.AllowExternalLoginAction',
api: UmbUserAllowExternalLoginActionCondition,
};
export { UmbUserAllowExternalLoginActionCondition as api };

View File

@@ -0,0 +1,10 @@
import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
export const manifests: Array<ManifestTypes> = [
{
type: 'condition',
name: 'User Allow Mfa Action Condition',
alias: 'Umb.Condition.User.AllowMfaAction',
api: () => import('./user-allow-mfa-action.condition.js'),
},
];

View File

@@ -1,5 +1,4 @@
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
import type { ManifestCondition } from '@umbraco-cms/backoffice/extension-api';
import { UmbConditionBase, umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';
export class UmbUserAllowMfaActionCondition extends UmbConditionBase<never> {
@@ -16,9 +15,4 @@ export class UmbUserAllowMfaActionCondition extends UmbConditionBase<never> {
}
}
export const manifest: ManifestCondition = {
type: 'condition',
name: 'User Allow Mfa Action Condition',
alias: 'Umb.Condition.User.AllowMfaAction',
api: UmbUserAllowMfaActionCondition,
};
export { UmbUserAllowMfaActionCondition as api };

View File

@@ -0,0 +1,10 @@
import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
export const manifests: Array<ManifestTypes> = [
{
type: 'condition',
name: 'User Allow Unlock Action Condition',
alias: 'Umb.Condition.User.AllowUnlockAction',
api: () => import('./user-allow-unlock-action.condition.js'),
},
];

View File

@@ -0,0 +1,16 @@
import { UmbUserStateEnum } from '../../types.js';
import { UmbUserActionConditionBase } from '../user-allow-action-base.condition.js';
export class UmbUserAllowUnlockActionCondition extends UmbUserActionConditionBase {
async _onUserDataChange() {
// don't allow the current user to unlock themselves
if (!this.userUnique || (await this.isCurrentUser())) {
this.permitted = false;
return;
}
this.permitted = this.userState === UmbUserStateEnum.LOCKED_OUT;
}
}
export { UmbUserAllowUnlockActionCondition as api };

View File

@@ -1,16 +1,16 @@
import { manifest as userAllowDisableActionManifest } from './user-allow-disable-action.condition.js';
import { manifest as userAllowEnableActionManifest } from './user-allow-enable-action.condition.js';
import { manifest as userAllowUnlockActionManifest } from './user-allow-unlock-action.condition.js';
import { manifest as userAllowExternalLoginActionManifest } from './user-allow-external-login-action.condition.js';
import { manifest as userAllowMfaActionManifest } from './user-allow-mfa-action.condition.js';
import { manifest as userAllowDeleteActionManifest } from './user-allow-delete-action.condition.js';
import { manifests as userAllowDeleteActionManifests } from './allow-delete/manifests.js';
import { manifests as userAllowDisableActionManifests } from './allow-disable/manifests.js';
import { manifests as userAllowEnableActionManifests } from './allow-enable/manifests.js';
import { manifests as userAllowExternalLoginActionManifests } from './allow-external-login/manifests.js';
import { manifests as userAllowMfaActionManifests } from './allow-mfa/manifests.js';
import { manifests as userAllowUnlockActionManifests } from './allow-unlock/manifests.js';
import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
export const manifests: Array<ManifestTypes> = [
userAllowDisableActionManifest,
userAllowEnableActionManifest,
userAllowUnlockActionManifest,
userAllowExternalLoginActionManifest,
userAllowMfaActionManifest,
userAllowDeleteActionManifest,
...userAllowDisableActionManifests,
...userAllowEnableActionManifests,
...userAllowUnlockActionManifests,
...userAllowExternalLoginActionManifests,
...userAllowMfaActionManifests,
...userAllowDeleteActionManifests,
];

View File

@@ -1,20 +0,0 @@
import { UmbUserActionConditionBase } from './user-allow-action-base.condition.js';
import type { ManifestCondition } from '@umbraco-cms/backoffice/extension-api';
export class UmbUserAllowDeleteActionCondition extends UmbUserActionConditionBase {
async _onUserDataChange() {
// don't allow the current user to delete themselves
if (!this.userUnique || (await this.isCurrentUser())) {
this.permitted = false;
} else {
this.permitted = true;
}
}
}
export const manifest: ManifestCondition = {
type: 'condition',
name: 'User Allow Delete Action Condition',
alias: 'Umb.Condition.User.AllowDeleteAction',
api: UmbUserAllowDeleteActionCondition,
};

View File

@@ -1,22 +0,0 @@
import { UmbUserStateEnum } from '../types.js';
import { UmbUserActionConditionBase } from './user-allow-action-base.condition.js';
import type { ManifestCondition } from '@umbraco-cms/backoffice/extension-api';
export class UmbUserAllowDisableActionCondition extends UmbUserActionConditionBase {
async _onUserDataChange() {
// don't allow the current user to disable themselves
if (!this.userUnique || (await this.isCurrentUser())) {
this.permitted = false;
return;
}
this.permitted = this.userState !== UmbUserStateEnum.DISABLED;
}
}
export const manifest: ManifestCondition = {
type: 'condition',
name: 'User Allow Disable Action Condition',
alias: 'Umb.Condition.User.AllowDisableAction',
api: UmbUserAllowDisableActionCondition,
};

View File

@@ -1,22 +0,0 @@
import { UmbUserStateEnum } from '../types.js';
import { UmbUserActionConditionBase } from './user-allow-action-base.condition.js';
import type { ManifestCondition } from '@umbraco-cms/backoffice/extension-api';
export class UmbUserAllowEnableActionCondition extends UmbUserActionConditionBase {
async _onUserDataChange() {
// don't allow the current user to enable themselves
if (!this.userUnique || (await this.isCurrentUser())) {
this.permitted = false;
return;
}
this.permitted = this.userState === UmbUserStateEnum.DISABLED;
}
}
export const manifest: ManifestCondition = {
type: 'condition',
name: 'User Allow Enable Action Condition',
alias: 'Umb.Condition.User.AllowEnableAction',
api: UmbUserAllowEnableActionCondition,
};

View File

@@ -1,22 +0,0 @@
import { UmbUserStateEnum } from '../types.js';
import { UmbUserActionConditionBase } from './user-allow-action-base.condition.js';
import type { ManifestCondition } from '@umbraco-cms/backoffice/extension-api';
export class UmbUserAllowUnlockActionCondition extends UmbUserActionConditionBase {
async _onUserDataChange() {
// don't allow the current user to unlock themselves
if (!this.userUnique || (await this.isCurrentUser())) {
this.permitted = false;
return;
}
this.permitted = this.userState === UmbUserStateEnum.LOCKED_OUT;
}
}
export const manifest: ManifestCondition = {
type: 'condition',
name: 'User Allow Unlock Action Condition',
alias: 'Umb.Condition.User.AllowUnlockAction',
api: UmbUserAllowUnlockActionCondition,
};

View File

@@ -27,3 +27,5 @@ export class UmbChangeUserPasswordEntityAction extends UmbEntityActionBase<never
await repository.changePassword(this.args.unique, data.newPassword);
}
}
export { UmbChangeUserPasswordEntityAction as api };

View File

@@ -33,3 +33,5 @@ export class UmbDisableUserEntityAction extends UmbEntityActionBase<never> {
await disableUserRepository.disable([this.args.unique]);
}
}
export { UmbDisableUserEntityAction as api };

View File

@@ -32,3 +32,5 @@ export class UmbEnableUserEntityAction extends UmbEntityActionBase<never> {
await enableRepository.enable([this.args.unique]);
}
}
export { UmbEnableUserEntityAction as api };

View File

@@ -1,10 +1,5 @@
import { UMB_USER_DETAIL_REPOSITORY_ALIAS, UMB_USER_ITEM_REPOSITORY_ALIAS } from '../repository/index.js';
import { UMB_USER_ENTITY_TYPE } from '../entity.js';
import { UmbDisableUserEntityAction } from './disable/disable-user.action.js';
import { UmbEnableUserEntityAction } from './enable/enable-user.action.js';
import { UmbChangeUserPasswordEntityAction } from './change-password/change-user-password.action.js';
import { UmbUnlockUserEntityAction } from './unlock/unlock-user.action.js';
import { UmbMfaUserEntityAction } from './mfa/mfa-user.action.js';
import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
const entityActions: Array<ManifestTypes> = [
@@ -30,7 +25,7 @@ const entityActions: Array<ManifestTypes> = [
alias: 'Umb.EntityAction.User.Enable',
name: 'Enable User Entity Action',
weight: 800,
api: UmbEnableUserEntityAction,
api: () => import('./enable/enable-user.action.js'),
forEntityTypes: [UMB_USER_ENTITY_TYPE],
meta: {
icon: 'icon-check',
@@ -48,7 +43,7 @@ const entityActions: Array<ManifestTypes> = [
alias: 'Umb.EntityAction.User.Disable',
name: 'Disable User Entity Action',
weight: 700,
api: UmbDisableUserEntityAction,
api: () => import('./disable/disable-user.action.js'),
forEntityTypes: [UMB_USER_ENTITY_TYPE],
meta: {
icon: 'icon-block',
@@ -66,7 +61,7 @@ const entityActions: Array<ManifestTypes> = [
alias: 'Umb.EntityAction.User.ChangePassword',
name: 'Change User Password Entity Action',
weight: 600,
api: UmbChangeUserPasswordEntityAction,
api: () => import('./change-password/change-user-password.action.js'),
forEntityTypes: [UMB_USER_ENTITY_TYPE],
meta: {
icon: 'icon-key',
@@ -79,7 +74,7 @@ const entityActions: Array<ManifestTypes> = [
alias: 'Umb.EntityAction.User.Unlock',
name: 'Unlock User Entity Action',
weight: 600,
api: UmbUnlockUserEntityAction,
api: () => import('./unlock/unlock-user.action.js'),
forEntityTypes: [UMB_USER_ENTITY_TYPE],
meta: {
icon: 'icon-unlocked',
@@ -97,7 +92,7 @@ const entityActions: Array<ManifestTypes> = [
alias: 'Umb.EntityAction.User.ConfigureMfa',
name: 'Configure MFA Entity Action',
weight: 500,
api: UmbMfaUserEntityAction,
api: () => import('./mfa/mfa-user.action.js'),
forEntityTypes: [UMB_USER_ENTITY_TYPE],
meta: {
icon: 'icon-settings',

View File

@@ -40,3 +40,5 @@ export class UmbMfaUserEntityAction extends UmbEntityActionBase<never> {
.catch(() => undefined);
}
}
export { UmbMfaUserEntityAction as api };

View File

@@ -32,3 +32,5 @@ export class UmbUnlockUserEntityAction extends UmbEntityActionBase<never> {
await unlockUserRepository?.unlock([this.args.unique]);
}
}
export { UmbUnlockUserEntityAction as api };

View File

@@ -24,3 +24,5 @@ export class UmbUserDeleteEntityBulkAction extends UmbEntityBulkActionBase<objec
}
}
}
export { UmbUserDeleteEntityBulkAction as api };

View File

@@ -25,3 +25,5 @@ export class UmbDisableUserEntityBulkAction extends UmbEntityBulkActionBase<obje
eventContext.dispatchEvent(event);
}
}
export { UmbDisableUserEntityBulkAction as api };

View File

@@ -25,3 +25,5 @@ export class UmbEnableUserEntityBulkAction extends UmbEntityBulkActionBase<objec
eventContext.dispatchEvent(event);
}
}
export { UmbEnableUserEntityBulkAction as api };

View File

@@ -1,8 +1,5 @@
import { UMB_USER_COLLECTION_ALIAS } from '../collection/manifests.js';
import { UMB_USER_COLLECTION_ALIAS } from '../collection/index.js';
import { UMB_USER_ENTITY_TYPE } from '../entity.js';
import { UmbEnableUserEntityBulkAction } from './enable/enable.action.js';
import { UmbUnlockUserEntityBulkAction } from './unlock/unlock.action.js';
import { UmbDisableUserEntityBulkAction } from './disable/disable.action.js';
import type { ManifestEntityBulkAction, ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
import { UMB_COLLECTION_ALIAS_CONDITION } from '@umbraco-cms/backoffice/collection';
@@ -31,7 +28,7 @@ const entityActions: Array<ManifestEntityBulkAction> = [
alias: 'Umb.EntityBulkAction.User.Enable',
name: 'Enable User Entity Bulk Action',
weight: 300,
api: UmbEnableUserEntityBulkAction,
api: () => import('./enable/enable.action.js'),
forEntityTypes: [UMB_USER_ENTITY_TYPE],
meta: {
label: 'Enable',
@@ -48,7 +45,7 @@ const entityActions: Array<ManifestEntityBulkAction> = [
alias: 'Umb.EntityBulkAction.User.Unlock',
name: 'Unlock User Entity Bulk Action',
weight: 200,
api: UmbUnlockUserEntityBulkAction,
api: () => import('./unlock/unlock.action.js'),
forEntityTypes: [UMB_USER_ENTITY_TYPE],
meta: {
label: 'Unlock',
@@ -65,7 +62,7 @@ const entityActions: Array<ManifestEntityBulkAction> = [
alias: 'Umb.EntityBulkAction.User.Disable',
name: 'Disable User Entity Bulk Action',
weight: 100,
api: UmbDisableUserEntityBulkAction,
api: () => import('./disable/disable.action.js'),
forEntityTypes: [UMB_USER_ENTITY_TYPE],
meta: {
label: 'Disable',

View File

@@ -6,3 +6,5 @@ export class UmbSetGroupUserEntityBulkAction extends UmbEntityBulkActionBase<obj
throw new Error('Bulk set group is not implemented yet');
}
}
export { UmbSetGroupUserEntityBulkAction as api };

View File

@@ -25,3 +25,5 @@ export class UmbUnlockUserEntityBulkAction extends UmbEntityBulkActionBase<objec
eventContext.dispatchEvent(event);
}
}
export { UmbUnlockUserEntityBulkAction as api };

View File

@@ -9,3 +9,5 @@ export class UmbInviteUserCollectionAction extends UmbCollectionActionBase {
await modalContext?.onSubmit();
}
}
export { UmbInviteUserCollectionAction as api };

View File

@@ -1,4 +1,3 @@
import { UmbInviteUserCollectionAction } from './invite-user.collection-action.js';
import { UMB_COLLECTION_ALIAS_CONDITION } from '@umbraco-cms/backoffice/collection';
import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
@@ -7,7 +6,7 @@ export const inviteManifest: ManifestTypes = {
kind: 'button',
name: 'Invite User Collection Action',
alias: 'Umb.CollectionAction.User.Invite',
api: UmbInviteUserCollectionAction,
api: () => import('./invite-user.collection-action.js'),
weight: 100,
meta: {
label: '#user_invite',

View File

@@ -1,6 +1,5 @@
import { UMB_USER_ENTITY_TYPE } from '../../entity.js';
import { UmbResendInviteToUserEntityAction } from './resend-invite/resend-invite.action.js';
import { manifest as conditionManifest } from './resend-invite/resend-invite.action.condition.js';
import { manifests as resendInviteManifests } from './resend-invite/manifests.js';
import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
const entityActions: Array<ManifestTypes> = [
@@ -10,7 +9,7 @@ const entityActions: Array<ManifestTypes> = [
alias: 'Umb.EntityAction.User.ResendInvite',
name: 'Resend Invite User Entity Action',
weight: 500,
api: UmbResendInviteToUserEntityAction,
api: () => import('./resend-invite/resend-invite.action.js'),
forEntityTypes: [UMB_USER_ENTITY_TYPE],
meta: {
icon: 'icon-message',
@@ -22,7 +21,7 @@ const entityActions: Array<ManifestTypes> = [
},
],
},
conditionManifest,
...resendInviteManifests,
];
export const manifests: Array<ManifestTypes> = [...entityActions];

View File

@@ -0,0 +1,10 @@
import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
export const manifests: Array<ManifestTypes> = [
{
type: 'condition',
name: 'User Allow Resend Invite Action Condition',
alias: 'Umb.Condition.User.AllowResendInviteAction',
api: () => import('./resend-invite.action.condition.js'),
},
];

View File

@@ -1,6 +1,5 @@
import { UmbUserActionConditionBase } from '../../../conditions/user-allow-action-base.condition.js';
import { UserStateModel } from '@umbraco-cms/backoffice/external/backend-api';
import type { ManifestCondition } from '@umbraco-cms/backoffice/extension-api';
export class UmbUserAllowResendInviteActionCondition extends UmbUserActionConditionBase {
async _onUserDataChange() {
@@ -13,9 +12,4 @@ export class UmbUserAllowResendInviteActionCondition extends UmbUserActionCondit
}
}
export const manifest: ManifestCondition = {
type: 'condition',
name: 'User Allow Resend Invite Action Condition',
alias: 'Umb.Condition.User.AllowResendInviteAction',
api: UmbUserAllowResendInviteActionCondition,
};
export { UmbUserAllowResendInviteActionCondition as api };

View File

@@ -25,3 +25,5 @@ export class UmbResendInviteToUserEntityAction extends UmbEntityActionBase<UmbEn
await modalContext.onSubmit();
}
}
export { UmbResendInviteToUserEntityAction as api };

View File

@@ -0,0 +1 @@
export const UMB_INVITE_USER_REPOSITORY_ALIAS = 'Umb.Repository.User.Invite';

View File

@@ -1,2 +1,2 @@
export { UmbInviteUserRepository } from './invite-user.repository.js';
export { UMB_INVITE_USER_REPOSITORY_ALIAS } from './manifests.js';
export { UMB_INVITE_USER_REPOSITORY_ALIAS } from './constants.js';

View File

@@ -1,6 +1,6 @@
import { UMB_INVITE_USER_REPOSITORY_ALIAS } from './constants.js';
import type { ManifestRepository, ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
export const UMB_INVITE_USER_REPOSITORY_ALIAS = 'Umb.Repository.User.Invite';
const inviteRepository: ManifestRepository = {
type: 'repository',
alias: UMB_INVITE_USER_REPOSITORY_ALIAS,

View File

@@ -0,0 +1 @@
export const UMB_USER_AVATAR_REPOSITORY_ALIAS = 'Umb.Repository.User.Avatar';

View File

@@ -1,2 +1,2 @@
export { UmbUserAvatarRepository } from './user-avatar.repository.js';
export { UMB_USER_AVATAR_REPOSITORY_ALIAS } from './manifests.js';
export { UMB_USER_AVATAR_REPOSITORY_ALIAS } from './constants.js';

View File

@@ -1,7 +1,6 @@
import { UMB_USER_AVATAR_REPOSITORY_ALIAS } from './constants.js';
import type { ManifestRepository, ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
export const UMB_USER_AVATAR_REPOSITORY_ALIAS = 'Umb.Repository.User.Avatar';
const avatarRepository: ManifestRepository = {
type: 'repository',
alias: UMB_USER_AVATAR_REPOSITORY_ALIAS,

Some files were not shown because too many files have changed in this diff Show More