@umbraco-cms/backoffice 14.0.0--preview005-c7e32bb7 → 14.0.0--preview005-cfee2c6f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cms/custom-elements.json +2 -2
- package/dist-cms/packages/block/block/workspace/views/edit/block-workspace-view-edit-properties.element.d.ts +3 -3
- package/dist-cms/packages/core/content-type/content-type-container-structure-helper.class.d.ts +9 -10
- package/dist-cms/packages/core/content-type/content-type-property-structure-helper.class.d.ts +7 -7
- package/dist-cms/packages/core/content-type/content-type-property-structure-helper.class.js +5 -2
- package/dist-cms/packages/core/content-type/content-type-structure-manager.class.d.ts +15 -17
- package/dist-cms/packages/core/content-type/content-type-structure-manager.class.js +2 -5
- package/dist-cms/packages/core/content-type/types.d.ts +13 -2
- package/dist-cms/packages/core/data-type/modals/data-type-picker-flow/data-type-picker-flow-data-type-picker-modal.element.js +1 -1
- package/dist-cms/packages/core/modal/common/property-settings/property-settings-modal.element.js +1 -1
- package/dist-cms/packages/core/modal/token/property-settings-modal.token.d.ts +3 -3
- package/dist-cms/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit-properties.element.d.ts +3 -4
- package/dist-cms/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit-properties.element.js +11 -11
- package/dist-cms/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit-property.element.d.ts +4 -4
- package/dist-cms/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit-property.element.js +6 -3
- package/dist-cms/packages/documents/documents/workspace/views/edit/document-workspace-view-edit-properties.element.d.ts +3 -3
- package/dist-cms/packages/media/media-types/workspace/views/design/media-type-workspace-view-edit-properties.element.d.ts +3 -4
- package/dist-cms/packages/media/media-types/workspace/views/design/media-type-workspace-view-edit-properties.element.js +10 -10
- package/dist-cms/packages/media/media-types/workspace/views/design/media-type-workspace-view-edit-property.element.js +4 -1
- package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
- package/dist-cms/vscode-html-custom-data.json +2 -2
- package/package.json +1 -1
|
@@ -6134,7 +6134,7 @@
|
|
|
6134
6134
|
{
|
|
6135
6135
|
"name": "property",
|
|
6136
6136
|
"description": "Property, the data object for the property.",
|
|
6137
|
-
"type": "UmbPropertyTypeModel",
|
|
6137
|
+
"type": "UmbPropertyTypeModel | UmbPropertyTypeScaffoldModel | undefined",
|
|
6138
6138
|
"default": "\"undefined\""
|
|
6139
6139
|
},
|
|
6140
6140
|
{
|
|
@@ -6166,7 +6166,7 @@
|
|
|
6166
6166
|
"name": "property",
|
|
6167
6167
|
"attribute": "property",
|
|
6168
6168
|
"description": "Property, the data object for the property.",
|
|
6169
|
-
"type": "UmbPropertyTypeModel",
|
|
6169
|
+
"type": "UmbPropertyTypeModel | UmbPropertyTypeScaffoldModel | undefined",
|
|
6170
6170
|
"default": "\"undefined\""
|
|
6171
6171
|
},
|
|
6172
6172
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { UmbBlockWorkspaceElementManagerNames } from '../../block-workspace.context.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { UmbPropertyContainerTypes, UmbPropertyTypeModel } from '../../../../../core/content-type/index.js';
|
|
3
3
|
import { UmbLitElement } from '../../../../../../shared/lit-element/index.js';
|
|
4
4
|
export declare class UmbBlockWorkspaceViewEditPropertiesElement extends UmbLitElement {
|
|
5
5
|
#private;
|
|
@@ -7,8 +7,8 @@ export declare class UmbBlockWorkspaceViewEditPropertiesElement extends UmbLitEl
|
|
|
7
7
|
set managerName(value: UmbBlockWorkspaceElementManagerNames | undefined);
|
|
8
8
|
get containerName(): string | undefined;
|
|
9
9
|
set containerName(value: string | undefined);
|
|
10
|
-
get containerType():
|
|
11
|
-
set containerType(value:
|
|
10
|
+
get containerType(): UmbPropertyContainerTypes | undefined;
|
|
11
|
+
set containerType(value: UmbPropertyContainerTypes | undefined);
|
|
12
12
|
_propertyStructure: Array<UmbPropertyTypeModel>;
|
|
13
13
|
constructor();
|
|
14
14
|
render(): unknown;
|
package/dist-cms/packages/core/content-type/content-type-container-structure-helper.class.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { UmbContentTypeModel } from './types.js';
|
|
3
|
-
import type { PropertyTypeContainerModelBaseModel } from '../../../external/backend-api/index.js';
|
|
1
|
+
import type { UmbContentTypePropertyStructureManager } from './content-type-structure-manager.class.js';
|
|
2
|
+
import type { UmbContentTypeModel, UmbPropertyContainerTypes, UmbPropertyTypeContainerModel } from './types.js';
|
|
4
3
|
import type { UmbControllerHostElement } from '../../../libs/controller-api/index.js';
|
|
5
4
|
export declare class UmbContentTypeContainerStructureHelper<T extends UmbContentTypeModel> {
|
|
6
5
|
#private;
|
|
@@ -15,14 +14,14 @@ export declare class UmbContentTypeContainerStructureHelper<T extends UmbContent
|
|
|
15
14
|
private _ownerName?;
|
|
16
15
|
private _ownerAlikeContainers;
|
|
17
16
|
private _ownerContainers;
|
|
18
|
-
readonly containers: import("rxjs").Observable<
|
|
17
|
+
readonly containers: import("rxjs").Observable<UmbPropertyTypeContainerModel[]>;
|
|
19
18
|
readonly hasProperties: import("rxjs").Observable<boolean>;
|
|
20
19
|
constructor(host: UmbControllerHostElement);
|
|
21
20
|
setStructureManager(structure: UmbContentTypePropertyStructureManager<T>): void;
|
|
22
|
-
setType(value?:
|
|
23
|
-
getType():
|
|
24
|
-
setContainerChildType(value?:
|
|
25
|
-
getContainerChildType():
|
|
21
|
+
setType(value?: UmbPropertyContainerTypes): void;
|
|
22
|
+
getType(): UmbPropertyContainerTypes | undefined;
|
|
23
|
+
setContainerChildType(value?: UmbPropertyContainerTypes): void;
|
|
24
|
+
getContainerChildType(): UmbPropertyContainerTypes | undefined;
|
|
26
25
|
setName(value?: string): void;
|
|
27
26
|
getName(): string | undefined;
|
|
28
27
|
setIsRoot(value: boolean): void;
|
|
@@ -43,9 +42,9 @@ export declare class UmbContentTypeContainerStructureHelper<T extends UmbContent
|
|
|
43
42
|
*/
|
|
44
43
|
isOwnerChildContainer(containerId?: string): boolean | undefined;
|
|
45
44
|
/** Manipulate methods: */
|
|
46
|
-
insertContainer(container:
|
|
45
|
+
insertContainer(container: UmbPropertyTypeContainerModel, sortOrder?: number): Promise<boolean>;
|
|
47
46
|
addContainer(parentContainerId?: string | null, sortOrder?: number): Promise<void>;
|
|
48
47
|
removeContainer(groupId: string): Promise<boolean>;
|
|
49
|
-
partialUpdateContainer(containerId: string, partialUpdate: Partial<
|
|
48
|
+
partialUpdateContainer(containerId: string, partialUpdate: Partial<UmbPropertyTypeContainerModel>): Promise<void>;
|
|
50
49
|
updateContainerName(containerId: string, containerParentId: string | null, name: string): Promise<void>;
|
|
51
50
|
}
|
package/dist-cms/packages/core/content-type/content-type-property-structure-helper.class.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { UmbContentTypeModel, UmbPropertyTypeModel } from './types.js';
|
|
1
|
+
import type { UmbContentTypePropertyStructureManager } from './content-type-structure-manager.class.js';
|
|
2
|
+
import type { UmbContentTypeModel, UmbPropertyContainerTypes, UmbPropertyTypeModel } from './types.js';
|
|
3
3
|
import type { UmbControllerHostElement } from '../../../libs/controller-api/index.js';
|
|
4
4
|
export declare class UmbContentTypePropertyStructureHelper<T extends UmbContentTypeModel> {
|
|
5
5
|
#private;
|
|
@@ -8,10 +8,10 @@ export declare class UmbContentTypePropertyStructureHelper<T extends UmbContentT
|
|
|
8
8
|
private _containerName?;
|
|
9
9
|
readonly propertyStructure: import("rxjs").Observable<UmbPropertyTypeModel[]>;
|
|
10
10
|
constructor(host: UmbControllerHostElement);
|
|
11
|
-
|
|
11
|
+
ownerDocumentTypes(): Promise<import("rxjs").Observable<T[]> | undefined>;
|
|
12
12
|
setStructureManager(structure: UmbContentTypePropertyStructureManager<T>): void;
|
|
13
|
-
setContainerType(value?:
|
|
14
|
-
getContainerType():
|
|
13
|
+
setContainerType(value?: UmbPropertyContainerTypes): void;
|
|
14
|
+
getContainerType(): UmbPropertyContainerTypes | undefined;
|
|
15
15
|
setContainerName(value?: string): void;
|
|
16
16
|
getContainerName(): string | undefined;
|
|
17
17
|
setIsRoot(value: boolean): void;
|
|
@@ -19,8 +19,8 @@ export declare class UmbContentTypePropertyStructureHelper<T extends UmbContentT
|
|
|
19
19
|
private _observeGroupContainers;
|
|
20
20
|
private _observePropertyStructureOf;
|
|
21
21
|
/** Manipulate methods: */
|
|
22
|
-
createPropertyScaffold(ownerId?: string, sortOrder?: number): Promise<
|
|
23
|
-
addProperty(ownerId?: string, sortOrder?: number): Promise<
|
|
22
|
+
createPropertyScaffold(ownerId?: string, sortOrder?: number): Promise<import("./types.js").UmbPropertyTypeScaffoldModel | undefined>;
|
|
23
|
+
addProperty(ownerId?: string, sortOrder?: number): Promise<import("./types.js").UmbPropertyTypeScaffoldModel | undefined>;
|
|
24
24
|
insertProperty(property: UmbPropertyTypeModel, sortOrder?: number): Promise<boolean>;
|
|
25
25
|
removeProperty(propertyId: string): Promise<boolean>;
|
|
26
26
|
partialUpdateProperty(propertyKey?: string, partialUpdate?: Partial<UmbPropertyTypeModel>): Promise<void>;
|
|
@@ -26,8 +26,11 @@ export class UmbContentTypePropertyStructureHelper {
|
|
|
26
26
|
// TODO: Remove as any when sortOrder is implemented:
|
|
27
27
|
__classPrivateFieldGet(this, _UmbContentTypePropertyStructureHelper_propertyStructure, "f").sortBy((a, b) => (a.sortOrder ?? 0) - (b.sortOrder ?? 0));
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
async ownerDocumentTypes() {
|
|
30
|
+
await __classPrivateFieldGet(this, _UmbContentTypePropertyStructureHelper_init, "f");
|
|
31
|
+
if (!__classPrivateFieldGet(this, _UmbContentTypePropertyStructureHelper_structure, "f"))
|
|
32
|
+
return;
|
|
33
|
+
return __classPrivateFieldGet(this, _UmbContentTypePropertyStructureHelper_structure, "f").contentTypes;
|
|
31
34
|
}
|
|
32
35
|
setStructureManager(structure) {
|
|
33
36
|
__classPrivateFieldSet(this, _UmbContentTypePropertyStructureHelper_structure, structure, "f");
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import type { UmbContentTypeModel, UmbPropertyTypeModel } from './types.js';
|
|
1
|
+
import type { UmbContentTypeModel, UmbPropertyContainerTypes, UmbPropertyTypeContainerModel, UmbPropertyTypeModel, UmbPropertyTypeScaffoldModel } from './types.js';
|
|
2
2
|
import type { UmbDetailRepository } from '../repository/index.js';
|
|
3
|
-
import type { PropertyTypeContainerModelBaseModel } from '../../../external/backend-api/index.js';
|
|
4
3
|
import type { UmbControllerHost } from '../../../libs/controller-api/index.js';
|
|
5
4
|
import type { MappingFunction } from '../../../libs/observable-api/index.js';
|
|
6
5
|
import { UmbBaseController } from '../../../libs/class-api/index.js';
|
|
7
|
-
export type PropertyContainerTypes = 'Group' | 'Tab';
|
|
8
6
|
export declare class UmbContentTypePropertyStructureManager<T extends UmbContentTypeModel> extends UmbBaseController {
|
|
9
7
|
#private;
|
|
10
8
|
readonly contentTypes: import("rxjs").Observable<T[]>;
|
|
@@ -42,13 +40,13 @@ export declare class UmbContentTypePropertyStructureManager<T extends UmbContent
|
|
|
42
40
|
ownerContentType(): import("rxjs").Observable<T | undefined>;
|
|
43
41
|
getOwnerContentType(): T | undefined;
|
|
44
42
|
updateOwnerContentType(entry: Partial<T>): void;
|
|
45
|
-
createContainer(contentTypeUnique: string | null, parentId?: string | null, type?:
|
|
46
|
-
insertContainer(contentTypeUnique: string | null, container:
|
|
47
|
-
makeContainerNameUniqueForOwnerContentType(newName: string, containerType?:
|
|
48
|
-
updateContainer(contentTypeUnique: string | null, containerId: string, partialUpdate: Partial<
|
|
43
|
+
createContainer(contentTypeUnique: string | null, parentId?: string | null, type?: UmbPropertyContainerTypes, sortOrder?: number): Promise<UmbPropertyTypeContainerModel>;
|
|
44
|
+
insertContainer(contentTypeUnique: string | null, container: UmbPropertyTypeContainerModel): Promise<void>;
|
|
45
|
+
makeContainerNameUniqueForOwnerContentType(newName: string, containerType?: UmbPropertyContainerTypes, parentId?: string | null): string | null;
|
|
46
|
+
updateContainer(contentTypeUnique: string | null, containerId: string, partialUpdate: Partial<UmbPropertyTypeContainerModel>): Promise<void>;
|
|
49
47
|
removeContainer(contentTypeUnique: string | null, containerId?: string | null): Promise<void>;
|
|
50
|
-
createPropertyScaffold(containerId?: string | null, sortOrder?: number):
|
|
51
|
-
createProperty(contentTypeUnique: string | null, containerId?: string | null, sortOrder?: number): Promise<
|
|
48
|
+
createPropertyScaffold(containerId?: string | null, sortOrder?: number): UmbPropertyTypeScaffoldModel;
|
|
49
|
+
createProperty(contentTypeUnique: string | null, containerId?: string | null, sortOrder?: number): Promise<UmbPropertyTypeScaffoldModel>;
|
|
52
50
|
insertProperty(contentTypeUnique: string | null, property: UmbPropertyTypeModel): Promise<void>;
|
|
53
51
|
removeProperty(contentTypeUnique: string | null, propertyId: string): Promise<void>;
|
|
54
52
|
updateProperty(contentTypeUnique: string | null, propertyId: string, partialUpdate: Partial<UmbPropertyTypeModel>): Promise<void>;
|
|
@@ -60,14 +58,14 @@ export declare class UmbContentTypePropertyStructureManager<T extends UmbContent
|
|
|
60
58
|
hasPropertyStructuresOf(containerId: string | null): import("rxjs").Observable<boolean>;
|
|
61
59
|
rootPropertyStructures(): import("rxjs").Observable<UmbPropertyTypeModel[]>;
|
|
62
60
|
propertyStructuresOf(containerId: string | null): import("rxjs").Observable<UmbPropertyTypeModel[]>;
|
|
63
|
-
rootContainers(containerType:
|
|
64
|
-
getRootContainers(containerType:
|
|
65
|
-
hasRootContainers(containerType:
|
|
66
|
-
ownerContainersOf(containerType:
|
|
67
|
-
getOwnerContainers(containerType:
|
|
68
|
-
isOwnerContainer(containerId: string):
|
|
69
|
-
containersOfParentKey(parentId: string, containerType:
|
|
70
|
-
containersByNameAndType(name: string, containerType:
|
|
61
|
+
rootContainers(containerType: UmbPropertyContainerTypes): import("rxjs").Observable<UmbPropertyTypeContainerModel[]>;
|
|
62
|
+
getRootContainers(containerType: UmbPropertyContainerTypes): UmbPropertyTypeContainerModel[];
|
|
63
|
+
hasRootContainers(containerType: UmbPropertyContainerTypes): import("rxjs").Observable<boolean>;
|
|
64
|
+
ownerContainersOf(containerType: UmbPropertyContainerTypes): import("rxjs").Observable<UmbPropertyTypeContainerModel[] | undefined>;
|
|
65
|
+
getOwnerContainers(containerType: UmbPropertyContainerTypes, parentId?: string | null): UmbPropertyTypeContainerModel[] | undefined;
|
|
66
|
+
isOwnerContainer(containerId: string): UmbPropertyTypeContainerModel[] | undefined;
|
|
67
|
+
containersOfParentKey(parentId: string, containerType: UmbPropertyContainerTypes): import("rxjs").Observable<UmbPropertyTypeContainerModel[]>;
|
|
68
|
+
containersByNameAndType(name: string, containerType: UmbPropertyContainerTypes): import("rxjs").Observable<UmbPropertyTypeContainerModel[]>;
|
|
71
69
|
private _reset;
|
|
72
70
|
destroy(): void;
|
|
73
71
|
}
|
|
@@ -14,8 +14,6 @@ import { UmbId } from '../id/index.js';
|
|
|
14
14
|
import { UmbArrayState, partialUpdateFrozenArray, appendToFrozenArray, filterFrozenArray, } from '../../../libs/observable-api/index.js';
|
|
15
15
|
import { incrementString } from '../../../shared/utils/index.js';
|
|
16
16
|
import { UmbBaseController } from '../../../libs/class-api/index.js';
|
|
17
|
-
// TODO: get this type from the repository, or use some generic type.
|
|
18
|
-
// TODO: Make this a controller on its own:
|
|
19
17
|
export class UmbContentTypePropertyStructureManager extends UmbBaseController {
|
|
20
18
|
constructor(host, typeRepository) {
|
|
21
19
|
super(host);
|
|
@@ -205,11 +203,10 @@ export class UmbContentTypePropertyStructureManager extends UmbBaseController {
|
|
|
205
203
|
createPropertyScaffold(containerId = null, sortOrder) {
|
|
206
204
|
const property = {
|
|
207
205
|
id: UmbId.new(),
|
|
208
|
-
containerId: containerId,
|
|
206
|
+
container: containerId ? { id: containerId } : null,
|
|
209
207
|
alias: '',
|
|
210
208
|
name: '',
|
|
211
209
|
description: '',
|
|
212
|
-
dataTypeId: '',
|
|
213
210
|
variesByCulture: false,
|
|
214
211
|
variesBySegment: false,
|
|
215
212
|
validation: {
|
|
@@ -222,7 +219,7 @@ export class UmbContentTypePropertyStructureManager extends UmbBaseController {
|
|
|
222
219
|
labelOnTop: false,
|
|
223
220
|
},
|
|
224
221
|
sortOrder: sortOrder ?? 0,
|
|
225
|
-
};
|
|
222
|
+
};
|
|
226
223
|
return property;
|
|
227
224
|
}
|
|
228
225
|
async createProperty(contentTypeUnique, containerId = null, sortOrder) {
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CompositionTypeModel, PropertyTypeModelBaseModel, ReferenceByIdModel } from '../../../external/backend-api/index.js';
|
|
2
|
+
export type UmbPropertyContainerTypes = 'Group' | 'Tab';
|
|
3
|
+
export interface UmbPropertyTypeContainerModel {
|
|
4
|
+
id: string;
|
|
5
|
+
parent?: ReferenceByIdModel | null;
|
|
6
|
+
name?: string | null;
|
|
7
|
+
type: UmbPropertyContainerTypes;
|
|
8
|
+
sortOrder: number;
|
|
9
|
+
}
|
|
2
10
|
export interface UmbContentTypeModel {
|
|
3
11
|
unique: string;
|
|
4
12
|
parentUnique: string | null;
|
|
@@ -11,10 +19,13 @@ export interface UmbContentTypeModel {
|
|
|
11
19
|
variesBySegment: boolean;
|
|
12
20
|
isElement: boolean;
|
|
13
21
|
properties: Array<UmbPropertyTypeModel>;
|
|
14
|
-
containers: Array<
|
|
22
|
+
containers: Array<UmbPropertyTypeContainerModel>;
|
|
15
23
|
allowedContentTypes: Array<UmbContentTypeSortModel>;
|
|
16
24
|
compositions: Array<UmbContentTypeCompositionModel>;
|
|
17
25
|
}
|
|
26
|
+
export interface UmbPropertyTypeScaffoldModel extends Omit<UmbPropertyTypeModel, 'dataType'> {
|
|
27
|
+
dataType?: UmbPropertyTypeModel['dataType'];
|
|
28
|
+
}
|
|
18
29
|
export interface UmbPropertyTypeModel extends Omit<PropertyTypeModelBaseModel, 'dataType'> {
|
|
19
30
|
dataType: {
|
|
20
31
|
unique: string;
|
|
@@ -8,7 +8,7 @@ import { UmbDataTypeDetailRepository } from '../../repository/detail/data-type-d
|
|
|
8
8
|
import { UmbDataTypeTreeRepository } from '../../tree/data-type-tree.repository.js';
|
|
9
9
|
import { css, html, customElement, state, repeat, when } from '../../../../../external/lit/index.js';
|
|
10
10
|
import { UmbTextStyles } from '../../../../../shared/style/index.js';
|
|
11
|
-
import { UmbModalBaseElement
|
|
11
|
+
import { UmbModalBaseElement } from '../../../modal/index.js';
|
|
12
12
|
let UmbDataTypePickerFlowDataTypePickerModalElement = class UmbDataTypePickerFlowDataTypePickerModalElement extends UmbModalBaseElement {
|
|
13
13
|
connectedCallback() {
|
|
14
14
|
super.connectedCallback();
|
package/dist-cms/packages/core/modal/common/property-settings/property-settings-modal.element.js
CHANGED
|
@@ -135,7 +135,7 @@ let UmbPropertySettingsModalElement = class UmbPropertySettingsModalElement exte
|
|
|
135
135
|
.value=${this.value.description}></uui-textarea>
|
|
136
136
|
</div>
|
|
137
137
|
<umb-data-type-flow-input
|
|
138
|
-
.value=${this.value.dataType
|
|
138
|
+
.value=${this.value.dataType?.unique}
|
|
139
139
|
@change=${__classPrivateFieldGet(this, _UmbPropertySettingsModalElement_instances, "m", _UmbPropertySettingsModalElement_onDataTypeIdChange)}></umb-data-type-flow-input>
|
|
140
140
|
<hr />
|
|
141
141
|
<div class="container">
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { UmbPropertyTypeModel } from '../../content-type/index.js';
|
|
1
|
+
import type { UmbPropertyTypeModel, UmbPropertyTypeScaffoldModel } from '../../content-type/index.js';
|
|
2
2
|
import { UmbModalToken } from '../index.js';
|
|
3
3
|
export type UmbPropertySettingsModalData = {
|
|
4
4
|
documentTypeId: string;
|
|
5
5
|
};
|
|
6
|
-
export type UmbPropertySettingsModalValue = UmbPropertyTypeModel;
|
|
7
|
-
export declare const UMB_PROPERTY_SETTINGS_MODAL: UmbModalToken<UmbPropertySettingsModalData,
|
|
6
|
+
export type UmbPropertySettingsModalValue = UmbPropertyTypeModel | UmbPropertyTypeScaffoldModel;
|
|
7
|
+
export declare const UMB_PROPERTY_SETTINGS_MODAL: UmbModalToken<UmbPropertySettingsModalData, UmbPropertySettingsModalValue>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './document-type-workspace-view-edit-property.element.js';
|
|
2
2
|
import type { UmbDocumentTypeDetailModel } from '../../../types.js';
|
|
3
|
-
import type {
|
|
3
|
+
import type { UmbPropertyContainerTypes, UmbPropertyTypeModel } from '../../../../../core/content-type/index.js';
|
|
4
4
|
import { UmbContentTypePropertyStructureHelper } from '../../../../../core/content-type/index.js';
|
|
5
5
|
import { UmbLitElement } from '../../../../../../shared/lit-element/index.js';
|
|
6
6
|
export declare class UmbDocumentTypeWorkspaceViewEditPropertiesElement extends UmbLitElement {
|
|
@@ -10,15 +10,14 @@ export declare class UmbDocumentTypeWorkspaceViewEditPropertiesElement extends U
|
|
|
10
10
|
set containerId(value: string | undefined);
|
|
11
11
|
get containerName(): string | undefined;
|
|
12
12
|
set containerName(value: string | undefined);
|
|
13
|
-
get containerType():
|
|
14
|
-
set containerType(value:
|
|
13
|
+
get containerType(): UmbPropertyContainerTypes | undefined;
|
|
14
|
+
set containerType(value: UmbPropertyContainerTypes | undefined);
|
|
15
15
|
_propertyStructureHelper: UmbContentTypePropertyStructureHelper<UmbDocumentTypeDetailModel>;
|
|
16
16
|
_propertyStructure: Array<UmbPropertyTypeModel>;
|
|
17
17
|
_ownerDocumentTypes?: UmbDocumentTypeDetailModel[];
|
|
18
18
|
protected _modalRouteNewProperty?: string;
|
|
19
19
|
_sortModeActive?: boolean;
|
|
20
20
|
constructor();
|
|
21
|
-
connectedCallback(): void;
|
|
22
21
|
render(): import("lit-html").TemplateResult<1>;
|
|
23
22
|
static styles: import("../../../../../../external/lit/index.js").CSSResult[];
|
|
24
23
|
}
|
|
@@ -91,12 +91,18 @@ let UmbDocumentTypeWorkspaceViewEditPropertiesElement = class UmbDocumentTypeWor
|
|
|
91
91
|
}));
|
|
92
92
|
this._propertyStructureHelper = new UmbContentTypePropertyStructureHelper(this);
|
|
93
93
|
this._propertyStructure = [];
|
|
94
|
-
this.consumeContext(UMB_WORKSPACE_CONTEXT, (workspaceContext) => {
|
|
94
|
+
this.consumeContext(UMB_WORKSPACE_CONTEXT, async (workspaceContext) => {
|
|
95
95
|
this._propertyStructureHelper.setStructureManager(workspaceContext.structure);
|
|
96
96
|
this.observe(workspaceContext.isSorting, (isSorting) => {
|
|
97
97
|
this._sortModeActive = isSorting;
|
|
98
98
|
__classPrivateFieldGet(this, _UmbDocumentTypeWorkspaceViewEditPropertiesElement_instances, "m", _UmbDocumentTypeWorkspaceViewEditPropertiesElement_setModel).call(this, isSorting);
|
|
99
99
|
}, '_observeIsSorting');
|
|
100
|
+
const docTypesObservable = await this._propertyStructureHelper.ownerDocumentTypes();
|
|
101
|
+
if (!docTypesObservable)
|
|
102
|
+
return;
|
|
103
|
+
this.observe(docTypesObservable, (documents) => {
|
|
104
|
+
this._ownerDocumentTypes = documents;
|
|
105
|
+
}, 'observeOwnerDocumentTypes');
|
|
100
106
|
});
|
|
101
107
|
this.observe(this._propertyStructureHelper.propertyStructure, (propertyStructure) => {
|
|
102
108
|
this._propertyStructure = propertyStructure;
|
|
@@ -114,28 +120,22 @@ let UmbDocumentTypeWorkspaceViewEditPropertiesElement = class UmbDocumentTypeWor
|
|
|
114
120
|
return { data: { documentTypeId }, value: propertyData };
|
|
115
121
|
})
|
|
116
122
|
.onSubmit((value) => {
|
|
123
|
+
if (!value.dataType) {
|
|
124
|
+
throw new Error('No data type selected');
|
|
125
|
+
}
|
|
117
126
|
__classPrivateFieldGet(this, _UmbDocumentTypeWorkspaceViewEditPropertiesElement_instances, "m", _UmbDocumentTypeWorkspaceViewEditPropertiesElement_addProperty).call(this, value);
|
|
118
127
|
})
|
|
119
128
|
.observeRouteBuilder((routeBuilder) => {
|
|
120
129
|
this._modalRouteNewProperty = routeBuilder(null);
|
|
121
130
|
});
|
|
122
131
|
}
|
|
123
|
-
connectedCallback() {
|
|
124
|
-
super.connectedCallback();
|
|
125
|
-
const doctypes = this._propertyStructureHelper.ownerDocumentTypes;
|
|
126
|
-
if (!doctypes)
|
|
127
|
-
return;
|
|
128
|
-
this.observe(doctypes, (documents) => {
|
|
129
|
-
this._ownerDocumentTypes = documents;
|
|
130
|
-
}, 'observeOwnerDocumentTypes');
|
|
131
|
-
}
|
|
132
132
|
render() {
|
|
133
133
|
return html `<div id="property-list">
|
|
134
134
|
${repeat(this._propertyStructure, (property) => property.id ?? '' + property.container?.id ?? '' + property.sortOrder ?? '', (property) => {
|
|
135
135
|
// Note: This piece might be moved into the property component
|
|
136
136
|
const inheritedFromDocument = this._ownerDocumentTypes?.find((types) => types.containers?.find((containers) => containers.id === property.container?.id));
|
|
137
137
|
return html `<umb-document-type-workspace-view-edit-property
|
|
138
|
-
data-umb-property-id=${
|
|
138
|
+
data-umb-property-id=${property.id}
|
|
139
139
|
owner-document-type-id=${ifDefined(inheritedFromDocument?.unique)}
|
|
140
140
|
owner-document-type-name=${ifDefined(inheritedFromDocument?.name)}
|
|
141
141
|
?inherited=${property.container?.id !== this.containerId}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { nothing } from '../../../../../../external/lit/index.js';
|
|
2
2
|
import { UmbLitElement } from '../../../../../../shared/lit-element/index.js';
|
|
3
|
-
import type { UmbPropertyTypeModel } from '../../../../../core/content-type/index.js';
|
|
3
|
+
import type { UmbPropertyTypeModel, UmbPropertyTypeScaffoldModel } from '../../../../../core/content-type/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* @element umb-document-type-workspace-view-edit-property
|
|
6
6
|
* @description - Element for displaying a property in an workspace.
|
|
@@ -11,12 +11,12 @@ export declare class UmbDocumentTypeWorkspacePropertyElement extends UmbLitEleme
|
|
|
11
11
|
private _property?;
|
|
12
12
|
/**
|
|
13
13
|
* Property, the data object for the property.
|
|
14
|
-
* @type {UmbPropertyTypeModel}
|
|
14
|
+
* @type {UmbPropertyTypeModel | UmbPropertyTypeScaffoldModel | undefined}
|
|
15
15
|
* @attr
|
|
16
16
|
* @default undefined
|
|
17
17
|
*/
|
|
18
|
-
get property(): UmbPropertyTypeModel | undefined;
|
|
19
|
-
set property(value: UmbPropertyTypeModel | undefined);
|
|
18
|
+
get property(): UmbPropertyTypeModel | UmbPropertyTypeScaffoldModel | undefined;
|
|
19
|
+
set property(value: UmbPropertyTypeModel | UmbPropertyTypeScaffoldModel | undefined);
|
|
20
20
|
/**
|
|
21
21
|
* Inherited, Determines if the property is part of the main document type thats being edited.
|
|
22
22
|
* If true, then the property is inherited from another document type, not a part of the main document type.
|
|
@@ -31,7 +31,7 @@ import { UmbTextStyles } from '../../../../../../shared/style/index.js';
|
|
|
31
31
|
let UmbDocumentTypeWorkspacePropertyElement = class UmbDocumentTypeWorkspacePropertyElement extends UmbLitElement {
|
|
32
32
|
/**
|
|
33
33
|
* Property, the data object for the property.
|
|
34
|
-
* @type {UmbPropertyTypeModel}
|
|
34
|
+
* @type {UmbPropertyTypeModel | UmbPropertyTypeScaffoldModel | undefined}
|
|
35
35
|
* @attr
|
|
36
36
|
* @default undefined
|
|
37
37
|
*/
|
|
@@ -42,7 +42,7 @@ let UmbDocumentTypeWorkspacePropertyElement = class UmbDocumentTypeWorkspaceProp
|
|
|
42
42
|
const oldValue = this._property;
|
|
43
43
|
this._property = value;
|
|
44
44
|
__classPrivateFieldGet(this, _UmbDocumentTypeWorkspacePropertyElement_modalRegistration, "f").setUniquePathValue('propertyId', value?.id?.toString());
|
|
45
|
-
this.setDataType(this._property?.dataType
|
|
45
|
+
this.setDataType(this._property?.dataType?.unique);
|
|
46
46
|
this.requestUpdate('property', oldValue);
|
|
47
47
|
}
|
|
48
48
|
get modalRoute() {
|
|
@@ -72,6 +72,9 @@ let UmbDocumentTypeWorkspacePropertyElement = class UmbDocumentTypeWorkspaceProp
|
|
|
72
72
|
return { data: { documentTypeId }, value: propertyData };
|
|
73
73
|
})
|
|
74
74
|
.onSubmit((result) => {
|
|
75
|
+
if (!result.dataType) {
|
|
76
|
+
throw new Error('No dataType found on property');
|
|
77
|
+
}
|
|
75
78
|
this._partialUpdate(result);
|
|
76
79
|
})
|
|
77
80
|
.observeRouteBuilder((routeBuilder) => {
|
|
@@ -209,7 +212,7 @@ let UmbDocumentTypeWorkspacePropertyElement = class UmbDocumentTypeWorkspaceProp
|
|
|
209
212
|
renderPropertyTags() {
|
|
210
213
|
return this.property
|
|
211
214
|
? html `<div class="types">
|
|
212
|
-
${this.property.dataType
|
|
215
|
+
${this.property.dataType?.unique ? html `<uui-tag look="default">${this._dataTypeName}</uui-tag>` : nothing}
|
|
213
216
|
${this.property.variesByCulture
|
|
214
217
|
? html `<uui-tag look="default">
|
|
215
218
|
<uui-icon name="icon-shuffle"></uui-icon> ${this.localize.term('contentTypeEditor_cultureVariantLabel')}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { UmbPropertyContainerTypes, UmbPropertyTypeModel } from '../../../../../core/content-type/index.js';
|
|
2
2
|
import { UmbContentTypePropertyStructureHelper } from '../../../../../core/content-type/index.js';
|
|
3
3
|
import { UmbLitElement } from '../../../../../../shared/lit-element/index.js';
|
|
4
4
|
export declare class UmbDocumentWorkspaceViewEditPropertiesElement extends UmbLitElement {
|
|
5
5
|
get containerName(): string | undefined;
|
|
6
6
|
set containerName(value: string | undefined);
|
|
7
|
-
get containerType():
|
|
8
|
-
set containerType(value:
|
|
7
|
+
get containerType(): UmbPropertyContainerTypes | undefined;
|
|
8
|
+
set containerType(value: UmbPropertyContainerTypes | undefined);
|
|
9
9
|
_propertyStructureHelper: UmbContentTypePropertyStructureHelper<any>;
|
|
10
10
|
_propertyStructure: Array<UmbPropertyTypeModel>;
|
|
11
11
|
constructor();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './media-type-workspace-view-edit-property.element.js';
|
|
2
2
|
import type { UmbMediaTypeDetailModel } from '../../../types.js';
|
|
3
|
-
import type {
|
|
3
|
+
import type { UmbPropertyContainerTypes, UmbPropertyTypeModel } from '../../../../../core/content-type/index.js';
|
|
4
4
|
import { UmbContentTypePropertyStructureHelper } from '../../../../../core/content-type/index.js';
|
|
5
5
|
import { UmbLitElement } from '../../../../../../shared/lit-element/index.js';
|
|
6
6
|
export declare class UmbMediaTypeWorkspaceViewEditPropertiesElement extends UmbLitElement {
|
|
@@ -10,15 +10,14 @@ export declare class UmbMediaTypeWorkspaceViewEditPropertiesElement extends UmbL
|
|
|
10
10
|
set containerId(value: string | undefined);
|
|
11
11
|
get containerName(): string | undefined;
|
|
12
12
|
set containerName(value: string | undefined);
|
|
13
|
-
get containerType():
|
|
14
|
-
set containerType(value:
|
|
13
|
+
get containerType(): UmbPropertyContainerTypes | undefined;
|
|
14
|
+
set containerType(value: UmbPropertyContainerTypes | undefined);
|
|
15
15
|
_propertyStructureHelper: UmbContentTypePropertyStructureHelper<UmbMediaTypeDetailModel>;
|
|
16
16
|
_propertyStructure: Array<UmbPropertyTypeModel>;
|
|
17
17
|
_ownerMediaTypes?: UmbMediaTypeDetailModel[];
|
|
18
18
|
protected _modalRouteNewProperty?: string;
|
|
19
19
|
_sortModeActive?: boolean;
|
|
20
20
|
constructor();
|
|
21
|
-
connectedCallback(): void;
|
|
22
21
|
render(): import("lit-html").TemplateResult<1>;
|
|
23
22
|
static styles: import("../../../../../../external/lit/index.js").CSSResult[];
|
|
24
23
|
}
|
|
@@ -91,12 +91,18 @@ let UmbMediaTypeWorkspaceViewEditPropertiesElement = class UmbMediaTypeWorkspace
|
|
|
91
91
|
}));
|
|
92
92
|
this._propertyStructureHelper = new UmbContentTypePropertyStructureHelper(this);
|
|
93
93
|
this._propertyStructure = [];
|
|
94
|
-
this.consumeContext(UMB_WORKSPACE_CONTEXT, (workspaceContext) => {
|
|
94
|
+
this.consumeContext(UMB_WORKSPACE_CONTEXT, async (workspaceContext) => {
|
|
95
95
|
this._propertyStructureHelper.setStructureManager(workspaceContext.structure);
|
|
96
96
|
this.observe(workspaceContext.isSorting, (isSorting) => {
|
|
97
97
|
this._sortModeActive = isSorting;
|
|
98
98
|
__classPrivateFieldGet(this, _UmbMediaTypeWorkspaceViewEditPropertiesElement_instances, "m", _UmbMediaTypeWorkspaceViewEditPropertiesElement_setModel).call(this, isSorting);
|
|
99
99
|
}, '_observeIsSorting');
|
|
100
|
+
const mediaTypesObservable = await this._propertyStructureHelper.ownerDocumentTypes();
|
|
101
|
+
if (!mediaTypesObservable)
|
|
102
|
+
return;
|
|
103
|
+
this.observe(mediaTypesObservable, (medias) => {
|
|
104
|
+
this._ownerMediaTypes = medias;
|
|
105
|
+
}, 'observeOwnerMediaTypes');
|
|
100
106
|
});
|
|
101
107
|
this.observe(this._propertyStructureHelper.propertyStructure, (propertyStructure) => {
|
|
102
108
|
this._propertyStructure = propertyStructure;
|
|
@@ -114,21 +120,15 @@ let UmbMediaTypeWorkspaceViewEditPropertiesElement = class UmbMediaTypeWorkspace
|
|
|
114
120
|
return { data: { documentTypeId: mediaTypeId }, value: propertyData }; //TODO: Should we have a separate modal for mediaTypes?
|
|
115
121
|
})
|
|
116
122
|
.onSubmit((value) => {
|
|
123
|
+
if (!value.dataType) {
|
|
124
|
+
throw new Error('No data type selected');
|
|
125
|
+
}
|
|
117
126
|
__classPrivateFieldGet(this, _UmbMediaTypeWorkspaceViewEditPropertiesElement_instances, "m", _UmbMediaTypeWorkspaceViewEditPropertiesElement_addProperty).call(this, value);
|
|
118
127
|
})
|
|
119
128
|
.observeRouteBuilder((routeBuilder) => {
|
|
120
129
|
this._modalRouteNewProperty = routeBuilder(null);
|
|
121
130
|
});
|
|
122
131
|
}
|
|
123
|
-
connectedCallback() {
|
|
124
|
-
super.connectedCallback();
|
|
125
|
-
const mediaTypes = this._propertyStructureHelper.ownerDocumentTypes; //TODO: Should we have a separate propertyStructureHelper for mediaTypes?
|
|
126
|
-
if (!mediaTypes)
|
|
127
|
-
return;
|
|
128
|
-
this.observe(mediaTypes, (medias) => {
|
|
129
|
-
this._ownerMediaTypes = medias;
|
|
130
|
-
}, 'observeOwnerMediaTypes');
|
|
131
|
-
}
|
|
132
132
|
render() {
|
|
133
133
|
return html `<div id="property-list">
|
|
134
134
|
${repeat(this._propertyStructure, (property) => property.id ?? '' + property.container?.id ?? '' + property.sortOrder ?? '', (property) => {
|
|
@@ -72,6 +72,9 @@ let UmbMediaTypeWorkspacePropertyElement = class UmbMediaTypeWorkspacePropertyEl
|
|
|
72
72
|
return { data: { documentTypeId: mediaTypeId }, value: propertyData }; //TODO: Should we have a separate modal for mediaTypes?
|
|
73
73
|
})
|
|
74
74
|
.onSubmit((result) => {
|
|
75
|
+
if (!result.dataType) {
|
|
76
|
+
throw new Error('No dataType found on property');
|
|
77
|
+
}
|
|
75
78
|
this._partialUpdate(result);
|
|
76
79
|
})
|
|
77
80
|
.observeRouteBuilder((routeBuilder) => {
|
|
@@ -209,7 +212,7 @@ let UmbMediaTypeWorkspacePropertyElement = class UmbMediaTypeWorkspacePropertyEl
|
|
|
209
212
|
renderPropertyTags() {
|
|
210
213
|
return this.property
|
|
211
214
|
? html `<div class="types">
|
|
212
|
-
${this.property.dataType
|
|
215
|
+
${this.property.dataType?.unique ? html `<uui-tag look="default">${this._dataTypeName}</uui-tag>` : nothing}
|
|
213
216
|
${this.property.variesByCulture
|
|
214
217
|
? html `<uui-tag look="default">
|
|
215
218
|
<uui-icon name="icon-shuffle"></uui-icon> ${this.localize.term('contentTypeEditor_cultureVariantLabel')}
|