@umbraco-cms/backoffice 14.0.0--preview004-52e41be8 → 14.0.0--preview004-f42e3cbb
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 +182 -11
- package/dist-cms/mocks/data/data-type.data.js +29 -1
- package/dist-cms/mocks/data/document-type.data.js +59 -0
- package/dist-cms/mocks/data/document.data.js +14 -1
- package/dist-cms/mocks/data/user-group.data.js +7 -0
- package/dist-cms/packages/core/content-type/components/index.d.ts +1 -0
- package/dist-cms/packages/core/content-type/components/index.js +1 -0
- package/dist-cms/packages/core/content-type/components/input-content-type/index.d.ts +1 -0
- package/dist-cms/packages/core/content-type/components/input-content-type/index.js +1 -0
- package/dist-cms/packages/core/content-type/components/input-content-type/input-content-type.element.d.ts +26 -0
- package/dist-cms/packages/core/content-type/components/input-content-type/input-content-type.element.js +104 -0
- package/dist-cms/packages/core/content-type/index.d.ts +1 -0
- package/dist-cms/packages/core/content-type/index.js +1 -0
- package/dist-cms/packages/core/property-editor/uis/tree-picker/config/start-node/property-editor-ui-tree-picker-start-node.element.d.ts +3 -2
- package/dist-cms/packages/core/property-editor/uis/tree-picker/config/start-node/property-editor-ui-tree-picker-start-node.element.js +13 -10
- package/dist-cms/packages/core/property-editor/uis/tree-picker/manifests.js +1 -1
- package/dist-cms/packages/core/property-editor/uis/tree-picker/property-editor-ui-tree-picker.element.d.ts +10 -1
- package/dist-cms/packages/core/property-editor/uis/tree-picker/property-editor-ui-tree-picker.element.js +52 -4
- package/dist-cms/packages/core/tree/components/index.d.ts +1 -0
- package/dist-cms/packages/core/tree/components/index.js +1 -0
- package/dist-cms/packages/core/tree/components/input-tree/index.d.ts +1 -0
- package/dist-cms/packages/core/tree/components/input-tree/index.js +1 -0
- package/dist-cms/packages/core/tree/components/input-tree/input-tree.element.d.ts +30 -0
- package/dist-cms/packages/core/tree/components/input-tree/input-tree.element.js +127 -0
- package/dist-cms/packages/core/tree/index.d.ts +1 -0
- package/dist-cms/packages/core/tree/index.js +1 -0
- package/dist-cms/packages/documents/documents/components/input-document/input-document.element.js +15 -6
- package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
- package/dist-cms/vscode-html-custom-data.json +85 -3
- package/package.json +1 -1
|
@@ -2105,6 +2105,55 @@
|
|
|
2105
2105
|
}
|
|
2106
2106
|
]
|
|
2107
2107
|
},
|
|
2108
|
+
{
|
|
2109
|
+
"name": "umb-input-content-type",
|
|
2110
|
+
"path": "./../src/packages/core/content-type/components/input-content-type/input-content-type.element.ts",
|
|
2111
|
+
"attributes": [
|
|
2112
|
+
{
|
|
2113
|
+
"name": "type",
|
|
2114
|
+
"type": "ContentType | undefined"
|
|
2115
|
+
},
|
|
2116
|
+
{
|
|
2117
|
+
"name": "node-id",
|
|
2118
|
+
"type": "string",
|
|
2119
|
+
"default": "\"\""
|
|
2120
|
+
},
|
|
2121
|
+
{
|
|
2122
|
+
"name": "dynamic-path",
|
|
2123
|
+
"type": "string",
|
|
2124
|
+
"default": "\"\""
|
|
2125
|
+
}
|
|
2126
|
+
],
|
|
2127
|
+
"properties": [
|
|
2128
|
+
{
|
|
2129
|
+
"name": "type",
|
|
2130
|
+
"attribute": "type",
|
|
2131
|
+
"type": "ContentType | undefined"
|
|
2132
|
+
},
|
|
2133
|
+
{
|
|
2134
|
+
"name": "nodeId",
|
|
2135
|
+
"attribute": "node-id",
|
|
2136
|
+
"type": "string",
|
|
2137
|
+
"default": "\"\""
|
|
2138
|
+
},
|
|
2139
|
+
{
|
|
2140
|
+
"name": "dynamicPath",
|
|
2141
|
+
"attribute": "dynamic-path",
|
|
2142
|
+
"type": "string",
|
|
2143
|
+
"default": "\"\""
|
|
2144
|
+
},
|
|
2145
|
+
{
|
|
2146
|
+
"name": "styles",
|
|
2147
|
+
"type": "array",
|
|
2148
|
+
"default": "[null]"
|
|
2149
|
+
}
|
|
2150
|
+
],
|
|
2151
|
+
"events": [
|
|
2152
|
+
{
|
|
2153
|
+
"name": "change"
|
|
2154
|
+
}
|
|
2155
|
+
]
|
|
2156
|
+
},
|
|
2108
2157
|
{
|
|
2109
2158
|
"name": "umb-input-culture-select",
|
|
2110
2159
|
"path": "./../src/packages/core/culture/components/input-culture-select/input-culture-select.element.ts",
|
|
@@ -4471,28 +4520,24 @@
|
|
|
4471
4520
|
"path": "./../src/packages/core/property-editor/uis/tree-picker/config/start-node/property-editor-ui-tree-picker-start-node.element.ts",
|
|
4472
4521
|
"attributes": [
|
|
4473
4522
|
{
|
|
4474
|
-
"name": "value"
|
|
4475
|
-
"type": "string",
|
|
4476
|
-
"default": "\"\""
|
|
4523
|
+
"name": "value"
|
|
4477
4524
|
}
|
|
4478
4525
|
],
|
|
4479
4526
|
"properties": [
|
|
4480
4527
|
{
|
|
4481
4528
|
"name": "value",
|
|
4482
|
-
"attribute": "value"
|
|
4483
|
-
"type": "string",
|
|
4484
|
-
"default": "\"\""
|
|
4485
|
-
},
|
|
4486
|
-
{
|
|
4487
|
-
"name": "config",
|
|
4488
|
-
"type": "never[]",
|
|
4489
|
-
"default": "[]"
|
|
4529
|
+
"attribute": "value"
|
|
4490
4530
|
},
|
|
4491
4531
|
{
|
|
4492
4532
|
"name": "styles",
|
|
4493
4533
|
"type": "array",
|
|
4494
4534
|
"default": "[\"UmbTextStyles\"]"
|
|
4495
4535
|
}
|
|
4536
|
+
],
|
|
4537
|
+
"events": [
|
|
4538
|
+
{
|
|
4539
|
+
"name": "property-value-change"
|
|
4540
|
+
}
|
|
4496
4541
|
]
|
|
4497
4542
|
},
|
|
4498
4543
|
{
|
|
@@ -4512,6 +4557,35 @@
|
|
|
4512
4557
|
"type": "string",
|
|
4513
4558
|
"default": "\"\""
|
|
4514
4559
|
},
|
|
4560
|
+
{
|
|
4561
|
+
"name": "type"
|
|
4562
|
+
},
|
|
4563
|
+
{
|
|
4564
|
+
"name": "startNodeId",
|
|
4565
|
+
"type": "string | null | undefined"
|
|
4566
|
+
},
|
|
4567
|
+
{
|
|
4568
|
+
"name": "min",
|
|
4569
|
+
"type": "number",
|
|
4570
|
+
"default": "0"
|
|
4571
|
+
},
|
|
4572
|
+
{
|
|
4573
|
+
"name": "max",
|
|
4574
|
+
"type": "number",
|
|
4575
|
+
"default": "0"
|
|
4576
|
+
},
|
|
4577
|
+
{
|
|
4578
|
+
"name": "filter",
|
|
4579
|
+
"type": "string | null | undefined"
|
|
4580
|
+
},
|
|
4581
|
+
{
|
|
4582
|
+
"name": "showOpenButton",
|
|
4583
|
+
"type": "boolean | undefined"
|
|
4584
|
+
},
|
|
4585
|
+
{
|
|
4586
|
+
"name": "ignoreUserStartNodes",
|
|
4587
|
+
"type": "boolean | undefined"
|
|
4588
|
+
},
|
|
4515
4589
|
{
|
|
4516
4590
|
"name": "config"
|
|
4517
4591
|
},
|
|
@@ -4520,6 +4594,11 @@
|
|
|
4520
4594
|
"type": "array",
|
|
4521
4595
|
"default": "[\"UmbTextStyles\"]"
|
|
4522
4596
|
}
|
|
4597
|
+
],
|
|
4598
|
+
"events": [
|
|
4599
|
+
{
|
|
4600
|
+
"name": "property-value-change"
|
|
4601
|
+
}
|
|
4523
4602
|
]
|
|
4524
4603
|
},
|
|
4525
4604
|
{
|
|
@@ -4724,6 +4803,98 @@
|
|
|
4724
4803
|
}
|
|
4725
4804
|
]
|
|
4726
4805
|
},
|
|
4806
|
+
{
|
|
4807
|
+
"name": "umb-input-tree",
|
|
4808
|
+
"path": "./../src/packages/core/tree/components/input-tree/input-tree.element.ts",
|
|
4809
|
+
"attributes": [
|
|
4810
|
+
{
|
|
4811
|
+
"name": "type"
|
|
4812
|
+
},
|
|
4813
|
+
{
|
|
4814
|
+
"name": "startNodeId",
|
|
4815
|
+
"type": "string | undefined"
|
|
4816
|
+
},
|
|
4817
|
+
{
|
|
4818
|
+
"name": "min",
|
|
4819
|
+
"type": "number",
|
|
4820
|
+
"default": "0"
|
|
4821
|
+
},
|
|
4822
|
+
{
|
|
4823
|
+
"name": "max",
|
|
4824
|
+
"type": "number",
|
|
4825
|
+
"default": "0"
|
|
4826
|
+
},
|
|
4827
|
+
{
|
|
4828
|
+
"name": "filter",
|
|
4829
|
+
"type": "string"
|
|
4830
|
+
},
|
|
4831
|
+
{
|
|
4832
|
+
"name": "showOpenButton",
|
|
4833
|
+
"type": "boolean | undefined"
|
|
4834
|
+
},
|
|
4835
|
+
{
|
|
4836
|
+
"name": "ignoreUserStartNodes",
|
|
4837
|
+
"type": "boolean | undefined"
|
|
4838
|
+
},
|
|
4839
|
+
{
|
|
4840
|
+
"name": "value",
|
|
4841
|
+
"type": "string"
|
|
4842
|
+
}
|
|
4843
|
+
],
|
|
4844
|
+
"properties": [
|
|
4845
|
+
{
|
|
4846
|
+
"name": "type",
|
|
4847
|
+
"attribute": "type"
|
|
4848
|
+
},
|
|
4849
|
+
{
|
|
4850
|
+
"name": "startNodeId",
|
|
4851
|
+
"attribute": "startNodeId",
|
|
4852
|
+
"type": "string | undefined"
|
|
4853
|
+
},
|
|
4854
|
+
{
|
|
4855
|
+
"name": "min",
|
|
4856
|
+
"attribute": "min",
|
|
4857
|
+
"type": "number",
|
|
4858
|
+
"default": "0"
|
|
4859
|
+
},
|
|
4860
|
+
{
|
|
4861
|
+
"name": "max",
|
|
4862
|
+
"attribute": "max",
|
|
4863
|
+
"type": "number",
|
|
4864
|
+
"default": "0"
|
|
4865
|
+
},
|
|
4866
|
+
{
|
|
4867
|
+
"name": "filter",
|
|
4868
|
+
"attribute": "filter",
|
|
4869
|
+
"type": "string"
|
|
4870
|
+
},
|
|
4871
|
+
{
|
|
4872
|
+
"name": "showOpenButton",
|
|
4873
|
+
"attribute": "showOpenButton",
|
|
4874
|
+
"type": "boolean | undefined"
|
|
4875
|
+
},
|
|
4876
|
+
{
|
|
4877
|
+
"name": "ignoreUserStartNodes",
|
|
4878
|
+
"attribute": "ignoreUserStartNodes",
|
|
4879
|
+
"type": "boolean | undefined"
|
|
4880
|
+
},
|
|
4881
|
+
{
|
|
4882
|
+
"name": "value",
|
|
4883
|
+
"attribute": "value",
|
|
4884
|
+
"type": "string"
|
|
4885
|
+
},
|
|
4886
|
+
{
|
|
4887
|
+
"name": "selectedIds",
|
|
4888
|
+
"type": "string[]",
|
|
4889
|
+
"default": "[]"
|
|
4890
|
+
},
|
|
4891
|
+
{
|
|
4892
|
+
"name": "styles",
|
|
4893
|
+
"type": "array",
|
|
4894
|
+
"default": "[null]"
|
|
4895
|
+
}
|
|
4896
|
+
]
|
|
4897
|
+
},
|
|
4727
4898
|
{
|
|
4728
4899
|
"name": "umb-entity-tree-item",
|
|
4729
4900
|
"path": "./../src/packages/core/tree/entity-tree-item/entity-tree-item.element.ts",
|
|
@@ -193,7 +193,35 @@ export const data = [
|
|
|
193
193
|
parentId: null,
|
|
194
194
|
propertyEditorAlias: 'Umbraco.MultiNodeTreePicker',
|
|
195
195
|
propertyEditorUiAlias: 'Umb.PropertyEditorUi.TreePicker',
|
|
196
|
-
values: [
|
|
196
|
+
values: [
|
|
197
|
+
{
|
|
198
|
+
alias: 'startNode',
|
|
199
|
+
value: {
|
|
200
|
+
type: 'content',
|
|
201
|
+
id: null,
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
alias: 'minNumber',
|
|
206
|
+
value: 0,
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
alias: 'maxNumber',
|
|
210
|
+
value: 3,
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
alias: 'ignoreUserStartNodes',
|
|
214
|
+
value: false,
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
alias: 'showOpenButton',
|
|
218
|
+
value: true,
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
alias: 'filter',
|
|
222
|
+
value: '',
|
|
223
|
+
},
|
|
224
|
+
],
|
|
197
225
|
},
|
|
198
226
|
{
|
|
199
227
|
type: 'data-type',
|
|
@@ -603,6 +603,56 @@ export const data = [
|
|
|
603
603
|
keepLatestVersionPerDayForDays: null,
|
|
604
604
|
},
|
|
605
605
|
},
|
|
606
|
+
{
|
|
607
|
+
allowedTemplateIds: [],
|
|
608
|
+
defaultTemplateId: null,
|
|
609
|
+
id: 'simple-document-type-id',
|
|
610
|
+
alias: 'blogPost',
|
|
611
|
+
name: 'All property editors document type',
|
|
612
|
+
description: null,
|
|
613
|
+
icon: 'umb:item-arrangement',
|
|
614
|
+
allowedAsRoot: true,
|
|
615
|
+
variesByCulture: true,
|
|
616
|
+
variesBySegment: false,
|
|
617
|
+
isElement: false,
|
|
618
|
+
properties: [
|
|
619
|
+
{
|
|
620
|
+
id: '6',
|
|
621
|
+
containerId: 'all-properties-group-key',
|
|
622
|
+
alias: 'multiNodeTreePicker',
|
|
623
|
+
name: 'Multi Node Tree Picker',
|
|
624
|
+
description: '',
|
|
625
|
+
dataTypeId: 'dt-multiNodeTreePicker',
|
|
626
|
+
variesByCulture: false,
|
|
627
|
+
variesBySegment: false,
|
|
628
|
+
validation: {
|
|
629
|
+
mandatory: true,
|
|
630
|
+
mandatoryMessage: null,
|
|
631
|
+
regEx: null,
|
|
632
|
+
regExMessage: null,
|
|
633
|
+
},
|
|
634
|
+
appearance: {
|
|
635
|
+
labelOnTop: false,
|
|
636
|
+
},
|
|
637
|
+
},
|
|
638
|
+
],
|
|
639
|
+
containers: [
|
|
640
|
+
{
|
|
641
|
+
id: 'all-properties-group-key',
|
|
642
|
+
parentId: null,
|
|
643
|
+
name: 'Content',
|
|
644
|
+
type: 'Group',
|
|
645
|
+
sortOrder: 0,
|
|
646
|
+
},
|
|
647
|
+
],
|
|
648
|
+
allowedContentTypes: [],
|
|
649
|
+
compositions: [],
|
|
650
|
+
cleanup: {
|
|
651
|
+
preventCleanup: false,
|
|
652
|
+
keepAllVersionsNewerThanDays: null,
|
|
653
|
+
keepLatestVersionPerDayForDays: null,
|
|
654
|
+
},
|
|
655
|
+
},
|
|
606
656
|
{
|
|
607
657
|
allowedTemplateIds: [],
|
|
608
658
|
defaultTemplateId: null,
|
|
@@ -1001,6 +1051,15 @@ export const treeData = [
|
|
|
1001
1051
|
parentId: null,
|
|
1002
1052
|
icon: '',
|
|
1003
1053
|
},
|
|
1054
|
+
{
|
|
1055
|
+
name: 'Simple document type',
|
|
1056
|
+
type: 'document-type',
|
|
1057
|
+
hasChildren: false,
|
|
1058
|
+
id: 'simple-document-type-id',
|
|
1059
|
+
isContainer: false,
|
|
1060
|
+
parentId: null,
|
|
1061
|
+
icon: '',
|
|
1062
|
+
},
|
|
1004
1063
|
{
|
|
1005
1064
|
name: 'Page Document Type',
|
|
1006
1065
|
type: 'document-type',
|
|
@@ -526,7 +526,12 @@ export const data = [
|
|
|
526
526
|
],
|
|
527
527
|
},
|
|
528
528
|
{
|
|
529
|
-
urls: [
|
|
529
|
+
urls: [
|
|
530
|
+
{
|
|
531
|
+
culture: 'en-US',
|
|
532
|
+
url: '/',
|
|
533
|
+
},
|
|
534
|
+
],
|
|
530
535
|
templateId: null,
|
|
531
536
|
id: 'simple-document-id',
|
|
532
537
|
contentTypeId: 'simple-document-type-id',
|
|
@@ -541,6 +546,14 @@ export const data = [
|
|
|
541
546
|
updateDate: '2023-02-06T15:32:24.957009',
|
|
542
547
|
},
|
|
543
548
|
],
|
|
549
|
+
values: [
|
|
550
|
+
{
|
|
551
|
+
alias: 'multiNodeTreePicker',
|
|
552
|
+
culture: null,
|
|
553
|
+
segment: null,
|
|
554
|
+
value: null,
|
|
555
|
+
},
|
|
556
|
+
],
|
|
544
557
|
},
|
|
545
558
|
];
|
|
546
559
|
export const treeData = [
|
|
@@ -67,6 +67,13 @@ export const data = [
|
|
|
67
67
|
documentStartNodeId: 'all-property-editors-document-id',
|
|
68
68
|
permissions: [UMB_USER_PERMISSION_DOCUMENT_CREATE, UMB_USER_PERMISSION_DOCUMENT_DELETE],
|
|
69
69
|
},
|
|
70
|
+
{
|
|
71
|
+
id: 'c630d49e-4e7b-42ea-b2bc-edc0edacb6b2',
|
|
72
|
+
name: 'Something',
|
|
73
|
+
icon: 'umb:medal',
|
|
74
|
+
documentStartNodeId: 'simple-document-id',
|
|
75
|
+
permissions: [UMB_USER_PERMISSION_DOCUMENT_CREATE, UMB_USER_PERMISSION_DOCUMENT_DELETE],
|
|
76
|
+
},
|
|
70
77
|
{
|
|
71
78
|
id: '9d24dc47-a4bf-427f-8a4a-b900f03b8a12',
|
|
72
79
|
name: 'User Group 1',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './input-content-type/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './input-content-type/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './input-content-type.element.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './input-content-type.element.js';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
|
|
2
|
+
export type ContentType = 'content' | 'member' | 'media';
|
|
3
|
+
export type StartNode = {
|
|
4
|
+
type?: ContentType;
|
|
5
|
+
id?: string | null;
|
|
6
|
+
query?: string | null;
|
|
7
|
+
};
|
|
8
|
+
declare const UmbInputContentTypeElement_base: (new (...args: any[]) => import("../../../../../external/uui/index.js").FormControlMixinInterface) & typeof UmbLitElement;
|
|
9
|
+
export declare class UmbInputContentTypeElement extends UmbInputContentTypeElement_base {
|
|
10
|
+
#private;
|
|
11
|
+
protected getFormElement(): undefined;
|
|
12
|
+
private _type;
|
|
13
|
+
set type(value: StartNode['type']);
|
|
14
|
+
get type(): StartNode['type'];
|
|
15
|
+
nodeId: string;
|
|
16
|
+
dynamicPath: string;
|
|
17
|
+
_options: Array<Option>;
|
|
18
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
19
|
+
static styles: import("@lit/reactive-element/css-tag").CSSResult[];
|
|
20
|
+
}
|
|
21
|
+
export default UmbInputContentTypeElement;
|
|
22
|
+
declare global {
|
|
23
|
+
interface HTMLElementTagNameMap {
|
|
24
|
+
'umb-input-content-type': UmbInputContentTypeElement;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { html, customElement, property, css, state } from '../../../../../external/lit/index.js';
|
|
8
|
+
import { FormControlMixin } from '../../../../../external/uui/index.js';
|
|
9
|
+
import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
|
|
10
|
+
import { UmbChangeEvent } from '../../../event/index.js';
|
|
11
|
+
export let UmbInputContentTypeElement = class UmbInputContentTypeElement extends FormControlMixin(UmbLitElement) {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this._type = 'content';
|
|
15
|
+
this.nodeId = '';
|
|
16
|
+
this.dynamicPath = '';
|
|
17
|
+
this._options = [
|
|
18
|
+
{ value: 'content', name: 'Content' },
|
|
19
|
+
{ value: 'member', name: 'Members' },
|
|
20
|
+
{ value: 'media', name: 'Media' },
|
|
21
|
+
];
|
|
22
|
+
}
|
|
23
|
+
getFormElement() {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
set type(value) {
|
|
27
|
+
const oldValue = this._type;
|
|
28
|
+
this._options = this._options.map((option) => option.value === value ? { ...option, selected: true } : { ...option, selected: false });
|
|
29
|
+
this._type = value;
|
|
30
|
+
this.requestUpdate('type', oldValue);
|
|
31
|
+
}
|
|
32
|
+
get type() {
|
|
33
|
+
return this._type;
|
|
34
|
+
}
|
|
35
|
+
#onTypeChange(event) {
|
|
36
|
+
this.type = event.target.value;
|
|
37
|
+
// Clear others
|
|
38
|
+
this.nodeId = '';
|
|
39
|
+
this.dynamicPath = '';
|
|
40
|
+
this.dispatchEvent(new UmbChangeEvent());
|
|
41
|
+
}
|
|
42
|
+
#onIdChange(event) {
|
|
43
|
+
this.nodeId = event.target.selectedIds.join('');
|
|
44
|
+
this.dispatchEvent(new CustomEvent('change'));
|
|
45
|
+
}
|
|
46
|
+
render() {
|
|
47
|
+
return html `<umb-input-dropdown-list
|
|
48
|
+
.options=${this._options}
|
|
49
|
+
@change="${this.#onTypeChange}"></umb-input-dropdown-list>
|
|
50
|
+
${this.#renderType()}`;
|
|
51
|
+
}
|
|
52
|
+
#renderType() {
|
|
53
|
+
switch (this.type) {
|
|
54
|
+
case 'content':
|
|
55
|
+
return this.#renderTypeContent();
|
|
56
|
+
case 'media':
|
|
57
|
+
return this.#renderTypeMedia();
|
|
58
|
+
case 'member':
|
|
59
|
+
return this.#renderTypeMember();
|
|
60
|
+
default:
|
|
61
|
+
return 'No type found';
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
#renderTypeContent() {
|
|
65
|
+
const nodeId = this.nodeId ? [this.nodeId] : [];
|
|
66
|
+
//TODO: Dynamic paths
|
|
67
|
+
return html ` <umb-input-document @change=${this.#onIdChange} .selectedIds=${nodeId} max="1"></umb-input-document> `;
|
|
68
|
+
}
|
|
69
|
+
#renderTypeMedia() {
|
|
70
|
+
const nodeId = this.nodeId ? [this.nodeId] : [];
|
|
71
|
+
//TODO => MediaTypes
|
|
72
|
+
return html ` <umb-input-media @change=${this.#onIdChange} .selectedIds=${nodeId} max="1"></umb-input-media> `;
|
|
73
|
+
}
|
|
74
|
+
#renderTypeMember() {
|
|
75
|
+
const nodeId = this.nodeId ? [this.nodeId] : [];
|
|
76
|
+
//TODO => Members
|
|
77
|
+
return html ` <umb-input-member @change=${this.#onIdChange} .selectedIds=${nodeId} max="1"></umb-input-member> `;
|
|
78
|
+
}
|
|
79
|
+
static { this.styles = [
|
|
80
|
+
css `
|
|
81
|
+
:host {
|
|
82
|
+
display: flex;
|
|
83
|
+
flex-direction: column;
|
|
84
|
+
gap: var(--uui-size-4);
|
|
85
|
+
}
|
|
86
|
+
`,
|
|
87
|
+
]; }
|
|
88
|
+
};
|
|
89
|
+
__decorate([
|
|
90
|
+
property()
|
|
91
|
+
], UmbInputContentTypeElement.prototype, "type", null);
|
|
92
|
+
__decorate([
|
|
93
|
+
property({ attribute: 'node-id' })
|
|
94
|
+
], UmbInputContentTypeElement.prototype, "nodeId", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
property({ attribute: 'dynamic-path' })
|
|
97
|
+
], UmbInputContentTypeElement.prototype, "dynamicPath", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
state()
|
|
100
|
+
], UmbInputContentTypeElement.prototype, "_options", void 0);
|
|
101
|
+
UmbInputContentTypeElement = __decorate([
|
|
102
|
+
customElement('umb-input-content-type')
|
|
103
|
+
], UmbInputContentTypeElement);
|
|
104
|
+
export default UmbInputContentTypeElement;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { StartNode } from '../../../../../content-type/index.js';
|
|
1
2
|
import { UmbLitElement } from '../../../../../../../shared/lit-element/index.js';
|
|
2
3
|
/**
|
|
3
4
|
* @element umb-property-editor-ui-tree-picker-start-node
|
|
4
5
|
*/
|
|
5
6
|
export declare class UmbPropertyEditorUITreePickerStartNodeElement extends UmbLitElement {
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
#private;
|
|
8
|
+
value?: StartNode;
|
|
8
9
|
render(): import("lit-html").TemplateResult<1>;
|
|
9
10
|
static styles: import("@lit/reactive-element/css-tag").CSSResult[];
|
|
10
11
|
}
|
|
@@ -5,28 +5,31 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { html, customElement, property } from '../../../../../../../external/lit/index.js';
|
|
8
|
-
import { UmbTextStyles } from
|
|
8
|
+
import { UmbTextStyles } from '../../../../../../../shared/style/index.js';
|
|
9
9
|
import { UmbLitElement } from '../../../../../../../shared/lit-element/index.js';
|
|
10
10
|
/**
|
|
11
11
|
* @element umb-property-editor-ui-tree-picker-start-node
|
|
12
12
|
*/
|
|
13
13
|
export let UmbPropertyEditorUITreePickerStartNodeElement = class UmbPropertyEditorUITreePickerStartNodeElement extends UmbLitElement {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
this.value =
|
|
17
|
-
|
|
14
|
+
#onChange(event) {
|
|
15
|
+
const target = event.target;
|
|
16
|
+
this.value = {
|
|
17
|
+
type: target.type,
|
|
18
|
+
id: target.nodeId,
|
|
19
|
+
query: target.dynamicPath,
|
|
20
|
+
};
|
|
21
|
+
this.dispatchEvent(new CustomEvent('property-value-change'));
|
|
18
22
|
}
|
|
19
23
|
render() {
|
|
20
|
-
return html `<
|
|
24
|
+
return html `<umb-input-content-type
|
|
25
|
+
@change="${this.#onChange}"
|
|
26
|
+
.type=${this.value?.type}></umb-input-content-type>`;
|
|
21
27
|
}
|
|
22
28
|
static { this.styles = [UmbTextStyles]; }
|
|
23
29
|
};
|
|
24
30
|
__decorate([
|
|
25
|
-
property()
|
|
31
|
+
property({ type: Object })
|
|
26
32
|
], UmbPropertyEditorUITreePickerStartNodeElement.prototype, "value", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
property({ type: Array, attribute: false })
|
|
29
|
-
], UmbPropertyEditorUITreePickerStartNodeElement.prototype, "config", void 0);
|
|
30
33
|
UmbPropertyEditorUITreePickerStartNodeElement = __decorate([
|
|
31
34
|
customElement('umb-property-editor-ui-tree-picker-start-node')
|
|
32
35
|
], UmbPropertyEditorUITreePickerStartNodeElement);
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
import { UmbPropertyEditorUiElement } from '../../../extension-registry/index.js';
|
|
2
2
|
import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
|
|
3
3
|
import { UmbPropertyEditorConfigCollection } from '../../index.js';
|
|
4
|
+
import { StartNode } from '../../../content-type/index.js';
|
|
4
5
|
/**
|
|
5
6
|
* @element umb-property-editor-ui-tree-picker
|
|
6
7
|
*/
|
|
7
8
|
export declare class UmbPropertyEditorUITreePickerElement extends UmbLitElement implements UmbPropertyEditorUiElement {
|
|
9
|
+
#private;
|
|
8
10
|
value: string;
|
|
9
|
-
|
|
11
|
+
type?: StartNode['type'];
|
|
12
|
+
startNodeId?: string | null;
|
|
13
|
+
min: number;
|
|
14
|
+
max: number;
|
|
15
|
+
filter?: string | null;
|
|
16
|
+
showOpenButton?: boolean;
|
|
17
|
+
ignoreUserStartNodes?: boolean;
|
|
18
|
+
set config(config: UmbPropertyEditorConfigCollection | undefined);
|
|
10
19
|
render(): import("lit-html").TemplateResult<1>;
|
|
11
20
|
static styles: import("@lit/reactive-element/css-tag").CSSResult[];
|
|
12
21
|
}
|