@umbraco-cms/backoffice 14.0.0--preview004-c2e8b331 → 14.0.0--preview004-37f7727e

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 (21) hide show
  1. package/dist-cms/custom-elements.json +16 -0
  2. package/dist-cms/packages/core/data-type/components/data-type-input/data-type-input.element.js +2 -1
  3. package/dist-cms/packages/documents/document-types/components/document-type-input/document-type-input.element.js +2 -1
  4. package/dist-cms/packages/documents/documents/components/input-document/input-document.element.js +2 -1
  5. package/dist-cms/packages/documents/documents/components/input-document-granular-permission/input-document-granular-permission.element.js +2 -1
  6. package/dist-cms/packages/media/media/components/input-media/input-media.element.js +2 -1
  7. package/dist-cms/packages/media/media-types/components/media-type-input/media-type-input.element.js +2 -1
  8. package/dist-cms/packages/settings/languages/components/input-language-picker/input-language-picker.element.js +2 -1
  9. package/dist-cms/packages/settings/languages/workspace/language-root/components/language-root-table-boolean-column-layout.element.d.ts +12 -0
  10. package/dist-cms/packages/settings/languages/workspace/language-root/components/language-root-table-boolean-column-layout.element.js +26 -0
  11. package/dist-cms/packages/settings/languages/workspace/language-root/language-root-workspace.element.d.ts +1 -0
  12. package/dist-cms/packages/settings/languages/workspace/language-root/language-root-workspace.element.js +3 -0
  13. package/dist-cms/packages/user/user/components/user-input/user-input.element.js +2 -1
  14. package/dist-cms/packages/user/user-group/components/input-user-group/user-group-input.element.js +2 -1
  15. package/dist-cms/shared/utils/index.d.ts +1 -0
  16. package/dist-cms/shared/utils/index.js +1 -0
  17. package/dist-cms/shared/utils/split-string-to-array.d.ts +17 -0
  18. package/dist-cms/shared/utils/split-string-to-array.js +22 -0
  19. package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
  20. package/dist-cms/vscode-html-custom-data.json +5 -0
  21. package/package.json +1 -1
@@ -7926,6 +7926,22 @@
7926
7926
  }
7927
7927
  ]
7928
7928
  },
7929
+ {
7930
+ "name": "umb-language-root-table-boolean-column-layout",
7931
+ "path": "./../src/packages/settings/languages/workspace/language-root/components/language-root-table-boolean-column-layout.element.ts",
7932
+ "properties": [
7933
+ {
7934
+ "name": "value",
7935
+ "type": "boolean",
7936
+ "default": "false"
7937
+ },
7938
+ {
7939
+ "name": "styles",
7940
+ "type": "array",
7941
+ "default": "[\"UmbTextStyles\",null]"
7942
+ }
7943
+ ]
7944
+ },
7929
7945
  {
7930
7946
  "name": "umb-language-root-table-delete-column-layout",
7931
7947
  "path": "./../src/packages/settings/languages/workspace/language-root/components/language-root-table-delete-column-layout.element.ts",
@@ -8,6 +8,7 @@ import { UmbDataTypePickerContext } from './data-type-input.context.js';
8
8
  import { css, html, customElement, property, state } from '../../../../../external/lit/index.js';
9
9
  import { FormControlMixin } from '../../../../../external/uui/index.js';
10
10
  import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
11
+ import { splitStringToArray } from '../../../../../shared/utils/index.js';
11
12
  let UmbDataTypeInputElement = class UmbDataTypeInputElement extends FormControlMixin(UmbLitElement) {
12
13
  /**
13
14
  * This is a minimum amount of selected items in this input.
@@ -41,7 +42,7 @@ let UmbDataTypeInputElement = class UmbDataTypeInputElement extends FormControlM
41
42
  }
42
43
  set value(idsString) {
43
44
  // Its with full purpose we don't call super.value, as thats being handled by the observation of the context selection.
44
- this.selectedIds = idsString.split(/[ ,]+/);
45
+ this.selectedIds = splitStringToArray(idsString);
45
46
  }
46
47
  get pickableFilter() {
47
48
  return this.#pickerContext.pickableFilter;
@@ -8,6 +8,7 @@ import { UmbDocumentTypePickerContext } from './document-type-input.context.js';
8
8
  import { css, html, customElement, property, state } from '../../../../../external/lit/index.js';
9
9
  import { FormControlMixin } from '../../../../../external/uui/index.js';
10
10
  import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
11
+ import { splitStringToArray } from '../../../../../shared/utils/index.js';
11
12
  let UmbDocumentTypeInputElement = class UmbDocumentTypeInputElement extends FormControlMixin(UmbLitElement) {
12
13
  /**
13
14
  * This is a minimum amount of selected items in this input.
@@ -41,7 +42,7 @@ let UmbDocumentTypeInputElement = class UmbDocumentTypeInputElement extends Form
41
42
  }
42
43
  set value(idsString) {
43
44
  // Its with full purpose we don't call super.value, as thats being handled by the observation of the context selection.
44
- this.selectedIds = idsString.split(/[ ,]+/);
45
+ this.selectedIds = splitStringToArray(idsString);
45
46
  }
46
47
  get pickableFilter() {
47
48
  return this.#pickerContext.pickableFilter;
@@ -8,6 +8,7 @@ import { UmbDocumentPickerContext } from './input-document.context.js';
8
8
  import { css, html, customElement, property, state, ifDefined, repeat } from '../../../../../external/lit/index.js';
9
9
  import { FormControlMixin } from '../../../../../external/uui/index.js';
10
10
  import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
11
+ import { splitStringToArray } from '../../../../../shared/utils/index.js';
11
12
  let UmbInputDocumentElement = class UmbInputDocumentElement extends FormControlMixin(UmbLitElement) {
12
13
  /**
13
14
  * This is a minimum amount of selected items in this input.
@@ -41,7 +42,7 @@ let UmbInputDocumentElement = class UmbInputDocumentElement extends FormControlM
41
42
  }
42
43
  set value(idsString) {
43
44
  // Its with full purpose we don't call super.value, as thats being handled by the observation of the context selection.
44
- this.selectedIds = idsString.split(/[ ,]+/);
45
+ this.selectedIds = splitStringToArray(idsString);
45
46
  }
46
47
  #pickerContext;
47
48
  constructor() {
@@ -10,6 +10,7 @@ import { UMB_MODAL_MANAGER_CONTEXT_TOKEN, UMB_CONFIRM_MODAL, UMB_DOCUMENT_PICKER
10
10
  import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
11
11
  import { UmbDocumentRepository } from '../../index.js';
12
12
  import { UmbChangeEvent } from '../../../../core/event/index.js';
13
+ import { splitStringToArray } from '../../../../../shared/utils/index.js';
13
14
  let UmbInputDocumentGranularPermissionElement = class UmbInputDocumentGranularPermissionElement extends FormControlMixin(UmbLitElement) {
14
15
  get selectedIds() {
15
16
  return this._selectedIds;
@@ -21,7 +22,7 @@ let UmbInputDocumentGranularPermissionElement = class UmbInputDocumentGranularPe
21
22
  }
22
23
  set value(idsString) {
23
24
  if (idsString !== this._value) {
24
- this.selectedIds = idsString.split(/[ ,]+/);
25
+ this.selectedIds = splitStringToArray(idsString);
25
26
  }
26
27
  }
27
28
  #documentRepository;
@@ -8,6 +8,7 @@ import { UmbMediaPickerContext } from './input-media.context.js';
8
8
  import { css, html, customElement, property, state, ifDefined } from '../../../../../external/lit/index.js';
9
9
  import { FormControlMixin } from '../../../../../external/uui/index.js';
10
10
  import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
11
+ import { splitStringToArray } from '../../../../../shared/utils/index.js';
11
12
  let UmbInputMediaElement = class UmbInputMediaElement extends FormControlMixin(UmbLitElement) {
12
13
  /**
13
14
  * This is a minimum amount of selected items in this input.
@@ -41,7 +42,7 @@ let UmbInputMediaElement = class UmbInputMediaElement extends FormControlMixin(U
41
42
  }
42
43
  set value(idsString) {
43
44
  // Its with full purpose we don't call super.value, as thats being handled by the observation of the context selection.
44
- this.selectedIds = idsString.split(/[ ,]+/);
45
+ this.selectedIds = splitStringToArray(idsString);
45
46
  }
46
47
  #pickerContext;
47
48
  constructor() {
@@ -8,6 +8,7 @@ import { UmbMediaTypePickerContext } from './media-type-input.context.js';
8
8
  import { css, html, customElement, property, state, ifDefined } from '../../../../../external/lit/index.js';
9
9
  import { FormControlMixin } from '../../../../../external/uui/index.js';
10
10
  import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
11
+ import { splitStringToArray } from '../../../../../shared/utils/index.js';
11
12
  let UmbMediaTypeInputElement = class UmbMediaTypeInputElement extends FormControlMixin(UmbLitElement) {
12
13
  /**
13
14
  * This is a minimum amount of selected items in this input.
@@ -41,7 +42,7 @@ let UmbMediaTypeInputElement = class UmbMediaTypeInputElement extends FormContro
41
42
  }
42
43
  set value(idsString) {
43
44
  // Its with full purpose we don't call super.value, as thats being handled by the observation of the context selection.
44
- this.selectedIds = idsString.split(/[ ,]+/);
45
+ this.selectedIds = splitStringToArray(idsString);
45
46
  }
46
47
  get pickableFilter() {
47
48
  return this.#pickerContext.pickableFilter;
@@ -8,6 +8,7 @@ import { UmbLanguagePickerContext } from './input-language-picker.context.js';
8
8
  import { css, html, ifDefined, customElement, property, state } from '../../../../../external/lit/index.js';
9
9
  import { FormControlMixin } from '../../../../../external/uui/index.js';
10
10
  import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
11
+ import { splitStringToArray } from '../../../../../shared/utils/index.js';
11
12
  let UmbInputLanguagePickerElement = class UmbInputLanguagePickerElement extends FormControlMixin(UmbLitElement) {
12
13
  /**
13
14
  * This is a minimum amount of selected items in this input.
@@ -41,7 +42,7 @@ let UmbInputLanguagePickerElement = class UmbInputLanguagePickerElement extends
41
42
  }
42
43
  set value(isoCodesString) {
43
44
  // Its with full purpose we don't call super.value, as thats being handled by the observation of the context selection.
44
- this.selectedIsoCodes = isoCodesString.split(/[ ,]+/);
45
+ this.selectedIsoCodes = splitStringToArray(isoCodesString);
45
46
  }
46
47
  #pickerContext;
47
48
  constructor() {
@@ -0,0 +1,12 @@
1
+ import { nothing } from '../../../../../../external/lit/index.js';
2
+ import { UmbLitElement } from '../../../../../../shared/lit-element/index.js';
3
+ export declare class UmbLanguageRootTableBooleanColumnLayoutElement extends UmbLitElement {
4
+ value: boolean;
5
+ render(): import("lit-html").TemplateResult<1> | typeof nothing;
6
+ static styles: import("@lit/reactive-element/css-tag").CSSResult[];
7
+ }
8
+ declare global {
9
+ interface HTMLElementTagNameMap {
10
+ 'umb-language-root-table-boolean-column-layout': UmbLanguageRootTableBooleanColumnLayoutElement;
11
+ }
12
+ }
@@ -0,0 +1,26 @@
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 { UmbTextStyles } from '../../../../../../shared/style/index.js';
8
+ import { css, html, nothing, customElement, property } from '../../../../../../external/lit/index.js';
9
+ import { UmbLitElement } from '../../../../../../shared/lit-element/index.js';
10
+ let UmbLanguageRootTableBooleanColumnLayoutElement = class UmbLanguageRootTableBooleanColumnLayoutElement extends UmbLitElement {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.value = false;
14
+ }
15
+ render() {
16
+ return this.value ? html `<uui-icon name="icon-check"></uui-icon>` : nothing;
17
+ }
18
+ static { this.styles = [UmbTextStyles, css ``]; }
19
+ };
20
+ __decorate([
21
+ property({ attribute: false })
22
+ ], UmbLanguageRootTableBooleanColumnLayoutElement.prototype, "value", void 0);
23
+ UmbLanguageRootTableBooleanColumnLayoutElement = __decorate([
24
+ customElement('umb-language-root-table-boolean-column-layout')
25
+ ], UmbLanguageRootTableBooleanColumnLayoutElement);
26
+ export { UmbLanguageRootTableBooleanColumnLayoutElement };
@@ -1,6 +1,7 @@
1
1
  import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
2
2
  import './components/language-root-table-delete-column-layout.element.js';
3
3
  import './components/language-root-table-name-column-layout.element.js';
4
+ import './components/language-root-table-boolean-column-layout.element.js';
4
5
  export declare class UmbLanguageRootWorkspaceElement extends UmbLitElement {
5
6
  #private;
6
7
  private _tableConfig;
@@ -10,6 +10,7 @@ import { css, html, customElement, state } from '../../../../../external/lit/ind
10
10
  import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
11
11
  import './components/language-root-table-delete-column-layout.element.js';
12
12
  import './components/language-root-table-name-column-layout.element.js';
13
+ import './components/language-root-table-boolean-column-layout.element.js';
13
14
  let UmbLanguageRootWorkspaceElement = class UmbLanguageRootWorkspaceElement extends UmbLitElement {
14
15
  constructor() {
15
16
  super(...arguments);
@@ -29,10 +30,12 @@ let UmbLanguageRootWorkspaceElement = class UmbLanguageRootWorkspaceElement exte
29
30
  {
30
31
  name: 'Default',
31
32
  alias: 'defaultLanguage',
33
+ elementName: 'umb-language-root-table-boolean-column-layout',
32
34
  },
33
35
  {
34
36
  name: 'Mandatory',
35
37
  alias: 'mandatoryLanguage',
38
+ elementName: 'umb-language-root-table-boolean-column-layout',
36
39
  },
37
40
  {
38
41
  name: 'Fallback',
@@ -8,6 +8,7 @@ import { UmbUserPickerContext } from './user-input.context.js';
8
8
  import { css, html, customElement, property, state, ifDefined } from '../../../../../external/lit/index.js';
9
9
  import { FormControlMixin } from '../../../../../external/uui/index.js';
10
10
  import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
11
+ import { splitStringToArray } from '../../../../../shared/utils/index.js';
11
12
  let UmbUserInputElement = class UmbUserInputElement extends FormControlMixin(UmbLitElement) {
12
13
  /**
13
14
  * This is a minimum amount of selected items in this input.
@@ -41,7 +42,7 @@ let UmbUserInputElement = class UmbUserInputElement extends FormControlMixin(Umb
41
42
  }
42
43
  set value(idsString) {
43
44
  // Its with full purpose we don't call super.value, as thats being handled by the observation of the context selection.
44
- this.selectedIds = idsString.split(/[ ,]+/);
45
+ this.selectedIds = splitStringToArray(idsString);
45
46
  }
46
47
  #pickerContext;
47
48
  constructor() {
@@ -8,6 +8,7 @@ import { UmbUserGroupPickerContext } from './user-group-input.context.js';
8
8
  import { css, html, customElement, property, state, ifDefined, nothing } from '../../../../../external/lit/index.js';
9
9
  import { FormControlMixin } from '../../../../../external/uui/index.js';
10
10
  import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
11
+ import { splitStringToArray } from '../../../../../shared/utils/index.js';
11
12
  let UmbUserGroupInputElement = class UmbUserGroupInputElement extends FormControlMixin(UmbLitElement) {
12
13
  /**
13
14
  * This is a minimum amount of selected items in this input.
@@ -41,7 +42,7 @@ let UmbUserGroupInputElement = class UmbUserGroupInputElement extends FormContro
41
42
  }
42
43
  set value(idsString) {
43
44
  // Its with full purpose we don't call super.value, as thats being handled by the observation of the context selection.
44
- this.selectedIds = idsString.split(/[ ,]+/);
45
+ this.selectedIds = splitStringToArray(idsString);
45
46
  }
46
47
  #pickerContext;
47
48
  constructor() {
@@ -11,6 +11,7 @@ export * from './path-folder-name.function.js';
11
11
  export * from './selection-manager.js';
12
12
  export * from './udi-service.js';
13
13
  export * from './umbraco-path.function.js';
14
+ export * from './split-string-to-array.js';
14
15
  declare global {
15
16
  interface Window {
16
17
  Umbraco: any;
@@ -11,3 +11,4 @@ export * from './path-folder-name.function.js';
11
11
  export * from './selection-manager.js';
12
12
  export * from './udi-service.js';
13
13
  export * from './umbraco-path.function.js';
14
+ export * from './split-string-to-array.js';
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Splits a string into an array using a specified delimiter,
3
+ * trims whitespace from each element, and removes empty elements.
4
+ *
5
+ * @param {string} string - The input string to be split and processed.
6
+ * @param {string} [split=','] - The delimiter used for splitting the string (default is comma).
7
+ * @returns {string[]} An array of non-empty, trimmed strings.
8
+ *
9
+ * @example
10
+ * const result = splitStringToArray('one, two, three, ,five');
11
+ * // result: ['one', 'two', 'three', 'five']
12
+ *
13
+ * @example
14
+ * const customDelimiterResult = splitStringToArray('apple | orange | banana', ' | ');
15
+ * // customDelimiterResult: ['apple', 'orange', 'banana']
16
+ */
17
+ export declare function splitStringToArray(string: string, split?: string): string[];
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Splits a string into an array using a specified delimiter,
3
+ * trims whitespace from each element, and removes empty elements.
4
+ *
5
+ * @param {string} string - The input string to be split and processed.
6
+ * @param {string} [split=','] - The delimiter used for splitting the string (default is comma).
7
+ * @returns {string[]} An array of non-empty, trimmed strings.
8
+ *
9
+ * @example
10
+ * const result = splitStringToArray('one, two, three, ,five');
11
+ * // result: ['one', 'two', 'three', 'five']
12
+ *
13
+ * @example
14
+ * const customDelimiterResult = splitStringToArray('apple | orange | banana', ' | ');
15
+ * // customDelimiterResult: ['apple', 'orange', 'banana']
16
+ */
17
+ export function splitStringToArray(string, split = ',') {
18
+ return (string
19
+ .split(split)
20
+ .map((s) => s.trim())
21
+ .filter((s) => s.length > 0) ?? []);
22
+ }