@umbraco-cms/backoffice 14.0.0--preview007-b64c7cb9 → 14.0.0--preview007-dd76e4de
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 +0 -16
- package/dist-cms/mocks/data/document-type/document-type.data.js +47 -0
- package/dist-cms/packages/documents/document-types/components/input-document-type/input-document-type.element.d.ts +1 -0
- package/dist-cms/packages/documents/document-types/components/input-document-type/input-document-type.element.js +3 -0
- package/dist-cms/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit-properties.element.d.ts +1 -1
- package/dist-cms/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit-properties.element.js +100 -66
- package/dist-cms/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit-property.element.js +8 -0
- package/dist-cms/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit-tab.element.d.ts +2 -7
- package/dist-cms/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit-tab.element.js +145 -101
- package/dist-cms/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit.element.d.ts +1 -5
- package/dist-cms/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit.element.js +89 -63
- package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
- package/dist-cms/vscode-html-custom-data.json +2 -2
- package/package.json +1 -1
|
@@ -6263,11 +6263,6 @@
|
|
|
6263
6263
|
}
|
|
6264
6264
|
],
|
|
6265
6265
|
"properties": [
|
|
6266
|
-
{
|
|
6267
|
-
"name": "config",
|
|
6268
|
-
"type": "UmbSorterConfig<PropertyTypeContainerModelBaseModel>",
|
|
6269
|
-
"default": "{}"
|
|
6270
|
-
},
|
|
6271
6266
|
{
|
|
6272
6267
|
"name": "ownerTabId",
|
|
6273
6268
|
"attribute": "ownerTabId",
|
|
@@ -6287,9 +6282,6 @@
|
|
|
6287
6282
|
"name": "styles",
|
|
6288
6283
|
"type": "array",
|
|
6289
6284
|
"default": "[\"UmbTextStyles\",null]"
|
|
6290
|
-
},
|
|
6291
|
-
{
|
|
6292
|
-
"name": "sorter"
|
|
6293
6285
|
}
|
|
6294
6286
|
]
|
|
6295
6287
|
},
|
|
@@ -6297,18 +6289,10 @@
|
|
|
6297
6289
|
"name": "umb-document-type-workspace-view-edit",
|
|
6298
6290
|
"path": "./../src/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit.element.ts",
|
|
6299
6291
|
"properties": [
|
|
6300
|
-
{
|
|
6301
|
-
"name": "config",
|
|
6302
|
-
"type": "UmbSorterConfig<PropertyTypeContainerModelBaseModel>",
|
|
6303
|
-
"default": "{}"
|
|
6304
|
-
},
|
|
6305
6292
|
{
|
|
6306
6293
|
"name": "styles",
|
|
6307
6294
|
"type": "array",
|
|
6308
6295
|
"default": "[\"UmbTextStyles\",null]"
|
|
6309
|
-
},
|
|
6310
|
-
{
|
|
6311
|
-
"name": "sorter"
|
|
6312
6296
|
}
|
|
6313
6297
|
]
|
|
6314
6298
|
},
|
|
@@ -1004,6 +1004,46 @@ export const data = [
|
|
|
1004
1004
|
labelOnTop: false,
|
|
1005
1005
|
},
|
|
1006
1006
|
},
|
|
1007
|
+
{
|
|
1008
|
+
id: 'a92de6ac-1a22-4a45-a481-b6cae1cccbba',
|
|
1009
|
+
container: { id: '2e845ca8-1e3e-4b03-be1d-0b4149ce2120' },
|
|
1010
|
+
alias: 'alchemyElement',
|
|
1011
|
+
name: 'Alchemy Element',
|
|
1012
|
+
description: null,
|
|
1013
|
+
dataType: { id: '0cc0eba1-9960-42c9-bf9b-60e150b429ae' },
|
|
1014
|
+
variesByCulture: false,
|
|
1015
|
+
variesBySegment: false,
|
|
1016
|
+
sortOrder: 0,
|
|
1017
|
+
validation: {
|
|
1018
|
+
mandatory: false,
|
|
1019
|
+
mandatoryMessage: null,
|
|
1020
|
+
regEx: null,
|
|
1021
|
+
regExMessage: null,
|
|
1022
|
+
},
|
|
1023
|
+
appearance: {
|
|
1024
|
+
labelOnTop: false,
|
|
1025
|
+
},
|
|
1026
|
+
},
|
|
1027
|
+
{
|
|
1028
|
+
id: 'c92de6ac-1a22-4a45-a481-b6cae1cccbba',
|
|
1029
|
+
container: { id: '2e845ca8-1e3e-4b03-be1d-0b4149ce2120' },
|
|
1030
|
+
alias: 'acidScale',
|
|
1031
|
+
name: 'Acid Scale',
|
|
1032
|
+
description: null,
|
|
1033
|
+
dataType: { id: '0cc0eba1-9960-42c9-bf9b-60e150b429ae' },
|
|
1034
|
+
variesByCulture: false,
|
|
1035
|
+
variesBySegment: false,
|
|
1036
|
+
sortOrder: 0,
|
|
1037
|
+
validation: {
|
|
1038
|
+
mandatory: false,
|
|
1039
|
+
mandatoryMessage: null,
|
|
1040
|
+
regEx: null,
|
|
1041
|
+
regExMessage: null,
|
|
1042
|
+
},
|
|
1043
|
+
appearance: {
|
|
1044
|
+
labelOnTop: false,
|
|
1045
|
+
},
|
|
1046
|
+
},
|
|
1007
1047
|
],
|
|
1008
1048
|
containers: [
|
|
1009
1049
|
{
|
|
@@ -1013,6 +1053,13 @@ export const data = [
|
|
|
1013
1053
|
type: 'Group',
|
|
1014
1054
|
sortOrder: 0,
|
|
1015
1055
|
},
|
|
1056
|
+
{
|
|
1057
|
+
id: '2e845ca8-1e3e-4b03-be1d-0b4149ce2120',
|
|
1058
|
+
parent: null,
|
|
1059
|
+
name: 'Alchemy',
|
|
1060
|
+
type: 'Group',
|
|
1061
|
+
sortOrder: 0,
|
|
1062
|
+
},
|
|
1016
1063
|
],
|
|
1017
1064
|
allowedDocumentTypes: [],
|
|
1018
1065
|
compositions: [],
|
|
@@ -42,6 +42,7 @@ export declare class UmbInputDocumentTypeElement extends UmbInputDocumentTypeEle
|
|
|
42
42
|
get selectedIds(): Array<string>;
|
|
43
43
|
set selectedIds(ids: Array<string> | undefined);
|
|
44
44
|
set value(idsString: string);
|
|
45
|
+
get value(): string;
|
|
45
46
|
private _items?;
|
|
46
47
|
private _editDocumentTypePath;
|
|
47
48
|
constructor();
|
|
@@ -51,6 +51,9 @@ let UmbInputDocumentTypeElement = class UmbInputDocumentTypeElement extends Form
|
|
|
51
51
|
// Its with full purpose we don't call super.value, as thats being handled by the observation of the context selection.
|
|
52
52
|
this.selectedIds = splitStringToArray(idsString);
|
|
53
53
|
}
|
|
54
|
+
get value() {
|
|
55
|
+
return this.selectedIds.join(',');
|
|
56
|
+
}
|
|
54
57
|
constructor() {
|
|
55
58
|
super();
|
|
56
59
|
_UmbInputDocumentTypeElement_instances.add(this);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import './document-type-workspace-view-edit-property.element.js';
|
|
2
2
|
import type { UmbDocumentTypeDetailModel } from '../../../types.js';
|
|
3
|
+
import { UmbLitElement } from '../../../../../core/lit-element/index.js';
|
|
3
4
|
import type { UmbPropertyContainerTypes, UmbPropertyTypeModel } from '../../../../../core/content-type/index.js';
|
|
4
5
|
import { UmbContentTypePropertyStructureHelper } from '../../../../../core/content-type/index.js';
|
|
5
|
-
import { UmbLitElement } from '../../../../../core/lit-element/index.js';
|
|
6
6
|
export declare class UmbDocumentTypeWorkspaceViewEditPropertiesElement extends UmbLitElement {
|
|
7
7
|
#private;
|
|
8
8
|
private _containerId;
|
|
@@ -9,27 +9,21 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
9
9
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
10
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
11
|
};
|
|
12
|
-
var
|
|
12
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
13
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
14
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
15
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
16
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
17
|
+
};
|
|
18
|
+
var _UmbDocumentTypeWorkspaceViewEditPropertiesElement_instances, _UmbDocumentTypeWorkspaceViewEditPropertiesElement_model, _UmbDocumentTypeWorkspaceViewEditPropertiesElement_sorter, _UmbDocumentTypeWorkspaceViewEditPropertiesElement_addProperty;
|
|
13
19
|
import './document-type-workspace-view-edit-property.element.js';
|
|
20
|
+
import { UmbLitElement } from '../../../../../core/lit-element/index.js';
|
|
14
21
|
import { css, html, customElement, property, state, repeat, ifDefined } from '../../../../../../external/lit/index.js';
|
|
15
22
|
import { UmbTextStyles } from '../../../../../../shared/style/index.js';
|
|
16
23
|
import { UmbContentTypePropertyStructureHelper } from '../../../../../core/content-type/index.js';
|
|
17
24
|
import { UmbSorterController } from '../../../../../core/sorter/index.js';
|
|
18
|
-
import { UmbLitElement } from '../../../../../core/lit-element/index.js';
|
|
19
25
|
import { UMB_WORKSPACE_CONTEXT } from '../../../../../core/workspace/index.js';
|
|
20
26
|
import { UMB_PROPERTY_SETTINGS_MODAL, UmbModalRouteRegistrationController } from '../../../../../core/modal/index.js';
|
|
21
|
-
const SORTER_CONFIG = {
|
|
22
|
-
getUniqueOfElement: (element) => {
|
|
23
|
-
return element.getAttribute('data-umb-property-id');
|
|
24
|
-
},
|
|
25
|
-
getUniqueOfModel: (modelEntry) => {
|
|
26
|
-
return modelEntry.id;
|
|
27
|
-
},
|
|
28
|
-
identifier: 'content-type-property-sorter',
|
|
29
|
-
itemSelector: '[data-umb-property-id]',
|
|
30
|
-
disabledItemSelector: '[inherited]',
|
|
31
|
-
containerSelector: '#property-list',
|
|
32
|
-
};
|
|
33
27
|
let UmbDocumentTypeWorkspaceViewEditPropertiesElement = class UmbDocumentTypeWorkspaceViewEditPropertiesElement extends UmbLitElement {
|
|
34
28
|
get containerId() {
|
|
35
29
|
return this._containerId;
|
|
@@ -56,37 +50,64 @@ let UmbDocumentTypeWorkspaceViewEditPropertiesElement = class UmbDocumentTypeWor
|
|
|
56
50
|
constructor() {
|
|
57
51
|
super();
|
|
58
52
|
_UmbDocumentTypeWorkspaceViewEditPropertiesElement_instances.add(this);
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
sortOrder =
|
|
69
|
-
(this._propertyStructure[Math.min(args.newIndex, this._propertyStructure.length - 1)].sortOrder ?? 0) + 1;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
return this._propertyStructureHelper.insertProperty(args.item, sortOrder);
|
|
53
|
+
_UmbDocumentTypeWorkspaceViewEditPropertiesElement_model.set(this, []);
|
|
54
|
+
_UmbDocumentTypeWorkspaceViewEditPropertiesElement_sorter.set(this, new UmbSorterController(this, {
|
|
55
|
+
getUniqueOfElement: (element) => {
|
|
56
|
+
return element.getAttribute('data-umb-property-id');
|
|
57
|
+
},
|
|
58
|
+
getUniqueOfModel: (modelEntry) => {
|
|
59
|
+
return modelEntry.id;
|
|
73
60
|
},
|
|
74
|
-
|
|
75
|
-
|
|
61
|
+
identifier: 'document-type-property-sorter',
|
|
62
|
+
itemSelector: 'umb-document-type-workspace-view-edit-property',
|
|
63
|
+
//disabledItemSelector: '[inherited]',
|
|
64
|
+
//TODO: Set the property list (sorter wrapper) to inherited, if its inherited
|
|
65
|
+
// This is because we don't want to move local properties into an inherited group container.
|
|
66
|
+
// Or maybe we do, but we still need to check if the group exists locally, if not, then it needs to be created before we move a property into it.
|
|
67
|
+
// TODO: Fix bug where a local property turn into an inherited when moved to a new group container.
|
|
68
|
+
containerSelector: '#property-list',
|
|
69
|
+
onChange: ({ item, model }) => {
|
|
70
|
+
__classPrivateFieldSet(this, _UmbDocumentTypeWorkspaceViewEditPropertiesElement_model, model, "f");
|
|
71
|
+
this._propertyStructure = model;
|
|
76
72
|
},
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
73
|
+
onEnd: ({ item }) => {
|
|
74
|
+
/** Explanation: If the item is the first in list, we compare it to the item behind it to set a sortOrder.
|
|
75
|
+
* If it's not the first in list, we will compare to the item in before it, and check the following item to see if it caused overlapping sortOrder, then update
|
|
76
|
+
* the overlap if true, which may cause another overlap, so we loop through them till no more overlaps...
|
|
77
|
+
*/
|
|
78
|
+
const model = __classPrivateFieldGet(this, _UmbDocumentTypeWorkspaceViewEditPropertiesElement_model, "f");
|
|
79
|
+
const newIndex = model.findIndex((entry) => entry.id === item.id);
|
|
80
|
+
// Doesn't exist in model
|
|
81
|
+
if (newIndex === -1)
|
|
82
|
+
return;
|
|
83
|
+
// First in list
|
|
84
|
+
if (newIndex === 0 && model.length > 1) {
|
|
85
|
+
this._propertyStructureHelper.partialUpdateProperty(item.id, {
|
|
86
|
+
sortOrder: model[1].sortOrder - 1,
|
|
87
|
+
container: this._containerId ? { id: this._containerId } : null,
|
|
88
|
+
});
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
// Not first in list
|
|
92
|
+
if (newIndex > 0 && model.length > 1) {
|
|
93
|
+
const prevItemSortOrder = model[newIndex - 1].sortOrder;
|
|
94
|
+
let weight = 1;
|
|
95
|
+
this._propertyStructureHelper.partialUpdateProperty(item.id, {
|
|
96
|
+
sortOrder: prevItemSortOrder + weight,
|
|
97
|
+
container: this._containerId ? { id: this._containerId } : null,
|
|
98
|
+
});
|
|
99
|
+
// Check for overlaps
|
|
100
|
+
model.some((entry, index) => {
|
|
101
|
+
if (index <= newIndex)
|
|
102
|
+
return;
|
|
103
|
+
if (entry.sortOrder === prevItemSortOrder + weight) {
|
|
104
|
+
weight++;
|
|
105
|
+
this._propertyStructureHelper.partialUpdateProperty(entry.id, { sortOrder: prevItemSortOrder + weight });
|
|
106
|
+
}
|
|
107
|
+
// Break the loop
|
|
108
|
+
return true;
|
|
109
|
+
});
|
|
88
110
|
}
|
|
89
|
-
return this._propertyStructureHelper.insertProperty(args.item, sortOrder);
|
|
90
111
|
},
|
|
91
112
|
}));
|
|
92
113
|
this._propertyStructureHelper = new UmbContentTypePropertyStructureHelper(this);
|
|
@@ -95,7 +116,12 @@ let UmbDocumentTypeWorkspaceViewEditPropertiesElement = class UmbDocumentTypeWor
|
|
|
95
116
|
this._propertyStructureHelper.setStructureManager(workspaceContext.structure);
|
|
96
117
|
this.observe(workspaceContext.isSorting, (isSorting) => {
|
|
97
118
|
this._sortModeActive = isSorting;
|
|
98
|
-
|
|
119
|
+
if (isSorting) {
|
|
120
|
+
__classPrivateFieldGet(this, _UmbDocumentTypeWorkspaceViewEditPropertiesElement_sorter, "f").setModel(this._propertyStructure);
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
__classPrivateFieldGet(this, _UmbDocumentTypeWorkspaceViewEditPropertiesElement_sorter, "f").setModel([]);
|
|
124
|
+
}
|
|
99
125
|
}, '_observeIsSorting');
|
|
100
126
|
const docTypesObservable = await this._propertyStructureHelper.ownerDocumentTypes();
|
|
101
127
|
if (!docTypesObservable)
|
|
@@ -106,6 +132,12 @@ let UmbDocumentTypeWorkspaceViewEditPropertiesElement = class UmbDocumentTypeWor
|
|
|
106
132
|
});
|
|
107
133
|
this.observe(this._propertyStructureHelper.propertyStructure, (propertyStructure) => {
|
|
108
134
|
this._propertyStructure = propertyStructure;
|
|
135
|
+
if (this._sortModeActive) {
|
|
136
|
+
__classPrivateFieldGet(this, _UmbDocumentTypeWorkspaceViewEditPropertiesElement_sorter, "f").setModel(this._propertyStructure);
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
__classPrivateFieldGet(this, _UmbDocumentTypeWorkspaceViewEditPropertiesElement_sorter, "f").setModel([]);
|
|
140
|
+
}
|
|
109
141
|
});
|
|
110
142
|
// Note: Route for adding a new property
|
|
111
143
|
new UmbModalRouteRegistrationController(this, UMB_PROPERTY_SETTINGS_MODAL)
|
|
@@ -130,26 +162,30 @@ let UmbDocumentTypeWorkspaceViewEditPropertiesElement = class UmbDocumentTypeWor
|
|
|
130
162
|
});
|
|
131
163
|
}
|
|
132
164
|
render() {
|
|
133
|
-
return html
|
|
134
|
-
|
|
165
|
+
return html `
|
|
166
|
+
<div id="property-list" ?sort-mode-active=${this._sortModeActive}>
|
|
167
|
+
${repeat(this._propertyStructure, (property) => '' + property.container?.id + property.id + '' + property.sortOrder, (property) => {
|
|
135
168
|
// Note: This piece might be moved into the property component
|
|
136
169
|
const inheritedFromDocument = this._ownerDocumentTypes?.find((types) => types.containers?.find((containers) => containers.id === property.container?.id));
|
|
137
|
-
return html
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
170
|
+
return html `
|
|
171
|
+
<umb-document-type-workspace-view-edit-property
|
|
172
|
+
data-umb-property-id=${property.id}
|
|
173
|
+
owner-document-type-id=${ifDefined(inheritedFromDocument?.unique)}
|
|
174
|
+
owner-document-type-name=${ifDefined(inheritedFromDocument?.name)}
|
|
175
|
+
?inherited=${property.container?.id !== this.containerId}
|
|
176
|
+
?sort-mode-active=${this._sortModeActive}
|
|
177
|
+
.property=${property}
|
|
178
|
+
@partial-property-update=${(event) => {
|
|
145
179
|
this._propertyStructureHelper.partialUpdateProperty(property.id, event.detail);
|
|
146
180
|
}}
|
|
147
|
-
|
|
181
|
+
@property-delete=${() => {
|
|
148
182
|
this._propertyStructureHelper.removeProperty(property.id);
|
|
149
183
|
}}>
|
|
150
|
-
|
|
184
|
+
</umb-document-type-workspace-view-edit-property>
|
|
185
|
+
`;
|
|
151
186
|
})}
|
|
152
187
|
</div>
|
|
188
|
+
|
|
153
189
|
${!this._sortModeActive
|
|
154
190
|
? html `<uui-button
|
|
155
191
|
label=${this.localize.term('contentTypeEditor_addProperty')}
|
|
@@ -158,20 +194,13 @@ let UmbDocumentTypeWorkspaceViewEditPropertiesElement = class UmbDocumentTypeWor
|
|
|
158
194
|
href=${ifDefined(this._modalRouteNewProperty)}>
|
|
159
195
|
<umb-localize key="contentTypeEditor_addProperty">Add property</umb-localize>
|
|
160
196
|
</uui-button> `
|
|
161
|
-
: ''}
|
|
197
|
+
: ''}
|
|
198
|
+
`;
|
|
162
199
|
}
|
|
163
200
|
};
|
|
164
|
-
|
|
201
|
+
_UmbDocumentTypeWorkspaceViewEditPropertiesElement_model = new WeakMap();
|
|
202
|
+
_UmbDocumentTypeWorkspaceViewEditPropertiesElement_sorter = new WeakMap();
|
|
165
203
|
_UmbDocumentTypeWorkspaceViewEditPropertiesElement_instances = new WeakSet();
|
|
166
|
-
_UmbDocumentTypeWorkspaceViewEditPropertiesElement_setModel = function _UmbDocumentTypeWorkspaceViewEditPropertiesElement_setModel(isSorting) {
|
|
167
|
-
if (isSorting) {
|
|
168
|
-
__classPrivateFieldGet(this, _UmbDocumentTypeWorkspaceViewEditPropertiesElement_propertySorter, "f").setModel(this._propertyStructure);
|
|
169
|
-
}
|
|
170
|
-
else {
|
|
171
|
-
// TODO: Make a more proper way to disable sorting:
|
|
172
|
-
__classPrivateFieldGet(this, _UmbDocumentTypeWorkspaceViewEditPropertiesElement_propertySorter, "f").setModel([]);
|
|
173
|
-
}
|
|
174
|
-
};
|
|
175
204
|
_UmbDocumentTypeWorkspaceViewEditPropertiesElement_addProperty = async function _UmbDocumentTypeWorkspaceViewEditPropertiesElement_addProperty(propertyData) {
|
|
176
205
|
const propertyPlaceholder = await this._propertyStructureHelper.addProperty(this._containerId);
|
|
177
206
|
if (!propertyPlaceholder)
|
|
@@ -184,6 +213,11 @@ UmbDocumentTypeWorkspaceViewEditPropertiesElement.styles = [
|
|
|
184
213
|
#add {
|
|
185
214
|
width: 100%;
|
|
186
215
|
}
|
|
216
|
+
|
|
217
|
+
#property-list[sort-mode-active]:not(:has(umb-document-type-workspace-view-edit-property)) {
|
|
218
|
+
/* Some height so that the sorter can target the area if the group is empty*/
|
|
219
|
+
min-height: var(--uui-size-layout-1);
|
|
220
|
+
}
|
|
187
221
|
`,
|
|
188
222
|
];
|
|
189
223
|
__decorate([
|
|
@@ -112,6 +112,7 @@ let UmbDocumentTypeWorkspacePropertyElement = class UmbDocumentTypeWorkspaceProp
|
|
|
112
112
|
type="number"
|
|
113
113
|
?readonly=${this.inherited}
|
|
114
114
|
label="sort order"
|
|
115
|
+
@change=${(e) => this._partialUpdate({ sortOrder: parseInt(e.target.value) || 0 })}
|
|
115
116
|
.value=${this.property.sortOrder ?? 0}></uui-input>
|
|
116
117
|
`;
|
|
117
118
|
}
|
|
@@ -440,6 +441,13 @@ UmbDocumentTypeWorkspacePropertyElement.styles = [
|
|
|
440
441
|
a {
|
|
441
442
|
color: inherit;
|
|
442
443
|
}
|
|
444
|
+
|
|
445
|
+
:host([drag-placeholder]) {
|
|
446
|
+
opacity: 0.5;
|
|
447
|
+
}
|
|
448
|
+
:host([drag-placeholder]) uui-input {
|
|
449
|
+
visibility: hidden;
|
|
450
|
+
}
|
|
443
451
|
`,
|
|
444
452
|
];
|
|
445
453
|
__decorate([
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import type { UmbDocumentTypeDetailModel } from '../../../types.js';
|
|
2
|
-
import { UmbContentTypeContainerStructureHelper } from '../../../../../core/content-type/index.js';
|
|
3
2
|
import { UmbLitElement } from '../../../../../core/lit-element/index.js';
|
|
4
|
-
import type
|
|
5
|
-
import type { UmbSorterConfig } from '../../../../../core/sorter/index.js';
|
|
6
|
-
import { UmbSorterController } from '../../../../../core/sorter/index.js';
|
|
3
|
+
import { UmbContentTypeContainerStructureHelper, type UmbPropertyTypeContainerModel } from '../../../../../core/content-type/index.js';
|
|
7
4
|
import './document-type-workspace-view-edit-properties.element.js';
|
|
8
5
|
export declare class UmbDocumentTypeWorkspaceViewEditTabElement extends UmbLitElement {
|
|
9
6
|
#private;
|
|
10
|
-
sorter?: UmbSorterController<PropertyTypeContainerModelBaseModel>;
|
|
11
|
-
config: UmbSorterConfig<PropertyTypeContainerModelBaseModel>;
|
|
12
7
|
private _ownerTabId?;
|
|
13
8
|
get ownerTabId(): string | null | undefined;
|
|
14
9
|
set ownerTabId(value: string | null | undefined);
|
|
@@ -19,7 +14,7 @@ export declare class UmbDocumentTypeWorkspaceViewEditTabElement extends UmbLitEl
|
|
|
19
14
|
get noTabName(): boolean;
|
|
20
15
|
set noTabName(value: boolean);
|
|
21
16
|
_groupStructureHelper: UmbContentTypeContainerStructureHelper<UmbDocumentTypeDetailModel>;
|
|
22
|
-
_groups: Array<
|
|
17
|
+
_groups: Array<UmbPropertyTypeContainerModel>;
|
|
23
18
|
_hasProperties: boolean;
|
|
24
19
|
_sortModeActive?: boolean;
|
|
25
20
|
constructor();
|