@orangelogic/design-system 2.116.0 → 2.117.0

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 (37) hide show
  1. package/library/chunks/asset-link-format.QzzboHHE.js +6 -0
  2. package/library/chunks/asset.CIWxY-Aw.js +469 -0
  3. package/library/chunks/{endpoints.DBlquU2-.js → endpoints.D4h8hp1m.js} +90 -90
  4. package/library/chunks/{folder-select.Bc9x2hMO.js → folder-select.CrWjwQcw.js} +2 -2
  5. package/library/chunks/{list-editor.on8VVRn-.js → list-editor.BfpDIsU5.js} +127 -122
  6. package/library/chunks/{transformation.BlQCWMfI.js → transformation.c-RS37zA.js} +1 -1
  7. package/library/components/asset-link-format.js +3 -3
  8. package/library/components/audio.js +165 -103
  9. package/library/components/cropper.js +1 -1
  10. package/library/components/folder-select.js +2 -2
  11. package/library/components/list-editor.js +1 -1
  12. package/library/components/molecules.js +2 -2
  13. package/library/components/select.js +107 -107
  14. package/library/components/types.js +23956 -24118
  15. package/library/package.json +1 -1
  16. package/library/packages/atoms/src/components/audio/audio.d.ts +32 -5
  17. package/library/packages/molecules/src/asset-data-display/asset-data-display.d.ts +2 -1
  18. package/library/packages/molecules/src/asset-picker/asset-picker.d.ts +2 -0
  19. package/library/packages/molecules/src/index.d.ts +0 -1
  20. package/library/packages/molecules/src/page-outline/page-outline.d.ts +1 -2
  21. package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.d.ts +4 -1
  22. package/library/packages/organisms/src/content-builder/configs/audio.d.ts +1 -0
  23. package/library/packages/organisms/src/content-builder/configs-controller.d.ts +2 -0
  24. package/library/packages/organisms/src/content-builder/styleController.d.ts +1 -0
  25. package/library/packages/services/src/api/asset/asset.d.ts +6 -3
  26. package/library/packages/services/src/api/endpoints.d.ts +2 -1
  27. package/library/packages/tools/src/fetch-asset/fetch-asset.d.ts +6 -1
  28. package/library/packages/tools/src/fetch-image/fetch-image.d.ts +2 -0
  29. package/library/packages/types/src/asset-link-format.d.ts +1 -0
  30. package/library/packages/types/src/content-builder.d.ts +4 -0
  31. package/library/react-web-component.d.ts +741 -721
  32. package/library/utils.js +1 -1
  33. package/package.json +1 -1
  34. package/library/chunks/asset-link-format.B0c92pSs.js +0 -6
  35. package/library/chunks/asset.D_xAgoOX.js +0 -460
  36. package/library/packages/molecules/src/timeline/timeline.d.ts +0 -71
  37. package/library/packages/molecules/src/timeline/timeline.styles.d.ts +0 -2
@@ -1,42 +1,42 @@
1
- import { C as S } from "./button.DwJEeW2t.js";
2
- import { C as G, D as R } from "./dialog.BYCWepBc.js";
3
- import j from "../components/grid.js";
1
+ import { C as k } from "./button.DwJEeW2t.js";
2
+ import { C as R, D as j } from "./dialog.BYCWepBc.js";
3
+ import B from "../components/grid.js";
4
4
  import F from "../components/grid-item.js";
5
5
  import { C as E } from "./input.CH4lKxPM.js";
6
6
  import P from "../components/line-clamp.js";
7
- import { C as B } from "./option.Bvh35v8S.js";
8
- import K from "../components/radio.js";
9
- import U from "../components/radio-group.js";
10
- import H from "../components/select.js";
7
+ import { C as K } from "./option.Bvh35v8S.js";
8
+ import U from "../components/radio.js";
9
+ import H from "../components/radio-group.js";
10
+ import V from "../components/select.js";
11
11
  import T from "../components/space.js";
12
- import { C as V, H as W } from "./table.GCs54Y2t.js";
12
+ import { C as W, H as J } from "./table.GCs54Y2t.js";
13
13
  import { C as L } from "./typography.DJC_UXgs.js";
14
14
  import { n as o, C as D } from "./lib-cortex-element.CVMmyPMC.js";
15
- import J from "../components/dynamic-select.js";
15
+ import X from "../components/dynamic-select.js";
16
16
  import { c as M } from "./component.styles.CRO4Odto.js";
17
17
  import { c as z } from "./custom-element.L4WJXn1j.js";
18
- import { d as X } from "./debounce.CIEhztrj.js";
18
+ import { d as Y } from "./debounce.CIEhztrj.js";
19
19
  import { L as O } from "./i18n.CH-wak_P.js";
20
20
  import { w as v } from "./watch.CThbualB.js";
21
- import { a as Y } from "./_commonjsHelpers.DQNKXVTB.js";
21
+ import { a as Z } from "./_commonjsHelpers.DQNKXVTB.js";
22
22
  import { i as q, x as l } from "./lit-element.jLBm65_O.js";
23
23
  import { r as N } from "./state.CSDxrqLd.js";
24
24
  import { e as y } from "./query.BBf1UFkC.js";
25
- import { r as Z } from "./choose.BTbF6BAn.js";
26
- import { e as Q } from "./class-map.BiVq-cVR.js";
27
- import { o as ee } from "./map.D8heArFD.js";
25
+ import { r as Q } from "./choose.BTbF6BAn.js";
26
+ import { e as ee } from "./class-map.BiVq-cVR.js";
27
+ import { o as te } from "./map.D8heArFD.js";
28
28
  import { c as x } from "./repeat.DbF2p5ae.js";
29
29
  import { n as b } from "./when.Dr1es41R.js";
30
30
  import { t as ae } from "./toString.CAY8lys2.js";
31
- import { C as te } from "./icon-button.CQiBjznj.js";
32
- import { C as ie } from "./image.cT-FziNS.js";
33
- import { a as ne, F as I, b as w } from "./asset.D_xAgoOX.js";
34
- import { a as se } from "./index.Cpamj0jB.js";
31
+ import { C as ie } from "./icon-button.CQiBjznj.js";
32
+ import { C as ne } from "./image.cT-FziNS.js";
33
+ import { a as se, F as I, b as w } from "./asset.CIWxY-Aw.js";
34
+ import { a as re } from "./index.Cpamj0jB.js";
35
35
  import { A as g } from "./content-builder.OsUmm8Wu.js";
36
- import { b as re, t as $ } from "./string.DUgD4c9f.js";
37
- import { t as oe } from "./toast.D3AW3RWv.js";
36
+ import { b as oe, t as $ } from "./string.DUgD4c9f.js";
37
+ import { t as le } from "./toast.D3AW3RWv.js";
38
38
  var C, _;
39
- function le() {
39
+ function me() {
40
40
  return _ || (_ = 1, C = {
41
41
  aa: {
42
42
  name: "Afar",
@@ -772,19 +772,19 @@ function le() {
772
772
  }
773
773
  }), C;
774
774
  }
775
- var A, k;
776
- function me() {
777
- if (k) return A;
778
- k = 1;
779
- const e = le(), a = {}, t = {}, i = [], s = [], p = [];
775
+ var A, S;
776
+ function ce() {
777
+ if (S) return A;
778
+ S = 1;
779
+ const e = me(), t = {}, a = {}, i = [], s = [], p = [];
780
780
  for (const d in e) {
781
781
  const { name: m, nativeName: h } = e[d];
782
- a[d] = t[m.toLowerCase()] = t[h.toLowerCase()] = { code: d, name: m, nativeName: h }, i.push(d), s.push(m), p.push(h);
782
+ t[d] = a[m.toLowerCase()] = a[h.toLowerCase()] = { code: d, name: m, nativeName: h }, i.push(d), s.push(m), p.push(h);
783
783
  }
784
784
  return A = class f {
785
785
  static getLanguages(m = []) {
786
786
  return m.map(
787
- (h) => f.validate(h) ? Object.assign({}, a[h]) : { code: h, name: "", nativeName: "" }
787
+ (h) => f.validate(h) ? Object.assign({}, t[h]) : { code: h, name: "", nativeName: "" }
788
788
  );
789
789
  }
790
790
  static getName(m) {
@@ -800,7 +800,7 @@ function me() {
800
800
  return p.slice();
801
801
  }
802
802
  static getCode(m) {
803
- return m = m.toLowerCase(), t.hasOwnProperty(m) ? t[m].code : "";
803
+ return m = m.toLowerCase(), a.hasOwnProperty(m) ? a[m].code : "";
804
804
  }
805
805
  static getAllCodes() {
806
806
  return i.slice();
@@ -810,22 +810,22 @@ function me() {
810
810
  }
811
811
  }, A;
812
812
  }
813
- var ce = me();
814
- const de = /* @__PURE__ */ Y(ce);
815
- var pe = 0;
816
- function ue(e) {
817
- var a = ++pe;
818
- return ae(e) + a;
813
+ var de = ce();
814
+ const pe = /* @__PURE__ */ Z(de);
815
+ var ue = 0;
816
+ function he(e) {
817
+ var t = ++ue;
818
+ return ae(e) + t;
819
819
  }
820
- const he = q`:host{isolation:isolate}.asset-picker__input[data-user-invalid]~.asset-picker__trigger-wrapper .asset-picker__button::part(base){border-color:var(--cx-input-invalid-border-color)}.asset-picker__input[data-user-invalid]:focus-within~.asset-picker__trigger-wrapper .asset-picker__button::part(base){border-color:var(--cx-input-invalid-border-color);box-shadow:var(--cx-input-invalid-shadow)}.asset-picker__button-container{position:relative}.asset-picker__trigger-wrapper{z-index:1;position:relative}.asset-picker__image{--height:150px;--width:200px;--border-radius:var(--cx-border-radius-medium)}.asset-picker__input{opacity:0;width:100%;height:100%;position:absolute;top:0;left:0}`;
821
- var ve = Object.defineProperty, ge = Object.getOwnPropertyDescriptor, u = (e, a, t, i) => {
822
- for (var s = i > 1 ? void 0 : i ? ge(a, t) : a, p = e.length - 1, d; p >= 0; p--)
823
- (d = e[p]) && (s = (i ? d(a, t, s) : d(s)) || s);
824
- return i && s && ve(a, t, s), s;
820
+ const ve = q`:host{isolation:isolate}.asset-picker__input[data-user-invalid]~.asset-picker__trigger-wrapper .asset-picker__button::part(base){border-color:var(--cx-input-invalid-border-color)}.asset-picker__input[data-user-invalid]:focus-within~.asset-picker__trigger-wrapper .asset-picker__button::part(base){border-color:var(--cx-input-invalid-border-color);box-shadow:var(--cx-input-invalid-shadow)}.asset-picker__button-container{position:relative}.asset-picker__trigger-wrapper{z-index:1;position:relative}.asset-picker__image{--height:150px;--width:200px;--border-radius:var(--cx-border-radius-medium)}.asset-picker__input{opacity:0;width:100%;height:100%;position:absolute;top:0;left:0}`;
821
+ var ge = Object.defineProperty, be = Object.getOwnPropertyDescriptor, u = (e, t, a, i) => {
822
+ for (var s = i > 1 ? void 0 : i ? be(t, a) : t, p = e.length - 1, d; p >= 0; p--)
823
+ (d = e[p]) && (s = (i ? d(t, a, s) : d(s)) || s);
824
+ return i && s && ge(t, a, s), s;
825
825
  };
826
826
  let c = class extends D {
827
827
  constructor() {
828
- super(...arguments), this.localize = new O(this), this.value = "", this.name = "", this.type = [g.Image], this.multiple = !1, this.accepts = [], this.required = !1, this.disabled = !1, this.onRequestAsset = void 0, this.recordId = "", this.previewSrc = "", this.apiGetAssets = ne;
828
+ super(...arguments), this.localize = new O(this), this.value = "", this.name = "", this.type = [g.Image], this.multiple = !1, this.accepts = [], this.required = !1, this.disabled = !1, this.onRequestAsset = void 0, this.recordId = "", this.isSiteBuilder = !1, this.previewSrc = "", this.apiGetAssets = se;
829
829
  }
830
830
  async handleRequestAssetClick() {
831
831
  if (this.onRequestAsset)
@@ -841,27 +841,28 @@ let c = class extends D {
841
841
  this.accepts
842
842
  );
843
843
  if (this.accepts.length > 0 && Object.values(e).some(
844
- (t) => !this.accepts.includes(re(t.src) ?? "")
844
+ (a) => !this.accepts.includes(oe(a.src) ?? "")
845
845
  ))
846
- oe(this.localize.term("nonAcceptedExtension", this.accepts), {
846
+ le(this.localize.term("nonAcceptedExtension", this.accepts), {
847
847
  notificationType: "warning"
848
848
  });
849
849
  else if (this.multiple) {
850
- const t = Object.values(e);
850
+ const a = Object.values(e);
851
851
  this.emit("cx-content-builder-asset-select", {
852
- detail: t
852
+ detail: a
853
853
  });
854
854
  } else {
855
- const { extension: t, id: i, identifier: s, name: p, representative: d, src: m, type: h } = e;
855
+ const { extension: a, id: i, identifier: s, name: p, parentAssetID: d, representative: m, src: h, type: G } = e;
856
856
  this.emit("cx-content-builder-asset-select", {
857
857
  detail: {
858
- extension: t,
858
+ extension: a,
859
859
  id: i,
860
860
  identifier: s,
861
861
  name: p,
862
- representative: d,
863
- src: m,
864
- type: h
862
+ parentAssetID: d,
863
+ representative: m,
864
+ src: h,
865
+ type: G
865
866
  }
866
867
  });
867
868
  }
@@ -885,12 +886,13 @@ let c = class extends D {
885
886
  return;
886
887
  }
887
888
  try {
888
- const a = (await this.apiGetAssets({
889
+ const t = (await this.apiGetAssets({
889
890
  extraFields: ["path_TR1", I, w],
890
891
  getPermanentAssetsPaths: !0,
892
+ isSiteBuilder: this.isSiteBuilder,
891
893
  recordIds: [this.recordId]
892
894
  })).items[0];
893
- this.previewSrc = a?.path_TR1 || a?.originalUrl || "", this.name = a?.[I] || a?.[w] || "";
895
+ this.previewSrc = t?.path_TR1 || t?.originalUrl || "", this.name = t?.[I] || t?.[w] || "";
894
896
  } catch {
895
897
  this.previewSrc = "";
896
898
  }
@@ -904,7 +906,7 @@ let c = class extends D {
904
906
  }
905
907
  renderAssetPreview() {
906
908
  if ((this.previewSrc || this.value) && this.acceptsType(g.Image))
907
- return l`<cx-image part="image" class="asset-picker__image" src=${this.previewSrc || this.value} alt=${this.name} width="200px" object-fit=${se.Cover}></cx-image>`;
909
+ return l`<cx-image part="image" class="asset-picker__image" src=${this.previewSrc || this.value} alt=${this.name} width="200px" object-fit=${re.Cover}></cx-image>`;
908
910
  if (this.name && this.acceptsType(g.Audio) || this.acceptsType(g.Video))
909
911
  return l`<cx-typography variant="body-2">${$(this.name, 30, 11, 11)}</cx-typography>`;
910
912
  if (this.name && (this.acceptsType(g.Other) || this.acceptsType(g.All))) {
@@ -929,11 +931,11 @@ let c = class extends D {
929
931
  )}</cx-space>`;
930
932
  }
931
933
  };
932
- c.styles = [M, he];
934
+ c.styles = [M, ve];
933
935
  c.dependencies = {
934
- "cx-button": S,
935
- "cx-icon-button": te,
936
- "cx-image": ie,
936
+ "cx-button": k,
937
+ "cx-icon-button": ie,
938
+ "cx-image": ne,
937
939
  "cx-input": E,
938
940
  "cx-space": T,
939
941
  "cx-typography": L
@@ -953,7 +955,7 @@ u([
953
955
  u([
954
956
  o({
955
957
  converter: {
956
- fromAttribute: (e) => (e ?? "").split(" ").filter((a) => a !== ""),
958
+ fromAttribute: (e) => (e ?? "").split(" ").filter((t) => t !== ""),
957
959
  toAttribute: (e) => e.join(" ")
958
960
  },
959
961
  reflect: !0
@@ -965,7 +967,7 @@ u([
965
967
  u([
966
968
  o({
967
969
  converter: {
968
- fromAttribute: (e) => (e ?? "").split(" ").filter((a) => a !== ""),
970
+ fromAttribute: (e) => (e ?? "").split(" ").filter((t) => t !== ""),
969
971
  toAttribute: (e) => e.join(" ")
970
972
  },
971
973
  reflect: !0
@@ -983,6 +985,9 @@ u([
983
985
  u([
984
986
  o({ attribute: "record-id", reflect: !0, type: String })
985
987
  ], c.prototype, "recordId", 2);
988
+ u([
989
+ o({ attribute: "is-site-builder", reflect: !0, type: Boolean })
990
+ ], c.prototype, "isSiteBuilder", 2);
986
991
  u([
987
992
  N()
988
993
  ], c.prototype, "previewSrc", 2);
@@ -995,13 +1000,13 @@ u([
995
1000
  c = u([
996
1001
  z("cx-asset-picker")
997
1002
  ], c);
998
- const be = q`:host{--overridden-min-height:var(--min-height,160px);--overridden-max-height:var(--max-height,260px);width:100%;display:block}.list-editor{width:100%}.list-editor__table{--cell-border-color:transparent;--cell-bottom-border-color:transparent;--header-font-size:var(--cx-font-size-small);--row-header-border-color:transparent;--cell-horizontal-padding:var(--cx-spacing-2x-small);--table-min-height:var(--overridden-min-height);--table-max-height:var(--overridden-max-height)}.list-editor__table--no-header{--cell-hover-background-color:transparent}.list-editor__item::part(expand-button){display:none}.list-editor__item__text{--line-height:1}.list-editor__item__text__description{color:var(--cx-color-neutral-600)}.list-editor__dialog{--body-spacing:0;--header-spacing:var(--cx-spacing-small) var(--cx-spacing-large) 0;--width:540px}.list-editor__tab-group{--padding:0;--tab-group-nav-padding:0 var(--cx-spacing-large)}`;
999
- var Ne = Object.defineProperty, xe = Object.getOwnPropertyDescriptor, r = (e, a, t, i) => {
1000
- for (var s = i > 1 ? void 0 : i ? xe(a, t) : a, p = e.length - 1, d; p >= 0; p--)
1001
- (d = e[p]) && (s = (i ? d(a, t, s) : d(s)) || s);
1002
- return i && s && Ne(a, t, s), s;
1003
+ const Ne = q`:host{--overridden-min-height:var(--min-height,160px);--overridden-max-height:var(--max-height,260px);width:100%;display:block}.list-editor{width:100%}.list-editor__table{--cell-border-color:transparent;--cell-bottom-border-color:transparent;--header-font-size:var(--cx-font-size-small);--row-header-border-color:transparent;--cell-horizontal-padding:var(--cx-spacing-2x-small);--table-min-height:var(--overridden-min-height);--table-max-height:var(--overridden-max-height)}.list-editor__table--no-header{--cell-hover-background-color:transparent}.list-editor__item::part(expand-button){display:none}.list-editor__item__text{--line-height:1}.list-editor__item__text__description{color:var(--cx-color-neutral-600)}.list-editor__dialog{--body-spacing:0;--header-spacing:var(--cx-spacing-small) var(--cx-spacing-large) 0;--width:540px}.list-editor__tab-group{--padding:0;--tab-group-nav-padding:0 var(--cx-spacing-large)}`;
1004
+ var xe = Object.defineProperty, fe = Object.getOwnPropertyDescriptor, r = (e, t, a, i) => {
1005
+ for (var s = i > 1 ? void 0 : i ? fe(t, a) : t, p = e.length - 1, d; p >= 0; p--)
1006
+ (d = e[p]) && (s = (i ? d(t, a, s) : d(s)) || s);
1007
+ return i && s && xe(t, a, s), s;
1003
1008
  };
1004
- const fe = {
1009
+ const ye = {
1005
1010
  resizable: !1
1006
1011
  };
1007
1012
  let n = class extends D {
@@ -1033,7 +1038,7 @@ let n = class extends D {
1033
1038
  }
1034
1039
  ],
1035
1040
  options: {
1036
- placement: W.Right
1041
+ placement: J.Right
1037
1042
  }
1038
1043
  }, this.OMITTED_FIELDS = ["id"];
1039
1044
  }
@@ -1054,15 +1059,15 @@ let n = class extends D {
1054
1059
  }
1055
1060
  handleEditedItemChange() {
1056
1061
  const e = {};
1057
- for (const a of this.columns)
1058
- e[a.field] = a.configOrder;
1059
- this.sortedEntries = Object.entries(this.editedItem || {}).filter(([a]) => this.OMITTED_FIELDS.indexOf(a) === -1 && this.columnsMap[a]).sort(([a], [t]) => (e[a] ?? Number.MAX_SAFE_INTEGER) - (e[t] ?? Number.MAX_SAFE_INTEGER));
1062
+ for (const t of this.columns)
1063
+ e[t.field] = t.configOrder;
1064
+ this.sortedEntries = Object.entries(this.editedItem || {}).filter(([t]) => this.OMITTED_FIELDS.indexOf(t) === -1 && this.columnsMap[t]).sort(([t], [a]) => (e[t] ?? Number.MAX_SAFE_INTEGER) - (e[a] ?? Number.MAX_SAFE_INTEGER));
1060
1065
  }
1061
1066
  handleTableActions(e) {
1062
- const { name: a, row: t } = e.detail, i = "component" in t ? t.component : t;
1067
+ const { name: t, row: a } = e.detail, i = "component" in a ? a.component : a;
1063
1068
  if (i) {
1064
1069
  if (this.useEvents) {
1065
- this.emit(`cx-list-editor-${a}`, {
1070
+ this.emit(`cx-list-editor-${t}`, {
1066
1071
  detail: {
1067
1072
  index: i.getIndex(),
1068
1073
  item: i.getData()
@@ -1070,7 +1075,7 @@ let n = class extends D {
1070
1075
  });
1071
1076
  return;
1072
1077
  }
1073
- a === "edit" ? this.editedItem = i.getData() : a === "delete" && this.emit("cx-list-editor-change", {
1078
+ t === "edit" ? this.editedItem = i.getData() : t === "delete" && this.emit("cx-list-editor-change", {
1074
1079
  detail: {
1075
1080
  data: this.data.filter((s) => s.id !== i.getData().id)
1076
1081
  }
@@ -1090,22 +1095,22 @@ let n = class extends D {
1090
1095
  handleAddClick() {
1091
1096
  this.isAdding = !0, this.editedItem = {
1092
1097
  ...this.sampleItem,
1093
- id: ue(`${Date.now()}-`)
1098
+ id: he(`${Date.now()}-`)
1094
1099
  };
1095
1100
  }
1096
1101
  handleSaveClick() {
1097
1102
  if (this.editedItem) {
1098
1103
  const e = this.data.findIndex(
1099
- (t) => t.id === this.editedItem.id
1104
+ (a) => a.id === this.editedItem.id
1100
1105
  );
1101
1106
  if (!this.isAdding && e === -1) {
1102
1107
  this.editedItem = null;
1103
1108
  return;
1104
1109
  }
1105
- let a = this.data;
1106
- this.isAdding ? a = [...a, this.editedItem] : a = this.data.map((t) => t.id === this.editedItem.id ? this.editedItem : t), this.emit("cx-list-editor-change", {
1110
+ let t = this.data;
1111
+ this.isAdding ? t = [...t, this.editedItem] : t = this.data.map((a) => a.id === this.editedItem.id ? this.editedItem : a), this.emit("cx-list-editor-change", {
1107
1112
  detail: {
1108
- data: a
1113
+ data: t
1109
1114
  }
1110
1115
  }), this.editedItem = null, this.isAdding = !1;
1111
1116
  }
@@ -1124,55 +1129,55 @@ let n = class extends D {
1124
1129
  if (await this.updateComplete, !this.table)
1125
1130
  return;
1126
1131
  if (!this.loadingItemIndex) {
1127
- this.table.tabulatorInstance?.getRows().forEach((t) => {
1128
- const i = t._row.hoverMenuElement;
1129
- t._row.hoverMenuElement.actions = i.actions.map((s) => (s.options?.buttonProps && (s.options.buttonProps.loading = !1), s));
1132
+ this.table.tabulatorInstance?.getRows().forEach((a) => {
1133
+ const i = a._row.hoverMenuElement;
1134
+ a._row.hoverMenuElement.actions = i.actions.map((s) => (s.options?.buttonProps && (s.options.buttonProps.loading = !1), s));
1130
1135
  });
1131
1136
  return;
1132
1137
  }
1133
1138
  const e = this.table.tabulatorInstance?.getRow(this.loadingItemIndex);
1134
1139
  if (!e || !e?._row?.hoverMenuElement)
1135
1140
  return;
1136
- const a = e._row.hoverMenuElement;
1137
- a.actions = a.actions.map((t) => (t.options?.buttonProps && (t.options.buttonProps.loading = t.name === this.loadingEvent && this.loadingItemIndex === e.getIndex()), t));
1141
+ const t = e._row.hoverMenuElement;
1142
+ t.actions = t.actions.map((a) => (a.options?.buttonProps && (a.options.buttonProps.loading = a.name === this.loadingEvent && this.loadingItemIndex === e.getIndex()), a));
1138
1143
  }
1139
1144
  handleChange(e) {
1140
1145
  if (!e.target)
1141
1146
  return;
1142
- const a = e.target, t = a.dataset.id;
1143
- if (!t)
1147
+ const t = e.target, a = t.dataset.id;
1148
+ if (!a)
1144
1149
  return;
1145
- let i = a.value;
1150
+ let i = t.value;
1146
1151
  Array.isArray(i) ? i = i.join(" ") : i = String(i), this.editedItem = {
1147
1152
  ...this.editedItem,
1148
- [t]: i
1153
+ [a]: i
1149
1154
  };
1150
1155
  }
1151
1156
  renderControls(e) {
1152
1157
  if (e === "translation") {
1153
- const a = l`
1158
+ const t = l`
1154
1159
  ${x(
1155
1160
  this.translatableControls,
1156
- (t) => t.field,
1157
- (t) => l`<cx-grid columns="4" spacing="var(--cx-spacing-small)" column-spacing="0" use-flex-gap row-spacing="0" wrap="wrap"><cx-grid-item xs="4" sm="1"><cx-typography variant="body2">${t.title}</cx-typography></cx-grid-item><cx-grid-item xs="4" sm="3"><cx-space direction="vertical" spacing="x-small" wrap="nowrap">${ee(this.supportedLanguages, (i) => {
1158
- const s = this.localize.languageName(i) || de.getName(i) || i, p = (d) => {
1161
+ (a) => a.field,
1162
+ (a) => l`<cx-grid columns="4" spacing="var(--cx-spacing-small)" column-spacing="0" use-flex-gap row-spacing="0" wrap="wrap"><cx-grid-item xs="4" sm="1"><cx-typography variant="body2">${a.title}</cx-typography></cx-grid-item><cx-grid-item xs="4" sm="3"><cx-space direction="vertical" spacing="x-small" wrap="nowrap">${te(this.supportedLanguages, (i) => {
1163
+ const s = this.localize.languageName(i) || pe.getName(i) || i, p = (d) => {
1159
1164
  const m = d.target.value;
1160
1165
  this.editedItem = {
1161
1166
  ...this.editedItem,
1162
- [`${t.field}-${i}`]: m
1167
+ [`${a.field}-${i}`]: m
1163
1168
  };
1164
1169
  };
1165
- return l`<cx-input ?disabled=${i.toLowerCase() === this.defaultLanguage?.toLowerCase()} label=${s} value=${this.editedItem?.[`${t.field}-${i}`] ?? this.editedItem?.[`${t.field}`] ?? ""} @cx-change=${p}></cx-input>`;
1170
+ return l`<cx-input ?disabled=${i.toLowerCase() === this.defaultLanguage?.toLowerCase()} label=${s} value=${this.editedItem?.[`${a.field}-${i}`] ?? this.editedItem?.[`${a.field}`] ?? ""} @cx-change=${p}></cx-input>`;
1166
1171
  })}</cx-space></cx-grid-item></cx-grid>`
1167
1172
  )}
1168
1173
  `;
1169
- return l`<cx-space direction="vertical" wrap="nowrap">${a}</cx-space>`;
1174
+ return l`<cx-space direction="vertical" wrap="nowrap">${t}</cx-space>`;
1170
1175
  }
1171
1176
  return l`<cx-grid columns="3" spacing="var(--cx-spacing-small)" wrap="wrap">${x(
1172
1177
  this.sortedEntries,
1173
- ([a]) => a,
1174
- ([a, t]) => l`<cx-grid-item xs="3" sm="1"><cx-typography variant="body2">${this.columnsMap[a].title}</cx-typography></cx-grid-item><cx-grid-item xs="3" sm="2">${Z(
1175
- this.columnsMap[a].controlType,
1178
+ ([t]) => t,
1179
+ ([t, a]) => l`<cx-grid-item xs="3" sm="1"><cx-typography variant="body2">${this.columnsMap[t].title}</cx-typography></cx-grid-item><cx-grid-item xs="3" sm="2">${Q(
1180
+ this.columnsMap[t].controlType,
1176
1181
  [
1177
1182
  [
1178
1183
  "image-picker",
@@ -1183,45 +1188,45 @@ let n = class extends D {
1183
1188
  const { id: d, src: m } = p.detail;
1184
1189
  this.editedItem = {
1185
1190
  ...this.editedItem,
1186
- [a]: m,
1191
+ [t]: m,
1187
1192
  recordId: d
1188
1193
  };
1189
1194
  }, s = async () => {
1190
1195
  this.editedItem = {
1191
1196
  ...this.editedItem,
1192
- [a]: "",
1197
+ [t]: "",
1193
1198
  recordId: ""
1194
1199
  };
1195
1200
  };
1196
- return l`<cx-asset-picker value=${t} record-id=${this.editedItem.recordId || ""} type="image" id=${a} @cx-content-builder-asset-select=${i} @cx-content-builder-asset-delete=${s} @cx-asset-request-status=${this.handleAssetRequestStatus} .onRequestAsset=${this.onRequestAsset}></cx-asset-picker>`;
1201
+ return l`<cx-asset-picker value=${a} record-id=${this.editedItem.recordId || ""} type="image" is-site-builder id=${t} @cx-content-builder-asset-select=${i} @cx-content-builder-asset-delete=${s} @cx-asset-request-status=${this.handleAssetRequestStatus} .onRequestAsset=${this.onRequestAsset}></cx-asset-picker>`;
1197
1202
  }
1198
1203
  ],
1199
1204
  [
1200
1205
  "radio-group",
1201
- () => l`<cx-radio-group data-id=${a} data-testid="radio-group-control" horizontal value=${(t || this.columnsMap[a].defaultValue) ?? ""} size="medium" @cx-change=${this.handleChange}>${x(
1202
- this.columnsMap[a].options ?? [],
1206
+ () => l`<cx-radio-group data-id=${t} data-testid="radio-group-control" horizontal value=${(a || this.columnsMap[t].defaultValue) ?? ""} size="medium" @cx-change=${this.handleChange}>${x(
1207
+ this.columnsMap[t].options ?? [],
1203
1208
  (i) => i.value,
1204
1209
  (i) => l`<cx-radio value=${i.value}>${i.name}</cx-radio>`
1205
1210
  )}</cx-radio-group>`
1206
1211
  ],
1207
1212
  [
1208
1213
  "select",
1209
- () => this.columnsMap[a].api ? l`<cx-dynamic-select data-id=${a} hoist value=${t} @cx-change=${this.handleChange} .api=${this.columnsMap[a].api}></cx-dynamic-select>` : l`<cx-select data-id=${a} hoist value=${t} @cx-change=${this.handleChange}>${x(
1210
- this.columnsMap[a].options ?? [],
1214
+ () => this.columnsMap[t].api ? l`<cx-dynamic-select data-id=${t} hoist value=${a} @cx-change=${this.handleChange} .api=${this.columnsMap[t].api}></cx-dynamic-select>` : l`<cx-select data-id=${t} hoist value=${a} @cx-change=${this.handleChange}>${x(
1215
+ this.columnsMap[t].options ?? [],
1211
1216
  (i) => i.value,
1212
1217
  (i) => l`<cx-option value=${i.value}>${i.name}</cx-option>`
1213
1218
  )}</cx-select>`
1214
1219
  ]
1215
1220
  ],
1216
- () => l`<cx-input data-id=${a} value=${t} @cx-change=${this.handleChange}></cx-input>`
1221
+ () => l`<cx-input data-id=${t} value=${a} @cx-change=${this.handleChange}></cx-input>`
1217
1222
  )}</cx-grid-item>`
1218
1223
  )}</cx-grid>`;
1219
1224
  }
1220
1225
  render() {
1221
- return l`<cx-space direction="vertical" align-items="flex-start"><div class="list-editor"><cx-table part="table" class=${Q({
1226
+ return l`<cx-space direction="vertical" align-items="flex-start"><div class="list-editor"><cx-table part="table" class=${ee({
1222
1227
  "list-editor__table": !0,
1223
1228
  "list-editor__table--no-header": this.noHeader
1224
- })} ?movable-rows=${this.sortable} ?no-header=${this.noHeader} layout="fitColumns" row-height=${this.rowHeight} .columns=${this.columns} .columnDefaults=${fe} .hoverMenu=${this.hoverMenu} .data=${this.data ?? []} no-selectable @cx-table.rowMoved=${this.handleTableRowMoved} @cx-table-row-action-click=${this.handleTableActions}></cx-table><cx-dialog part="dialog" class="list-editor__dialog" divider-position=${R.Footer} use-overlay-scrollbar strategy="fixed" ?open=${!!this.editedItem} .boundary=${this.boundary} @cx-request-close=${this.handleRequestClose}><cx-space slot="label" direction="vertical" spacing="2x-small"><cx-typography variant="h4">${this.isAdding ? this.addDialogLabel : this.editDialogLabel}</cx-typography>${b(
1229
+ })} ?movable-rows=${this.sortable} ?no-header=${this.noHeader} layout="fitColumns" row-height=${this.rowHeight} .columns=${this.columns} .columnDefaults=${ye} .hoverMenu=${this.hoverMenu} .data=${this.data ?? []} no-selectable @cx-table.rowMoved=${this.handleTableRowMoved} @cx-table-row-action-click=${this.handleTableActions}></cx-table><cx-dialog part="dialog" class="list-editor__dialog" divider-position=${j.Footer} use-overlay-scrollbar strategy="fixed" ?open=${!!this.editedItem} .boundary=${this.boundary} @cx-request-close=${this.handleRequestClose}><cx-space slot="label" direction="vertical" spacing="2x-small"><cx-typography variant="h4">${this.isAdding ? this.addDialogLabel : this.editDialogLabel}</cx-typography>${b(
1225
1230
  !this.isAdding && this.editedItem?.[this.displayField],
1226
1231
  () => l`<cx-typography variant="body3"><cx-line-clamp lines="1">${this.editedItem?.[this.displayField]}</cx-line-clamp></cx-typography>`
1227
1232
  )}</cx-space>${b(
@@ -1238,22 +1243,22 @@ let n = class extends D {
1238
1243
  )}</cx-space>`;
1239
1244
  }
1240
1245
  };
1241
- n.styles = [M, be];
1246
+ n.styles = [M, Ne];
1242
1247
  n.dependencies = {
1243
1248
  "cx-asset-picker": c,
1244
- "cx-button": S,
1245
- "cx-dialog": G,
1246
- "cx-dynamic-select": J,
1247
- "cx-grid": j,
1249
+ "cx-button": k,
1250
+ "cx-dialog": R,
1251
+ "cx-dynamic-select": X,
1252
+ "cx-grid": B,
1248
1253
  "cx-grid-item": F,
1249
1254
  "cx-input": E,
1250
1255
  "cx-line-clamp": P,
1251
- "cx-option": B,
1252
- "cx-radio": K,
1253
- "cx-radio-group": U,
1254
- "cx-select": H,
1256
+ "cx-option": K,
1257
+ "cx-radio": U,
1258
+ "cx-radio-group": H,
1259
+ "cx-select": V,
1255
1260
  "cx-space": T,
1256
- "cx-table": V,
1261
+ "cx-table": W,
1257
1262
  "cx-typography": L
1258
1263
  };
1259
1264
  r([
@@ -1267,8 +1272,8 @@ r([
1267
1272
  converter: {
1268
1273
  fromAttribute: (e) => {
1269
1274
  try {
1270
- const a = JSON.parse(e);
1271
- return Array.isArray(a) ? a : [];
1275
+ const t = JSON.parse(e);
1276
+ return Array.isArray(t) ? t : [];
1272
1277
  } catch {
1273
1278
  return [];
1274
1279
  }
@@ -1367,15 +1372,15 @@ r([
1367
1372
  r([
1368
1373
  v("loadingEvent", { waitUntilFirstUpdate: !0 }),
1369
1374
  v("loadingItemIndex", { waitUntilFirstUpdate: !0 }),
1370
- X(10)
1375
+ Y(10)
1371
1376
  ], n.prototype, "handleLoadingEventChange", 1);
1372
1377
  n = r([
1373
1378
  z("cx-list-editor")
1374
1379
  ], n);
1375
1380
  export {
1376
1381
  n as C,
1377
- de as I,
1382
+ pe as I,
1378
1383
  c as a,
1379
- fe as c,
1380
- ue as u
1384
+ ye as c,
1385
+ he as u
1381
1386
  };
@@ -1,4 +1,4 @@
1
- import { T as r } from "./asset-link-format.B0c92pSs.js";
1
+ import { T as r } from "./asset-link-format.QzzboHHE.js";
2
2
  function m({
3
3
  asset: k,
4
4
  baseUrl: h,
@@ -3,14 +3,14 @@ import { C as B } from "../chunks/button.DwJEeW2t.js";
3
3
  import _ from "./space.js";
4
4
  import { C as F } from "../chunks/typography.DJC_UXgs.js";
5
5
  import { n, C as W } from "../chunks/lib-cortex-element.CVMmyPMC.js";
6
- import { c as rt, d as ht } from "../chunks/asset.D_xAgoOX.js";
6
+ import { c as rt, d as ht } from "../chunks/asset.CIWxY-Aw.js";
7
7
  import { c as E } from "../chunks/component.styles.CRO4Odto.js";
8
- import { U as a, T as l } from "../chunks/asset-link-format.B0c92pSs.js";
8
+ import { U as a, T as l } from "../chunks/asset-link-format.QzzboHHE.js";
9
9
  import { c as N } from "../chunks/custom-element.L4WJXn1j.js";
10
10
  import { L as U } from "../chunks/i18n.CH-wak_P.js";
11
11
  import { w } from "../chunks/watch.CThbualB.js";
12
12
  import { s as et, c as it } from "../chunks/number.B4PQLJIg.js";
13
- import { b as G } from "../chunks/transformation.BlQCWMfI.js";
13
+ import { b as G } from "../chunks/transformation.c-RS37zA.js";
14
14
  import { i as O, x as m, E as nt } from "../chunks/lit-element.jLBm65_O.js";
15
15
  import { r as z } from "../chunks/state.CSDxrqLd.js";
16
16
  import { n as k } from "../chunks/when.Dr1es41R.js";