@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.
Files changed (36) hide show
  1. package/dist-cms/custom-elements.json +28 -26
  2. package/dist-cms/packages/core/components/variant-selector/variant-selector.element.d.ts +1 -0
  3. package/dist-cms/packages/core/components/variant-selector/variant-selector.element.js +22 -2
  4. package/dist-cms/packages/core/modal/common/icon-picker/icon-picker-modal.element.js +1 -1
  5. package/dist-cms/packages/core/property-editor/schemas/Umbraco.ContentPicker.d.ts +2 -0
  6. package/dist-cms/packages/{documents/documents/property-editors → core/property-editor/schemas}/Umbraco.ContentPicker.js +1 -1
  7. package/dist-cms/packages/core/property-editor/schemas/Umbraco.Dropdown.Flexible.js +1 -1
  8. package/dist-cms/packages/core/property-editor/schemas/Umbraco.ListView.js +1 -1
  9. package/dist-cms/packages/core/property-editor/schemas/manifests.js +2 -0
  10. 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
  11. 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
  12. 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
  13. package/dist-cms/packages/core/property-editor/uis/collection-view/config/column-configuration/property-editor-ui-collection-view-column-configuration.element.js +139 -5
  14. 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
  15. package/dist-cms/packages/core/property-editor/uis/collection-view/config/layout-configuration/property-editor-ui-collection-view-layout-configuration.element.js +139 -6
  16. 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
  17. package/dist-cms/packages/core/property-editor/uis/collection-view/config/order-by/property-editor-ui-collection-view-order-by.element.js +24 -4
  18. package/dist-cms/packages/core/property-editor/uis/dropdown/manifests.js +1 -1
  19. package/dist-cms/packages/core/property-editor/uis/icon-picker/property-editor-ui-icon-picker.element.d.ts +6 -2
  20. package/dist-cms/packages/core/property-editor/uis/icon-picker/property-editor-ui-icon-picker.element.js +48 -11
  21. package/dist-cms/packages/core/property-editor/uis/image-crops-configuration/property-editor-ui-image-crops-configuration.element.js +5 -2
  22. package/dist-cms/packages/core/property-editor/uis/order-direction/property-editor-ui-order-direction.element.d.ts +1 -0
  23. package/dist-cms/packages/core/property-editor/uis/order-direction/property-editor-ui-order-direction.element.js +21 -4
  24. package/dist-cms/packages/core/property-editor/uis/value-type/property-editor-ui-value-type.element.d.ts +2 -0
  25. package/dist-cms/packages/core/property-editor/uis/value-type/property-editor-ui-value-type.element.js +6 -1
  26. package/dist-cms/packages/documents/documents/property-editors/document-picker/manifests.js +0 -12
  27. package/dist-cms/packages/documents/documents/property-editors/manifests.js +1 -2
  28. package/dist-cms/packages/settings/languages/app-language-select/app-language-select.element.js +1 -1
  29. package/dist-cms/shared/resources/extractUmbColorVariable.function.d.ts +1 -0
  30. package/dist-cms/shared/resources/extractUmbColorVariable.function.js +15 -0
  31. package/dist-cms/shared/resources/index.d.ts +1 -0
  32. package/dist-cms/shared/resources/index.js +1 -0
  33. package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
  34. package/dist-cms/vscode-html-custom-data.json +17 -13
  35. package/package.json +1 -1
  36. package/dist-cms/packages/documents/documents/property-editors/Umbraco.ContentPicker.d.ts +0 -2
@@ -4,7 +4,10 @@ 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, ifDefined } from '../../../../../../../external/lit/index.js';
8
+ import { extractUmbColorVariable } from '../../../../../../../shared/resources/index.js';
9
+ import { UMB_ICON_PICKER_MODAL, UMB_MODAL_MANAGER_CONTEXT_TOKEN, } from '../../../../../modal/index.js';
10
+ import { UmbPropertyValueChangeEvent, } from '../../../../index.js';
8
11
  import { UmbTextStyles } from '../../../../../../../shared/style/index.js';
9
12
  import { UmbLitElement } from '../../../../../../../shared/lit-element/index.js';
10
13
  /**
@@ -12,16 +15,146 @@ import { UmbLitElement } from '../../../../../../../shared/lit-element/index.js'
12
15
  */
13
16
  let UmbPropertyEditorUICollectionViewLayoutConfigurationElement = class UmbPropertyEditorUICollectionViewLayoutConfigurationElement extends UmbLitElement {
14
17
  constructor() {
15
- super(...arguments);
16
- this.value = '';
18
+ super();
19
+ this.value = [];
20
+ this.consumeContext(UMB_MODAL_MANAGER_CONTEXT_TOKEN, (instance) => {
21
+ this._modalContext = instance;
22
+ });
23
+ }
24
+ #onAdd() {
25
+ this.value = [...this.value, { isSystem: false, icon: 'icon-stop', selected: true }];
26
+ this.dispatchEvent(new UmbPropertyValueChangeEvent());
27
+ }
28
+ #onRemove(unique) {
29
+ const values = [...this.value];
30
+ values.splice(unique, 1);
31
+ this.value = values;
32
+ this.dispatchEvent(new UmbPropertyValueChangeEvent());
33
+ }
34
+ #onChangePath(e, index) {
35
+ const values = [...this.value];
36
+ values[index] = { ...values[index], path: e.target.value };
37
+ this.value = values;
38
+ this.dispatchEvent(new UmbPropertyValueChangeEvent());
39
+ }
40
+ #onChangeName(e, index) {
41
+ const values = [...this.value];
42
+ values[index] = { ...values[index], name: e.target.value };
43
+ this.value = values;
44
+ this.dispatchEvent(new UmbPropertyValueChangeEvent());
45
+ }
46
+ #onChangeSelected(e, index) {
47
+ const values = [...this.value];
48
+ values[index] = { ...values[index], selected: e.target.checked };
49
+ this.value = values;
50
+ this.dispatchEvent(new UmbPropertyValueChangeEvent());
51
+ }
52
+ async #onIconChange(index) {
53
+ const icon = this.#iconReader(this.value[index].icon ?? '');
54
+ // TODO: send icon data to modal
55
+ const modalContext = this._modalContext?.open(UMB_ICON_PICKER_MODAL);
56
+ const picked = await modalContext?.onSubmit();
57
+ if (!picked)
58
+ return;
59
+ const values = [...this.value];
60
+ values[index] = { ...values[index], icon: `${picked.icon} color-${picked.color}` };
61
+ this.value = values;
62
+ this.dispatchEvent(new UmbPropertyValueChangeEvent());
17
63
  }
18
64
  render() {
19
- return html `<div>umb-property-editor-ui-collection-view-layout-configuration</div>`;
65
+ return html `<div id="layout-wrapper">
66
+ ${repeat(this.value, (layout, index) => '' + layout.name + layout.icon, (layout, index) => html ` <div class="layout-item">
67
+ <uui-icon name="icon-navigation"></uui-icon> ${layout.isSystem
68
+ ? this.renderSystemFieldRow(layout, index)
69
+ : this.renderCustomFieldRow(layout, index)}
70
+ </div>`)}
71
+ </div>
72
+ <uui-button
73
+ id="add"
74
+ label=${this.localize.term('general_add')}
75
+ look="placeholder"
76
+ @click=${this.#onAdd}></uui-button>`;
77
+ }
78
+ #iconReader(iconString) {
79
+ if (!iconString)
80
+ return { icon: '' };
81
+ const parts = iconString.split(' ');
82
+ if (parts.length === 2) {
83
+ const [icon, color] = parts;
84
+ const varName = extractUmbColorVariable(color.replace('color-', ''));
85
+ return { icon, color: varName };
86
+ }
87
+ else {
88
+ const [icon] = parts;
89
+ return { icon };
90
+ }
91
+ }
92
+ renderSystemFieldRow(layout, index) {
93
+ const icon = this.#iconReader(layout.icon ?? '');
94
+ return html ` <uui-button compact disabled label="Icon" look="outline">
95
+ <uui-icon name=${ifDefined(icon.icon)}></uui-icon>
96
+ </uui-button>
97
+ ${index}
98
+ <span><strong>${ifDefined(layout.name)}</strong> <small>(system field)</small></span>
99
+ <uui-checkbox
100
+ ?checked=${layout.selected}
101
+ label="Show"
102
+ @change=${(e) => this.#onChangeSelected(e, index)}>
103
+ </uui-checkbox>`;
104
+ }
105
+ renderCustomFieldRow(layout, index) {
106
+ const icon = this.#iconReader(layout.icon ?? '');
107
+ return html `<uui-button compact look="outline" label="pick icon" @click=${() => this.#onIconChange(index)}>
108
+ ${icon.color
109
+ ? html `<uui-icon name=${icon.icon} style="color:var(${icon.color})"></uui-icon>`
110
+ : html `<uui-icon name=${icon.icon}></uui-icon>`}
111
+ </uui-button>
112
+ ${index}
113
+ <uui-input
114
+ label="name"
115
+ value=${ifDefined(layout.name)}
116
+ placeholder="Name..."
117
+ @change=${(e) => this.#onChangeName(e, index)}></uui-input>
118
+ <uui-input
119
+ label="path"
120
+ value=${ifDefined(layout.path)}
121
+ placeholder="Layout path..."
122
+ @change=${(e) => this.#onChangePath(e, index)}></uui-input>
123
+ <uui-button
124
+ label=${this.localize.term('actions_remove')}
125
+ look="secondary"
126
+ @click=${() => this.#onRemove(index)}></uui-button>`;
20
127
  }
21
- static { this.styles = [UmbTextStyles]; }
128
+ static { this.styles = [
129
+ UmbTextStyles,
130
+ css `
131
+ #layout-wrapper {
132
+ display: flex;
133
+ flex-direction: column;
134
+ gap: 1px;
135
+ margin-bottom: var(--uui-size-3);
136
+ }
137
+
138
+ .layout-item {
139
+ background-color: var(--uui-color-surface-alt);
140
+ display: flex;
141
+ align-items: center;
142
+ gap: var(--uui-size-6);
143
+ padding: var(--uui-size-3) var(--uui-size-6);
144
+ }
145
+
146
+ .layout-item > :last-child {
147
+ margin-left: auto;
148
+ }
149
+
150
+ #add {
151
+ width: 100%;
152
+ }
153
+ `,
154
+ ]; }
22
155
  };
23
156
  __decorate([
24
- property()
157
+ property({ type: Array })
25
158
  ], UmbPropertyEditorUICollectionViewLayoutConfigurationElement.prototype, "value", void 0);
26
159
  __decorate([
27
160
  property({ type: Object, attribute: false })
@@ -5,7 +5,11 @@ import { UmbLitElement } from '../../../../../../../shared/lit-element/index.js'
5
5
  * @element umb-property-editor-ui-collection-view-order-by
6
6
  */
7
7
  export declare class UmbPropertyEditorUICollectionViewOrderByElement extends UmbLitElement implements UmbPropertyEditorUiElement {
8
- value: string;
8
+ #private;
9
+ private _value;
10
+ set value(v: string);
11
+ get value(): string;
12
+ _options: Array<Option>;
9
13
  config?: UmbPropertyEditorConfigCollection;
10
14
  render(): import("lit-html").TemplateResult<1>;
11
15
  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, state } 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,35 @@ import { UmbLitElement } from '../../../../../../../shared/lit-element/index.js'
13
14
  let UmbPropertyEditorUICollectionViewOrderByElement = class UmbPropertyEditorUICollectionViewOrderByElement extends UmbLitElement {
14
15
  constructor() {
15
16
  super(...arguments);
16
- this.value = '';
17
+ this._value = '';
18
+ this._options = [
19
+ { value: 'name', name: 'Name' },
20
+ { value: 'updateDate', name: 'Last edited' },
21
+ { value: 'owner', name: 'Created by' },
22
+ ];
23
+ }
24
+ set value(v) {
25
+ this._value = v;
26
+ this._options = this._options.map((option) => (option.value === v ? { ...option, selected: true } : option));
27
+ }
28
+ get value() {
29
+ return this._value;
30
+ }
31
+ #onChange(e) {
32
+ this.value = e.target.value;
33
+ this.dispatchEvent(new UmbPropertyValueChangeEvent());
17
34
  }
18
35
  render() {
19
- return html `<div>umb-property-editor-ui-collection-view-order-by</div>`;
36
+ return html `<uui-select label="select" .options=${this._options} @change=${this.#onChange}></uui-select>`;
20
37
  }
21
38
  static { this.styles = [UmbTextStyles]; }
22
39
  };
23
40
  __decorate([
24
41
  property()
25
- ], UmbPropertyEditorUICollectionViewOrderByElement.prototype, "value", void 0);
42
+ ], UmbPropertyEditorUICollectionViewOrderByElement.prototype, "value", null);
43
+ __decorate([
44
+ state()
45
+ ], UmbPropertyEditorUICollectionViewOrderByElement.prototype, "_options", void 0);
26
46
  __decorate([
27
47
  property({ type: Object, attribute: false })
28
48
  ], UmbPropertyEditorUICollectionViewOrderByElement.prototype, "config", void 0);
@@ -5,7 +5,7 @@ export const manifest = {
5
5
  js: () => import('./property-editor-ui-dropdown.element.js'),
6
6
  meta: {
7
7
  label: 'Dropdown',
8
- propertyEditorSchemaAlias: 'Umbraco.Dropdown',
8
+ propertyEditorSchemaAlias: 'Umbraco.DropDown.Flexible',
9
9
  icon: 'icon-time',
10
10
  group: 'pickers',
11
11
  settings: {
@@ -5,8 +5,12 @@ import type { UmbPropertyEditorConfigCollection } from '../../index.js';
5
5
  * @element umb-property-editor-ui-icon-picker
6
6
  */
7
7
  export declare class UmbPropertyEditorUIIconPickerElement extends UmbLitElement implements UmbPropertyEditorUiElement {
8
- value: string;
9
- config?: UmbPropertyEditorConfigCollection;
8
+ private _value;
9
+ set value(v: string);
10
+ get value(): string;
11
+ private _icon;
12
+ private _color;
13
+ set config(config: UmbPropertyEditorConfigCollection | undefined);
10
14
  private _modalContext?;
11
15
  constructor();
12
16
  private _openModal;
@@ -4,34 +4,68 @@ 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, state } from '../../../../../external/lit/index.js';
8
8
  import { UmbTextStyles } from '../../../../../shared/style/index.js';
9
9
  import { UMB_MODAL_MANAGER_CONTEXT_TOKEN, UMB_ICON_PICKER_MODAL, } from '../../../modal/index.js';
10
10
  import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
11
+ import { extractUmbColorVariable } from '../../../../../shared/resources/index.js';
11
12
  /**
12
13
  * @element umb-property-editor-ui-icon-picker
13
14
  */
14
15
  let UmbPropertyEditorUIIconPickerElement = class UmbPropertyEditorUIIconPickerElement extends UmbLitElement {
16
+ set value(v) {
17
+ this._value = v;
18
+ const parts = v.split(' ');
19
+ if (parts.length === 2) {
20
+ this._icon = parts[0];
21
+ this._color = parts[1].replace('color-', '');
22
+ }
23
+ else {
24
+ this._icon = v;
25
+ this._color = '';
26
+ }
27
+ }
28
+ get value() {
29
+ return this._value;
30
+ }
31
+ set config(config) {
32
+ if (!config)
33
+ return;
34
+ console.log('config', config);
35
+ }
15
36
  constructor() {
16
37
  super();
17
- this.value = '';
38
+ this._value = '';
39
+ this._icon = '';
40
+ this._color = '';
18
41
  this.consumeContext(UMB_MODAL_MANAGER_CONTEXT_TOKEN, (instance) => {
19
42
  this._modalContext = instance;
20
43
  });
21
44
  }
22
- _openModal() {
23
- // TODO: Modal should know the current selected one, and bring back the newly selected one.
24
- this._modalContext?.open(UMB_ICON_PICKER_MODAL);
45
+ async _openModal() {
46
+ const modalContext = this._modalContext?.open(UMB_ICON_PICKER_MODAL);
47
+ const data = await modalContext?.onSubmit();
48
+ if (!data)
49
+ return;
50
+ if (data.color) {
51
+ this.value = `${data.icon} color-${data.color}`;
52
+ }
53
+ else {
54
+ this.value = data.icon;
55
+ }
56
+ this.dispatchEvent(new CustomEvent('property-value-change'));
25
57
  }
26
- // TODO: We should show the current picked icon.
27
58
  render() {
28
59
  return html `
29
60
  <uui-button
30
- label="open-icon-picker"
61
+ compact
62
+ label=${this.localize.term('defaultdialogs_selectIcon')}
31
63
  look="secondary"
32
64
  @click=${this._openModal}
33
65
  style="margin-right: var(--uui-size-space-3)">
34
- Pick an icon
66
+ ${this._color
67
+ ? html ` <uui-icon name="${this._icon}" style="color:var(${extractUmbColorVariable(this._color)})"></uui-icon>`
68
+ : html ` <uui-icon name="${this._icon}"></uui-icon>`}
35
69
  </uui-button>
36
70
  `;
37
71
  }
@@ -39,10 +73,13 @@ let UmbPropertyEditorUIIconPickerElement = class UmbPropertyEditorUIIconPickerEl
39
73
  };
40
74
  __decorate([
41
75
  property()
42
- ], UmbPropertyEditorUIIconPickerElement.prototype, "value", void 0);
76
+ ], UmbPropertyEditorUIIconPickerElement.prototype, "value", null);
77
+ __decorate([
78
+ state()
79
+ ], UmbPropertyEditorUIIconPickerElement.prototype, "_icon", void 0);
43
80
  __decorate([
44
- property({ attribute: false })
45
- ], UmbPropertyEditorUIIconPickerElement.prototype, "config", void 0);
81
+ state()
82
+ ], UmbPropertyEditorUIIconPickerElement.prototype, "_color", void 0);
46
83
  UmbPropertyEditorUIIconPickerElement = __decorate([
47
84
  customElement('umb-property-editor-ui-icon-picker')
48
85
  ], UmbPropertyEditorUIIconPickerElement);
@@ -101,7 +101,7 @@ let UmbPropertyEditorUIImageCropsConfigurationElement = class UmbPropertyEditorU
101
101
  <span class="append" slot="append">px</span>
102
102
  </uui-input>
103
103
  </div>
104
- ${this.#renderActions()}
104
+ <div class="action-wrapper">${this.#renderActions()}</div>
105
105
  </form>
106
106
  </uui-form>
107
107
  <div class="crops">
@@ -123,7 +123,6 @@ let UmbPropertyEditorUIImageCropsConfigurationElement = class UmbPropertyEditorU
123
123
  UmbTextStyles,
124
124
  css `
125
125
  :host {
126
- max-width: 500px;
127
126
  display: block;
128
127
  }
129
128
  .crops {
@@ -171,6 +170,10 @@ let UmbPropertyEditorUIImageCropsConfigurationElement = class UmbPropertyEditorU
171
170
  display: flex;
172
171
  align-items: center;
173
172
  }
173
+ .action-wrapper {
174
+ display: flex;
175
+ align-items: flex-end;
176
+ }
174
177
  `,
175
178
  ]; }
176
179
  };
@@ -5,6 +5,7 @@ import { UmbPropertyEditorConfigCollection } from '../../index.js';
5
5
  * @element umb-property-editor-ui-order-direction
6
6
  */
7
7
  export declare class UmbPropertyEditorUIOrderDirectionElement extends UmbLitElement implements UmbPropertyEditorUiElement {
8
+ #private;
8
9
  value: string;
9
10
  config?: UmbPropertyEditorConfigCollection;
10
11
  render(): import("lit-html").TemplateResult<1>;
@@ -4,21 +4,38 @@ 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
8
  import { UmbTextStyles } from '../../../../../shared/style/index.js';
9
9
  import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
10
+ import { UmbPropertyValueChangeEvent, } from '../../index.js';
10
11
  /**
11
12
  * @element umb-property-editor-ui-order-direction
12
13
  */
13
14
  let UmbPropertyEditorUIOrderDirectionElement = class UmbPropertyEditorUIOrderDirectionElement extends UmbLitElement {
14
15
  constructor() {
15
16
  super(...arguments);
16
- this.value = '';
17
+ this.value = 'asc';
18
+ }
19
+ #onInput(e) {
20
+ this.value = e.target.value;
21
+ this.dispatchEvent(new UmbPropertyValueChangeEvent());
17
22
  }
18
23
  render() {
19
- return html `<div>umb-property-editor-ui-order-direction</div>`;
24
+ return html `<uui-radio-group @input=${this.#onInput} value=${this.value}>
25
+ <uui-radio name="order" label="Ascending [a-z]" value="asc"></uui-radio>
26
+ <uui-radio name="order" label="Descending [z-a]" value="desc"></uui-radio>
27
+ </uui-radio-group>`;
20
28
  }
21
- static { this.styles = [UmbTextStyles]; }
29
+ static { this.styles = [
30
+ UmbTextStyles,
31
+ css `
32
+ uui-radio-group {
33
+ display: flex;
34
+ flex-direction: row;
35
+ gap: var(--uui-size-6);
36
+ }
37
+ `,
38
+ ]; }
22
39
  };
23
40
  __decorate([
24
41
  property()
@@ -1,3 +1,4 @@
1
+ import type { UUISelectElement } from '../../../../../external/uui/index.js';
1
2
  import { UmbPropertyEditorUiElement } from '../../../extension-registry/index.js';
2
3
  import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
3
4
  import type { UmbPropertyEditorConfigCollection } from '../../index.js';
@@ -9,6 +10,7 @@ export declare class UmbPropertyEditorUIValueTypeElement extends UmbLitElement i
9
10
  private _value;
10
11
  get value(): string | undefined;
11
12
  set value(value: string | undefined);
13
+ selectEl?: UUISelectElement;
12
14
  private _options;
13
15
  config?: UmbPropertyEditorConfigCollection;
14
16
  render(): import("lit-html").TemplateResult<1>;
@@ -4,7 +4,7 @@ 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, state } from '../../../../../external/lit/index.js';
7
+ import { html, customElement, property, state, query } from '../../../../../external/lit/index.js';
8
8
  import { UmbTextStyles } from '../../../../../shared/style/index.js';
9
9
  import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
10
10
  /**
@@ -30,6 +30,8 @@ let UmbPropertyEditorUIValueTypeElement = class UmbPropertyEditorUIValueTypeElem
30
30
  set value(value) {
31
31
  this._value = value;
32
32
  const selected = this._options.filter((option) => {
33
+ if (this.selectEl && option.value === this.value)
34
+ this.selectEl.value = this.value;
33
35
  return (option.selected = option.value === this.value);
34
36
  });
35
37
  if (selected.length === 0) {
@@ -51,6 +53,9 @@ let UmbPropertyEditorUIValueTypeElement = class UmbPropertyEditorUIValueTypeElem
51
53
  __decorate([
52
54
  property()
53
55
  ], UmbPropertyEditorUIValueTypeElement.prototype, "value", null);
56
+ __decorate([
57
+ query('uui-select')
58
+ ], UmbPropertyEditorUIValueTypeElement.prototype, "selectEl", void 0);
54
59
  __decorate([
55
60
  state()
56
61
  ], UmbPropertyEditorUIValueTypeElement.prototype, "_options", void 0);
@@ -16,18 +16,6 @@ export const manifest = {
16
16
  description: 'Opens the node in a dialog',
17
17
  propertyEditorUiAlias: 'Umb.PropertyEditorUi.Toggle',
18
18
  },
19
- {
20
- alias: 'validationLimit',
21
- label: 'Amount of Documents',
22
- description: 'Require a certain amount of documents',
23
- propertyEditorUiAlias: 'Umb.PropertyEditorUi.NumberRange',
24
- },
25
- {
26
- alias: 'ignoreUserStartNodes',
27
- label: 'Ignore User Start Nodes',
28
- description: 'Selecting this option allows a user to choose nodes that they normally dont have access to',
29
- propertyEditorUiAlias: 'Umb.PropertyEditorUi.Toggle',
30
- },
31
19
  ],
32
20
  },
33
21
  },
@@ -1,3 +1,2 @@
1
1
  import { manifest as documentPickerUI } from './document-picker/manifests.js';
2
- import { manifest as contentPicker } from './Umbraco.ContentPicker.js';
3
- export const manifests = [documentPickerUI, contentPicker];
2
+ export const manifests = [documentPickerUI];
@@ -70,7 +70,7 @@ let UmbAppLanguageSelectElement = class UmbAppLanguageSelectElement extends UmbL
70
70
  </button>`;
71
71
  }
72
72
  #renderContent() {
73
- return html ` <uui-popover-container id="dropdown-popover" @toggle=${this.#onPopoverToggle}>
73
+ return html ` <uui-popover-container id="dropdown-popover" @beforetoggle=${this.#onPopoverToggle}>
74
74
  <umb-popover-layout>
75
75
  ${repeat(this._languages, (language) => language.isoCode, (language) => html `
76
76
  <uui-menu-item
@@ -0,0 +1 @@
1
+ export declare function extractUmbColorVariable(colorAlias: string): string | undefined;
@@ -0,0 +1,15 @@
1
+ const umbracoColors = [
2
+ { alias: 'text', varName: '--uui-color-text' },
3
+ { alias: 'yellow', varName: '--uui-palette-sunglow' },
4
+ { alias: 'pink', varName: '--uui-palette-spanish-pink' },
5
+ { alias: 'dark', varName: '--uui-palette-gunmetal' },
6
+ { alias: 'darkblue', varName: '--uui-palette-space-cadet' },
7
+ { alias: 'blue', varName: '--uui-palette-violet-blue' },
8
+ { alias: 'red', varName: '--uui-palette-maroon-flush' },
9
+ { alias: 'green', varName: '--uui-palette-jungle-green' },
10
+ { alias: 'brown', varName: '--uui-palette-chamoisee' },
11
+ ];
12
+ export function extractUmbColorVariable(colorAlias) {
13
+ const found = umbracoColors.find((umbColor) => umbColor.alias === colorAlias);
14
+ return found?.varName;
15
+ }
@@ -1,3 +1,4 @@
1
1
  export * from './resource.controller.js';
2
2
  export * from './tryExecute.function.js';
3
3
  export * from './tryExecuteAndNotify.function.js';
4
+ export * from './extractUmbColorVariable.function.js';
@@ -1,3 +1,4 @@
1
1
  export * from './resource.controller.js';
2
2
  export * from './tryExecute.function.js';
3
3
  export * from './tryExecuteAndNotify.function.js';
4
+ export * from './extractUmbColorVariable.function.js';