@orangelogic/design-system 2.123.0 → 2.125.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.
- package/library/chunks/{asset.CPPr2-ir.js → asset.D_VITxRH.js} +6 -6
- package/library/chunks/{header.BrmqvtqC.js → header.WRWyUU36.js} +64 -68
- package/library/chunks/{list-editor.CSZvS-Fm.js → list-editor.CyHNKjuZ.js} +130 -123
- package/library/components/asset-link-format.js +1 -1
- package/library/components/atoms.js +1 -1
- package/library/components/header.js +1 -1
- package/library/components/list-editor.js +1 -1
- package/library/components/molecules.js +1 -1
- package/library/components/types.js +23971 -23718
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/header/header.d.ts +4 -0
- package/library/packages/events/src/events.d.ts +0 -1
- package/library/packages/molecules/src/asset-format-picker/asset-format-picker.d.ts +9 -3
- package/library/packages/molecules/src/asset-picker/asset-picker.d.ts +7 -1
- package/library/packages/organisms/src/_v1/comment/comment.d.ts +67 -0
- package/library/packages/organisms/src/_v1/comment/components/comment-menu/comment-menu.d.ts +32 -0
- package/library/packages/organisms/src/_v1/comment/extensions/time.d.ts +63 -0
- package/library/packages/organisms/src/content-builder/components/config-form/config-form.d.ts +1 -1
- package/library/packages/organisms/src/content-builder/configs/audio.d.ts +0 -1
- package/library/packages/organisms/src/content-builder/configs/header.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/video.d.ts +0 -1
- package/library/packages/organisms/src/content-builder/configs-controller.d.ts +1 -4
- package/library/packages/organisms/src/content-builder/styleController.d.ts +1 -1
- package/library/packages/organisms/src/index.d.ts +1 -0
- package/library/packages/types/src/asset-format-picker.d.ts +0 -1
- package/library/packages/types/src/content-builder.d.ts +2 -2
- package/library/react-web-component.d.ts +13 -1
- package/package.json +1 -1
- package/library/packages/events/src/cx-asset-format-picker-delete.d.ts +0 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as k } from "./button.DcInI7IV.js";
|
|
2
|
-
import { C as
|
|
2
|
+
import { C as G, D as R } from "./dialog.BlKHLwFx.js";
|
|
3
3
|
import B from "../components/grid.js";
|
|
4
4
|
import F from "../components/grid-item.js";
|
|
5
5
|
import { C as E } from "./input.BRgVRr2i.js";
|
|
@@ -11,7 +11,7 @@ import V from "../components/select.js";
|
|
|
11
11
|
import T from "../components/space.js";
|
|
12
12
|
import { C as W, H as J } from "./table.CipCH4U5.js";
|
|
13
13
|
import { C as L } from "./typography.DJC_UXgs.js";
|
|
14
|
-
import { n as
|
|
14
|
+
import { n as r, C as D } from "./lib-cortex-element.CVMmyPMC.js";
|
|
15
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";
|
|
@@ -19,18 +19,18 @@ import { d as Y } from "./debounce.DaHuiSGU.js";
|
|
|
19
19
|
import { L as O } from "./i18n.NAH4U8Lw.js";
|
|
20
20
|
import { w as v } from "./watch.CThbualB.js";
|
|
21
21
|
import { a as Z } from "./_commonjsHelpers.DQNKXVTB.js";
|
|
22
|
-
import { i as
|
|
23
|
-
import { r as
|
|
22
|
+
import { i as j, x as l } from "./lit-element.jLBm65_O.js";
|
|
23
|
+
import { r as b } from "./state.CSDxrqLd.js";
|
|
24
24
|
import { e as y } from "./query.BBf1UFkC.js";
|
|
25
25
|
import { r as Q } from "./choose.BTbF6BAn.js";
|
|
26
26
|
import { e as ee } from "./class-map.BiVq-cVR.js";
|
|
27
27
|
import { o as te } from "./map.D8heArFD.js";
|
|
28
28
|
import { c as x } from "./repeat.DbF2p5ae.js";
|
|
29
|
-
import { n as
|
|
29
|
+
import { n as N } from "./when.Dr1es41R.js";
|
|
30
30
|
import { t as ae } from "./toString.CAY8lys2.js";
|
|
31
31
|
import { C as ie } from "./icon-button.COTH_z-J.js";
|
|
32
32
|
import { C as ne } from "./image.CDrKFe1H.js";
|
|
33
|
-
import { a as se, F as I, b as w } from "./asset.
|
|
33
|
+
import { a as se, F as I, b as w } from "./asset.D_VITxRH.js";
|
|
34
34
|
import { a as re } from "./index.Cpamj0jB.js";
|
|
35
35
|
import { A as g } from "./content-builder.BGzxZUgi.js";
|
|
36
36
|
import { b as oe, t as $ } from "./string.CbnVBzsd.js";
|
|
@@ -776,10 +776,10 @@ var A, S;
|
|
|
776
776
|
function ce() {
|
|
777
777
|
if (S) return A;
|
|
778
778
|
S = 1;
|
|
779
|
-
const e = me(), t = {}, a = {}, i = [], s = [],
|
|
779
|
+
const e = me(), t = {}, a = {}, i = [], s = [], u = [];
|
|
780
780
|
for (const d in e) {
|
|
781
781
|
const { name: m, nativeName: h } = e[d];
|
|
782
|
-
t[d] = a[m.toLowerCase()] = a[h.toLowerCase()] = { code: d, name: m, nativeName: h }, i.push(d), s.push(m),
|
|
782
|
+
t[d] = a[m.toLowerCase()] = a[h.toLowerCase()] = { code: d, name: m, nativeName: h }, i.push(d), s.push(m), u.push(h);
|
|
783
783
|
}
|
|
784
784
|
return A = class f {
|
|
785
785
|
static getLanguages(m = []) {
|
|
@@ -797,7 +797,7 @@ function ce() {
|
|
|
797
797
|
return f.validate(m) ? e[m].nativeName : "";
|
|
798
798
|
}
|
|
799
799
|
static getAllNativeNames() {
|
|
800
|
-
return
|
|
800
|
+
return u.slice();
|
|
801
801
|
}
|
|
802
802
|
static getCode(m) {
|
|
803
803
|
return m = m.toLowerCase(), a.hasOwnProperty(m) ? a[m].code : "";
|
|
@@ -817,15 +817,15 @@ function he(e) {
|
|
|
817
817
|
var t = ++ue;
|
|
818
818
|
return ae(e) + t;
|
|
819
819
|
}
|
|
820
|
-
const ve =
|
|
821
|
-
var ge = Object.defineProperty, be = Object.getOwnPropertyDescriptor,
|
|
822
|
-
for (var s = i > 1 ? void 0 : i ? be(t, a) : t,
|
|
823
|
-
(d = e[
|
|
820
|
+
const ve = j`: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, p = (e, t, a, i) => {
|
|
822
|
+
for (var s = i > 1 ? void 0 : i ? be(t, a) : t, u = e.length - 1, d; u >= 0; u--)
|
|
823
|
+
(d = e[u]) && (s = (i ? d(t, a, s) : d(s)) || s);
|
|
824
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.isSiteBuilder = !1, this.previewSrc = "", this.apiGetAssets = se;
|
|
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.restrict = !1, this.onRequestAsset = void 0, this.recordId = "", this.isSiteBuilder = !1, this.previewSrc = "", this.assetTitle = "", this.apiGetAssets = se;
|
|
829
829
|
}
|
|
830
830
|
async handleRequestAssetClick() {
|
|
831
831
|
if (this.onRequestAsset)
|
|
@@ -838,7 +838,8 @@ let c = class extends D {
|
|
|
838
838
|
const e = await this.onRequestAsset(
|
|
839
839
|
this.type.join(" "),
|
|
840
840
|
this.multiple,
|
|
841
|
-
this.accepts
|
|
841
|
+
this.accepts,
|
|
842
|
+
this.restrict ? this.type.join(" ") : void 0
|
|
842
843
|
);
|
|
843
844
|
if (this.accepts.length > 0 && Object.values(e).some(
|
|
844
845
|
(a) => !this.accepts.includes(oe(a.src) ?? "")
|
|
@@ -852,17 +853,17 @@ let c = class extends D {
|
|
|
852
853
|
detail: a
|
|
853
854
|
});
|
|
854
855
|
} else {
|
|
855
|
-
const { extension: a, id: i, identifier: s, name:
|
|
856
|
+
const { extension: a, id: i, identifier: s, name: u, parentAssetID: d, representative: m, src: h, type: q } = e;
|
|
856
857
|
this.emit("cx-content-builder-asset-select", {
|
|
857
858
|
detail: {
|
|
858
859
|
extension: a,
|
|
859
860
|
id: i,
|
|
860
861
|
identifier: s,
|
|
861
|
-
name:
|
|
862
|
+
name: u,
|
|
862
863
|
parentAssetID: d,
|
|
863
864
|
representative: m,
|
|
864
865
|
src: h,
|
|
865
|
-
type:
|
|
866
|
+
type: q
|
|
866
867
|
}
|
|
867
868
|
});
|
|
868
869
|
}
|
|
@@ -882,7 +883,7 @@ let c = class extends D {
|
|
|
882
883
|
}
|
|
883
884
|
async handleRecordIdChange() {
|
|
884
885
|
if (!this.recordId) {
|
|
885
|
-
this.previewSrc = "";
|
|
886
|
+
this.previewSrc = "", this.assetTitle = "";
|
|
886
887
|
return;
|
|
887
888
|
}
|
|
888
889
|
try {
|
|
@@ -892,9 +893,9 @@ let c = class extends D {
|
|
|
892
893
|
isSiteBuilder: this.isSiteBuilder,
|
|
893
894
|
recordIds: [this.recordId]
|
|
894
895
|
})).items[0];
|
|
895
|
-
this.previewSrc = t?.path_TR1 || t?.originalUrl || "", this.
|
|
896
|
+
this.previewSrc = t?.path_TR1 || t?.originalUrl || "", this.assetTitle = t?.[I] || t?.[w] || "";
|
|
896
897
|
} catch {
|
|
897
|
-
this.previewSrc = "";
|
|
898
|
+
this.previewSrc = "", this.assetTitle = "";
|
|
898
899
|
}
|
|
899
900
|
}
|
|
900
901
|
handleDeleteClick() {
|
|
@@ -906,13 +907,13 @@ let c = class extends D {
|
|
|
906
907
|
}
|
|
907
908
|
renderAssetPreview() {
|
|
908
909
|
if ((this.previewSrc || this.value) && this.acceptsType(g.Image))
|
|
909
|
-
return l`<cx-image part="image" class="asset-picker__image" src=${this.previewSrc || this.value} alt=${this.
|
|
910
|
-
if (this.
|
|
911
|
-
return l`<cx-typography variant="body-2">${$(this.
|
|
912
|
-
if (this.
|
|
913
|
-
const e = this.
|
|
910
|
+
return l`<cx-image part="image" class="asset-picker__image" src=${this.previewSrc || this.value} alt=${this.assetTitle} width="200px" object-fit=${re.Cover}></cx-image>`;
|
|
911
|
+
if (this.assetTitle && (this.acceptsType(g.Audio) || this.acceptsType(g.Video)))
|
|
912
|
+
return l`<cx-typography variant="body-2">${$(this.assetTitle, 30, 11, 11)}</cx-typography>`;
|
|
913
|
+
if (this.assetTitle && (this.acceptsType(g.Other) || this.acceptsType(g.All))) {
|
|
914
|
+
const e = this.assetTitle.split(",");
|
|
914
915
|
return l`<cx-typography variant="body-2">${$(e[0], 30, 11, 11)}
|
|
915
|
-
${
|
|
916
|
+
${N(
|
|
916
917
|
e.length > 1,
|
|
917
918
|
() => l` ${this.localize.term("andOthers", e.length - 1)}`
|
|
918
919
|
)}</cx-typography>`;
|
|
@@ -921,9 +922,9 @@ let c = class extends D {
|
|
|
921
922
|
}
|
|
922
923
|
render() {
|
|
923
924
|
return l`<cx-space part="base" class="asset-picker" spacing="2x-small" direction="horizontal" align-items=${this.acceptsType(g.Image) ? "flex-start" : "center"}>${this.renderAssetPreview()}
|
|
924
|
-
${
|
|
925
|
+
${N(
|
|
925
926
|
!this.disabled,
|
|
926
|
-
() => l`<div part="button-container" class="asset-picker__button-container"><cx-input class="asset-picker__input" aria-label=${this.localize.term("choose")} name=${this.name} value=${this.value} ?required=${this.required} .form=${this.closest("form")}></cx-input><div class="asset-picker__trigger-wrapper"><slot name="trigger" @click=${this.handleRequestAssetClick}><cx-button part="button" class="asset-picker__button">${this.localize.term("choose")}</cx-button></slot></div></div>${
|
|
927
|
+
() => l`<div part="button-container" class="asset-picker__button-container"><cx-input class="asset-picker__input" aria-label=${this.localize.term("choose")} name=${this.name} value=${this.value} ?required=${this.required} .form=${this.closest("form")}></cx-input><div class="asset-picker__trigger-wrapper"><slot name="trigger" @click=${this.handleRequestAssetClick}><cx-button part="button" class="asset-picker__button">${this.localize.term("choose")}</cx-button></slot></div></div>${N(
|
|
927
928
|
this.value,
|
|
928
929
|
() => l`<cx-icon-button label=${this.localize.term("delete")} name="delete" @click=${this.handleDeleteClick}></cx-icon-button>`
|
|
929
930
|
)}
|
|
@@ -940,20 +941,20 @@ c.dependencies = {
|
|
|
940
941
|
"cx-space": T,
|
|
941
942
|
"cx-typography": L
|
|
942
943
|
};
|
|
943
|
-
|
|
944
|
+
p([
|
|
944
945
|
y(".asset-picker__button")
|
|
945
946
|
], c.prototype, "buttonEl", 2);
|
|
946
|
-
|
|
947
|
+
p([
|
|
947
948
|
y(".asset-picker__input")
|
|
948
949
|
], c.prototype, "inputEl", 2);
|
|
949
|
-
|
|
950
|
-
|
|
950
|
+
p([
|
|
951
|
+
r({ reflect: !0, type: String })
|
|
951
952
|
], c.prototype, "value", 2);
|
|
952
|
-
|
|
953
|
-
|
|
953
|
+
p([
|
|
954
|
+
r({ reflect: !0, type: String })
|
|
954
955
|
], c.prototype, "name", 2);
|
|
955
|
-
|
|
956
|
-
|
|
956
|
+
p([
|
|
957
|
+
r({
|
|
957
958
|
converter: {
|
|
958
959
|
fromAttribute: (e) => (e ?? "").split(" ").filter((t) => t !== ""),
|
|
959
960
|
toAttribute: (e) => e.join(" ")
|
|
@@ -961,11 +962,11 @@ u([
|
|
|
961
962
|
reflect: !0
|
|
962
963
|
})
|
|
963
964
|
], c.prototype, "type", 2);
|
|
964
|
-
|
|
965
|
-
|
|
965
|
+
p([
|
|
966
|
+
r({ reflect: !0, type: Boolean })
|
|
966
967
|
], c.prototype, "multiple", 2);
|
|
967
|
-
|
|
968
|
-
|
|
968
|
+
p([
|
|
969
|
+
r({
|
|
969
970
|
converter: {
|
|
970
971
|
fromAttribute: (e) => (e ?? "").split(" ").filter((t) => t !== ""),
|
|
971
972
|
toAttribute: (e) => e.join(" ")
|
|
@@ -973,37 +974,43 @@ u([
|
|
|
973
974
|
reflect: !0
|
|
974
975
|
})
|
|
975
976
|
], c.prototype, "accepts", 2);
|
|
976
|
-
|
|
977
|
-
|
|
977
|
+
p([
|
|
978
|
+
r({ reflect: !0, type: Boolean })
|
|
978
979
|
], c.prototype, "required", 2);
|
|
979
|
-
|
|
980
|
-
|
|
980
|
+
p([
|
|
981
|
+
r({ attribute: "disabled", reflect: !0, type: Boolean })
|
|
981
982
|
], c.prototype, "disabled", 2);
|
|
982
|
-
|
|
983
|
-
|
|
983
|
+
p([
|
|
984
|
+
r({ attribute: "restrict", reflect: !0, type: Boolean })
|
|
985
|
+
], c.prototype, "restrict", 2);
|
|
986
|
+
p([
|
|
987
|
+
r({ attribute: "on-request-asset", type: Function })
|
|
984
988
|
], c.prototype, "onRequestAsset", 2);
|
|
985
|
-
|
|
986
|
-
|
|
989
|
+
p([
|
|
990
|
+
r({ attribute: "record-id", reflect: !0, type: String })
|
|
987
991
|
], c.prototype, "recordId", 2);
|
|
988
|
-
|
|
989
|
-
|
|
992
|
+
p([
|
|
993
|
+
r({ attribute: "is-site-builder", reflect: !0, type: Boolean })
|
|
990
994
|
], c.prototype, "isSiteBuilder", 2);
|
|
991
|
-
|
|
992
|
-
|
|
995
|
+
p([
|
|
996
|
+
b()
|
|
993
997
|
], c.prototype, "previewSrc", 2);
|
|
994
|
-
|
|
998
|
+
p([
|
|
999
|
+
b()
|
|
1000
|
+
], c.prototype, "assetTitle", 2);
|
|
1001
|
+
p([
|
|
995
1002
|
v("value")
|
|
996
1003
|
], c.prototype, "handleValueChange", 1);
|
|
997
|
-
|
|
1004
|
+
p([
|
|
998
1005
|
v("recordId")
|
|
999
1006
|
], c.prototype, "handleRecordIdChange", 1);
|
|
1000
|
-
c =
|
|
1007
|
+
c = p([
|
|
1001
1008
|
z("cx-asset-picker")
|
|
1002
1009
|
], c);
|
|
1003
|
-
const Ne =
|
|
1004
|
-
var xe = Object.defineProperty, fe = Object.getOwnPropertyDescriptor,
|
|
1005
|
-
for (var s = i > 1 ? void 0 : i ? fe(t, a) : t,
|
|
1006
|
-
(d = e[
|
|
1010
|
+
const Ne = j`: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)}`;
|
|
1011
|
+
var xe = Object.defineProperty, fe = Object.getOwnPropertyDescriptor, o = (e, t, a, i) => {
|
|
1012
|
+
for (var s = i > 1 ? void 0 : i ? fe(t, a) : t, u = e.length - 1, d; u >= 0; u--)
|
|
1013
|
+
(d = e[u]) && (s = (i ? d(t, a, s) : d(s)) || s);
|
|
1007
1014
|
return i && s && xe(t, a, s), s;
|
|
1008
1015
|
};
|
|
1009
1016
|
const ye = {
|
|
@@ -1160,14 +1167,14 @@ let n = class extends D {
|
|
|
1160
1167
|
this.translatableControls,
|
|
1161
1168
|
(a) => a.field,
|
|
1162
1169
|
(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,
|
|
1170
|
+
const s = this.localize.languageName(i) || pe.getName(i) || i, u = (d) => {
|
|
1164
1171
|
const m = d.target.value;
|
|
1165
1172
|
this.editedItem = {
|
|
1166
1173
|
...this.editedItem,
|
|
1167
1174
|
[`${a.field}-${i}`]: m
|
|
1168
1175
|
};
|
|
1169
1176
|
};
|
|
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=${
|
|
1177
|
+
return l`<cx-input ?disabled=${i.toLowerCase() === this.defaultLanguage?.toLowerCase()} label=${s} value=${this.editedItem?.[`${a.field}-${i}`] ?? this.editedItem?.[`${a.field}`] ?? ""} @cx-change=${u}></cx-input>`;
|
|
1171
1178
|
})}</cx-space></cx-grid-item></cx-grid>`
|
|
1172
1179
|
)}
|
|
1173
1180
|
`;
|
|
@@ -1182,10 +1189,10 @@ let n = class extends D {
|
|
|
1182
1189
|
[
|
|
1183
1190
|
"image-picker",
|
|
1184
1191
|
() => {
|
|
1185
|
-
const i = async (
|
|
1186
|
-
if (Array.isArray(
|
|
1192
|
+
const i = async (u) => {
|
|
1193
|
+
if (Array.isArray(u.detail))
|
|
1187
1194
|
return;
|
|
1188
|
-
const { id: d, src: m } =
|
|
1195
|
+
const { id: d, src: m } = u.detail;
|
|
1189
1196
|
this.editedItem = {
|
|
1190
1197
|
...this.editedItem,
|
|
1191
1198
|
[t]: m,
|
|
@@ -1226,10 +1233,10 @@ let n = class extends D {
|
|
|
1226
1233
|
return l`<cx-space direction="vertical" align-items="flex-start"><div class="list-editor"><cx-table part="table" class=${ee({
|
|
1227
1234
|
"list-editor__table": !0,
|
|
1228
1235
|
"list-editor__table--no-header": this.noHeader
|
|
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=${
|
|
1236
|
+
})} ?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=${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>${N(
|
|
1230
1237
|
!this.isAdding && this.editedItem?.[this.displayField],
|
|
1231
1238
|
() => l`<cx-typography variant="body3"><cx-line-clamp lines="1">${this.editedItem?.[this.displayField]}</cx-line-clamp></cx-typography>`
|
|
1232
|
-
)}</cx-space>${
|
|
1239
|
+
)}</cx-space>${N(
|
|
1233
1240
|
this.tabs.length >= 1,
|
|
1234
1241
|
() => l`<cx-tab-group class="list-editor__tab-group" placement="top">${x(
|
|
1235
1242
|
this.tabs,
|
|
@@ -1237,7 +1244,7 @@ let n = class extends D {
|
|
|
1237
1244
|
(e) => l`<cx-tab slot="nav" panel=${e}>${this.localize.term(e)}</cx-tab><cx-tab-panel name=${e}><cx-space direction="vertical" spacing="x-small" wrap="nowrap">${this.renderControls(e)}</cx-space></cx-tab-panel>`
|
|
1238
1245
|
)}</cx-tab-group>`,
|
|
1239
1246
|
() => l`<cx-space direction="vertical" spacing="x-small" wrap="nowrap">${this.renderControls(this.tabs[0])}</cx-space>`
|
|
1240
|
-
)}<cx-space slot="footer" spacing="x-small" wrap="nowrap" justify-content="end"><cx-button data-testid="cancel-button" variant="default" size="medium" @click=${this.handleCancelClick}>${this.localize.term("cancel")}</cx-button><cx-button data-testid="save-button" variant="primary" size="medium" @click=${this.handleSaveClick}>${this.localize.term("save")}</cx-button></cx-space></cx-dialog></div>${
|
|
1247
|
+
)}<cx-space slot="footer" spacing="x-small" wrap="nowrap" justify-content="end"><cx-button data-testid="cancel-button" variant="default" size="medium" @click=${this.handleCancelClick}>${this.localize.term("cancel")}</cx-button><cx-button data-testid="save-button" variant="primary" size="medium" @click=${this.handleSaveClick}>${this.localize.term("save")}</cx-button></cx-space></cx-dialog></div>${N(
|
|
1241
1248
|
this.canAdd,
|
|
1242
1249
|
() => l`<cx-button data-testid="add-button" variant="default" size="medium" @click=${this.handleAddClick}>${this.addItemText || this.localize.term("add")}</cx-button>`
|
|
1243
1250
|
)}</cx-space>`;
|
|
@@ -1247,7 +1254,7 @@ n.styles = [M, Ne];
|
|
|
1247
1254
|
n.dependencies = {
|
|
1248
1255
|
"cx-asset-picker": c,
|
|
1249
1256
|
"cx-button": k,
|
|
1250
|
-
"cx-dialog":
|
|
1257
|
+
"cx-dialog": G,
|
|
1251
1258
|
"cx-dynamic-select": X,
|
|
1252
1259
|
"cx-grid": B,
|
|
1253
1260
|
"cx-grid-item": F,
|
|
@@ -1261,14 +1268,14 @@ n.dependencies = {
|
|
|
1261
1268
|
"cx-table": W,
|
|
1262
1269
|
"cx-typography": L
|
|
1263
1270
|
};
|
|
1264
|
-
|
|
1271
|
+
o([
|
|
1265
1272
|
y("cx-dialog")
|
|
1266
1273
|
], n.prototype, "dialog", 2);
|
|
1267
|
-
|
|
1274
|
+
o([
|
|
1268
1275
|
y("cx-table")
|
|
1269
1276
|
], n.prototype, "table", 2);
|
|
1270
|
-
|
|
1271
|
-
|
|
1277
|
+
o([
|
|
1278
|
+
r({
|
|
1272
1279
|
converter: {
|
|
1273
1280
|
fromAttribute: (e) => {
|
|
1274
1281
|
try {
|
|
@@ -1284,53 +1291,53 @@ r([
|
|
|
1284
1291
|
type: String
|
|
1285
1292
|
})
|
|
1286
1293
|
], n.prototype, "data", 2);
|
|
1287
|
-
|
|
1288
|
-
|
|
1294
|
+
o([
|
|
1295
|
+
r({ attribute: "can-add", reflect: !0, type: Boolean })
|
|
1289
1296
|
], n.prototype, "canAdd", 2);
|
|
1290
|
-
|
|
1291
|
-
|
|
1297
|
+
o([
|
|
1298
|
+
r({ attribute: "add-dialog-label", reflect: !0, type: String })
|
|
1292
1299
|
], n.prototype, "addDialogLabel", 2);
|
|
1293
|
-
|
|
1294
|
-
|
|
1300
|
+
o([
|
|
1301
|
+
r({ attribute: "edit-dialog-label", reflect: !0, type: String })
|
|
1295
1302
|
], n.prototype, "editDialogLabel", 2);
|
|
1296
|
-
|
|
1297
|
-
|
|
1303
|
+
o([
|
|
1304
|
+
r({ attribute: "display-field", reflect: !0, type: String })
|
|
1298
1305
|
], n.prototype, "displayField", 2);
|
|
1299
|
-
|
|
1300
|
-
|
|
1306
|
+
o([
|
|
1307
|
+
r({ attribute: "description-field", reflect: !0, type: String })
|
|
1301
1308
|
], n.prototype, "descriptionField", 2);
|
|
1302
|
-
|
|
1303
|
-
|
|
1309
|
+
o([
|
|
1310
|
+
r({ attribute: "add-item-text", reflect: !0, type: String })
|
|
1304
1311
|
], n.prototype, "addItemText", 2);
|
|
1305
|
-
|
|
1306
|
-
|
|
1312
|
+
o([
|
|
1313
|
+
r({ attribute: "sample-item", type: Object })
|
|
1307
1314
|
], n.prototype, "sampleItem", 2);
|
|
1308
|
-
|
|
1309
|
-
|
|
1315
|
+
o([
|
|
1316
|
+
r({ attribute: "use-events", reflect: !0, type: Boolean })
|
|
1310
1317
|
], n.prototype, "useEvents", 2);
|
|
1311
|
-
|
|
1312
|
-
|
|
1318
|
+
o([
|
|
1319
|
+
r({ reflect: !0, type: Boolean })
|
|
1313
1320
|
], n.prototype, "sortable", 2);
|
|
1314
|
-
|
|
1315
|
-
|
|
1321
|
+
o([
|
|
1322
|
+
r({ attribute: "loading-event", reflect: !0, type: String })
|
|
1316
1323
|
], n.prototype, "loadingEvent", 2);
|
|
1317
|
-
|
|
1318
|
-
|
|
1324
|
+
o([
|
|
1325
|
+
r({ attribute: "loading-item-index", reflect: !0, type: String })
|
|
1319
1326
|
], n.prototype, "loadingItemIndex", 2);
|
|
1320
|
-
|
|
1321
|
-
|
|
1327
|
+
o([
|
|
1328
|
+
r({ attribute: "columns", reflect: !1, type: Array })
|
|
1322
1329
|
], n.prototype, "columns", 2);
|
|
1323
|
-
|
|
1324
|
-
|
|
1330
|
+
o([
|
|
1331
|
+
r({ attribute: "no-header", reflect: !0, type: Boolean })
|
|
1325
1332
|
], n.prototype, "noHeader", 2);
|
|
1326
|
-
|
|
1327
|
-
|
|
1333
|
+
o([
|
|
1334
|
+
r({ attribute: "row-height", reflect: !0, type: Number })
|
|
1328
1335
|
], n.prototype, "rowHeight", 2);
|
|
1329
|
-
|
|
1330
|
-
|
|
1336
|
+
o([
|
|
1337
|
+
r({ attribute: "default-language", reflect: !0, type: String })
|
|
1331
1338
|
], n.prototype, "defaultLanguage", 2);
|
|
1332
|
-
|
|
1333
|
-
|
|
1339
|
+
o([
|
|
1340
|
+
r({
|
|
1334
1341
|
attribute: "supported-languages",
|
|
1335
1342
|
converter: {
|
|
1336
1343
|
fromAttribute: (e) => e.split(" ").filter(Boolean),
|
|
@@ -1340,41 +1347,41 @@ r([
|
|
|
1340
1347
|
type: Array
|
|
1341
1348
|
})
|
|
1342
1349
|
], n.prototype, "supportedLanguages", 2);
|
|
1343
|
-
|
|
1344
|
-
|
|
1350
|
+
o([
|
|
1351
|
+
r({ type: Object })
|
|
1345
1352
|
], n.prototype, "boundary", 2);
|
|
1346
|
-
|
|
1347
|
-
|
|
1353
|
+
o([
|
|
1354
|
+
r({ attribute: "on-request-asset", type: Function })
|
|
1348
1355
|
], n.prototype, "onRequestAsset", 2);
|
|
1349
|
-
|
|
1350
|
-
|
|
1356
|
+
o([
|
|
1357
|
+
b()
|
|
1351
1358
|
], n.prototype, "editedItem", 2);
|
|
1352
|
-
|
|
1353
|
-
|
|
1359
|
+
o([
|
|
1360
|
+
b()
|
|
1354
1361
|
], n.prototype, "isAdding", 2);
|
|
1355
|
-
|
|
1356
|
-
|
|
1362
|
+
o([
|
|
1363
|
+
b()
|
|
1357
1364
|
], n.prototype, "columnsMap", 2);
|
|
1358
|
-
|
|
1359
|
-
|
|
1365
|
+
o([
|
|
1366
|
+
b()
|
|
1360
1367
|
], n.prototype, "sortedEntries", 2);
|
|
1361
|
-
|
|
1362
|
-
|
|
1368
|
+
o([
|
|
1369
|
+
b()
|
|
1363
1370
|
], n.prototype, "translatableControls", 2);
|
|
1364
|
-
|
|
1371
|
+
o([
|
|
1365
1372
|
v("columns"),
|
|
1366
1373
|
v("supportedLanguages", { waitUntilFirstUpdate: !0 })
|
|
1367
1374
|
], n.prototype, "handleColumnsChange", 1);
|
|
1368
|
-
|
|
1375
|
+
o([
|
|
1369
1376
|
v("editedItem"),
|
|
1370
1377
|
v("columns", { waitUntilFirstUpdate: !0 })
|
|
1371
1378
|
], n.prototype, "handleEditedItemChange", 1);
|
|
1372
|
-
|
|
1379
|
+
o([
|
|
1373
1380
|
v("loadingEvent", { waitUntilFirstUpdate: !0 }),
|
|
1374
1381
|
v("loadingItemIndex", { waitUntilFirstUpdate: !0 }),
|
|
1375
1382
|
Y(10)
|
|
1376
1383
|
], n.prototype, "handleLoadingEventChange", 1);
|
|
1377
|
-
n =
|
|
1384
|
+
n = o([
|
|
1378
1385
|
z("cx-list-editor")
|
|
1379
1386
|
], n);
|
|
1380
1387
|
export {
|
|
@@ -3,7 +3,7 @@ import { C as B } from "../chunks/button.DcInI7IV.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.
|
|
6
|
+
import { c as rt, d as ht } from "../chunks/asset.D_VITxRH.js";
|
|
7
7
|
import { c as E } from "../chunks/component.styles.CRO4Odto.js";
|
|
8
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";
|
|
@@ -33,7 +33,7 @@ import { default as Te } from "./format-number.js";
|
|
|
33
33
|
import { default as De } from "./format-time.js";
|
|
34
34
|
import { default as Be } from "./grid.js";
|
|
35
35
|
import { default as he } from "./grid-item.js";
|
|
36
|
-
import { C as Pe } from "../chunks/header.
|
|
36
|
+
import { C as Pe } from "../chunks/header.WRWyUU36.js";
|
|
37
37
|
import { C as Me } from "../chunks/hub-connection.Dri0ZNfh.js";
|
|
38
38
|
import { f } from "../chunks/icon.DnBh6-56.js";
|
|
39
39
|
import { C as Fe } from "../chunks/icon.DnBh6-56.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./copy-button.js";
|
|
2
2
|
import "../chunks/lib-cortex-element.CVMmyPMC.js";
|
|
3
3
|
import "../chunks/component.styles.CRO4Odto.js";
|
|
4
|
-
import { C as x } from "../chunks/header.
|
|
4
|
+
import { C as x } from "../chunks/header.WRWyUU36.js";
|
|
5
5
|
import "../chunks/custom-element.L4WJXn1j.js";
|
|
6
6
|
import "../chunks/i18n.NAH4U8Lw.js";
|
|
7
7
|
import "../chunks/watch.CThbualB.js";
|
|
@@ -18,7 +18,7 @@ import "../chunks/custom-element.L4WJXn1j.js";
|
|
|
18
18
|
import "../chunks/debounce.DaHuiSGU.js";
|
|
19
19
|
import "../chunks/i18n.NAH4U8Lw.js";
|
|
20
20
|
import "../chunks/watch.CThbualB.js";
|
|
21
|
-
import { c as E, C as F } from "../chunks/list-editor.
|
|
21
|
+
import { c as E, C as F } from "../chunks/list-editor.CyHNKjuZ.js";
|
|
22
22
|
import "../chunks/lit-element.jLBm65_O.js";
|
|
23
23
|
import "../chunks/state.CSDxrqLd.js";
|
|
24
24
|
import "../chunks/query.BBf1UFkC.js";
|
|
@@ -6,7 +6,7 @@ import { default as s } from "./corner-position-input-group.js";
|
|
|
6
6
|
import { default as m } from "./cropper.js";
|
|
7
7
|
import { default as i } from "./dynamic-select.js";
|
|
8
8
|
import { C as c } from "../chunks/folder-select.CDFQfcrG.js";
|
|
9
|
-
import { C as P } from "../chunks/list-editor.
|
|
9
|
+
import { C as P } from "../chunks/list-editor.CyHNKjuZ.js";
|
|
10
10
|
import { default as I } from "./masonry.js";
|
|
11
11
|
import { default as y } from "./padding-input-group.js";
|
|
12
12
|
import { default as w } from "./position-picker.js";
|