diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/editors/user-group/editor-user-group.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/editors/user-group/editor-user-group.element.ts new file mode 100644 index 0000000000..a731b87c06 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/backoffice/editors/user-group/editor-user-group.element.ts @@ -0,0 +1,17 @@ +import { html, LitElement } from 'lit'; +import { customElement } from 'lit/decorators.js'; + +@customElement('umb-editor-user-group') +export class UmbEditorUserGroupElement extends LitElement { + render() { + return html`
User Group
`; + } +} + +export default UmbEditorUserGroupElement; + +declare global { + interface HTMLElementTagNameMap { + 'umb-editor-user-group': UmbEditorUserGroupElement; + } +} diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/editors/user-groups/editor-user-groups.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/editors/user-groups/editor-user-groups.element.ts deleted file mode 100644 index 15ae67aa6d..0000000000 --- a/src/Umbraco.Web.UI.Client/src/backoffice/editors/user-groups/editor-user-groups.element.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { html, LitElement } from 'lit'; -import { customElement } from 'lit/decorators.js'; - -@customElement('umb-editor-user-groups') -export class UmbEditorUserGroupsElement extends LitElement { - render() { - return html`
User Groups
`; - } -} - -export default UmbEditorUserGroupsElement; - -declare global { - interface HTMLElementTagNameMap { - 'umb-editor-user-groups': UmbEditorUserGroupsElement; - } -} diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/editors/users/views/users/actions/editor-action-users-save.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/editors/user/actions/editor-action-user-save.element.ts similarity index 60% rename from src/Umbraco.Web.UI.Client/src/backoffice/editors/users/views/users/actions/editor-action-users-save.element.ts rename to src/Umbraco.Web.UI.Client/src/backoffice/editors/user/actions/editor-action-user-save.element.ts index 36fd45fb49..f15417ceec 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/editors/users/views/users/actions/editor-action-users-save.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/editors/user/actions/editor-action-user-save.element.ts @@ -2,12 +2,12 @@ import { css, html, LitElement, nothing } from 'lit'; import { UUITextStyles } from '@umbraco-ui/uui-css/lib'; import { customElement, state } from 'lit/decorators.js'; import { Subscription } from 'rxjs'; -import { UmbContextConsumerMixin } from '../../../../../../core/context'; -import { UmbUserStore } from '../../../../../../core/stores/user/user.store'; -import type { UserEntity } from '../../../../../../core/models'; +import { UmbContextConsumerMixin } from '../../../../core/context'; +import { UmbUserStore } from '../../../../core/stores/user/user.store'; +import type { UserEntity } from '../../../../core/models'; -@customElement('umb-editor-action-users-save') -export class UmbEditorActionUsersSaveElement extends UmbContextConsumerMixin(LitElement) { +@customElement('umb-editor-action-user-save') +export class UmbEditorActionUserSaveElement extends UmbContextConsumerMixin(LitElement) { static styles = [UUITextStyles, css``]; private _userStore?: UmbUserStore; @@ -30,10 +30,10 @@ export class UmbEditorActionUsersSaveElement extends UmbContextConsumerMixin(Lit } } -export default UmbEditorActionUsersSaveElement; +export default UmbEditorActionUserSaveElement; declare global { interface HTMLElementTagNameMap { - 'umb-editor-action-users-save': UmbEditorActionUsersSaveElement; + 'umb-editor-action-user-save': UmbEditorActionUserSaveElement; } } diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/editors/users/views/users/editor-view-users-user-details.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/editors/user/editor-user.element.ts similarity index 90% rename from src/Umbraco.Web.UI.Client/src/backoffice/editors/users/views/users/editor-view-users-user-details.element.ts rename to src/Umbraco.Web.UI.Client/src/backoffice/editors/user/editor-user.element.ts index 2c6ea9c82c..8630c3f092 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/editors/users/views/users/editor-view-users-user-details.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/editors/user/editor-user.element.ts @@ -2,14 +2,14 @@ import { css, html, LitElement, nothing } from 'lit'; import { UUITextStyles } from '@umbraco-ui/uui-css/lib'; import { customElement, property, state } from 'lit/decorators.js'; import { Subscription } from 'rxjs'; -import { UmbContextConsumerMixin } from '../../../../../core/context'; -import UmbSectionViewUsersElement from '../../../../sections/users/views/users/section-view-users.element'; -import '../../../../property-editors/content-picker/property-editor-content-picker.element'; -import { UmbUserStore } from '../../../../../core/stores/user/user.store'; -import type { UserDetails } from '../../../../../core/models'; +import { UmbContextConsumerMixin } from '../../../core/context'; +import UmbSectionViewUsersElement from '../../sections/users/views/users/section-view-users.element'; +import '../../property-editors/content-picker/property-editor-content-picker.element'; +import { UmbUserStore } from '../../../core/stores/user/user.store'; +import type { UserDetails } from '../../../core/models'; -@customElement('umb-editor-view-users-user-details') -export class UmbEditorViewUsersUserDetailsElement extends UmbContextConsumerMixin(LitElement) { +@customElement('umb-editor-user') +export class UmbEditorUserElement extends UmbContextConsumerMixin(LitElement) { static styles = [ UUITextStyles, css` @@ -246,10 +246,10 @@ export class UmbEditorViewUsersUserDetailsElement extends UmbContextConsumerMixi } } -export default UmbEditorViewUsersUserDetailsElement; +export default UmbEditorUserElement; declare global { interface HTMLElementTagNameMap { - 'umb-editor-view-users-user-details': UmbEditorViewUsersUserDetailsElement; + 'umb-editor-view-users-user-details': UmbEditorUserElement; } } diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/editors/users/editor-users.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/editors/users/editor-users.element.ts deleted file mode 100644 index 0f3f8549c7..0000000000 --- a/src/Umbraco.Web.UI.Client/src/backoffice/editors/users/editor-users.element.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { UUITextStyles } from '@umbraco-ui/uui-css/lib'; -import { css, html, LitElement } from 'lit'; -import { customElement } from 'lit/decorators.js'; -import { UmbContextConsumerMixin, UmbContextProviderMixin } from '../../../core/context'; - -import '../shared/editor-entity-layout/editor-entity-layout.element'; - -// Lazy load -// TODO: Make this dynamic, use load-extensions method to loop over extensions for this node. -import './views/user-groups/editor-view-user-groups.element'; - -@customElement('umb-editor-users') -export class UmbEditorUsersElement extends UmbContextProviderMixin(UmbContextConsumerMixin(LitElement)) { - static styles = [ - UUITextStyles, - css` - :host { - display: block; - width: 100%; - height: 100%; - } - - #name { - width: 100%; - } - - #alias { - padding: 0 var(--uui-size-space-3); - } - `, - ]; - - render() { - return html` `; - } -} - -export default UmbEditorUsersElement; - -declare global { - interface HTMLElementTagNameMap { - 'umb-editor-users': UmbEditorUsersElement; - } -} diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/users/editor-view-users-overview.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/users/editor-view-users-overview.element.ts index 0ca11fb943..fd6c2a6ae0 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/users/editor-view-users-overview.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/users/editor-view-users-overview.element.ts @@ -6,7 +6,7 @@ import './list-view-layouts/table/editor-view-users-table.element'; import './list-view-layouts/grid/editor-view-users-grid.element'; import './editor-view-users-selection.element'; import './editor-view-users-invite.element'; -import { IRoute , isPathActive } from 'router-slot'; +import { IRoute } from 'router-slot'; import { UUIPopoverElement } from '@umbraco-ui/uui'; import { UmbContextConsumerMixin } from '../../../../../core/context'; import UmbSectionViewUsersElement from './section-view-users.element'; diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/users/section-view-users.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/users/section-view-users.element.ts index eab6228273..b74262689c 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/users/section-view-users.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/users/section-view-users.element.ts @@ -12,7 +12,7 @@ import './editor-view-users-selection.element'; import './editor-view-users-invite.element'; import type { UserDetails, UserEntity } from '../../../../../core/models'; -import type { UmbEditorViewUsersUserDetailsElement } from '../../../../editors/users/views/users/editor-view-users-user-details.element'; +import type { UmbEditorUserElement } from '../../../../editors/user/editor-user.element'; @customElement('umb-section-view-users') export class UmbSectionViewUsersElement extends UmbContextProviderMixin(LitElement) { @@ -30,9 +30,9 @@ export class UmbSectionViewUsersElement extends UmbContextProviderMixin(LitEleme }, { path: 'details/:key', - component: () => import('../../../../editors/users/views/users/editor-view-users-user-details.element'), + component: () => import('../../../../editors/user/editor-user.element'), setup: (component: unknown, info: IRoutingInfo) => { - const element = component as UmbEditorViewUsersUserDetailsElement; + const element = component as UmbEditorUserElement; element.key = info.match.params.key; }, }, diff --git a/src/Umbraco.Web.UI.Client/src/temp-internal-manifests.ts b/src/Umbraco.Web.UI.Client/src/temp-internal-manifests.ts index b68838d3e4..56b3e22983 100644 --- a/src/Umbraco.Web.UI.Client/src/temp-internal-manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/temp-internal-manifests.ts @@ -343,33 +343,21 @@ export const internalManifests: Array Promise import('./backoffice/sections/users/views/users/section-view-users.element'), + type: 'editor', + alias: 'Umb.Editor.User', + name: 'User Editor', + loader: () => import('./backoffice/editors/user/editor-user.element'), meta: { - editors: ['Umb.Editor.Users'], - pathname: 'users', - weight: 1, - icon: 'document', + entityType: 'user', }, }, { type: 'editorAction', - alias: 'Umb.EditorAction.Users.Save', + alias: 'Umb.EditorAction.User.Save', name: 'EditorActionUserSave', - loader: () => import('./backoffice/editors/users/views/users/actions/editor-action-users-save.element'), + loader: () => import('./backoffice/editors/user/actions/editor-action-user-save.element'), meta: { - editors: ['Umb.Editor.Users'], - }, - }, - { - type: 'editorAction', - alias: 'Umb.EditorAction.Users.Delete', - name: 'EditorActionUserDelete', - loader: () => import('./backoffice/editors/users/views/users/actions/editor-action-users-save.element'), - meta: { - editors: ['Umb.Editor.DataType'], + editors: ['Umb.Editor.User'], }, }, {