Skip to content

Commit c216d69

Browse files
authoredFeb 18, 2025··
Feature: Display current variant item name (#18311)
* wip entity-item-ref extension point * clean up * add ref list element * fix styling * Update document-item-ref.element.ts * move item repo * implement for input member * enable action slot * add null check * fix sorting again * fix sorting again * use member element * add draft styling back * move item repository * implement for user input * pass readonly and standalone props * make editPath a state * Update member-item-ref.element.ts * Fix user item ref * remove open button * remove unused * remove unused * check for section permission * add fallback element * add unique to modal route registration * add unique to modal router * remove unused id * Update member-item-ref.element.ts * append unique * compare with old value * only recreate the controller if the entity type changes * fix console warning * implement for document item ref * move logic to item data resolver * render draft as a tag * Update document-item-ref.element.ts * add more helpers to data resolver * export resolver * add observables * use observables in document item ref * add data resolver to tree item * add observable state * use const * align models * get icon from document type object * observe name and state * update observed value when a new item is set * update method name * update method names * pass model type * pass context type * use api prop instead of context * use api prop instead of context * fix types * use addUniquePaths for modal registration * fix type errors * Update index.ts * clean up * use path pattern
1 parent fdebb66 commit c216d69

File tree

13 files changed

+442
-182
lines changed

13 files changed

+442
-182
lines changed
 

‎src/Umbraco.Web.UI.Client/src/packages/core/tree/tree-item/tree-item-base/tree-item-element-base.ts

+41-40
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,46 @@
11
import type { UmbTreeItemContext } from '../index.js';
22
import type { UmbTreeItemModel } from '../../types.js';
3-
import { UMB_TREE_ITEM_CONTEXT } from './tree-item-context-base.js';
43
import { html, nothing, state, ifDefined, repeat, property } from '@umbraco-cms/backoffice/external/lit';
54
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
65

7-
export abstract class UmbTreeItemElementBase<TreeItemModelType extends UmbTreeItemModel> extends UmbLitElement {
8-
_item?: TreeItemModelType;
6+
export abstract class UmbTreeItemElementBase<
7+
TreeItemModelType extends UmbTreeItemModel,
8+
TreeItemContextType extends UmbTreeItemContext<TreeItemModelType> = UmbTreeItemContext<TreeItemModelType>,
9+
> extends UmbLitElement {
10+
protected _item?: TreeItemModelType;
911
@property({ type: Object, attribute: false })
1012
get item(): TreeItemModelType | undefined {
1113
return this._item;
1214
}
1315
set item(newVal: TreeItemModelType) {
1416
this._item = newVal;
15-
this.#initTreeItem();
17+
18+
if (this._item) {
19+
this.#initTreeItem();
20+
}
21+
}
22+
23+
#api: TreeItemContextType | undefined;
24+
@property({ type: Object, attribute: false })
25+
public get api(): TreeItemContextType | undefined {
26+
return this.#api;
27+
}
28+
public set api(value: TreeItemContextType | undefined) {
29+
this.#api = value;
30+
31+
if (this.#api) {
32+
this.observe(this.#api.childItems, (value) => (this._childItems = value));
33+
this.observe(this.#api.hasChildren, (value) => (this._hasChildren = value));
34+
this.observe(this.#api.isActive, (value) => (this._isActive = value));
35+
this.observe(this.#api.isLoading, (value) => (this._isLoading = value));
36+
this.observe(this.#api.isSelectableContext, (value) => (this._isSelectableContext = value));
37+
this.observe(this.#api.isSelectable, (value) => (this._isSelectable = value));
38+
this.observe(this.#api.isSelected, (value) => (this._isSelected = value));
39+
this.observe(this.#api.path, (value) => (this._href = value));
40+
this.observe(this.#api.pagination.currentPage, (value) => (this._currentPage = value));
41+
this.observe(this.#api.pagination.totalPages, (value) => (this._totalPages = value));
42+
this.#initTreeItem();
43+
}
1644
}
1745

1846
@property({ type: Boolean, attribute: false })
@@ -51,58 +79,31 @@ export abstract class UmbTreeItemElementBase<TreeItemModelType extends UmbTreeIt
5179
@state()
5280
private _currentPage = 1;
5381

54-
#treeItemContext?: UmbTreeItemContext<TreeItemModelType>;
55-
56-
constructor() {
57-
super();
58-
59-
// TODO: Notice this can be retrieve via a api property. [NL]
60-
this.consumeContext(UMB_TREE_ITEM_CONTEXT, (instance) => {
61-
this.#treeItemContext = instance;
62-
if (!this.#treeItemContext) return;
63-
64-
this.#initTreeItem();
65-
66-
// TODO: investigate if we can make an observe decorator
67-
this.observe(this.#treeItemContext.treeItem, (value) => (this._item = value));
68-
this.observe(this.#treeItemContext.childItems, (value) => (this._childItems = value));
69-
this.observe(this.#treeItemContext.hasChildren, (value) => (this._hasChildren = value));
70-
this.observe(this.#treeItemContext.isActive, (value) => (this._isActive = value));
71-
this.observe(this.#treeItemContext.isLoading, (value) => (this._isLoading = value));
72-
this.observe(this.#treeItemContext.isSelectableContext, (value) => (this._isSelectableContext = value));
73-
this.observe(this.#treeItemContext.isSelectable, (value) => (this._isSelectable = value));
74-
this.observe(this.#treeItemContext.isSelected, (value) => (this._isSelected = value));
75-
this.observe(this.#treeItemContext.path, (value) => (this._href = value));
76-
this.observe(this.#treeItemContext.pagination.currentPage, (value) => (this._currentPage = value));
77-
this.observe(this.#treeItemContext.pagination.totalPages, (value) => (this._totalPages = value));
78-
});
79-
}
80-
8182
#initTreeItem() {
82-
if (!this.#treeItemContext) return;
83+
if (!this.#api) return;
8384
if (!this._item) return;
84-
this.#treeItemContext.setTreeItem(this._item);
85+
this.#api.setTreeItem(this._item);
8586
}
8687

8788
private _handleSelectedItem(event: Event) {
8889
event.stopPropagation();
89-
this.#treeItemContext?.select();
90+
this.#api?.select();
9091
}
9192

9293
private _handleDeselectedItem(event: Event) {
9394
event.stopPropagation();
94-
this.#treeItemContext?.deselect();
95+
this.#api?.deselect();
9596
}
9697

9798
// TODO: do we want to catch and emit a backoffice event here?
9899
private _onShowChildren() {
99-
this.#treeItemContext?.loadChildren();
100+
this.#api?.loadChildren();
100101
}
101102

102103
#onLoadMoreClick = (event: any) => {
103104
event.stopPropagation();
104105
const next = (this._currentPage = this._currentPage + 1);
105-
this.#treeItemContext?.pagination.setCurrentPageNumber(next);
106+
this.#api?.pagination.setCurrentPageNumber(next);
106107
};
107108

108109
// Note: Currently we want to prevent opening when the item is in a selectable context, but this might change in the future.
@@ -168,11 +169,11 @@ export abstract class UmbTreeItemElementBase<TreeItemModelType extends UmbTreeIt
168169

169170
#renderActions() {
170171
if (this.hideActions) return;
171-
return this.#treeItemContext && this._item
172+
return this.#api && this._item
172173
? html`<umb-entity-actions-bundle
173174
slot="actions"
174-
.entityType=${this.#treeItemContext.entityType}
175-
.unique=${this.#treeItemContext.unique}
175+
.entityType=${this.#api.entityType}
176+
.unique=${this.#api.unique}
176177
.label=${this._item.name}>
177178
</umb-entity-actions-bundle>`
178179
: '';

‎src/Umbraco.Web.UI.Client/src/packages/documents/documents/collection/repository/document-collection.server.data-source.ts

+17-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { UmbDocumentCollectionFilterModel, UmbDocumentCollectionItemModel } from '../types.js';
2+
import { UMB_DOCUMENT_ENTITY_TYPE } from '../../entity.js';
23
import { DirectionModel, DocumentService } from '@umbraco-cms/backoffice/external/backend-api';
34
import { tryExecuteAndNotify } from '@umbraco-cms/backoffice/resources';
45
import type { DocumentCollectionResponseModel } from '@umbraco-cms/backoffice/external/backend-api';
@@ -32,16 +33,18 @@ export class UmbDocumentCollectionServerDataSource implements UmbCollectionDataS
3233

3334
if (data) {
3435
const items = data.items.map((item: DocumentCollectionResponseModel) => {
35-
// TODO: [LK] Temp solution, review how to get the name from the corresponding variant.
36+
// TODO: remove in v17.0.0
3637
const variant = item.variants[0];
3738

3839
const model: UmbDocumentCollectionItemModel = {
3940
unique: item.id,
40-
entityType: 'document',
41+
entityType: UMB_DOCUMENT_ENTITY_TYPE,
4142
contentTypeAlias: item.documentType.alias,
4243
createDate: new Date(variant.createDate),
4344
creator: item.creator,
4445
icon: item.documentType.icon,
46+
isProtected: item.isProtected,
47+
isTrashed: item.isTrashed,
4548
name: variant.name,
4649
sortOrder: item.sortOrder,
4750
state: variant.state,
@@ -50,6 +53,18 @@ export class UmbDocumentCollectionServerDataSource implements UmbCollectionDataS
5053
values: item.values.map((item) => {
5154
return { alias: item.alias, value: item.value as string };
5255
}),
56+
documentType: {
57+
unique: item.documentType.id,
58+
icon: item.documentType.icon,
59+
alias: item.documentType.alias,
60+
},
61+
variants: item.variants.map((item) => {
62+
return {
63+
name: item.name,
64+
culture: item.culture ?? null,
65+
state: item.state,
66+
};
67+
}),
5368
};
5469
return model;
5570
});

‎src/Umbraco.Web.UI.Client/src/packages/documents/documents/collection/types.ts

+41-7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import type { UmbDocumentEntityType } from '../entity.js';
2+
import type { UmbDocumentItemVariantModel } from '../item/repository/types.js';
13
import type { UmbCollectionFilterModel } from '@umbraco-cms/backoffice/collection';
24

35
export interface UmbDocumentCollectionFilterModel extends UmbCollectionFilterModel {
@@ -11,17 +13,49 @@ export interface UmbDocumentCollectionFilterModel extends UmbCollectionFilterMod
1113

1214
export interface UmbDocumentCollectionItemModel {
1315
unique: string;
14-
entityType: string;
15-
contentTypeAlias: string;
16-
createDate: Date;
16+
entityType: UmbDocumentEntityType;
1717
creator?: string | null;
18-
icon: string;
19-
name: string;
2018
sortOrder: number;
21-
state: string;
22-
updateDate: Date;
2319
updater?: string | null;
2420
values: Array<{ alias: string; value: string }>;
21+
isProtected: boolean;
22+
isTrashed: boolean;
23+
documentType: {
24+
unique: string;
25+
icon: string;
26+
alias: string;
27+
};
28+
variants: Array<UmbDocumentItemVariantModel>;
29+
30+
/**
31+
* @deprecated From 15.3.0. Will be removed in 17.0.0. Use state in variants array instead.
32+
*/
33+
state: string;
34+
35+
/**
36+
* @deprecated From 15.3.0. Will be removed in 17.0.0. Use name in variants array instead.
37+
*/
38+
name: string;
39+
40+
/**
41+
* @deprecated From 15.3.0. Will be removed in 17.0.0. Use updateDate in variants array instead.
42+
*/
43+
updateDate: Date;
44+
45+
/**
46+
* @deprecated From 15.3.0. Will be removed in 17.0.0. Use createDate in variants array instead.
47+
*/
48+
createDate: Date;
49+
50+
/**
51+
* @deprecated From 15.3.0. Will be removed in 17.0.0. Use alias on documentType instead.
52+
*/
53+
contentTypeAlias: string;
54+
55+
/**
56+
* @deprecated From 15.3.0. Will be removed in 17.0.0. Use icon on documentType instead.
57+
*/
58+
icon: string;
2559
}
2660

2761
export interface UmbEditableDocumentCollectionItemModel {

‎src/Umbraco.Web.UI.Client/src/packages/documents/documents/collection/views/table/column-layouts/document-table-column-name.element.ts

+22-14
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,40 @@
11
import type { UmbEditableDocumentCollectionItemModel } from '../../../types.js';
2-
import { css, customElement, html, nothing, property } from '@umbraco-cms/backoffice/external/lit';
2+
import { UmbDocumentItemDataResolver } from '../../../../item/index.js';
3+
import { css, customElement, html, nothing, property, state } from '@umbraco-cms/backoffice/external/lit';
34
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
45
import type { UmbTableColumn, UmbTableColumnLayoutElement, UmbTableItem } from '@umbraco-cms/backoffice/components';
5-
import type { UUIButtonElement } from '@umbraco-cms/backoffice/external/uui';
66

77
@customElement('umb-document-table-column-name')
88
export class UmbDocumentTableColumnNameElement extends UmbLitElement implements UmbTableColumnLayoutElement {
99
column!: UmbTableColumn;
1010
item!: UmbTableItem;
1111

12+
#value!: UmbEditableDocumentCollectionItemModel;
1213
@property({ attribute: false })
13-
value!: UmbEditableDocumentCollectionItemModel;
14+
public get value(): UmbEditableDocumentCollectionItemModel {
15+
return this.#value;
16+
}
17+
public set value(value: UmbEditableDocumentCollectionItemModel) {
18+
this.#value = value;
19+
20+
if (value.item) {
21+
this.#item.setData(value.item);
22+
}
23+
}
24+
25+
@state()
26+
_name = '';
27+
28+
#item = new UmbDocumentItemDataResolver(this);
1429

15-
#onClick(event: Event & { target: UUIButtonElement }) {
16-
event.preventDefault();
17-
event.stopPropagation();
18-
window.history.pushState(null, '', event.target.href);
30+
constructor() {
31+
super();
32+
this.#item.observe(this.#item.name, (name) => (this._name = name || ''));
1933
}
2034

2135
override render() {
2236
if (!this.value) return nothing;
23-
return html`
24-
<uui-button
25-
compact
26-
href=${this.value.editPath}
27-
label=${this.value.item.name}
28-
@click=${this.#onClick}></uui-button>
29-
`;
37+
return html` <uui-button compact href=${this.value.editPath} label=${this._name}></uui-button> `;
3038
}
3139

3240
static override styles = [

‎src/Umbraco.Web.UI.Client/src/packages/documents/documents/collection/views/table/column-layouts/document-table-column-state.element.ts

+24-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { UmbEditableDocumentCollectionItemModel } from '../../../types.js';
2-
import { customElement, html, property } from '@umbraco-cms/backoffice/external/lit';
2+
import { UmbDocumentItemDataResolver } from '../../../../item/index.js';
3+
import { customElement, html, property, state } from '@umbraco-cms/backoffice/external/lit';
34
import { fromCamelCase } from '@umbraco-cms/backoffice/utils';
45
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
56
import type { UmbTableColumn, UmbTableColumnLayoutElement, UmbTableItem } from '@umbraco-cms/backoffice/components';
@@ -9,11 +10,31 @@ export class UmbDocumentTableColumnStateElement extends UmbLitElement implements
910
column!: UmbTableColumn;
1011
item!: UmbTableItem;
1112

13+
#value!: UmbEditableDocumentCollectionItemModel;
1214
@property({ attribute: false })
13-
value!: UmbEditableDocumentCollectionItemModel;
15+
public get value(): UmbEditableDocumentCollectionItemModel {
16+
return this.#value;
17+
}
18+
public set value(value: UmbEditableDocumentCollectionItemModel) {
19+
this.#value = value;
20+
21+
if (value.item) {
22+
this.#item.setData(value.item);
23+
}
24+
}
25+
26+
@state()
27+
_state = '';
28+
29+
#item = new UmbDocumentItemDataResolver(this);
30+
31+
constructor() {
32+
super();
33+
this.#item.observe(this.#item.state, (state) => (this._state = state || ''));
34+
}
1435

1536
override render() {
16-
switch (this.value.item.state) {
37+
switch (this._state) {
1738
case 'Published':
1839
return html`<uui-tag color="positive" look="secondary">${this.localize.term('content_published')}</uui-tag>`;
1940
case 'PublishedPendingChanges':

‎src/Umbraco.Web.UI.Client/src/packages/documents/documents/collection/views/table/document-table-collection-view.element.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { UMB_EDIT_DOCUMENT_WORKSPACE_PATH_PATTERN } from '../../../paths.js';
33
import type { UmbDocumentCollectionItemModel } from '../../types.js';
44
import type { UmbDocumentCollectionContext } from '../../document-collection.context.js';
55
import { UMB_DOCUMENT_COLLECTION_CONTEXT } from '../../document-collection.context-token.js';
6+
import { UMB_DOCUMENT_ENTITY_TYPE } from '../../../entity.js';
67
import type { UmbCollectionColumnConfiguration } from '@umbraco-cms/backoffice/collection';
78
import { css, customElement, html, state } from '@umbraco-cms/backoffice/external/lit';
89
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
@@ -166,8 +167,8 @@ export class UmbDocumentTableCollectionViewElement extends UmbLitElement {
166167

167168
return {
168169
id: item.unique,
169-
icon: item.icon,
170-
entityType: 'document',
170+
icon: item.documentType.icon,
171+
entityType: UMB_DOCUMENT_ENTITY_TYPE,
171172
data: data,
172173
};
173174
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
import { UmbDocumentVariantState } from '../types.js';
2+
import type { UmbDocumentItemModel } from './types.js';
3+
import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
4+
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
5+
import type { DocumentVariantStateModel } from '@umbraco-cms/backoffice/external/backend-api';
6+
import type { UmbAppLanguageContext } from '@umbraco-cms/backoffice/language';
7+
import { UMB_APP_LANGUAGE_CONTEXT } from '@umbraco-cms/backoffice/language';
8+
import { UmbBooleanState, UmbStringState } from '@umbraco-cms/backoffice/observable-api';
9+
import { UMB_PROPERTY_DATASET_CONTEXT } from '@umbraco-cms/backoffice/property';
10+
import type { UmbVariantId } from '@umbraco-cms/backoffice/variant';
11+
12+
type UmbDocumentItemDataResolverModel = Omit<UmbDocumentItemModel, 'parent' | 'hasChildren'>;
13+
14+
/**
15+
* A controller for resolving data for a document item
16+
* @exports
17+
* @class UmbDocumentItemDataResolver
18+
* @augments {UmbControllerBase}
19+
*/
20+
export class UmbDocumentItemDataResolver<DataType extends UmbDocumentItemDataResolverModel> extends UmbControllerBase {
21+
#defaultCulture?: string;
22+
#appCulture?: string;
23+
#propertyDataSetCulture?: UmbVariantId;
24+
#data?: DataType | undefined;
25+
26+
#init: Promise<[UmbAppLanguageContext]>;
27+
28+
#unique = new UmbStringState(undefined);
29+
public readonly unique = this.#unique.asObservable();
30+
31+
#name = new UmbStringState(undefined);
32+
public readonly name = this.#name.asObservable();
33+
34+
#icon = new UmbStringState(undefined);
35+
public readonly icon = this.#icon.asObservable();
36+
37+
#state = new UmbStringState(undefined);
38+
public readonly state = this.#state.asObservable();
39+
40+
#isTrashed = new UmbBooleanState(undefined);
41+
public readonly isTrashed = this.#isTrashed.asObservable();
42+
43+
#isDraft = new UmbBooleanState(undefined);
44+
public readonly isDraft = this.#isDraft.asObservable();
45+
46+
constructor(host: UmbControllerHost) {
47+
super(host);
48+
49+
// We do not depend on this context because we know is it only available in some cases
50+
this.consumeContext(UMB_PROPERTY_DATASET_CONTEXT, (context) => {
51+
this.#propertyDataSetCulture = context.getVariantId();
52+
this.#setVariantAwareValues();
53+
});
54+
55+
this.#init = Promise.all([
56+
this.consumeContext(UMB_APP_LANGUAGE_CONTEXT, (context) => {
57+
this.observe(context.appLanguageCulture, (culture) => {
58+
this.#appCulture = culture;
59+
this.#setVariantAwareValues();
60+
});
61+
62+
this.observe(context.appDefaultLanguage, (value) => {
63+
this.#defaultCulture = value?.unique;
64+
this.#setVariantAwareValues();
65+
});
66+
}).asPromise(),
67+
]);
68+
}
69+
70+
/**
71+
* Get the current item
72+
* @returns {DataType | undefined} The current item
73+
* @memberof UmbDocumentItemDataResolver
74+
*/
75+
getData(): DataType | undefined {
76+
return this.#data;
77+
}
78+
79+
/**
80+
* Set the current item
81+
* @param {DataType | undefined} data The current item
82+
* @memberof UmbDocumentItemDataResolver
83+
*/
84+
setData(data: DataType | undefined) {
85+
this.#data = data;
86+
87+
if (!this.#data) {
88+
this.#unique.setValue(undefined);
89+
this.#name.setValue(undefined);
90+
this.#icon.setValue(undefined);
91+
this.#isTrashed.setValue(undefined);
92+
this.#isDraft.setValue(undefined);
93+
return;
94+
}
95+
96+
this.#unique.setValue(this.#data.unique);
97+
this.#icon.setValue(this.#data.documentType.icon);
98+
this.#isTrashed.setValue(this.#data.isTrashed);
99+
this.#setVariantAwareValues();
100+
}
101+
102+
/**
103+
* Get the unique of the item
104+
* @returns {Promise<string | undefined>} The unique of the item
105+
* @memberof UmbDocumentItemDataResolver
106+
*/
107+
async getUnique(): Promise<string | undefined> {
108+
await this.#init;
109+
return this.#unique.getValue();
110+
}
111+
112+
/**
113+
* Get the name of the item
114+
* @returns {Promise<string>} The name of the item
115+
* @memberof UmbDocumentItemDataResolver
116+
*/
117+
async getName(): Promise<string> {
118+
await this.#init;
119+
return this.#name.getValue() || '';
120+
}
121+
122+
/**
123+
* Get the icon of the item
124+
* @returns {Promise<string | undefined>} The icon of the item
125+
* @memberof UmbDocumentItemDataResolver
126+
*/
127+
async getIcon(): Promise<string | undefined> {
128+
await this.#init;
129+
return this.#data?.documentType.icon;
130+
}
131+
132+
/**
133+
* Get the state of the item
134+
* @returns {Promise<string | undefined>} The state of the item
135+
* @memberof UmbDocumentItemDataResolver
136+
*/
137+
async getState(): Promise<DocumentVariantStateModel | null | undefined> {
138+
await this.#init;
139+
return this.#getCurrentVariant()?.state;
140+
}
141+
142+
/**
143+
* Get the isDraft of the item
144+
* @returns {Promise<boolean>} The isDraft of the item
145+
* @memberof UmbDocumentItemDataResolver
146+
*/
147+
async getIsDraft(): Promise<boolean> {
148+
await this.#init;
149+
return this.#isDraft.getValue() ?? false;
150+
}
151+
152+
/**
153+
* Get the isTrashed of the item
154+
* @returns {Promise<boolean | undefined>} The isTrashed of the item
155+
* @memberof UmbDocumentItemDataResolver
156+
*/
157+
async getIsTrashed(): Promise<boolean> {
158+
await this.#init;
159+
return this.#data?.isTrashed ?? false;
160+
}
161+
162+
#setVariantAwareValues() {
163+
this.#setName();
164+
this.#setIsDraft();
165+
this.#setState();
166+
}
167+
168+
#setName() {
169+
const variant = this.#getCurrentVariant();
170+
const fallbackName = this.#findVariant(this.#defaultCulture)?.name;
171+
const name = variant?.name ?? `(${fallbackName})`;
172+
this.#name.setValue(name);
173+
}
174+
175+
#setIsDraft() {
176+
const variant = this.#getCurrentVariant();
177+
const isDraft = variant?.state === UmbDocumentVariantState.DRAFT || false;
178+
this.#isDraft.setValue(isDraft);
179+
}
180+
181+
#setState() {
182+
const variant = this.#getCurrentVariant();
183+
const state = variant?.state || UmbDocumentVariantState.NOT_CREATED;
184+
this.#state.setValue(state);
185+
}
186+
187+
#findVariant(culture: string | undefined) {
188+
return this.#data?.variants.find((x) => x.culture === culture);
189+
}
190+
191+
#getCurrentVariant() {
192+
if (this.#isInvariant()) {
193+
return this.#data?.variants?.[0];
194+
}
195+
196+
const culture = this.#propertyDataSetCulture?.culture || this.#appCulture;
197+
return this.#findVariant(culture);
198+
}
199+
200+
#isInvariant() {
201+
return this.#data?.variants?.[0]?.culture === null;
202+
}
203+
}

‎src/Umbraco.Web.UI.Client/src/packages/documents/documents/item/document-item-ref.element.ts

+45-38
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,34 @@
11
import { UMB_DOCUMENT_ENTITY_TYPE } from '../entity.js';
2+
import { UMB_EDIT_DOCUMENT_WORKSPACE_PATH_PATTERN } from '../paths.js';
23
import type { UmbDocumentItemModel } from './types.js';
3-
import {
4-
classMap,
5-
css,
6-
customElement,
7-
html,
8-
ifDefined,
9-
nothing,
10-
property,
11-
state,
12-
} from '@umbraco-cms/backoffice/external/lit';
4+
import { UmbDocumentItemDataResolver } from './document-item-data-resolver.js';
5+
import { customElement, html, ifDefined, nothing, property, state } from '@umbraco-cms/backoffice/external/lit';
136
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
147
import { UmbModalRouteRegistrationController } from '@umbraco-cms/backoffice/router';
158
import { UMB_WORKSPACE_MODAL } from '@umbraco-cms/backoffice/workspace';
169

1710
@customElement('umb-document-item-ref')
1811
export class UmbDocumentItemRefElement extends UmbLitElement {
19-
#item?: UmbDocumentItemModel | undefined;
12+
#item = new UmbDocumentItemDataResolver<UmbDocumentItemModel>(this);
2013

2114
@property({ type: Object })
2215
public get item(): UmbDocumentItemModel | undefined {
23-
return this.#item;
16+
return this.#item.getData();
2417
}
2518
public set item(value: UmbDocumentItemModel | undefined) {
26-
const oldValue = this.#item;
27-
this.#item = value;
19+
const oldValue = this.#item.getData();
20+
this.#item.setData(value);
2821

29-
if (!this.#item) {
22+
if (!value) {
3023
this.#modalRoute?.destroy();
3124
return;
3225
}
3326

34-
if (oldValue?.unique === this.#item.unique) {
27+
if (oldValue?.unique === value.unique) {
3528
return;
3629
}
3730

38-
this.#modalRoute?.setUniquePathValue('unique', this.#item.unique);
31+
this.#modalRoute?.setUniquePathValue('unique', value.unique);
3932
}
4033

4134
@property({ type: Boolean })
@@ -44,6 +37,21 @@ export class UmbDocumentItemRefElement extends UmbLitElement {
4437
@property({ type: Boolean })
4538
standalone = false;
4639

40+
@state()
41+
_unique = '';
42+
43+
@state()
44+
_name = '';
45+
46+
@state()
47+
_icon = '';
48+
49+
@state()
50+
_isTrashed = false;
51+
52+
@state()
53+
_isDraft = false;
54+
4755
@state()
4856
_editPath = '';
4957

@@ -61,49 +69,48 @@ export class UmbDocumentItemRefElement extends UmbLitElement {
6169
.observeRouteBuilder((routeBuilder) => {
6270
this._editPath = routeBuilder({});
6371
});
64-
}
6572

66-
#isDraft(item: UmbDocumentItemModel) {
67-
return item.variants[0]?.state === 'Draft';
73+
this.#item.observe(this.#item.unique, (unique) => (this._unique = unique ?? ''));
74+
this.#item.observe(this.#item.name, (name) => (this._name = name ?? ''));
75+
this.#item.observe(this.#item.icon, (icon) => (this._icon = icon ?? ''));
76+
this.#item.observe(this.#item.isTrashed, (isTrashed) => (this._isTrashed = isTrashed ?? false));
77+
this.#item.observe(this.#item.isDraft, (isDraft) => (this._isDraft = isDraft ?? false));
6878
}
6979

70-
#getHref(item: UmbDocumentItemModel) {
71-
return `${this._editPath}/edit/${item.unique}`;
80+
#getHref() {
81+
const path = UMB_EDIT_DOCUMENT_WORKSPACE_PATH_PATTERN.generateLocal({ unique: this._unique });
82+
return `${this._editPath}/${path}`;
7283
}
7384

7485
override render() {
7586
if (!this.item) return nothing;
7687

7788
return html`
7889
<uui-ref-node
79-
class=${classMap({ draft: this.#isDraft(this.item) })}
80-
name=${this.item.name}
81-
href=${ifDefined(this.#getHref(this.item))}
90+
name=${this._name}
91+
href=${ifDefined(this.#getHref())}
8292
?readonly=${this.readonly}
8393
?standalone=${this.standalone}>
8494
<slot name="actions" slot="actions"></slot>
85-
${this.#renderIcon(this.item)} ${this.#renderIsTrashed(this.item)}
95+
${this.#renderIcon()}${this.#renderIsDraft()} ${this.#renderIsTrashed()}
8696
</uui-ref-node>
8797
`;
8898
}
8999

90-
#renderIcon(item: UmbDocumentItemModel) {
91-
if (!item.documentType.icon) return;
92-
return html`<umb-icon slot="icon" name=${item.documentType.icon}></umb-icon>`;
100+
#renderIcon() {
101+
if (!this._icon) return nothing;
102+
return html`<umb-icon slot="icon" name=${this._icon}></umb-icon>`;
93103
}
94104

95-
#renderIsTrashed(item: UmbDocumentItemModel) {
96-
if (!item.isTrashed) return;
105+
#renderIsTrashed() {
106+
if (!this._isTrashed) return nothing;
97107
return html`<uui-tag size="s" slot="tag" color="danger">Trashed</uui-tag>`;
98108
}
99109

100-
static override styles = [
101-
css`
102-
.draft {
103-
opacity: 0.6;
104-
}
105-
`,
106-
];
110+
#renderIsDraft() {
111+
if (!this._isDraft) return nothing;
112+
return html`<uui-tag size="s" slot="tag" look="secondary" color="default">Draft</uui-tag>`;
113+
}
107114
}
108115

109116
export { UmbDocumentItemRefElement as element };
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
export { UmbDocumentItemRepository } from './repository/index.js';
2+
export * from './document-item-data-resolver.js';

‎src/Umbraco.Web.UI.Client/src/packages/documents/documents/item/repository/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export interface UmbDocumentItemModel {
77
documentType: {
88
unique: string;
99
icon: string;
10-
collection: UmbReferenceByUnique | null;
10+
collection?: UmbReferenceByUnique | null;
1111
};
1212
entityType: UmbDocumentEntityType;
1313
hasChildren: boolean;

‎src/Umbraco.Web.UI.Client/src/packages/documents/documents/tree/tree-item/document-tree-item.context.ts

+11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { UmbDocumentTreeItemModel, UmbDocumentTreeRootModel } from '../types.js';
2+
import { UmbDocumentItemDataResolver } from '../../item/index.js';
23
import { UmbDefaultTreeItemContext } from '@umbraco-cms/backoffice/tree';
34
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
45
import { UmbIsTrashedEntityContext } from '@umbraco-cms/backoffice/recycle-bin';
@@ -9,6 +10,11 @@ export class UmbDocumentTreeItemContext extends UmbDefaultTreeItemContext<
910
> {
1011
// TODO: Provide this together with the EntityContext, ideally this takes part via a extension-type [NL]
1112
#isTrashedContext = new UmbIsTrashedEntityContext(this);
13+
#item = new UmbDocumentItemDataResolver(this);
14+
15+
readonly name = this.#item.name;
16+
readonly icon = this.#item.icon;
17+
readonly isDraft = this.#item.isDraft;
1218

1319
readonly isTrashed = this._treeItem.asObservablePart((item) => item?.isTrashed ?? false);
1420

@@ -19,6 +25,11 @@ export class UmbDocumentTreeItemContext extends UmbDefaultTreeItemContext<
1925
this.#isTrashedContext.setIsTrashed(isTrashed);
2026
});
2127
}
28+
29+
public override setTreeItem(treeItem: UmbDocumentTreeItemModel | undefined) {
30+
super.setTreeItem(treeItem);
31+
this.#item.setData(treeItem);
32+
}
2233
}
2334

2435
export { UmbDocumentTreeItemContext as api };

‎src/Umbraco.Web.UI.Client/src/packages/documents/documents/tree/tree-item/document-tree-item.element.ts

+27-69
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,46 @@
1-
import type { UmbDocumentTreeItemModel, UmbDocumentTreeItemVariantModel } from '../types.js';
2-
import { DocumentVariantStateModel } from '@umbraco-cms/backoffice/external/backend-api';
3-
import { css, html, nothing, customElement, state, classMap } from '@umbraco-cms/backoffice/external/lit';
4-
import type { UmbAppLanguageContext } from '@umbraco-cms/backoffice/language';
5-
import { UMB_APP_LANGUAGE_CONTEXT } from '@umbraco-cms/backoffice/language';
1+
import type { UmbDocumentTreeItemModel } from '../types.js';
2+
import type { UmbDocumentTreeItemContext } from './document-tree-item.context.js';
3+
import { css, html, nothing, customElement, classMap, state, property } from '@umbraco-cms/backoffice/external/lit';
64
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
75
import { UmbTreeItemElementBase } from '@umbraco-cms/backoffice/tree';
86

97
@customElement('umb-document-tree-item')
10-
export class UmbDocumentTreeItemElement extends UmbTreeItemElementBase<UmbDocumentTreeItemModel> {
11-
#appLanguageContext?: UmbAppLanguageContext;
12-
13-
@state()
14-
_currentCulture?: string;
15-
16-
@state()
17-
_defaultCulture?: string;
18-
19-
@state()
20-
_variant?: UmbDocumentTreeItemVariantModel;
21-
22-
constructor() {
23-
super();
24-
25-
this.consumeContext(UMB_APP_LANGUAGE_CONTEXT, (instance) => {
26-
this.#appLanguageContext = instance;
27-
this.#observeAppCulture();
28-
this.#observeDefaultCulture();
29-
});
30-
}
31-
32-
#observeAppCulture() {
33-
this.observe(this.#appLanguageContext!.appLanguageCulture, (value) => {
34-
this._currentCulture = value;
35-
this._variant = this.#findVariant(value);
36-
});
37-
}
38-
39-
#observeDefaultCulture() {
40-
this.observe(this.#appLanguageContext!.appDefaultLanguage, (value) => {
41-
this._defaultCulture = value?.unique;
42-
});
43-
}
44-
45-
#findVariant(culture: string | undefined) {
46-
return this.item?.variants.find((x) => x.culture === culture);
8+
export class UmbDocumentTreeItemElement extends UmbTreeItemElementBase<
9+
UmbDocumentTreeItemModel,
10+
UmbDocumentTreeItemContext
11+
> {
12+
#api: UmbDocumentTreeItemContext | undefined;
13+
@property({ type: Object, attribute: false })
14+
public override get api(): UmbDocumentTreeItemContext | undefined {
15+
return this.#api;
4716
}
17+
public override set api(value: UmbDocumentTreeItemContext | undefined) {
18+
this.#api = value;
4819

49-
#isInvariant() {
50-
const firstVariant = this.item?.variants[0];
51-
return firstVariant?.culture === null && firstVariant?.segment === null;
52-
}
53-
54-
// TODO: we should move the fallback name logic to a helper class. It will be used in multiple places
55-
#getLabel() {
56-
if (this.#isInvariant()) {
57-
return this._item?.variants[0].name;
20+
if (this.#api) {
21+
this.observe(this.#api.name, (name) => (this._name = name || ''));
22+
this.observe(this.#api.isDraft, (isDraft) => (this._isDraft = isDraft || false));
23+
this.observe(this.#api.icon, (icon) => (this._icon = icon || ''));
5824
}
5925

60-
// ensure we always have the correct variant data
61-
this._variant = this.#findVariant(this._currentCulture);
62-
63-
const fallbackName = this.#findVariant(this._defaultCulture)?.name ?? this._item?.variants[0].name ?? 'Unknown';
64-
return this._variant?.name ?? `(${fallbackName})`;
26+
super.api = value;
6527
}
6628

67-
#isDraft() {
68-
if (this.#isInvariant()) {
69-
return this._item?.variants[0].state === DocumentVariantStateModel.DRAFT;
70-
}
29+
@state()
30+
private _name = '';
7131

72-
// ensure we always have the correct variant data
73-
this._variant = this.#findVariant(this._currentCulture);
32+
@state()
33+
private _isDraft = false;
7434

75-
return this._variant?.state === DocumentVariantStateModel.DRAFT;
76-
}
35+
@state()
36+
private _icon = '';
7737

7838
override renderIconContainer() {
79-
const icon = this.item?.documentType.icon;
39+
const icon = this._icon;
8040
const iconWithoutColor = icon?.split(' ')[0];
8141

8242
return html`
83-
<span id="icon-container" slot="icon" class=${classMap({ draft: this.#isDraft() })}>
43+
<span id="icon-container" slot="icon" class=${classMap({ draft: this._isDraft })}>
8444
${icon && iconWithoutColor
8545
? html`
8646
<umb-icon id="icon" slot="icon" name="${this._isActive ? iconWithoutColor : icon}"></umb-icon>
@@ -92,9 +52,7 @@ export class UmbDocumentTreeItemElement extends UmbTreeItemElementBase<UmbDocume
9252
}
9353

9454
override renderLabel() {
95-
return html`<span id="label" slot="label" class=${classMap({ draft: this.#isDraft() })}
96-
>${this.#getLabel()}</span
97-
> `;
55+
return html`<span id="label" slot="label" class=${classMap({ draft: this._isDraft })}>${this._name}</span> `;
9856
}
9957

10058
#renderStateIcon() {

‎src/Umbraco.Web.UI.Client/utils/all-umb-consts/index.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export const foundConsts = [{
140140
},
141141
{
142142
path: '@umbraco-cms/backoffice/document',
143-
consts: ["UMB_DOCUMENT_COLLECTION_ALIAS","UMB_DOCUMENT_COLLECTION_CONTEXT","UMB_DOCUMENT_COLLECTION_REPOSITORY_ALIAS","UMB_DOCUMENT_GRID_COLLECTION_VIEW_ALIAS","UMB_DOCUMENT_TABLE_COLLECTION_VIEW_ALIAS","UMB_DOCUMENT_CREATE_OPTIONS_MODAL","UMB_CREATE_BLUEPRINT_MODAL","UMB_DOCUMENT_CREATE_BLUEPRINT_REPOSITORY_ALIAS","UMB_CULTURE_AND_HOSTNAMES_MODAL","UMB_DOCUMENT_CULTURE_AND_HOSTNAMES_REPOSITORY_ALIAS","UMB_DUPLICATE_DOCUMENT_MODAL","UMB_DUPLICATE_DOCUMENT_MODAL_ALIAS","UMB_DUPLICATE_DOCUMENT_REPOSITORY_ALIAS","UMB_MOVE_DOCUMENT_REPOSITORY_ALIAS","UMB_DOCUMENT_NOTIFICATIONS_MODAL","UMB_DOCUMENT_NOTIFICATIONS_MODAL_ALIAS","UMB_DOCUMENT_NOTIFICATIONS_REPOSITORY_ALIAS","UMB_PUBLIC_ACCESS_MODAL","UMB_DOCUMENT_PUBLIC_ACCESS_REPOSITORY_ALIAS","UMB_SORT_CHILDREN_OF_DOCUMENT_REPOSITORY_ALIAS","UMB_BULK_DUPLICATE_DOCUMENT_REPOSITORY_ALIAS","UMB_BULK_MOVE_DOCUMENT_REPOSITORY_ALIAS","UMB_BULK_TRASH_DOCUMENT_REPOSITORY_ALIAS","UMB_DOCUMENT_ENTITY_TYPE","UMB_DOCUMENT_ROOT_ENTITY_TYPE","UMB_DOCUMENT_CONFIGURATION_CONTEXT","UMB_CONTENT_MENU_ALIAS","UMB_DOCUMENT_PICKER_MODAL","UMB_DOCUMENT_SAVE_MODAL","UMB_DOCUMENT_SAVE_MODAL_ALIAS","UMB_DOCUMENT_WORKSPACE_PATH","UMB_CREATE_FROM_BLUEPRINT_DOCUMENT_WORKSPACE_PATH_PATTERN","UMB_CREATE_DOCUMENT_WORKSPACE_PATH_PATTERN","UMB_EDIT_DOCUMENT_WORKSPACE_PATH_PATTERN","UMB_DOCUMENT_PROPERTY_DATASET_CONTEXT","UMB_DOCUMENT_PUBLISH_MODAL_ALIAS","UMB_DOCUMENT_PUBLISH_MODAL","UMB_DOCUMENT_PUBLISH_WITH_DESCENDANTS_MODAL_ALIAS","UMB_DOCUMENT_PUBLISH_WITH_DESCENDANTS_MODAL","UMB_DOCUMENT_PUBLISHING_REPOSITORY_ALIAS","UMB_DOCUMENT_SCHEDULE_MODAL_ALIAS","UMB_DOCUMENT_SCHEDULE_MODAL","UMB_DOCUMENT_UNPUBLISH_MODAL_ALIAS","UMB_DOCUMENT_UNPUBLISH_MODAL","UMB_DOCUMENT_PUBLISHING_WORKSPACE_CONTEXT","UMB_DOCUMENT_RECYCLE_BIN_ROOT_ENTITY_TYPE","UMB_DOCUMENT_RECYCLE_BIN_REPOSITORY_ALIAS","UMB_DOCUMENT_RECYCLE_BIN_TREE_REPOSITORY_ALIAS","UMB_DOCUMENT_RECYCLE_BIN_TREE_STORE_ALIAS","UMB_DOCUMENT_RECYCLE_BIN_TREE_ALIAS","UMB_DOCUMENT_RECYCLE_BIN_TREE_STORE_CONTEXT","UMB_DOCUMENT_REFERENCE_REPOSITORY_ALIAS","UMB_DOCUMENT_DETAIL_REPOSITORY_ALIAS","UMB_DOCUMENT_DETAIL_STORE_ALIAS","UMB_DOCUMENT_DETAIL_STORE_CONTEXT","UMB_DOCUMENT_ITEM_REPOSITORY_ALIAS","UMB_DOCUMENT_STORE_ALIAS","UMB_DOCUMENT_ITEM_STORE_CONTEXT","UMB_DOCUMENT_VALIDATION_REPOSITORY_ALIAS","UMB_ROLLBACK_MODAL_ALIAS","UMB_ROLLBACK_MODAL","UMB_ROLLBACK_REPOSITORY_ALIAS","UMB_DOCUMENT_SEARCH_PROVIDER_ALIAS","UMB_DOCUMENT_TREE_STORE_CONTEXT","UMB_DOCUMENT_TREE_REPOSITORY_ALIAS","UMB_DOCUMENT_TREE_STORE_ALIAS","UMB_DOCUMENT_TREE_ALIAS","UMB_DOCUMENT_URL_REPOSITORY_ALIAS","UMB_DOCUMENT_URL_STORE_ALIAS","UMB_DOCUMENT_URL_STORE_CONTEXT","UMB_DOCUMENT_USER_PERMISSION_CONDITION_ALIAS","UMB_USER_PERMISSION_DOCUMENT_CREATE","UMB_USER_PERMISSION_DOCUMENT_READ","UMB_USER_PERMISSION_DOCUMENT_UPDATE","UMB_USER_PERMISSION_DOCUMENT_DELETE","UMB_USER_PERMISSION_DOCUMENT_CREATE_BLUEPRINT","UMB_USER_PERMISSION_DOCUMENT_NOTIFICATIONS","UMB_USER_PERMISSION_DOCUMENT_PUBLISH","UMB_USER_PERMISSION_DOCUMENT_PERMISSIONS","UMB_USER_PERMISSION_DOCUMENT_UNPUBLISH","UMB_USER_PERMISSION_DOCUMENT_DUPLICATE","UMB_USER_PERMISSION_DOCUMENT_MOVE","UMB_USER_PERMISSION_DOCUMENT_SORT","UMB_USER_PERMISSION_DOCUMENT_CULTURE_AND_HOSTNAMES","UMB_USER_PERMISSION_DOCUMENT_PUBLIC_ACCESS","UMB_USER_PERMISSION_DOCUMENT_ROLLBACK","UMB_DOCUMENT_PERMISSION_REPOSITORY_ALIAS","UMB_DOCUMENT_IS_NOT_TRASHED_CONDITION_ALIAS","UMB_DOCUMENT_IS_TRASHED_CONDITION_ALIAS","UMB_DOCUMENT_WORKSPACE_ALIAS","UMB_DOCUMENT_DETAIL_MODEL_VARIANT_SCAFFOLD","UMB_DOCUMENT_WORKSPACE_CONTEXT"]
143+
consts: ["UMB_DOCUMENT_COLLECTION_ALIAS","UMB_DOCUMENT_COLLECTION_CONTEXT","UMB_DOCUMENT_COLLECTION_REPOSITORY_ALIAS","UMB_DOCUMENT_GRID_COLLECTION_VIEW_ALIAS","UMB_DOCUMENT_TABLE_COLLECTION_VIEW_ALIAS","UMB_DOCUMENT_CREATE_OPTIONS_MODAL","UMB_CREATE_BLUEPRINT_MODAL","UMB_DOCUMENT_CREATE_BLUEPRINT_REPOSITORY_ALIAS","UMB_CULTURE_AND_HOSTNAMES_MODAL","UMB_DOCUMENT_CULTURE_AND_HOSTNAMES_REPOSITORY_ALIAS","UMB_DUPLICATE_DOCUMENT_MODAL","UMB_DUPLICATE_DOCUMENT_MODAL_ALIAS","UMB_DUPLICATE_DOCUMENT_REPOSITORY_ALIAS","UMB_MOVE_DOCUMENT_REPOSITORY_ALIAS","UMB_DOCUMENT_NOTIFICATIONS_MODAL","UMB_DOCUMENT_NOTIFICATIONS_MODAL_ALIAS","UMB_DOCUMENT_NOTIFICATIONS_REPOSITORY_ALIAS","UMB_PUBLIC_ACCESS_MODAL","UMB_DOCUMENT_PUBLIC_ACCESS_REPOSITORY_ALIAS","UMB_SORT_CHILDREN_OF_DOCUMENT_REPOSITORY_ALIAS","UMB_BULK_DUPLICATE_DOCUMENT_REPOSITORY_ALIAS","UMB_BULK_MOVE_DOCUMENT_REPOSITORY_ALIAS","UMB_BULK_TRASH_DOCUMENT_REPOSITORY_ALIAS","UMB_DOCUMENT_ENTITY_TYPE","UMB_DOCUMENT_ROOT_ENTITY_TYPE","UMB_DOCUMENT_CONFIGURATION_CONTEXT","UMB_DOCUMENT_ITEM_REPOSITORY_ALIAS","UMB_DOCUMENT_STORE_ALIAS","UMB_DOCUMENT_ITEM_STORE_CONTEXT","UMB_CONTENT_MENU_ALIAS","UMB_DOCUMENT_PICKER_MODAL","UMB_DOCUMENT_SAVE_MODAL","UMB_DOCUMENT_SAVE_MODAL_ALIAS","UMB_DOCUMENT_WORKSPACE_PATH","UMB_CREATE_FROM_BLUEPRINT_DOCUMENT_WORKSPACE_PATH_PATTERN","UMB_CREATE_DOCUMENT_WORKSPACE_PATH_PATTERN","UMB_EDIT_DOCUMENT_WORKSPACE_PATH_PATTERN","UMB_DOCUMENT_PROPERTY_DATASET_CONTEXT","UMB_DOCUMENT_PUBLISH_MODAL_ALIAS","UMB_DOCUMENT_PUBLISH_MODAL","UMB_DOCUMENT_PUBLISH_WITH_DESCENDANTS_MODAL_ALIAS","UMB_DOCUMENT_PUBLISH_WITH_DESCENDANTS_MODAL","UMB_DOCUMENT_PUBLISHING_REPOSITORY_ALIAS","UMB_DOCUMENT_SCHEDULE_MODAL_ALIAS","UMB_DOCUMENT_SCHEDULE_MODAL","UMB_DOCUMENT_UNPUBLISH_MODAL_ALIAS","UMB_DOCUMENT_UNPUBLISH_MODAL","UMB_DOCUMENT_PUBLISHING_WORKSPACE_CONTEXT","UMB_DOCUMENT_RECYCLE_BIN_ROOT_ENTITY_TYPE","UMB_DOCUMENT_RECYCLE_BIN_REPOSITORY_ALIAS","UMB_DOCUMENT_RECYCLE_BIN_TREE_REPOSITORY_ALIAS","UMB_DOCUMENT_RECYCLE_BIN_TREE_STORE_ALIAS","UMB_DOCUMENT_RECYCLE_BIN_TREE_ALIAS","UMB_DOCUMENT_RECYCLE_BIN_TREE_STORE_CONTEXT","UMB_DOCUMENT_REFERENCE_REPOSITORY_ALIAS","UMB_DOCUMENT_DETAIL_REPOSITORY_ALIAS","UMB_DOCUMENT_DETAIL_STORE_ALIAS","UMB_DOCUMENT_DETAIL_STORE_CONTEXT","UMB_DOCUMENT_VALIDATION_REPOSITORY_ALIAS","UMB_ROLLBACK_MODAL_ALIAS","UMB_ROLLBACK_MODAL","UMB_ROLLBACK_REPOSITORY_ALIAS","UMB_DOCUMENT_SEARCH_PROVIDER_ALIAS","UMB_DOCUMENT_TREE_STORE_CONTEXT","UMB_DOCUMENT_TREE_REPOSITORY_ALIAS","UMB_DOCUMENT_TREE_STORE_ALIAS","UMB_DOCUMENT_TREE_ALIAS","UMB_DOCUMENT_URL_REPOSITORY_ALIAS","UMB_DOCUMENT_URL_STORE_ALIAS","UMB_DOCUMENT_URL_STORE_CONTEXT","UMB_DOCUMENT_USER_PERMISSION_CONDITION_ALIAS","UMB_USER_PERMISSION_DOCUMENT_CREATE","UMB_USER_PERMISSION_DOCUMENT_READ","UMB_USER_PERMISSION_DOCUMENT_UPDATE","UMB_USER_PERMISSION_DOCUMENT_DELETE","UMB_USER_PERMISSION_DOCUMENT_CREATE_BLUEPRINT","UMB_USER_PERMISSION_DOCUMENT_NOTIFICATIONS","UMB_USER_PERMISSION_DOCUMENT_PUBLISH","UMB_USER_PERMISSION_DOCUMENT_PERMISSIONS","UMB_USER_PERMISSION_DOCUMENT_UNPUBLISH","UMB_USER_PERMISSION_DOCUMENT_DUPLICATE","UMB_USER_PERMISSION_DOCUMENT_MOVE","UMB_USER_PERMISSION_DOCUMENT_SORT","UMB_USER_PERMISSION_DOCUMENT_CULTURE_AND_HOSTNAMES","UMB_USER_PERMISSION_DOCUMENT_PUBLIC_ACCESS","UMB_USER_PERMISSION_DOCUMENT_ROLLBACK","UMB_DOCUMENT_PERMISSION_REPOSITORY_ALIAS","UMB_DOCUMENT_IS_NOT_TRASHED_CONDITION_ALIAS","UMB_DOCUMENT_IS_TRASHED_CONDITION_ALIAS","UMB_DOCUMENT_WORKSPACE_ALIAS","UMB_DOCUMENT_DETAIL_MODEL_VARIANT_SCAFFOLD","UMB_DOCUMENT_WORKSPACE_CONTEXT"]
144144
},
145145
{
146146
path: '@umbraco-cms/backoffice/entity-action',
@@ -224,15 +224,15 @@ export const foundConsts = [{
224224
},
225225
{
226226
path: '@umbraco-cms/backoffice/member',
227-
consts: ["UMB_MEMBER_COLLECTION_ALIAS","UMB_MEMBER_COLLECTION_CONTEXT","UMB_MEMBER_COLLECTION_REPOSITORY_ALIAS","UMB_MEMBER_TABLE_COLLECTION_VIEW_ALIAS","UMB_MEMBER_PICKER_MODAL","UMB_MEMBER_CREATE_OPTIONS_MODAL","UMB_MEMBER_ENTITY_TYPE","UMB_MEMBER_ROOT_ENTITY_TYPE","UMB_MEMBER_WORKSPACE_PATH","UMB_MEMBER_ROOT_WORKSPACE_PATH","UMB_CREATE_MEMBER_WORKSPACE_PATH_PATTERN","UMB_MEMBER_VARIANT_CONTEXT","UMB_MEMBER_DETAIL_REPOSITORY_ALIAS","UMB_MEMBER_DETAIL_STORE_ALIAS","UMB_MEMBER_DETAIL_STORE_CONTEXT","UMB_MEMBER_ITEM_REPOSITORY_ALIAS","UMB_MEMBER_STORE_ALIAS","UMB_MEMBER_ITEM_STORE_CONTEXT","UMB_MEMBER_VALIDATION_REPOSITORY_ALIAS","UMB_MEMBER_SEARCH_PROVIDER_ALIAS","UMB_MEMBER_DETAIL_MODEL_VARIANT_SCAFFOLD","UMB_MEMBER_WORKSPACE_ALIAS","UMB_MEMBER_WORKSPACE_CONTEXT","UMB_MEMBER_ROOT_WORKSPACE_ALIAS"]
227+
consts: ["UMB_MEMBER_COLLECTION_ALIAS","UMB_MEMBER_COLLECTION_CONTEXT","UMB_MEMBER_COLLECTION_REPOSITORY_ALIAS","UMB_MEMBER_TABLE_COLLECTION_VIEW_ALIAS","UMB_MEMBER_PICKER_MODAL","UMB_MEMBER_CREATE_OPTIONS_MODAL","UMB_MEMBER_ENTITY_TYPE","UMB_MEMBER_ROOT_ENTITY_TYPE","UMB_MEMBER_ITEM_REPOSITORY_ALIAS","UMB_MEMBER_STORE_ALIAS","UMB_MEMBER_ITEM_STORE_CONTEXT","UMB_MEMBER_WORKSPACE_PATH","UMB_MEMBER_ROOT_WORKSPACE_PATH","UMB_CREATE_MEMBER_WORKSPACE_PATH_PATTERN","UMB_MEMBER_VARIANT_CONTEXT","UMB_MEMBER_DETAIL_REPOSITORY_ALIAS","UMB_MEMBER_DETAIL_STORE_ALIAS","UMB_MEMBER_DETAIL_STORE_CONTEXT","UMB_MEMBER_VALIDATION_REPOSITORY_ALIAS","UMB_MEMBER_SEARCH_PROVIDER_ALIAS","UMB_MEMBER_DETAIL_MODEL_VARIANT_SCAFFOLD","UMB_MEMBER_WORKSPACE_ALIAS","UMB_MEMBER_WORKSPACE_CONTEXT","UMB_MEMBER_ROOT_WORKSPACE_ALIAS"]
228228
},
229229
{
230230
path: '@umbraco-cms/backoffice/menu',
231231
consts: ["UMB_MENU_CONTEXT"]
232232
},
233233
{
234234
path: '@umbraco-cms/backoffice/modal',
235-
consts: ["UMB_CONFIRM_MODAL","UMB_DISCARD_CHANGES_MODAL","UMB_ITEM_PICKER_MODAL","UMB_MODAL_MANAGER_CONTEXT","UMB_MODAL_CONTEXT"]
235+
consts: ["UMB_CONFIRM_MODAL","UMB_DISCARD_CHANGES_MODAL","UMB_ERROR_VIEWER_MODAL","UMB_ITEM_PICKER_MODAL","UMB_MODAL_MANAGER_CONTEXT","UMB_MODAL_CONTEXT"]
236236
},
237237
{
238238
path: '@umbraco-cms/backoffice/models',
@@ -260,7 +260,7 @@ export const foundConsts = [{
260260
},
261261
{
262262
path: '@umbraco-cms/backoffice/picker-input',
263-
consts: []
263+
consts: ["UMB_PICKER_INPUT_CONTEXT"]
264264
},
265265
{
266266
path: '@umbraco-cms/backoffice/picker',
@@ -384,7 +384,7 @@ export const foundConsts = [{
384384
},
385385
{
386386
path: '@umbraco-cms/backoffice/tree',
387-
consts: ["UMB_TREE_CONTEXT","UMB_DUPLICATE_TO_MODAL_ALIAS","UMB_DUPLICATE_TO_MODAL","UMB_SORT_CHILDREN_OF_MODAL_ALIAS","UMB_SORT_CHILDREN_OF_MODAL","UMB_FOLDER_CREATE_MODAL","UMB_FOLDER_UPDATE_MODAL","UMB_TREE_ITEM_CONTEXT","UMB_TREE_PICKER_MODAL_ALIAS","UMB_TREE_PICKER_MODAL"]
387+
consts: ["UMB_TREE_CONTEXT","UMB_DUPLICATE_TO_MODAL_ALIAS","UMB_DUPLICATE_TO_MODAL","UMB_SORT_CHILDREN_OF_MODAL_ALIAS","UMB_SORT_CHILDREN_OF_MODAL","UMB_FOLDER_CREATE_MODAL","UMB_FOLDER_UPDATE_MODAL","UMB_TREE_ITEM_CONTEXT","UMB_TREE_ITEM_DEFAULT_KIND_MANIFEST","UMB_TREE_PICKER_MODAL_ALIAS","UMB_TREE_PICKER_MODAL"]
388388
},
389389
{
390390
path: '@umbraco-cms/backoffice/ufm',
@@ -420,7 +420,7 @@ export const foundConsts = [{
420420
},
421421
{
422422
path: '@umbraco-cms/backoffice/webhook',
423-
consts: ["UMB_WEBHOOK_WORKSPACE_ALIAS","UMB_WEBHOOK_WORKSPACE","UMB_WEBHOOK_ENTITY_TYPE","UMB_WEBHOOK_ROOT_ENTITY_TYPE","UMB_WEBHOOK_DELIVERY_ENTITY_TYPE","UMB_WEBHOOK_COLLECTION_ALIAS","UMB_WEBHOOK_COLLECTION_REPOSITORY_ALIAS","UMB_WEBHOOK_TABLE_COLLECTION_VIEW_ALIAS","UMB_WEBHOOK_DETAIL_REPOSITORY_ALIAS","UMB_WEBHOOK_DETAIL_STORE_ALIAS","UMB_WEBHOOK_DETAIL_STORE_CONTEXT","UMB_WEBHOOK_ITEM_REPOSITORY_ALIAS","UMB_WEBHOOK_STORE_ALIAS","UMB_WEBHOOK_ITEM_STORE_CONTEXT","UMB_WEBHOOK_WORKSPACE_CONTEXT","UMB_WEBHOOK_DELIVERY_COLLECTION_ALIAS","UMB_WEBHOOK_DELIVERY_COLLECTION_REPOSITORY_ALIAS","UMB_WEBHOOK_EVENTS_MODAL","UMB_WEBHOOK_EVENT_REPOSITORY_ALIAS","UMB_WEBHOOK_EVENT_STORE_ALIAS","UMB_WEBHOOK_EVENT_STORE_CONTEXT","UMB_WEBHOOK_ROOT_WORKSPACE_ALIAS"]
423+
consts: ["UMB_WEBHOOK_WORKSPACE_ALIAS","UMB_WEBHOOK_WORKSPACE","UMB_WEBHOOK_ENTITY_TYPE","UMB_WEBHOOK_ROOT_ENTITY_TYPE","UMB_WEBHOOK_DELIVERY_ENTITY_TYPE","UMB_WEBHOOK_COLLECTION_ALIAS","UMB_WEBHOOK_COLLECTION_REPOSITORY_ALIAS","UMB_WEBHOOK_TABLE_COLLECTION_VIEW_ALIAS","UMB_WEBHOOK_WORKSPACE_PATH","UMB_CREATE_WEBHOOK_WORKSPACE_PATH_PATTERN","UMB_EDIT_WEBHOOK_WORKSPACE_PATH_PATTERN","UMB_WEBHOOK_DETAIL_REPOSITORY_ALIAS","UMB_WEBHOOK_DETAIL_STORE_ALIAS","UMB_WEBHOOK_DETAIL_STORE_CONTEXT","UMB_WEBHOOK_ITEM_REPOSITORY_ALIAS","UMB_WEBHOOK_STORE_ALIAS","UMB_WEBHOOK_ITEM_STORE_CONTEXT","UMB_WEBHOOK_WORKSPACE_CONTEXT","UMB_WEBHOOK_DELIVERY_COLLECTION_ALIAS","UMB_WEBHOOK_DELIVERY_COLLECTION_REPOSITORY_ALIAS","UMB_WEBHOOK_EVENTS_MODAL","UMB_WEBHOOK_EVENT_REPOSITORY_ALIAS","UMB_WEBHOOK_EVENT_STORE_ALIAS","UMB_WEBHOOK_EVENT_STORE_CONTEXT","UMB_WEBHOOK_ROOT_WORKSPACE_PATH","UMB_WEBHOOK_ROOT_WORKSPACE_ALIAS"]
424424
},
425425
{
426426
path: '@umbraco-cms/backoffice/workspace',

0 commit comments

Comments
 (0)
Please sign in to comment.