@umbraco-cms/backoffice 14.0.0--preview004-07058ebe → 14.0.0--preview004-c2e8b331
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 +28 -26
- package/dist-cms/packages/core/components/variant-selector/variant-selector.element.d.ts +1 -0
- package/dist-cms/packages/core/components/variant-selector/variant-selector.element.js +22 -2
- package/dist-cms/packages/core/modal/common/icon-picker/icon-picker-modal.element.js +1 -1
- package/dist-cms/packages/core/property-editor/schemas/Umbraco.ContentPicker.d.ts +2 -0
- package/dist-cms/packages/{documents/documents/property-editors → core/property-editor/schemas}/Umbraco.ContentPicker.js +1 -1
- package/dist-cms/packages/core/property-editor/schemas/Umbraco.Dropdown.Flexible.js +1 -1
- package/dist-cms/packages/core/property-editor/schemas/Umbraco.ListView.js +1 -1
- package/dist-cms/packages/core/property-editor/schemas/manifests.js +2 -0
- package/dist-cms/packages/core/property-editor/uis/collection-view/config/bulk-action-permissions/property-editor-ui-collection-view-bulk-action-permissions.element.d.ts +11 -1
- package/dist-cms/packages/core/property-editor/uis/collection-view/config/bulk-action-permissions/property-editor-ui-collection-view-bulk-action-permissions.element.js +68 -6
- package/dist-cms/packages/core/property-editor/uis/collection-view/config/column-configuration/property-editor-ui-collection-view-column-configuration.element.d.ts +10 -1
- package/dist-cms/packages/core/property-editor/uis/collection-view/config/column-configuration/property-editor-ui-collection-view-column-configuration.element.js +139 -5
- package/dist-cms/packages/core/property-editor/uis/collection-view/config/layout-configuration/property-editor-ui-collection-view-layout-configuration.element.d.ts +13 -1
- package/dist-cms/packages/core/property-editor/uis/collection-view/config/layout-configuration/property-editor-ui-collection-view-layout-configuration.element.js +139 -6
- package/dist-cms/packages/core/property-editor/uis/collection-view/config/order-by/property-editor-ui-collection-view-order-by.element.d.ts +5 -1
- package/dist-cms/packages/core/property-editor/uis/collection-view/config/order-by/property-editor-ui-collection-view-order-by.element.js +24 -4
- package/dist-cms/packages/core/property-editor/uis/dropdown/manifests.js +1 -1
- package/dist-cms/packages/core/property-editor/uis/icon-picker/property-editor-ui-icon-picker.element.d.ts +6 -2
- package/dist-cms/packages/core/property-editor/uis/icon-picker/property-editor-ui-icon-picker.element.js +48 -11
- package/dist-cms/packages/core/property-editor/uis/image-crops-configuration/property-editor-ui-image-crops-configuration.element.js +5 -2
- package/dist-cms/packages/core/property-editor/uis/order-direction/property-editor-ui-order-direction.element.d.ts +1 -0
- package/dist-cms/packages/core/property-editor/uis/order-direction/property-editor-ui-order-direction.element.js +21 -4
- package/dist-cms/packages/core/property-editor/uis/value-type/property-editor-ui-value-type.element.d.ts +2 -0
- package/dist-cms/packages/core/property-editor/uis/value-type/property-editor-ui-value-type.element.js +6 -1
- package/dist-cms/packages/documents/documents/property-editors/document-picker/manifests.js +0 -12
- package/dist-cms/packages/documents/documents/property-editors/manifests.js +1 -2
- package/dist-cms/packages/settings/languages/app-language-select/app-language-select.element.js +1 -1
- package/dist-cms/shared/resources/extractUmbColorVariable.function.d.ts +1 -0
- package/dist-cms/shared/resources/extractUmbColorVariable.function.js +15 -0
- package/dist-cms/shared/resources/index.d.ts +1 -0
- package/dist-cms/shared/resources/index.js +1 -0
- package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
- package/dist-cms/vscode-html-custom-data.json +17 -13
- package/package.json +1 -1
- package/dist-cms/packages/documents/documents/property-editors/Umbraco.ContentPicker.d.ts +0 -2
|
@@ -3664,16 +3664,14 @@
|
|
|
3664
3664
|
"attributes": [
|
|
3665
3665
|
{
|
|
3666
3666
|
"name": "value",
|
|
3667
|
-
"type": "
|
|
3668
|
-
"default": "\"\""
|
|
3667
|
+
"type": "BulkActionPermissions"
|
|
3669
3668
|
}
|
|
3670
3669
|
],
|
|
3671
3670
|
"properties": [
|
|
3672
3671
|
{
|
|
3673
3672
|
"name": "value",
|
|
3674
3673
|
"attribute": "value",
|
|
3675
|
-
"type": "
|
|
3676
|
-
"default": "\"\""
|
|
3674
|
+
"type": "BulkActionPermissions"
|
|
3677
3675
|
},
|
|
3678
3676
|
{
|
|
3679
3677
|
"name": "config"
|
|
@@ -3681,7 +3679,7 @@
|
|
|
3681
3679
|
{
|
|
3682
3680
|
"name": "styles",
|
|
3683
3681
|
"type": "array",
|
|
3684
|
-
"default": "[\"UmbTextStyles\"]"
|
|
3682
|
+
"default": "[\"UmbTextStyles\",null]"
|
|
3685
3683
|
}
|
|
3686
3684
|
]
|
|
3687
3685
|
},
|
|
@@ -3691,16 +3689,16 @@
|
|
|
3691
3689
|
"attributes": [
|
|
3692
3690
|
{
|
|
3693
3691
|
"name": "value",
|
|
3694
|
-
"type": "
|
|
3695
|
-
"default": "
|
|
3692
|
+
"type": "ColumnConfig[]",
|
|
3693
|
+
"default": "[]"
|
|
3696
3694
|
}
|
|
3697
3695
|
],
|
|
3698
3696
|
"properties": [
|
|
3699
3697
|
{
|
|
3700
3698
|
"name": "value",
|
|
3701
3699
|
"attribute": "value",
|
|
3702
|
-
"type": "
|
|
3703
|
-
"default": "
|
|
3700
|
+
"type": "ColumnConfig[]",
|
|
3701
|
+
"default": "[]"
|
|
3704
3702
|
},
|
|
3705
3703
|
{
|
|
3706
3704
|
"name": "config"
|
|
@@ -3708,7 +3706,7 @@
|
|
|
3708
3706
|
{
|
|
3709
3707
|
"name": "styles",
|
|
3710
3708
|
"type": "array",
|
|
3711
|
-
"default": "[\"UmbTextStyles\"]"
|
|
3709
|
+
"default": "[\"UmbTextStyles\",null]"
|
|
3712
3710
|
}
|
|
3713
3711
|
]
|
|
3714
3712
|
},
|
|
@@ -3718,16 +3716,16 @@
|
|
|
3718
3716
|
"attributes": [
|
|
3719
3717
|
{
|
|
3720
3718
|
"name": "value",
|
|
3721
|
-
"type": "
|
|
3722
|
-
"default": "
|
|
3719
|
+
"type": "LayoutConfig[]",
|
|
3720
|
+
"default": "[]"
|
|
3723
3721
|
}
|
|
3724
3722
|
],
|
|
3725
3723
|
"properties": [
|
|
3726
3724
|
{
|
|
3727
3725
|
"name": "value",
|
|
3728
3726
|
"attribute": "value",
|
|
3729
|
-
"type": "
|
|
3730
|
-
"default": "
|
|
3727
|
+
"type": "LayoutConfig[]",
|
|
3728
|
+
"default": "[]"
|
|
3731
3729
|
},
|
|
3732
3730
|
{
|
|
3733
3731
|
"name": "config"
|
|
@@ -3735,7 +3733,7 @@
|
|
|
3735
3733
|
{
|
|
3736
3734
|
"name": "styles",
|
|
3737
3735
|
"type": "array",
|
|
3738
|
-
"default": "[\"UmbTextStyles\"]"
|
|
3736
|
+
"default": "[\"UmbTextStyles\",null]"
|
|
3739
3737
|
}
|
|
3740
3738
|
]
|
|
3741
3739
|
},
|
|
@@ -3745,16 +3743,14 @@
|
|
|
3745
3743
|
"attributes": [
|
|
3746
3744
|
{
|
|
3747
3745
|
"name": "value",
|
|
3748
|
-
"type": "string"
|
|
3749
|
-
"default": "\"\""
|
|
3746
|
+
"type": "string"
|
|
3750
3747
|
}
|
|
3751
3748
|
],
|
|
3752
3749
|
"properties": [
|
|
3753
3750
|
{
|
|
3754
3751
|
"name": "value",
|
|
3755
3752
|
"attribute": "value",
|
|
3756
|
-
"type": "string"
|
|
3757
|
-
"default": "\"\""
|
|
3753
|
+
"type": "string"
|
|
3758
3754
|
},
|
|
3759
3755
|
{
|
|
3760
3756
|
"name": "config"
|
|
@@ -3937,16 +3933,14 @@
|
|
|
3937
3933
|
"attributes": [
|
|
3938
3934
|
{
|
|
3939
3935
|
"name": "value",
|
|
3940
|
-
"type": "string"
|
|
3941
|
-
"default": "\"\""
|
|
3936
|
+
"type": "string"
|
|
3942
3937
|
}
|
|
3943
3938
|
],
|
|
3944
3939
|
"properties": [
|
|
3945
3940
|
{
|
|
3946
3941
|
"name": "value",
|
|
3947
3942
|
"attribute": "value",
|
|
3948
|
-
"type": "string"
|
|
3949
|
-
"default": "\"\""
|
|
3943
|
+
"type": "string"
|
|
3950
3944
|
},
|
|
3951
3945
|
{
|
|
3952
3946
|
"name": "config"
|
|
@@ -3956,6 +3950,11 @@
|
|
|
3956
3950
|
"type": "array",
|
|
3957
3951
|
"default": "[\"UmbTextStyles\"]"
|
|
3958
3952
|
}
|
|
3953
|
+
],
|
|
3954
|
+
"events": [
|
|
3955
|
+
{
|
|
3956
|
+
"name": "property-value-change"
|
|
3957
|
+
}
|
|
3959
3958
|
]
|
|
3960
3959
|
},
|
|
3961
3960
|
{
|
|
@@ -4316,7 +4315,7 @@
|
|
|
4316
4315
|
{
|
|
4317
4316
|
"name": "value",
|
|
4318
4317
|
"type": "string",
|
|
4319
|
-
"default": "\"\""
|
|
4318
|
+
"default": "\"asc\""
|
|
4320
4319
|
}
|
|
4321
4320
|
],
|
|
4322
4321
|
"properties": [
|
|
@@ -4324,7 +4323,7 @@
|
|
|
4324
4323
|
"name": "value",
|
|
4325
4324
|
"attribute": "value",
|
|
4326
4325
|
"type": "string",
|
|
4327
|
-
"default": "\"\""
|
|
4326
|
+
"default": "\"asc\""
|
|
4328
4327
|
},
|
|
4329
4328
|
{
|
|
4330
4329
|
"name": "config"
|
|
@@ -4332,7 +4331,7 @@
|
|
|
4332
4331
|
{
|
|
4333
4332
|
"name": "styles",
|
|
4334
4333
|
"type": "array",
|
|
4335
|
-
"default": "[\"UmbTextStyles\"]"
|
|
4334
|
+
"default": "[\"UmbTextStyles\",null]"
|
|
4336
4335
|
}
|
|
4337
4336
|
]
|
|
4338
4337
|
},
|
|
@@ -4831,6 +4830,9 @@
|
|
|
4831
4830
|
"attribute": "value",
|
|
4832
4831
|
"type": "string | undefined"
|
|
4833
4832
|
},
|
|
4833
|
+
{
|
|
4834
|
+
"name": "selectEl"
|
|
4835
|
+
},
|
|
4834
4836
|
{
|
|
4835
4837
|
"name": "config"
|
|
4836
4838
|
},
|
|
@@ -3,6 +3,7 @@ import { UmbLitElement } from '../../../../shared/lit-element/index.js';
|
|
|
3
3
|
import { DocumentVariantResponseModel } from '../../../../external/backend-api/index.js';
|
|
4
4
|
export declare class UmbVariantSelectorElement extends UmbLitElement {
|
|
5
5
|
#private;
|
|
6
|
+
private _popoverElement?;
|
|
6
7
|
_variants: Array<DocumentVariantResponseModel>;
|
|
7
8
|
_activeVariants: Array<ActiveVariant>;
|
|
8
9
|
get _activeVariantsCultures(): string[];
|
|
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { UmbVariantId } from '../../variant/variant-id.class.js';
|
|
8
8
|
import { UUIInputEvent } from '../../../../external/uui/index.js';
|
|
9
|
-
import { css, html, nothing, customElement, property, state, ifDefined } from '../../../../external/lit/index.js';
|
|
9
|
+
import { css, html, nothing, customElement, property, state, ifDefined, query, } from '../../../../external/lit/index.js';
|
|
10
10
|
import { UMB_WORKSPACE_SPLIT_VIEW_CONTEXT, UMB_VARIANT_CONTEXT, isNameablePropertySetContext, } from '../../workspace/index.js';
|
|
11
11
|
import { UmbLitElement } from '../../../../shared/lit-element/index.js';
|
|
12
12
|
import { ContentStateModel } from '../../../../external/backend-api/index.js';
|
|
@@ -104,8 +104,18 @@ let UmbVariantSelectorElement = class UmbVariantSelectorElement extends UmbLitEl
|
|
|
104
104
|
_isNotPublishedMode(culture, state) {
|
|
105
105
|
return state !== ContentStateModel.PUBLISHED && !this._isVariantActive(culture);
|
|
106
106
|
}
|
|
107
|
+
// TODO: This ignorer is just needed for JSON SCHEMA TO WORK, As its not updated with latest TS jet.
|
|
108
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
109
|
+
// @ts-ignore
|
|
107
110
|
#onPopoverToggle(event) {
|
|
108
111
|
this._variantSelectorOpen = event.newState === 'open';
|
|
112
|
+
if (!this._popoverElement)
|
|
113
|
+
return;
|
|
114
|
+
const isOpen = event.newState === 'open';
|
|
115
|
+
if (!isOpen)
|
|
116
|
+
return;
|
|
117
|
+
const host = this.getBoundingClientRect();
|
|
118
|
+
this._popoverElement.style.width = `${host.width}px`;
|
|
109
119
|
}
|
|
110
120
|
render() {
|
|
111
121
|
return html `
|
|
@@ -133,7 +143,10 @@ let UmbVariantSelectorElement = class UmbVariantSelectorElement extends UmbLitEl
|
|
|
133
143
|
|
|
134
144
|
${this._variants && this._variants.length > 0
|
|
135
145
|
? html `
|
|
136
|
-
<uui-popover-container
|
|
146
|
+
<uui-popover-container
|
|
147
|
+
id="variant-selector-popover"
|
|
148
|
+
@beforetoggle=${this.#onPopoverToggle}
|
|
149
|
+
placement="bottom-end">
|
|
137
150
|
<div id="variant-selector-dropdown">
|
|
138
151
|
<uui-scroll-container>
|
|
139
152
|
<ul>
|
|
@@ -182,6 +195,10 @@ let UmbVariantSelectorElement = class UmbVariantSelectorElement extends UmbLitEl
|
|
|
182
195
|
white-space: nowrap;
|
|
183
196
|
}
|
|
184
197
|
|
|
198
|
+
#variant-selector-popover {
|
|
199
|
+
translate: 1px; /* Fixes tiny alignment issue caused by border */
|
|
200
|
+
}
|
|
201
|
+
|
|
185
202
|
#variant-selector-dropdown {
|
|
186
203
|
overflow: hidden;
|
|
187
204
|
z-index: -1;
|
|
@@ -294,6 +311,9 @@ let UmbVariantSelectorElement = class UmbVariantSelectorElement extends UmbLitEl
|
|
|
294
311
|
`,
|
|
295
312
|
]; }
|
|
296
313
|
};
|
|
314
|
+
__decorate([
|
|
315
|
+
query('#variant-selector-popover')
|
|
316
|
+
], UmbVariantSelectorElement.prototype, "_popoverElement", void 0);
|
|
297
317
|
__decorate([
|
|
298
318
|
state()
|
|
299
319
|
], UmbVariantSelectorElement.prototype, "_variants", void 0);
|
|
@@ -42,7 +42,7 @@ let UmbIconPickerModalElement = class UmbIconPickerModalElement extends UmbModal
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
#onColorChange(e) {
|
|
45
|
-
this.modalContext?.updateValue({
|
|
45
|
+
this.modalContext?.updateValue({ color: e.target.value });
|
|
46
46
|
}
|
|
47
47
|
connectedCallback() {
|
|
48
48
|
super.connectedCallback();
|
|
@@ -3,7 +3,7 @@ export const manifest = {
|
|
|
3
3
|
name: 'Content Picker',
|
|
4
4
|
alias: 'Umbraco.ContentPicker',
|
|
5
5
|
meta: {
|
|
6
|
-
defaultPropertyEditorUiAlias: 'Umb.PropertyEditorUi.
|
|
6
|
+
defaultPropertyEditorUiAlias: 'Umb.PropertyEditorUi.DocumentPicker',
|
|
7
7
|
settings: {
|
|
8
8
|
properties: [
|
|
9
9
|
{
|
|
@@ -2,6 +2,7 @@ import { manifest as blockGrid } from './Umbraco.BlockGrid.js';
|
|
|
2
2
|
import { manifest as blockList } from './Umbraco.BlockList.js';
|
|
3
3
|
import { manifest as checkboxList } from './Umbraco.CheckboxList.js';
|
|
4
4
|
import { manifest as colorPicker } from './Umbraco.ColorPicker.js';
|
|
5
|
+
import { manifest as contentPicker } from './Umbraco.ContentPicker.js';
|
|
5
6
|
import { manifest as dateTime } from './Umbraco.DateTime.js';
|
|
6
7
|
import { manifest as decimal } from './Umbraco.Decimal.js';
|
|
7
8
|
import { manifest as dropdownFlexible } from './Umbraco.Dropdown.Flexible.js';
|
|
@@ -33,6 +34,7 @@ export const manifests = [
|
|
|
33
34
|
blockList,
|
|
34
35
|
checkboxList,
|
|
35
36
|
colorPicker,
|
|
37
|
+
contentPicker,
|
|
36
38
|
dateTime,
|
|
37
39
|
decimal,
|
|
38
40
|
dropdownFlexible,
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import { UmbPropertyEditorUiElement } from '../../../../../extension-registry/index.js';
|
|
2
2
|
import { UmbPropertyEditorConfigCollection } from '../../../../index.js';
|
|
3
3
|
import { UmbLitElement } from '../../../../../../../shared/lit-element/index.js';
|
|
4
|
+
interface BulkActionPermissions {
|
|
5
|
+
allowBulkCopy: boolean;
|
|
6
|
+
allowBulkDelete: boolean;
|
|
7
|
+
allowBulkMove: boolean;
|
|
8
|
+
allowBulkPublish: boolean;
|
|
9
|
+
allowBulkUnpublish: boolean;
|
|
10
|
+
}
|
|
4
11
|
/**
|
|
5
12
|
* @element umb-property-editor-ui-collection-view-bulk-action-permissions
|
|
6
13
|
*/
|
|
7
14
|
export declare class UmbPropertyEditorUICollectionViewBulkActionPermissionsElement extends UmbLitElement implements UmbPropertyEditorUiElement {
|
|
8
|
-
|
|
15
|
+
#private;
|
|
16
|
+
private _value;
|
|
17
|
+
set value(obj: BulkActionPermissions);
|
|
18
|
+
get value(): BulkActionPermissions;
|
|
9
19
|
config?: UmbPropertyEditorConfigCollection;
|
|
10
20
|
render(): import("lit-html").TemplateResult<1>;
|
|
11
21
|
static styles: import("@lit/reactive-element/css-tag").CSSResult[];
|
|
@@ -4,7 +4,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
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
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { html, customElement, property } from '../../../../../../../external/lit/index.js';
|
|
7
|
+
import { html, customElement, property, css } from '../../../../../../../external/lit/index.js';
|
|
8
|
+
import { UmbPropertyValueChangeEvent, } from '../../../../index.js';
|
|
8
9
|
import { UmbTextStyles } from '../../../../../../../shared/style/index.js';
|
|
9
10
|
import { UmbLitElement } from '../../../../../../../shared/lit-element/index.js';
|
|
10
11
|
/**
|
|
@@ -13,16 +14,77 @@ import { UmbLitElement } from '../../../../../../../shared/lit-element/index.js'
|
|
|
13
14
|
let UmbPropertyEditorUICollectionViewBulkActionPermissionsElement = class UmbPropertyEditorUICollectionViewBulkActionPermissionsElement extends UmbLitElement {
|
|
14
15
|
constructor() {
|
|
15
16
|
super(...arguments);
|
|
16
|
-
this.
|
|
17
|
+
this._value = {
|
|
18
|
+
allowBulkPublish: false,
|
|
19
|
+
allowBulkUnpublish: false,
|
|
20
|
+
allowBulkCopy: false,
|
|
21
|
+
allowBulkDelete: false,
|
|
22
|
+
allowBulkMove: false,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
set value(obj) {
|
|
26
|
+
if (!obj)
|
|
27
|
+
return;
|
|
28
|
+
this._value = obj;
|
|
29
|
+
}
|
|
30
|
+
get value() {
|
|
31
|
+
return this._value;
|
|
32
|
+
}
|
|
33
|
+
#onChange(e, type) {
|
|
34
|
+
switch (type) {
|
|
35
|
+
case 'allowBulkPublish':
|
|
36
|
+
this.value = { ...this.value, allowBulkPublish: e.target.checked };
|
|
37
|
+
break;
|
|
38
|
+
case 'allowBulkUnpublish':
|
|
39
|
+
this.value = { ...this.value, allowBulkUnpublish: e.target.checked };
|
|
40
|
+
break;
|
|
41
|
+
case 'allowBulkMove':
|
|
42
|
+
this.value = { ...this.value, allowBulkMove: e.target.checked };
|
|
43
|
+
break;
|
|
44
|
+
case 'allowBulkCopy':
|
|
45
|
+
this.value = { ...this.value, allowBulkCopy: e.target.checked };
|
|
46
|
+
break;
|
|
47
|
+
case 'allowBulkDelete':
|
|
48
|
+
this.value = { ...this.value, allowBulkDelete: e.target.checked };
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
this.dispatchEvent(new UmbPropertyValueChangeEvent());
|
|
17
52
|
}
|
|
18
53
|
render() {
|
|
19
|
-
return html `<
|
|
54
|
+
return html `<uui-toggle
|
|
55
|
+
?checked=${this.value.allowBulkUnpublish}
|
|
56
|
+
@change=${(e) => this.#onChange(e, 'allowBulkPublish')}
|
|
57
|
+
label="Allow bulk publish (content only)"></uui-toggle>
|
|
58
|
+
<uui-toggle
|
|
59
|
+
?checked=${this.value.allowBulkUnpublish}
|
|
60
|
+
@change=${(e) => this.#onChange(e, 'allowBulkUnpublish')}
|
|
61
|
+
label="Allow bulk unpublish (content only)"></uui-toggle>
|
|
62
|
+
<uui-toggle
|
|
63
|
+
?checked=${this.value.allowBulkCopy}
|
|
64
|
+
@change=${(e) => this.#onChange(e, 'allowBulkCopy')}
|
|
65
|
+
label="Allow bulk copy (content only)"></uui-toggle>
|
|
66
|
+
<uui-toggle
|
|
67
|
+
?checked=${this.value.allowBulkMove}
|
|
68
|
+
@change=${(e) => this.#onChange(e, 'allowBulkMove')}
|
|
69
|
+
label="Allow bulk move"></uui-toggle>
|
|
70
|
+
<uui-toggle
|
|
71
|
+
?checked=${this.value.allowBulkDelete}
|
|
72
|
+
@change=${(e) => this.#onChange(e, 'allowBulkDelete')}
|
|
73
|
+
label="Allow bulk delete"></uui-toggle> `;
|
|
20
74
|
}
|
|
21
|
-
static { this.styles = [
|
|
75
|
+
static { this.styles = [
|
|
76
|
+
UmbTextStyles,
|
|
77
|
+
css `
|
|
78
|
+
:host {
|
|
79
|
+
display: flex;
|
|
80
|
+
flex-direction: column;
|
|
81
|
+
}
|
|
82
|
+
`,
|
|
83
|
+
]; }
|
|
22
84
|
};
|
|
23
85
|
__decorate([
|
|
24
|
-
property()
|
|
25
|
-
], UmbPropertyEditorUICollectionViewBulkActionPermissionsElement.prototype, "value",
|
|
86
|
+
property({ type: Object })
|
|
87
|
+
], UmbPropertyEditorUICollectionViewBulkActionPermissionsElement.prototype, "value", null);
|
|
26
88
|
__decorate([
|
|
27
89
|
property({ type: Object, attribute: false })
|
|
28
90
|
], UmbPropertyEditorUICollectionViewBulkActionPermissionsElement.prototype, "config", void 0);
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
import { UmbPropertyEditorUiElement } from '../../../../../extension-registry/index.js';
|
|
2
2
|
import { UmbPropertyEditorConfigCollection } from '../../../../index.js';
|
|
3
3
|
import { UmbLitElement } from '../../../../../../../shared/lit-element/index.js';
|
|
4
|
+
interface ColumnConfig {
|
|
5
|
+
alias: string;
|
|
6
|
+
header: string;
|
|
7
|
+
isSystem: boolean;
|
|
8
|
+
nameTemplate?: string;
|
|
9
|
+
}
|
|
4
10
|
/**
|
|
5
11
|
* @element umb-property-editor-ui-collection-view-column-configuration
|
|
6
12
|
*/
|
|
7
13
|
export declare class UmbPropertyEditorUICollectionViewColumnConfigurationElement extends UmbLitElement implements UmbPropertyEditorUiElement {
|
|
8
|
-
|
|
14
|
+
#private;
|
|
15
|
+
value: Array<ColumnConfig>;
|
|
9
16
|
config?: UmbPropertyEditorConfigCollection;
|
|
17
|
+
private _options;
|
|
18
|
+
private _selectEl;
|
|
10
19
|
render(): import("lit-html").TemplateResult<1>;
|
|
11
20
|
static styles: import("@lit/reactive-element/css-tag").CSSResult[];
|
|
12
21
|
}
|
|
@@ -4,7 +4,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
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
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { html, customElement, property } from '../../../../../../../external/lit/index.js';
|
|
7
|
+
import { html, customElement, property, repeat, css, query } from '../../../../../../../external/lit/index.js';
|
|
8
|
+
import { UmbPropertyValueChangeEvent, } from '../../../../index.js';
|
|
8
9
|
import { UmbTextStyles } from '../../../../../../../shared/style/index.js';
|
|
9
10
|
import { UmbLitElement } from '../../../../../../../shared/lit-element/index.js';
|
|
10
11
|
/**
|
|
@@ -13,19 +14,152 @@ import { UmbLitElement } from '../../../../../../../shared/lit-element/index.js'
|
|
|
13
14
|
let UmbPropertyEditorUICollectionViewColumnConfigurationElement = class UmbPropertyEditorUICollectionViewColumnConfigurationElement extends UmbLitElement {
|
|
14
15
|
constructor() {
|
|
15
16
|
super(...arguments);
|
|
16
|
-
this.value =
|
|
17
|
+
this.value = [];
|
|
18
|
+
this._options = [
|
|
19
|
+
{ value: 'sortOrder', name: this.localize.term('general_sort'), group: 'System Fields' },
|
|
20
|
+
{ value: 'updateDate', name: this.localize.term('content_updateDate'), group: 'System Fields' },
|
|
21
|
+
{ value: 'updater', name: this.localize.term('content_updatedBy'), group: 'System Fields' },
|
|
22
|
+
{ value: 'createDate', name: this.localize.term('content_createDate'), group: 'System Fields' },
|
|
23
|
+
{ value: 'owner', name: this.localize.term('content_createBy'), group: 'System Fields' },
|
|
24
|
+
{ value: 'published', name: this.localize.term('content_isPublished'), group: 'System Fields' },
|
|
25
|
+
{ value: 'contentTypeAlias', name: this.localize.term('content_documentType'), group: 'System Fields' },
|
|
26
|
+
{ value: 'email', name: this.localize.term('general_email'), group: 'System Fields' },
|
|
27
|
+
{ value: 'username', name: this.localize.term('general_username'), group: 'System Fields' },
|
|
28
|
+
/*
|
|
29
|
+
{ value: 'contentTreePicker', name: 'contentTreePicker', group: 'Custom Fields' },
|
|
30
|
+
{ value: 'ete', name: 'ete', group: 'Custom Fields' },
|
|
31
|
+
{ value: 'link', name: 'link', group: 'Custom Fields' },
|
|
32
|
+
{ value: 'listViewContent', name: 'listViewContent', group: 'Custom Fields' },
|
|
33
|
+
{ value: 'mediaTreepicker', name: 'mediaTreepicker', group: 'Custom Fields' },
|
|
34
|
+
{ value: 'memberTreepicker', name: 'memberTreepicker', group: 'Custom Fields' },
|
|
35
|
+
{ value: 'multinode', name: 'multinode', group: 'Custom Fields' },
|
|
36
|
+
{ value: 'richtext', name: 'richtext', group: 'Custom Fields' },
|
|
37
|
+
{ value: 'text', name: 'text', group: 'Custom Fields' },
|
|
38
|
+
{ value: 'umbracoBytes', name: 'umbracoBytes', group: 'Custom Fields' },
|
|
39
|
+
{ value: 'umbracoExtension', name: 'umbracoExtension', group: 'Custom Fields' },
|
|
40
|
+
{ value: 'umbracoFile', name: 'umbracoFile', group: 'Custom Fields' },
|
|
41
|
+
{ value: 'umbracoHeight', name: 'umbracoHeight', group: 'Custom Fields' },
|
|
42
|
+
{ value: 'umbracoMemberComments', name: 'umbracoMemberComments', group: 'Custom Fields' },
|
|
43
|
+
{ value: 'umbracoWidth', name: 'umbracoWidth', group: 'Custom Fields' },
|
|
44
|
+
{ value: 'uploadAFile', name: 'uploadAFile', group: 'Custom Fields' },
|
|
45
|
+
{ value: 'uploader', name: 'uploader', group: 'Custom Fields' },
|
|
46
|
+
*/
|
|
47
|
+
];
|
|
48
|
+
}
|
|
49
|
+
#onAdd() {
|
|
50
|
+
const selected = this._options.find((config) => config.value === this._selectEl.value);
|
|
51
|
+
if (!selected)
|
|
52
|
+
return;
|
|
53
|
+
const duplicate = this.value.find((config) => selected?.value === config.alias);
|
|
54
|
+
if (duplicate) {
|
|
55
|
+
this._selectEl.error = true;
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
this._selectEl.error = false;
|
|
60
|
+
}
|
|
61
|
+
const config = {
|
|
62
|
+
alias: selected.value,
|
|
63
|
+
header: selected.name,
|
|
64
|
+
isSystem: selected?.group === 'System Fields',
|
|
65
|
+
};
|
|
66
|
+
this.value = [...this.value, config];
|
|
67
|
+
this.dispatchEvent(new UmbPropertyValueChangeEvent());
|
|
68
|
+
}
|
|
69
|
+
#onRemove(unique) {
|
|
70
|
+
const newValue = [];
|
|
71
|
+
this.value.forEach((config) => {
|
|
72
|
+
if (config.alias !== unique)
|
|
73
|
+
newValue.push(config);
|
|
74
|
+
});
|
|
75
|
+
this.value = newValue;
|
|
76
|
+
this.dispatchEvent(new UmbPropertyValueChangeEvent());
|
|
77
|
+
}
|
|
78
|
+
#onHeaderChange(e, configuration) {
|
|
79
|
+
this.value = this.value.map((config) => config.alias === configuration.alias ? { ...config, header: e.target.value } : config);
|
|
80
|
+
this.dispatchEvent(new UmbPropertyValueChangeEvent());
|
|
81
|
+
}
|
|
82
|
+
#onTemplateChange(e, configuration) {
|
|
83
|
+
this.value = this.value.map((config) => config.alias === configuration.alias ? { ...config, nameTemplate: e.target.value } : config);
|
|
84
|
+
this.dispatchEvent(new UmbPropertyValueChangeEvent());
|
|
17
85
|
}
|
|
18
86
|
render() {
|
|
19
|
-
return html `<div>
|
|
87
|
+
return html `<div>
|
|
88
|
+
<uui-select .options=${this._options} label="Select"></uui-select>
|
|
89
|
+
<uui-button label=${this.localize.term('general_add')} look="secondary" @click=${this.#onAdd}></uui-button>
|
|
90
|
+
</div>
|
|
91
|
+
${this.#renderTable()}`;
|
|
20
92
|
}
|
|
21
|
-
|
|
93
|
+
#renderTable() {
|
|
94
|
+
if (this.value && !this.value.length)
|
|
95
|
+
return;
|
|
96
|
+
return html `<uui-table>
|
|
97
|
+
<uui-table-row>
|
|
98
|
+
<uui-table-head-cell style="width:0"></uui-table-head-cell>
|
|
99
|
+
<uui-table-head-cell>Alias</uui-table-head-cell>
|
|
100
|
+
<uui-table-head-cell>Header</uui-table-head-cell>
|
|
101
|
+
<uui-table-head-cell>Template</uui-table-head-cell>
|
|
102
|
+
<uui-table-head-cell style="width:0"></uui-table-head-cell>
|
|
103
|
+
</uui-table-row>
|
|
104
|
+
${repeat(this.value, (configuration) => configuration.alias, (configuration) => html `<uui-table-row>
|
|
105
|
+
<uui-table-cell><uui-icon name="icon-navigation"></uui-icon></uui-table-cell>
|
|
106
|
+
${configuration.isSystem
|
|
107
|
+
? this.#renderSystemFieldRow(configuration)
|
|
108
|
+
: this.#renderCustomFieldRow(configuration)}
|
|
109
|
+
<uui-table-cell>
|
|
110
|
+
<uui-button label="delete" look="secondary" @click=${() => this.#onRemove(configuration.alias)}
|
|
111
|
+
>Remove</uui-button
|
|
112
|
+
>
|
|
113
|
+
</uui-table-cell>
|
|
114
|
+
</uui-table-row> `)}
|
|
115
|
+
</uui-table>`;
|
|
116
|
+
}
|
|
117
|
+
#renderSystemFieldRow(configuration) {
|
|
118
|
+
return html `
|
|
119
|
+
<uui-table-cell><strong>${configuration.alias}</strong><small>(system field)</small></uui-table-cell>
|
|
120
|
+
<uui-table-cell>${configuration.header}</uui-table-cell>
|
|
121
|
+
<uui-table-cell></uui-table-cell>
|
|
122
|
+
`;
|
|
123
|
+
}
|
|
124
|
+
#renderCustomFieldRow(configuration) {
|
|
125
|
+
return html `
|
|
126
|
+
<uui-table-cell><strong>${configuration.alias}</strong></uui-table-cell>
|
|
127
|
+
<uui-table-cell>
|
|
128
|
+
<uui-input
|
|
129
|
+
label="header"
|
|
130
|
+
.value=${configuration.header ?? ''}
|
|
131
|
+
required
|
|
132
|
+
@change=${(e) => this.#onHeaderChange(e, configuration)}></uui-input>
|
|
133
|
+
</uui-table-cell>
|
|
134
|
+
<uui-table-cell>
|
|
135
|
+
<uui-input
|
|
136
|
+
label="template"
|
|
137
|
+
.value=${configuration.nameTemplate ?? ''}
|
|
138
|
+
@change=${(e) => this.#onTemplateChange(e, configuration)}></uui-input>
|
|
139
|
+
</uui-table-cell>
|
|
140
|
+
`;
|
|
141
|
+
}
|
|
142
|
+
static { this.styles = [
|
|
143
|
+
UmbTextStyles,
|
|
144
|
+
css `
|
|
145
|
+
strong {
|
|
146
|
+
display: block;
|
|
147
|
+
}
|
|
148
|
+
uui-input {
|
|
149
|
+
width: 100%;
|
|
150
|
+
}
|
|
151
|
+
`,
|
|
152
|
+
]; }
|
|
22
153
|
};
|
|
23
154
|
__decorate([
|
|
24
|
-
property()
|
|
155
|
+
property({ type: Array })
|
|
25
156
|
], UmbPropertyEditorUICollectionViewColumnConfigurationElement.prototype, "value", void 0);
|
|
26
157
|
__decorate([
|
|
27
158
|
property({ type: Object, attribute: false })
|
|
28
159
|
], UmbPropertyEditorUICollectionViewColumnConfigurationElement.prototype, "config", void 0);
|
|
160
|
+
__decorate([
|
|
161
|
+
query('uui-select')
|
|
162
|
+
], UmbPropertyEditorUICollectionViewColumnConfigurationElement.prototype, "_selectEl", void 0);
|
|
29
163
|
UmbPropertyEditorUICollectionViewColumnConfigurationElement = __decorate([
|
|
30
164
|
customElement('umb-property-editor-ui-collection-view-column-configuration')
|
|
31
165
|
], UmbPropertyEditorUICollectionViewColumnConfigurationElement);
|
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
import { UmbPropertyEditorUiElement } from '../../../../../extension-registry/index.js';
|
|
2
2
|
import { UmbPropertyEditorConfigCollection } from '../../../../index.js';
|
|
3
3
|
import { UmbLitElement } from '../../../../../../../shared/lit-element/index.js';
|
|
4
|
+
interface LayoutConfig {
|
|
5
|
+
icon?: string;
|
|
6
|
+
isSystem?: boolean;
|
|
7
|
+
name?: string;
|
|
8
|
+
path?: string;
|
|
9
|
+
selected?: boolean;
|
|
10
|
+
}
|
|
4
11
|
/**
|
|
5
12
|
* @element umb-property-editor-ui-collection-view-layout-configuration
|
|
6
13
|
*/
|
|
7
14
|
export declare class UmbPropertyEditorUICollectionViewLayoutConfigurationElement extends UmbLitElement implements UmbPropertyEditorUiElement {
|
|
8
|
-
|
|
15
|
+
#private;
|
|
16
|
+
value: Array<LayoutConfig>;
|
|
9
17
|
config?: UmbPropertyEditorConfigCollection;
|
|
18
|
+
private _modalContext?;
|
|
19
|
+
constructor();
|
|
10
20
|
render(): import("lit-html").TemplateResult<1>;
|
|
21
|
+
renderSystemFieldRow(layout: LayoutConfig, index: number): import("lit-html").TemplateResult<1>;
|
|
22
|
+
renderCustomFieldRow(layout: LayoutConfig, index: number): import("lit-html").TemplateResult<1>;
|
|
11
23
|
static styles: import("@lit/reactive-element/css-tag").CSSResult[];
|
|
12
24
|
}
|
|
13
25
|
export default UmbPropertyEditorUICollectionViewLayoutConfigurationElement;
|